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
Create a project in SonarQube.
public boolean createProject(String name, String key) { List<NameValuePair> param = new ArrayList<>(); param.add(new BasicNameValuePair("name", name)); param.add(new BasicNameValuePair("key", key)); Map<String, String> props = new HashMap<>(); props.put("Authorization", Authentication.getBasicAuth("sonar")); String url = Host.getSonar() + "api/projects/create"; try { Object[] response = HttpUtils.sendPost(url, param, props); if (Integer.parseInt(response[0].toString()) == 200) return true; } catch (Exception e) { logger.error("Create sonar project: POST request error.", e); } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Project createProject();", "Project createProject();", "Project createProject();", "@TaskAction\n public void createProject()\n throws IOException {\n String projectName = getProjectName();\n\n // Get the output directory\n String outputDir = \"build/\";\n String projectFolderPath = outputDir + PROJECT_PREFIX + PROJECT_PREFIX_INTEGRATION + projectName;\n Path outputPath = getProject().mkdir(new File(projectFolderPath)).toPath();\n\n // Build the project\n new ProjectBuilder(projectName, outputPath, getProject()).build();\n }", "@ApiMethod(\n \t\tname = \"createProject\", \n \t\tpath = \"createProject\", \n \t\thttpMethod = HttpMethod.POST)\n public Project createProject(final ProjectForm projectForm) {\n\n final Key<Project> projectKey = factory().allocateId(Project.class);\n final long projectId = projectKey.getId();\n final Queue queue = QueueFactory.getDefaultQueue();\n \n // Start transactions\n Project project = ofy().transact(new Work<Project>(){\n \t@Override\n \tpublic Project run(){\n \t\tProject project = new Project(projectId, projectForm);\n ofy().save().entities(project).now();\n \n return project;\n \t}\n }); \n return project;\n }", "public CreateProject() {\n\t\tsuper();\n\t}", "public void createProject(Project newProject);", "public void createProject(String name) {\n Project project = new Project(name);\n Leader leader = new Leader(this, project);\n project.addLeader(leader);\n }", "@Override\n\tpublic void createProject(ProjectCreate project) {\n\t\tprojectDao.createProject(project);\n\t}", "@Test\n\tpublic void testCreate() throws Exception {\n\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\n\t\tDate startDate = new Date();\n\t\tCalendar calendar = new GregorianCalendar();\n\t\tcalendar.setTime(startDate);\n\t\tcalendar.add(Calendar.MONTH, 2);\n\t\t//\"name\":\"mizehau\",\"introduction\":\"dkelwfjw\",\"validityStartTime\":\"2015-12-08 15:06:21\",\"validityEndTime\":\"2015-12-10 \n\n\t\t//15:06:24\",\"cycle\":\"12\",\"industry\":\"1202\",\"area\":\"2897\",\"remuneration\":\"1200\",\"taskId\":\"TVRRME9UVTFPRE0zT0RBeU1EQXdNRFkyTVRnMU9EQTU=\"\n\t\tProject a = new Project();\n\t\tDate endDate = calendar.getTime();\n\t\tString name = \"mizehau\";\n\t\tString introduction = \"dkelwfjw\";\n\t\tString industry = \"1202\";\n\t\tString area = \"test闫伟旗创建项目\";\n\t\t//String document = \"test闫伟旗创建项目\";\n\t\tint cycle = 12;\n\t\tString taskId = \"TVRRME9UVTFPRE0zT0RBeU1EQXdNRFkyTVRnMU9EQTU=\";\n\t\tdouble remuneration = 1200;\n\t\tTimestamp validityStartTime = Timestamp.valueOf(sdf.format(startDate));\n\t\tTimestamp validityEndTime = Timestamp.valueOf(sdf.format(endDate));\n\t\ta.setArea(area);\n\t\ta.setName(name);\n\t\ta.setIntroduction(introduction);\n\t\ta.setValidityStartTime(validityStartTime);\n\t\ta.setValidityEndTime(validityEndTime);\n\t\ta.setCycle(cycle);\n\t\ta.setIndustry(industry);\n\t\ta.setRemuneration(remuneration);\n\t\ta.setDocument(taskId);\n\t\tProject p = projectService.create(a);\n\t\tSystem.out.println(p);\n\t}", "public static Project creer(String name){\n\t\treturn new Project(name);\n\t}", "private boolean createProject() {\r\n ProjectOverviewerApplication app = (ProjectOverviewerApplication)getApplication();\r\n Projects projects = app.getProjects();\r\n String userHome = System.getProperty(\"user.home\");\r\n // master file for projects management\r\n File projectsFile = new File(userHome + \"/.hackystat/projectoverviewer/projects.xml\");\r\n \r\n // create new project and add it to the projects\r\n Project project = new Project();\r\n project.setProjectName(this.projectName);\r\n project.setOwner(this.ownerName);\r\n project.setPassword(this.password);\r\n project.setSvnUrl(this.svnUrl);\r\n for (Project existingProject : projects.getProject()) {\r\n if (existingProject.getProjectName().equalsIgnoreCase(this.projectName)) {\r\n return false;\r\n }\r\n }\r\n projects.getProject().add(project);\r\n \r\n try {\r\n // create the specific tm3 file and xml file for the new project\r\n File tm3File = new File(userHome + \r\n \"/.hackystat/projectoverviewer/\" + this.projectName + \".tm3\");\r\n File xmlFile = new File(userHome + \r\n \"/.hackystat/projectoverviewer/\" + this.projectName + \".xml\");\r\n tm3File.createNewFile();\r\n \r\n // initialize the data for the file\r\n SensorDataCollector collector = new SensorDataCollector(app.getSensorBaseHost(), \r\n this.ownerName, \r\n this.password);\r\n collector.getRepository(this.svnUrl, this.projectName);\r\n collector.write(tm3File, xmlFile);\r\n } \r\n catch (IOException e) {\r\n e.printStackTrace();\r\n return false;\r\n }\r\n // write the projects.xml file with the new project added\r\n String packageName = \"org.hackystat.iw.projectoverviewer.jaxb.projects\";\r\n return XmlConverter.objectToXml(projects, projectsFile, packageName);\r\n }", "public JiraProjectCreationResult createProject(\r\n String token, JiraProject project, JiraVersion version, ComponentType type) throws JiraManagerException {\r\n Util.logEnter(log, \"createProject\", token, project, version, type);\r\n Util.checkString(log, \"token\", token);\r\n Util.checkNull(log, \"project\", project);\r\n Util.checkNull(log, \"version\", version);\r\n Util.checkNull(log, \"type\", type);\r\n\r\n try {\r\n JiraProjectCreationResult result =\r\n getJiraManagementServicePort().createProject(token, project, version, type);\r\n Util.logExit(log, \"createProject\", result);\r\n return result;\r\n } catch (JiraServiceException e) {\r\n throw processError(e);\r\n }\r\n }", "@PostMapping(\"/projects\")\n @Timed\n public ResponseEntity<ProjectDTO> createProject(@Valid @RequestBody ProjectDTO projectDto)\n throws URISyntaxException, NotAuthorizedException {\n log.debug(\"REST request to save Project : {}\", projectDto);\n var org = projectDto.getOrganization();\n if (org == null || org.getName() == null) {\n throw new BadRequestException(\"Organization must be provided\",\n ENTITY_NAME, ERR_VALIDATION);\n }\n checkPermissionOnOrganization(token, PROJECT_CREATE, org.getName());\n\n if (projectDto.getId() != null) {\n return ResponseEntity.badRequest()\n .headers(HeaderUtil.createFailureAlert(\n ENTITY_NAME, \"idexists\", \"A new project cannot already have an ID\"))\n .body(null);\n }\n if (projectRepository.findOneWithEagerRelationshipsByName(projectDto.getProjectName())\n .isPresent()) {\n return ResponseEntity.badRequest()\n .headers(HeaderUtil.createFailureAlert(\n ENTITY_NAME, \"nameexists\", \"A project with this name already exists\"))\n .body(null);\n }\n ProjectDTO result = projectService.save(projectDto);\n return ResponseEntity.created(ResourceUriService.getUri(result))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getProjectName()))\n .body(result);\n }", "@Test (groups = {\"Functional\"})\n public void testAddProject() {\n //When\n CreateProject createProject = dashboard.clickCreateProjectButton();\n String projectName = \"TestProject\";\n String testAccount = \"Account1\";\n createProject.setProjectName(projectName);\n createProject.clickPublicProjectPrivacy();\n createProject.setAccountDropDown(testAccount);\n project = createProject.clickCreateProject();\n\n //Then\n assertEquals(PROJECT_NAME, project.getTitle());\n }", "public Long createProject(ProjectTo projectTo) {\n\t\tprojectTo = new ProjectTo();\n\t\tprojectTo.setOrg_id(1L);\n\t\tprojectTo.setOrg_name(\"AP\");\n\t\tprojectTo.setName(\"Menlo\");\n\t\tprojectTo.setShort_name(\"Pioneer Towers\");\n\t\tprojectTo.setOwner_username(\"Madhapur\");\n\n\t\ttry {\n\t\t\tWebResource webResource = getJerseyClient(userOptixURL + \"CreateProject\");\n\t\t\tprojectTo = webResource.type(MediaType.APPLICATION_JSON).post(ProjectTo.class, projectTo);\n\t\t\tif(projectTo != null && projectTo.getProject_id() != null) {\n\t\t\t\treturn projectTo.getProject_id() ;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error in getting the response from REST call CreateProject : \"+e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "public OperationReference queueCreateProject(\r\n final TeamProject projectToCreate) {\r\n\r\n final UUID locationId = UUID.fromString(\"603fe2ac-9723-48b9-88ad-09305aa6c6e1\"); //$NON-NLS-1$\r\n final ApiResourceVersion apiVersion = new ApiResourceVersion(\"2.1\"); //$NON-NLS-1$\r\n\r\n final Object httpRequest = super.createRequest(HttpMethod.POST,\r\n locationId,\r\n apiVersion,\r\n projectToCreate,\r\n APPLICATION_JSON_TYPE,\r\n APPLICATION_JSON_TYPE);\r\n\r\n return super.sendRequest(httpRequest, OperationReference.class);\r\n }", "LectureProject createLectureProject();", "@PostMapping\n public ResponseEntity<Project> createNewProject(@Valid @RequestBody Project project) {\n\n Project project1 = projectService.saveOrUpdateProject(project);\n return new ResponseEntity<Project>(project1, HttpStatus.CREATED);\n }", "private IProject createNewProject() {\r\n\t\tif (newProject != null) {\r\n\t\t\treturn newProject;\r\n\t\t}\r\n\r\n\t\t// get a project handle\r\n\t\tfinal IProject newProjectHandle = mainPage.getProjectHandle();\r\n\r\n\t\t// get a project descriptor\r\n\t\tURI location = mainPage.getLocationURI();\r\n\r\n\t\tIWorkspace workspace = ResourcesPlugin.getWorkspace();\r\n\t\tfinal IProjectDescription description = workspace.newProjectDescription(newProjectHandle.getName());\r\n\t\tdescription.setLocationURI(location);\r\n\r\n\t\tlog.info(\"Project name: \" + newProjectHandle.getName());\r\n\t\t//log.info(\"Location: \" + location.toString());\r\n\t\t\r\n\t\t// create the new project operation\r\n\t\tIRunnableWithProgress op = new IRunnableWithProgress() {\r\n\t\t\tpublic void run(IProgressMonitor monitor)\r\n\t\t\t\t\tthrows InvocationTargetException {\r\n\t\t\t\tCreateProjectOperation op = new CreateProjectOperation(description, ResourceMessages.NewProject_windowTitle);\r\n\t\t\t\ttry {\r\n\t\t\t\t\top.execute(monitor, WorkspaceUndoUtil.getUIInfoAdapter(getShell()));\r\n\t\t\t\t} catch (ExecutionException e) {\r\n\t\t\t\t\tthrow new InvocationTargetException(e);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t// run the new project creation operation\r\n\t\ttry {\r\n\t\t\tgetContainer().run(true, true, op);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\tlog.error(\"Project creation failed.\");\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t} catch (InvocationTargetException e) {\r\n\t\t\tlog.error(\"Project creation failed.\");\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tnewProject = newProjectHandle;\r\n\r\n\t\treturn newProject;\r\n\t}", "public static IProject createProject(String projectName, URI location) {\n \n IProject project = createBaseProject(projectName, location);\n try {\n addNature(project);\n String[] paths = {CLASSES_FOLDER};\n addToProjectStructure(project,paths);\n addProjectFiles(project);\n } catch (CoreException e) {\n e.printStackTrace();\n project = null;\n }\n \n return project;\n }", "protected void createProject(IProgressMonitor monitor)\n {\n monitor.beginTask(\"Creating the Totori project\", 50);\n try\n {\n IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();\n monitor.subTask(\"Defining the nature of the project\");\n IProject project = root.getProject(page.getProjectName());\n IProjectDescription description = ResourcesPlugin.getWorkspace().newProjectDescription(project.getName());\n if(!Platform.getLocation().equals(page.getLocationPath()))\n description.setLocation(page.getLocationPath());\n project.create(description,monitor);\n monitor.worked(10);\n project.open(monitor);\n description = project.getDescription();\n description.setNatureIds(new String[] { TotoriNature.NATURE_ID });\n project.setDescription(description,new SubProgressMonitor(monitor,10));\n monitor.subTask(\"Creating subdirectories\");\n createFolderHelper(root.getFolder(project.getFullPath().append(\"config\")), monitor);\n createFolderHelper(root.getFolder(project.getFullPath().append(\"ext\")), monitor);\n createFolderHelper(root.getFolder(project.getFullPath().append(\"ext\").append(\"nircmd\")), monitor);\n createFolderHelper(root.getFolder(project.getFullPath().append(\"features\")), monitor);\n createFolderHelper(root.getFolder(project.getFullPath().append(\"features\").append(\"plugins\")), monitor);\n createFolderHelper(root.getFolder(project.getFullPath().append(\"features\").append(\"steps\")), monitor);\n createFolderHelper(root.getFolder(project.getFullPath().append(\"features\").append(\"support\")), monitor);\n createFolderHelper(root.getFolder(project.getFullPath().append(\"reports\")), monitor);\n createFolderHelper(root.getFolder(project.getFullPath().append(\"reports\").append(\"assets\")), monitor);\n createFolderHelper(root.getFolder(project.getFullPath().append(\"reports\").append(\"screens\")), monitor);\n project.setDescription(description,new SubProgressMonitor(monitor,10));\n monitor.subTask(\"Creating files\");\n Vector<String> assets = new Vector<String>();\n assets.add(\"config/myconfig.yml\");\n assets.add(\"ext/nircmd/nircmd.chm\");\n assets.add(\"ext/nircmd/nircmd.exe\");\n assets.add(\"ext/nircmd/nircmdc.exe\");\n assets.add(\"features/support/env.rb\");\n assets.add(\"features/support/functions.rb\");\n assets.add(\"features/support/screenshots.rb\");\n assets.add(\"features/support/totori_formatter.rb\");\n assets.add(\"reports/assets/jquery-1.4.1.min.js\");\n assets.add(\"reports/assets/jquery.lightbox-0.5.css\");\n assets.add(\"reports/assets/jquery.lightbox-0.5.min.js\");\n assets.add(\"reports/assets/jquery.thumbs.js\");\n assets.add(\"reports/assets/lightbox-blank.gif\");\n assets.add(\"reports/assets/lightbox-btn-close.gif\");\n assets.add(\"reports/assets/lightbox-btn-next.gif\");\n assets.add(\"reports/assets/lightbox-btn-prev.gif\");\n assets.add(\"reports/assets/lightbox-ico-loading.gif\");\n assets.add(\"reports/assets/search.png\");\n assets.add(\"reports/assets/thumbs.css\");\n assets.add(\"reports/assets/totori.css\");\n for(String asset : assets) {\n \t String resource = \"/assets/\"+asset;\n \t InputStream stream = this.getClass().getResourceAsStream(resource);\n \t System.out.println(resource + \" : \" + stream);\n IPath path = project.getFullPath();\n for(String dir : asset.split(\"/\")) {\n \t path = path.append(dir);\n }\n IFile file = root.getFile(path);\n //file.getFullPath().toFile().mkdirs();\n //file.setCharset(\"utf-8\", monitor);\n file.create(stream, false, monitor);\n }\n monitor.worked(20);\n }\n catch(CoreException x)\n {\n reportError(x);\n }\n finally\n {\n monitor.done();\n }\n }", "public static Projects createEntity() {\n Projects projects = new Projects();\n projects = new Projects()\n .name(DEFAULT_NAME)\n .startDate(DEFAULT_START_DATE)\n .endDate(DEFAULT_END_DATE)\n .status(DEFAULT_STATUS);\n return projects;\n }", "public static Project Create(String id)\n\t{\n\t\t// Need to use an ancestor query to do this inside a transaction.\n\t\t// But the ancestor of project is project.\n\t\t// So we just create a normal key with only the type and id\n\t\tproject = ofy().load().key(Key.create(Project.class, id)).now();\n\n\t\treturn project;\n\t}", "@RequestMapping(value = \"/create/project/{projectId}\", method = RequestMethod.GET)\r\n public ModelAndView create(@PathVariable(\"projectId\") String projectId) {\r\n ModelAndView mav = new ModelAndView(\"creates2\");\r\n int pid = -1;\r\n try {\r\n pid = Integer.parseInt(projectId);\r\n } catch (Exception e) {\r\n LOG.error(e);\r\n }\r\n User loggedIn = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();\r\n User user = hibernateTemplate.get(User.class, loggedIn.getUsername());\r\n Project project = hibernateTemplate.get(Project.class, pid);\r\n if (!dataAccessService.isProjectAvailableToUser(project, user)) {\r\n return accessdenied();\r\n }\r\n List<SubProject> subProjects = dataAccessService.getResearcherSubProjectsForUserInProject(user, project);\r\n mav.addObject(\"projectId\", projectId);\r\n mav.addObject(\"methods\", project.getMethods());\r\n mav.addObject(\"subProjects\", subProjects);\r\n return mav;\r\n }", "public static void newProject() {\n\n //create the arena representation\n //populateBlocks();\n //populateSensors();\n }", "private static void createProject(final ProjectProperties props, final Path projectDir) throws IOException\n {\n // Create and set the Freemarker configuration\n final Configuration freeMarkerConfig = new Configuration();\n final File templateDir = new File(props.getApiDirectory(), \"templates\");\n freeMarkerConfig.setDirectoryForTemplateLoading(templateDir);\n freeMarkerConfig.setObjectWrapper(new DefaultObjectWrapper());\n\n // Generate the project\n final Injector injector = Guice.createInjector(new UtilInjectionModule(), new LocalInjectionModule());\n final ProjectGenerator projectGen = injector.getInstance(ProjectGenerator.class);\n projectGen.initialize(freeMarkerConfig, OUT_STREAM);\n try\n {\n projectGen.create(props, projectDir.toFile());\n }\n catch (final Exception ex)\n {\n OUT_STREAM.println(\"Error generating the project: \" + ex.getMessage());\n }\n }", "private static IProject createBaseProject(String projectName, URI location) {\n // it is acceptable to use the ResourcesPlugin class\n IProject newProject = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);\n \n if (!newProject.exists()) {\n URI projectLocation = location;\n IProjectDescription desc = newProject.getWorkspace().newProjectDescription(newProject.getName());\n if (location != null && ResourcesPlugin.getWorkspace().getRoot().getLocationURI().equals(location)) {\n projectLocation = null;\n }\n \n desc.setLocationURI(projectLocation);\n try {\n newProject.create(desc, null);\n if (!newProject.isOpen()) {\n newProject.open(null);\n }\n } catch (CoreException e) {\n e.printStackTrace();\n }\n }\n \n return newProject;\n }", "public void createProject(String nameProject, String nameDiscipline) throws \n InvalidDisciplineException,InvalidProjectException{\n int id = _person.getId();\n Professor _professor = getProfessors().get(id);\n _professor.createProject(nameProject, nameDiscipline);\n }", "private Project(){}", "void build(String name, Project project);", "public RepositoryArtifact createProject(RepositoryConnector connector, String rootFolderId, String projectName, String processDefinitionXml) {\r\n RepositoryArtifact result = null;\r\n try {\r\n ZipInputStream projectTemplateInputStream = new ZipInputStream(getProjectTemplate());\r\n ZipEntry zipEntry = null;\r\n \r\n String rootSubstitution = null;\r\n \r\n while ((zipEntry = projectTemplateInputStream.getNextEntry()) != null) {\r\n String zipName = zipEntry.getName();\r\n if (zipName.endsWith(\"/\")) {\r\n zipName = zipName.substring(0, zipName.length() - 1);\r\n }\r\n String path = \"\";\r\n String name = zipName;\r\n if (zipName.contains(\"/\")) {\r\n path = zipName.substring(0, zipName.lastIndexOf(\"/\"));\r\n name = zipName.substring(zipName.lastIndexOf(\"/\") + 1);\r\n }\r\n if (\"\".equals(path)) {\r\n // root folder is named after the project, not like the\r\n // template\r\n // folder name\r\n rootSubstitution = name;\r\n name = projectName;\r\n } else {\r\n // rename the root folder in all other paths as well\r\n path = path.replace(rootSubstitution, projectName);\r\n }\r\n String absolutePath = rootFolderId + \"/\" + path;\r\n boolean isBpmnModel = false;\r\n if (zipEntry.isDirectory()) {\r\n connector.createFolder(absolutePath, name);\r\n } else {\r\n Content content = new Content();\r\n \r\n if (\"template.bpmn20.xml\".equals(name)) {\r\n // This file shall be replaced with the process\r\n // definition\r\n content.setValue(processDefinitionXml);\r\n name = projectName + \".bpmn20.xml\";\r\n isBpmnModel = true;\r\n log.log(Level.INFO, \"Create processdefinition from Signavio process model \" + projectName);\r\n } else {\r\n byte[] bytes = IoUtil.readInputStream(projectTemplateInputStream, \"ZIP entry '\" + zipName + \"'\");\r\n String txtContent = new String(bytes).replaceAll(REPLACE_STRING, projectName).replaceAll(\"@@ACTIVITI.HOME@@\", ACTIVITI_HOME_PATH);\r\n content.setValue(txtContent);\r\n }\r\n log.log(Level.INFO, \"Create new artifact from zip entry '\" + zipEntry.getName() + \"' in folder '\" + absolutePath + \"' with name '\" + name + \"'\");\r\n RepositoryArtifact artifact = connector.createArtifact(absolutePath, name, null, content);\r\n if (isBpmnModel) {\r\n result = artifact;\r\n }\r\n }\r\n projectTemplateInputStream.closeEntry();\r\n }\r\n projectTemplateInputStream.close();\r\n } catch (IOException ex) {\r\n throw new RepositoryException(\"Couldn't create maven project due to IO errors\", ex);\r\n }\r\n return result;\r\n }", "@Test\n @org.junit.Ignore\n public void testProject_1()\n throws Exception {\n\n Project result = new Project();\n\n assertNotNull(result);\n assertEquals(null, result.getName());\n assertEquals(null, result.getWorkloadNames());\n assertEquals(null, result.getProductName());\n assertEquals(null, result.getComments());\n assertEquals(null, result.getCreator());\n assertEquals(0, result.getId());\n assertEquals(null, result.getModified());\n assertEquals(null, result.getCreated());\n }", "private void newProject()\n\t{\n\t\tnew FenetreCreationProjet();\n\t}", "public int createProject(File jarFile, String packageName, boolean isSource) {\n try {\n projectData = projectLoader.createProject(jarFile, packageName, isSource);\n\n } catch (FileNotFoundException ex) {\n \n return 1; // can not find ini file\n } catch (Exception ex) {\n \n return 2; // can not load import classes data\n \n } catch (TokenMgrError tm) {\n \n return 2; // can not load import classes data\n }\n\n\n return 0;\n \n }", "private void actionNewProject ()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tDataController.scenarioNewProject();\r\n\r\n\t\t\thelperDisplayProjectFiles();\r\n\r\n\t\t\t//---- Change button icon\r\n\t\t\tImageIcon iconButton = FormUtils.getIconResource(FormStyle.RESOURCE_PATH_ICO_VIEW_SAMPLES);\r\n\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setIcon(iconButton);\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setActionCommand(FormMainHandlerCommands.AC_VIEW_SAMPLES_ON);\r\n\t\t\tmainFormLink.getComponentToolbar().getComponentButtonViewSamples().setToolTipText(\"View detected samples\");\r\n\r\n\t\t\tmainFormLink.reset();\r\n\t\t}\r\n\t\tcatch (ExceptionMessage e)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(e);\r\n\t\t}\r\n\t}", "public Project() {\n\n }", "void createProjectForExercise(ProgrammingExercise programmingExercise) throws VersionControlException;", "GradleBuild create();", "public Project() {\n\t}", "public Project() {\n\t}", "public boolean insertProject(Project project) throws EmployeeManagementException;", "private synchronized static void createProjectIfNotExist(Project aweProject, String rubyProjectName) {\r\n \t\tboolean exist = false;\r\n \t\t\r\n \t\tfor (RubyProject rubyProject : aweProject.getElements(RubyProject.class)) {\r\n \t\t\tif (rubyProject.getName().equals(rubyProjectName)) {\r\n \t\t\t\texist = true;\r\n \t\t\t}\r\n \t\t}\r\n \t\t\r\n \t\tif (!exist) {\r\n \t\t\tRubyProject ruby = ProjectFactoryImpl.eINSTANCE.createRubyProject();\r\n \t\t\truby.setName(rubyProjectName);\r\n \t\t\truby.setProjectInternal(aweProject);\t\t\t\r\n \t\t}\r\n \t}", "public void createMonitoredProject(\n com.google.monitoring.metricsscope.v1.CreateMonitoredProjectRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getCreateMonitoredProjectMethod(), getCallOptions()),\n request,\n responseObserver);\n }", "public static void main(String[] args) throws Exception, IOException {\n String projectId = \"my_project_id\";\n\n createIssueModel(projectId);\n }", "public static void main(String[] args) {\n FinalGroupProjectCS2141 dbProject = new FinalGroupProjectCS2141();\r\n dbProject.createConnection();\r\n }", "public Project(String name) {\n this.name = name;\n }", "public Project()\n {\n\n }", "public int DSAddProject(String ProjectName, String ProjectLocation);", "public Project() {\n\t\t\n\t}", "private IProject createEclipseProject(IProgressMonitor monitor, IProject project, IProjectDescription description,\n Map<String, Object> parameters, ProjectPopulator projectPopulator, boolean isCmsProject) \n \t\tthrows CoreException, IOException {\n\n // Create project and open it\n project.create(description, new SubProgressMonitor(monitor, 10));\n if (monitor.isCanceled()) throw new OperationCanceledException();\n\n project.open(IResource.BACKGROUND_REFRESH, new SubProgressMonitor(monitor, 10));\n\n // Add the Java and CMS nature to the project\n DescriptorNature.setupProjectNatures(project, monitor, isCmsProject);\n\n // Create folders in the project if they don't already exist\n addDefaultDirectories(project, WS_ROOT, DEFAULT_DIRECTORIES, monitor);\n String[] sourceFolders;\n if (isCmsProject) {\n sourceFolders = new String[] {\n (String) parameters.get(PARAM_SRC_FOLDER),\n };\n } else {\n sourceFolders = new String[] {\n (String) parameters.get(PARAM_SRC_FOLDER)\n };\n }\n addDefaultDirectories(project, WS_ROOT, sourceFolders, monitor);\n\n if (projectPopulator != null) {\n try {\n projectPopulator.populate(project);\n } catch (InvocationTargetException ite) {\n ite.printStackTrace();\n }\n }\n\n // Setup class path: mark folders as source folders\n IJavaProject javaProject = JavaCore.create(project);\n setupSourceFolders(javaProject, sourceFolders, monitor);\n // Set output location\n// javaProject.setOutputLocation(project.getFolder(BIN_CLASSES_DIRECTORY).getFullPath(), monitor);\n // Create the reference to the target project\n\n return project;\n }", "@Test\n\tpublic void saveProjects() throws ParseException {\n\t\tproject.setEstimates(5);\n\t\tSimpleDateFormat format = new SimpleDateFormat(\"yyyyMMdd\");\n\t\tDate parsed = format.parse(\"20110210\");\n\t\tjava.sql.Date sql = new java.sql.Date(parsed.getTime());\n\t\tproject.setdRequested(sql);\n\t\tproject.setdRequired(sql);\n\t\tproject.setCritical(true);\n\t\tproject.setType(\"DOCSMANAGE\");\n\t\tProjectKeyContacts contacts = new ProjectKeyContacts();\n\t\tcontacts.setEmail(\"assdasd.gmail.com\");\n\t\tcontacts.setFname(\"sdsd\");\n\t\tcontacts.setLname(\"asdasd\");\n\t\tcontacts.setPhone(\"asd\");\n\t\tcontacts.setRole(\"asda\");\n\t\tcontacts.setTeam(\"saad\");\n\t\tproject.setContacts(contacts);\n\t\tProjectDetails det = new ProjectDetails();\n\t\tdet.setDescription(\"asdsd\");\n\t\tdet.setName(\"asd\");\n\t\tdet.setName(\"asdad\");\n\t\tdet.setSummary(\"asdd\");\n\t\tproject.setProjectDetails(det);\n\t\tproject.setType(\"DOCSMANAGE\");\n\t\tassertEquals(controller.saveProject(project).getStatusCode(), HttpStatus.CREATED);\n\t}", "private MavenModuleSet createMavenProject() throws IOException {\n MavenModuleSet mavenModuleSet = j.jenkins.createProject(MavenModuleSet.class, \"test\"+j.jenkins.getItems().size());\n mavenModuleSet.setRunHeadless(true);\n return mavenModuleSet;\n }", "@Before\n\tpublic void setUp() throws Exception {\n\t\tIWorkspaceDescription wsDescription = workspace.getDescription();\n\t\tif (wsDescription.isAutoBuilding()) {\n\t\t\twsDescription.setAutoBuilding(false);\n\t\t\tworkspace.setDescription(wsDescription);\n\t\t}\n\t\t\n\t\t// disable indexing\n\t\tDebugHelpers.disableIndexing();\n\t\t\n\t\t// Create a new project\n\t\trodinProject = createRodinProject(\"P\"); //$NON-NLS-1$\n\t}", "public void testGetProjectByNameWebService() throws Exception {\r\n ProjectService projectService = lookupProjectServiceWSClientWithUserRole();\r\n\r\n ProjectData projectData = new ProjectData();\r\n projectData.setName(\"project3\");\r\n projectData.setDescription(\"Hello\");\r\n\r\n projectService.createProject(projectData);\r\n\r\n // 1 is the user id\r\n ProjectData pd = projectService.getProjectByName(\"project3\", 1);\r\n\r\n assertNotNull(\"null project data received\", pd);\r\n }", "public void createProject(\n String projectName,\n int teamId,\n String assigneeName,\n LocalDate deadline,\n String description,\n Project.Importance importance)\n throws NoSignedInUserException, SQLException, InexistentUserException,\n InexistentTeamException, DuplicateProjectNameException, InexistentDatabaseEntityException,\n EmptyFieldsException, InvalidDeadlineException {\n if (isMissingProjectData(projectName, assigneeName, deadline)) {\n throw new EmptyFieldsException();\n }\n User currentUser = getMandatoryCurrentUser();\n User assignee = getMandatoryUser(assigneeName);\n Team team = getMandatoryTeam(teamId);\n // check that there is no other project with the same name\n if (projectRepository.getProject(teamId, projectName).isPresent()) {\n throw new DuplicateProjectNameException(projectName, team.getName());\n }\n // check if the new deadline of project is outdated (before the current date)\n if (isOutdatedDate(deadline)) {\n throw new InvalidDeadlineException();\n }\n // save project\n Project.SavableProject project =\n new Project.SavableProject(\n projectName, teamId, deadline, currentUser.getId(), assignee.getId(), importance);\n project.setDescription(description);\n projectRepository.saveProject(project);\n support.firePropertyChange(\n ProjectChangeablePropertyName.CREATE_PROJECT.toString(), OLD_VALUE, NEW_VALUE);\n }", "@Test\n \tpublic void testCreateMindProject() throws Exception {\n \t\tString name = \"Test\" ; //call a generator which compute a new name\n \t\tGTMenu.clickItem(\"File\", \"New\", FRACTAL_MIND_PROJECT);\n \t\tGTShell shell = new GTShell(Messages.MindProjectWizard_window_title);\n \t\t//shell.findTree().selectNode(\"Mind\",FRACTAL_MIND_PROJECT);\n \t\t//shell.findButton(\"Next >\").click();\n \t\tshell.findTextWithLabel(\"Project name:\").typeText(name);\n \t\tshell.close();\n \t\t\n \t\tTestMindProject.assertMindProject(name);\t\t\n \t}", "public Project() { }", "void createProjectReference(java.lang.String referenceName, org.apache.ant.common.model.Project model) throws org.apache.ant.common.util.ExecutionException;", "public static ProjectTeam createSampleProjectTeam() {\n ProjectTeam team = new ProjectTeam();\n team.setProjectName(\"Rule the Galaxy\");\n team.addMember(new ProjectMember(\n \"Emperor Palpatine\", \"lead\", \"palpatine@empire.gxy\"));\n team.addMember(new ProjectMember(\n \"Lord Darth Vader\", \"Jedi-Killer\", \"vader@empire.gxy\"));\n team.addMember(new ProjectMember(\n \"Grand Moff Tarkin\", \"Planet-Killer\", \"tarkin@empire.gxy\"));\n team.addMember(new ProjectMember(\n \"Admiral Motti\", \"Death Star operations\", \"motti@empire.gxy\"));\n return team;\n }", "public void testNewJavaProject() {\n NewProjectWizardOperator.invoke().cancel();\n NewProjectWizardOperator npwo = NewProjectWizardOperator.invoke();\n // \"Standard\"\n String standardLabel = Bundle.getStringTrimmed(\"org.netbeans.modules.java.j2seproject.ui.wizards.Bundle\", \"Templates/Project/Standard\");\n npwo.selectCategory(standardLabel);\n // \"Java Application\"\n String javaApplicationLabel = Bundle.getStringTrimmed(\"org.netbeans.modules.java.j2seproject.ui.wizards.Bundle\", \"template_app\");\n npwo.selectProject(javaApplicationLabel);\n npwo.next();\n NewJavaProjectNameLocationStepOperator npnlso = new NewJavaProjectNameLocationStepOperator();\n npnlso.txtProjectName().setText(SAMPLE_PROJECT_NAME);\n npnlso.txtProjectLocation().setText(System.getProperty(\"netbeans.user\")); // NOI18N\n npnlso.btFinish().pushNoBlock();\n npnlso.getTimeouts().setTimeout(\"ComponentOperator.WaitStateTimeout\", 120000);\n npnlso.waitClosed();\n // wait project appear in projects view\n new ProjectsTabOperator().getProjectRootNode(SAMPLE_PROJECT_NAME);\n\n //disable the compile on save:\n ProjectsTabOperator.invoke().getProjectRootNode(SAMPLE_PROJECT_NAME).properties();\n // \"Project Properties\"\n String projectPropertiesTitle = Bundle.getStringTrimmed(\"org.netbeans.modules.java.j2seproject.ui.customizer.Bundle\", \"LBL_Customizer_Title\");\n NbDialogOperator propertiesDialogOper = new NbDialogOperator(projectPropertiesTitle);\n // select \"Compile\" category\n String buildCategoryTitle = Bundle.getStringTrimmed(\"org.netbeans.modules.java.j2seproject.ui.customizer.Bundle\", \"LBL_Config_BuildCategory\");\n String compileCategoryTitle = Bundle.getStringTrimmed(\"org.netbeans.modules.java.j2seproject.ui.customizer.Bundle\", \"LBL_Config_Build\");\n new Node(new Node(new JTreeOperator(propertiesDialogOper), buildCategoryTitle), compileCategoryTitle).select();\n // actually disable the quick run:\n String compileOnSaveLabel = Bundle.getStringTrimmed(\"org.netbeans.modules.java.j2seproject.ui.customizer.Bundle\", \"CustomizerCompile.CompileOnSave\");\n JCheckBox cb = JCheckBoxOperator.waitJCheckBox((Container) propertiesDialogOper.getSource(), compileOnSaveLabel, true, true);\n if (cb.isSelected()) {\n cb.doClick();\n }\n // confirm properties dialog\n propertiesDialogOper.ok();\n\n // wait classpath scanning finished\n PerfWatchProjects.waitScanFinished();\n }", "@When(\"I click on the Create new Project\")\n public void i_click_on_the_create_new_project(){\n\n i_click_on_create_a_new_project();\n }", "public Project createProject( File build_file ) throws Exception { // NOPMD\n if ( build_file == null || !build_file.exists() )\n return null;\n\n // load the option settings for this build file\n setPrefs( build_file );\n\n // configure the project\n Project p = new Project();\n\n // set the project helper -- the AntelopeProjectHelper2 is the same as the Ant\n // ProjectHelper2, but has been slightly modified so it does not automatically\n // run the implicit target\n System.setProperty( \"org.apache.tools.ant.ProjectHelper\", \"ise.antelope.common.AntelopeProjectHelper2\" );\n\n try {\n ClassLoader cl = _helper.getAntClassLoader();\n p.setCoreLoader( cl );\n\n /*\n try {\n Log.log(\"loading antlib with _helper classloader\");\n cl.getResource( \"ise/antelope/tasks/antlib.xml\" );\n Log.log(\"loaded antlib with _helper classloader\");\n }\n catch(Exception e) {\n e.printStackTrace();\n }\n */\n\n // add the antelope build logger now so that any output produced by the\n // ProjectHelper is captured\n p.addBuildListener( _build_logger );\n\n // add the progress bar build listener\n p.addBuildListener( _progress );\n\n // optionally add the antelope performance listener\n if ( _settings.getShowPerformanceOutput() ) {\n if ( _performance_listener == null )\n _performance_listener = new AntPerformanceListener();\n p.addBuildListener( _performance_listener );\n }\n\n // add the gui input handler\n setInputHandler( p );\n\n p.init(); // this takes as much as 9 seconds the first time, less than 1/2 second later\n\n p.setUserProperty( \"ant.file\", build_file.getAbsolutePath() );\n p.setProperty( \"ant.version\", Main.getAntVersion() );\n //String ant_home = System.getProperty(\"ant.home\");\n String ant_home = AntUtils.getAntHome();\n if ( ant_home != null ) {\n p.setProperty( \"ant.home\", ant_home );\n }\n String ant_lib_dirs = AntUtils.getAntLibDirs();\n if ( ant_lib_dirs != null )\n p.setProperty( \"ant.library.dir\", ant_lib_dirs );\n\n // add ant.jar to the classpath\n // for Ant 1.6, does ant-launcher.jar need to be added also? --\n // yes -- add all jars in $ant_home/lib and $user.home/.ant/lib, this\n // is what command-line Ant does. Ant also supports a -lib command-line\n // option where the user can specify additional locations. Should\n // Antelope support this? Need a gui in the properties panel if so.\n // 12/22/2004: added AntelopeLauncher, so -lib option is handled for app,\n // but not for plugin\n /// -- should this be done here or in the helper? --\n java.util.List ant_jars = _helper.getAntJarList();\n if ( ant_jars != null ) {\n java.util.List cp_list = new ArrayList();\n String classpath = p.getProperty( \"java.class.path\" );\n StringTokenizer st = new StringTokenizer( classpath, File.pathSeparator );\n while ( st.hasMoreTokens() ) {\n cp_list.add( new File( st.nextToken() ) );\n }\n Iterator it = ant_jars.iterator();\n while ( it.hasNext() ) {\n File f = new File( ( String ) it.next() );\n if ( !cp_list.contains( f ) ) {\n cp_list.add( f );\n }\n }\n StringBuffer sb = new StringBuffer();\n it = cp_list.iterator();\n while ( it.hasNext() ) {\n sb.append( ( ( File ) it.next() ).getAbsolutePath() ).append( File.pathSeparator );\n }\n classpath = sb.toString();\n p.setProperty( \"java.class.path\", classpath );\n System.setProperty( \"java.class.path\", classpath );\n }\n\n // load any saved user properties for this build file. These are properties\n // that the user has set using the properties dialog and in command-line\n // Ant would have been passed on the command line.\n Preferences user_prefs = getPrefs().node( Constants.ANT_USER_PROPS );\n String[] keys = user_prefs.keys();\n for ( int i = 0; i < keys.length; i++ ) {\n p.setUserProperty( keys[ i ], user_prefs.get( keys[ i ], \"\" ) );\n }\n\n //ProjectHelper.configureProject( p, build_file ); // deprecated\n ProjectHelper helper = ProjectHelper.getProjectHelper();\n p.addReference( \"ant.projectHelper\", helper );\n helper.parse( p, build_file );\n\n //for (Iterator it = p.getTargets().keySet().iterator(); it.hasNext(); ) {\n // System.out.println(\"target: \" + it.next());\n //}\n\n /*\n // looks like a recent change for antlib has busted loading custom tasks from\n // an antlib declaration. Need to check if this ever worked, I used to use\n // taskdef exclusively, and have only recently switched to using antlib.\n // Using antlib works when Antelope is running as an application, but not as\n // a plugin. Seems to have something to do with classloading.\n try {\n System.out.println(\"AntelopePanel classloader = \" + getClass().getClassLoader().hashCode());\n Class c = Class.forName(\"org.apache.tools.ant.Main\");\n if (c != null) {\n System.out.println(\"classloader for Main = \" + c.getClassLoader().hashCode());\n System.out.println(\"parent classloader for Main = \" + c.getClassLoader().getParent());\n }\n else\n System.out.println(\"did not find class for Main\");\n c = Class.forName(\"ise.antelope.tasks.Unset\");\n if (c != null){\n System.out.println(\"classloader for Unset = \" + c.getClassLoader().hashCode());\n System.out.println(\"parent classloader for Unset = \" + c.getClassLoader().getParent());\n System.out.println(\"classloader for Unset is a \" + c.getClassLoader().getClass().getName());\n }\n else\n System.out.println(\"did not find class for Unset\");\n c = Class.forName(\"org.apache.tools.ant.taskdefs.optional.EchoProperties\");\n if (c != null){\n System.out.println(\"classloader for EchoProperties = \" + c.getClassLoader().hashCode());\n System.out.println(\"parent classloader for EchoProperties = \" + c.getClassLoader().getParent());\n System.out.println(\"classloader for EchoProperties is a \" + c.getClassLoader().getClass().getName());\n }\n else\n System.out.println(\"did not find class for EchoProperties\");\n }\n catch(Exception e) {\n e.printStackTrace();\n }\n */\n\n\n return p;\n }\n catch ( Exception e ) {\n Log.log( e );\n e.printStackTrace( System.out );\n JOptionPane.showMessageDialog( GUIUtils.getRootJFrame( this ),\n \"<html>Error:<br>\" + e.getMessage(),\n \"Ant Error\",\n JOptionPane.ERROR_MESSAGE );\n throw e;\n }\n catch ( NoClassDefFoundError error ) {\n Log.log( error );\n error.printStackTrace( System.out );\n JOptionPane.showMessageDialog( GUIUtils.getRootJFrame( this ),\n \"<html>Error: No Class Definition Found for<br>\" + error.getMessage() +\n \"<br><p>This is most likely caused by a required third-party<br>\" +\n \"jar file not being in the class path.\",\n \"Ant Error\",\n JOptionPane.ERROR_MESSAGE );\n throw new Exception( error.getMessage() ); // NOPMD\n }\n }", "public Project getProjectByName(String name);", "public static Builder newProject(String name) {\n return new Builder(name);\n }", "public void create(Connection conn, Object object) \r\n\t\tthrows DAOException {\r\n\r\n\t\tif (!(object instanceof ProjectInfo))\r\n\t\t\tthrow new DAOException (\"invalid.object.projdao\",\r\n\t\t\t\t\tnull, DAOException.ERROR, true);\r\n\t\t\t\r\n\t\t\r\n\t\tString sqlstmt = DAOConstants.PROJ_CREATE;\r\n\t\tProjectInfo project = (ProjectInfo) object;\r\n\r\n\t\tif(project.getProjectId() == null)\r\n\t\t\tthrow new DAOException (\"invalid.object.projdao\",\r\n\t\t\t\t\tnull, DAOException.ERROR, true);\r\n\t\t\t\r\n\t\t\t\r\n\t\tlog.debug(\"creating ProjectInfo entry\");\r\n\t\ttry{\r\n\t\t\tif (conn == null || conn.isClosed())\r\n\t\t\t\tconn = dbAccess.getConnection();\r\n\t\t\tPreparedStatement stmt = conn.prepareStatement(sqlstmt);\r\n\t\t\tProjectAssembler.getPreparedStatement(project, stmt);\r\n\t\t\tstmt.executeUpdate();\r\n\t\t\tlog.debug(\"created ProjectInfo entry\");\r\n\t\t\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow new DAOException (\"sql.create.exception.projdao\",\r\n\t\t\te, DAOException.ERROR, true);\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new DAOException (\"create.exception.projdao\",\r\n\t\t\te.getCause(), DAOException.ERROR, true);\r\n \r\n\t\t} \r\n\t}", "public UploadProjectAction() {\n\t\tsuper();\n\t}", "public Project procreate(Project pud) throws IOException {\n\t\tString ur = url + \"/procreate\";\n\t\tProject us = restTemplate().postForObject(ur, pud, Project.class);\n\t\tSystem.out.println(us.toString());\n\t\t//UserDetails user = om.readValue(us,UserDetails.class);\n\t\treturn us;\n\t}", "public ApiProject() {\n super();\n }", "default void createMonitoredProject(\n com.google.monitoring.metricsscope.v1.CreateMonitoredProjectRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateMonitoredProjectMethod(), responseObserver);\n }", "public Project createProjectFromPRJ() {\n\n\t\tSystem.out.println(\"Trying to load prj file with : \" + data_path + \" \" + projectName + \" \" + conceptName + \" \");\n\n\t\tProject project = null;\n\n\t\ttry {\n\n\t\t\tproject = new Project(data_path + projectName);\n\n\t\t\t// Sehr wichtig hier das Warten einzubauen, sonst gibts leere\n\t\t\t// Retrieval Results, weil die Faelle noch nicht geladen sind wenn\n\t\t\t// das\n\t\t\t// Erste Retrieval laueft\n\t\t\twhile (project.isImporting()) {\n\t\t\t\tThread.sleep(1000);\n\t\t\t\tSystem.out.print(\".\");\n\t\t\t}\n\t\t\tSystem.out.print(\"\\n\"); // console pretty print\n\t\t} catch (Exception ex) {\n\n\t\t\tSystem.out.println(\"Error when loading the project\");\n\t\t}\n\t\treturn project;\n\t}", "public static Project Construct(String id)\n\t{\n\t\treturn new Project(id);\n\t}", "@OnKeyword(value = \"message\")\n\tpublic void createMessage(TeamchatAPI api) throws Exception {\n\t\tif (isBasecampnotPresent(api)) {\n\t\t\treturn;\n\t\t}\n\t\t// populating with project name list\n\t\tField f = api.objects().select().name(\"project\").label(\"Project\");\n\t\tfor (Project project : bah.getActiveProjects()) {\n\t\t\tf.addOption(project.getName() + \" | \" + project.getId());\n\t\t}\n\t\t// set topic type to message\n\t\ttopicType = \"Message\";\n\t\tapi.perform(api\n\t\t\t\t.context()\n\t\t\t\t.currentRoom()\n\t\t\t\t.post(new PrimaryChatlet()\n\t\t\t\t\t\t.setQuestion(\"Get message(s) from a project\")\n\t\t\t\t\t\t.setReplyScreen(api.objects().form().addField(f))\n\t\t\t\t\t\t.setReplyLabel(\"Select Project\")\n\t\t\t\t\t\t.alias(\"createmessage2\")));\n\t}", "public int createProject(Map<File, String> classes, boolean isSource) {\n try {\n projectData = projectLoader.createProject(classes, isSource);\n } catch (FileNotFoundException ex) {\n Logger.getLogger(ProjectManager.class.getName()).log(Level.SEVERE, null, ex);\n } catch (Exception ex) {\n try {\n \n projectData = projectLoader.createProject(classes, isSource);\n } catch (FileNotFoundException ex1) {\n Logger.getLogger(ProjectManager.class.getName()).log(Level.SEVERE, null, ex1);\n } catch (Exception ex1) {\n ex1.printStackTrace();\n JOptionPane.showMessageDialog(master, \"Cannot open file \\nTry it again, please\");\n }\n }\n return 0;\n }", "public Project(String name){\n\t\tthis.pName = name;\n\t}", "public void testGetProjectByName() throws Exception {\r\n ProjectData projectData = new ProjectData();\r\n projectData.setName(\"project1\");\r\n projectData.setDescription(\"des\");\r\n\r\n projectService.createProject(projectData);\r\n\r\n\t\tlong start = System.currentTimeMillis();\r\n\t\tProjectData pd = null;\r\n\t\tfor (int i = 0; i < 100; i++) {\r\n\t pd = projectService.getProjectByName(\"project1\", 1);\r\n\t\t}\r\n\t\tlong end = System.currentTimeMillis();\r\n\t\tSystem.out.println(\"Run getProjectByName used \" + (end - start) + \"ms\");\r\n\r\n assertEquals(\"The project data is wrong.\", pd.getDescription(), projectData.getDescription());\r\n assertEquals(\"The project data is wrong.\", pd.getName(), projectData.getName());\r\n }", "@RequestMapping(value = \"/projectreleasesprints\",\n method = RequestMethod.POST,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Projectreleasesprint> createProjectreleasesprint(@Valid @RequestBody Projectreleasesprint projectreleasesprint) throws URISyntaxException {\n log.debug(\"REST request to save Projectreleasesprint : {}\", projectreleasesprint);\n if (projectreleasesprint.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(\"projectreleasesprint\", \"idexists\", \"A new projectreleasesprint cannot already have an ID\")).body(null);\n }\n Projectreleasesprint result = projectreleasesprintRepository.save(projectreleasesprint);\n return ResponseEntity.created(new URI(\"/api/projectreleasesprints/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(\"projectreleasesprint\", result.getId().toString()))\n .body(result);\n }", "public static String createAzkabanJob(String sessionId, AzkabanProjectConfig azkabanProjectConfig)\n throws IOException {\n log.info(\"Creating Azkaban project for: \" + azkabanProjectConfig.getAzkabanProjectName());\n\n // Create zip file\n String zipFilePath = createAzkabanJobZip(azkabanProjectConfig);\n log.info(\"Zip file path: \" + zipFilePath);\n\n // Upload zip file to Azkaban\n String projectId = AzkabanAjaxAPIClient.createAzkabanProject(sessionId, zipFilePath, azkabanProjectConfig);\n log.info(\"Project Id: \" + projectId);\n\n return projectId;\n }", "Project getProject();", "public Project(String name, String description){\n this.name = name;\n this.description = description; \n }", "public static Project createProject() throws ParseException {\n System.out.println(\"Please enter the project number: \");\n int projNum = input.nextInt();\n input.nextLine();\n\n System.out.println(\"Please enter the project name: \");\n String projName = input.nextLine();\n\n System.out.println(\"Please enter the type of building: \");\n String buildingType = input.nextLine();\n\n System.out.println(\"Please enter the physical address for the project: \");\n String address = input.nextLine();\n\n System.out.println(\"Please enter the ERF number: \");\n String erfNum = input.nextLine();\n\n System.out.println(\"Please enter the total fee for the project: \");\n int totalFee = input.nextInt();\n input.nextLine();\n\n System.out.println(\"Please enter the total amount paid to date: \");\n int amountPaid = input.nextInt();\n input.nextLine();\n\n System.out.println(\"Please enter the deadline for the project (dd/MM/yyyy): \");\n String sdeadline = input.nextLine();\n Date deadline = dateformat.parse(sdeadline);\n\n Person architect = createPerson(\"architect\", input);\n Person contractor = createPerson(\"contractor\", input);\n Person client = createPerson(\"client\", input);\n\n // If the user did not enter a name for the project, then the program will\n // concatenate the building type and the client's surname as the new project\n // name.\n\n if (projName == \"\") {\n String[] clientname = client.name.split(\" \");\n String lastname = clientname[clientname.length - 1];\n projName = buildingType + \" \" + lastname;\n }\n\n return new Project(projNum, projName, buildingType, address, erfNum, totalFee, amountPaid, deadline, contractor,\n architect, client);\n\n }", "public com.google.longrunning.Operation createMonitoredProject(\n com.google.monitoring.metricsscope.v1.CreateMonitoredProjectRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getCreateMonitoredProjectMethod(), getCallOptions(), request);\n }", "public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation>\n createMonitoredProject(\n com.google.monitoring.metricsscope.v1.CreateMonitoredProjectRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getCreateMonitoredProjectMethod(), getCallOptions()), request);\n }", "public static Project createAnyProject(File buildFile){\n\t\tProject antProject = new Project();\n\t\tantProject.init();\n\t\tDefaultLogger logger = new DefaultLogger();\n\t\tMessageConsole myConsole = Activator.findConsole();\n\t\tMessageConsoleStream out = myConsole.newMessageStream();\n\t\tlogger.setOutputPrintStream(new PrintStream(out));\n\t\tlogger.setMessageOutputLevel(Project.MSG_VERBOSE);\n\n\t\tActivator.showConsole(myConsole);\n\n\t\tProjectHelper.configureProject(antProject, buildFile);\n\t\tantProject.addBuildListener(logger);\n\t\treturn antProject;\n\t}", "private void newProject(ActionEvent x) {\n\t\tthis.controller.newProject();\n\t}", "@SystemSetup(type = Type.PROJECT, process = Process.ALL)\n\tpublic void createProjectData(final SystemSetupContext context)\n\t{\n\t\tif (getBooleanSystemSetupParameter(context, IMPORT_PROJECT_DATA))\n\t\t{\n\t\t\t\n\t\t\t//Store locator is out of scope for SBD b2b\t\n\t\t\timportStoreInitialData(context, PROJECT_DATA_IMPORT_FOLDER, PROJECT_NAME, PROJECT_NAME,\n\t\t\t\t\tCollections.singletonList(PROJECT_NAME));\n\t\t\t\n\t\t}\n\t\tif (getBooleanSystemSetupParameter(context, IMPORT_SBD_SAMPLE_PRODUCT_DATA))\n\t\t{\n\t\t\timportCommonData(context, PROJECT_DATA_IMPORT_FOLDER);\n\t\t\timportProductCatalog(context, PROJECT_DATA_IMPORT_FOLDER, PROJECT_NAME);\t\n\t\t\t\n\t\t}\n\t}", "@Test\n public void postTemplateProgrammerProjectTest() throws ApiException {\n ProjectDTO request = null;\n TaskIdResult response = api.postTemplateProgrammerProject(request);\n\n // TODO: test validations\n }", "private void initiateProject() {\n\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yyyy\", Locale.getDefault());\n\n Date startDay = null;\n Date deadlineMinPace = null;\n Date deadlineMaxPace = null;\n\n try {\n startDay = dateFormat.parse(\"21-08-2018\");\n deadlineMinPace = dateFormat.parse(\"27-08-2018\");\n deadlineMaxPace = dateFormat.parse(\"25-08-2018\");\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n if (startDay != null && deadlineMinPace != null && deadlineMaxPace != null) {\n\n smp = new SmartProject(\"Test project\", \"Test project description\",\n 35, startDay, deadlineMinPace, deadlineMaxPace);\n\n System.out.println(\"===>>>\" + smp.toString());\n\n } else {\n System.out.println(\"===>>> Some date are null!\");\n }\n\n /*\n // *** print block ***\n smp.printEntries();\n\n for (float f : smp.getYAxisChartValuesMinPace()) {\n System.out.println(f);\n }\n\n for (float f : smp.getYAxisChartValuesMaxPace()) {\n System.out.println(f);\n }\n\n for (float f : smp.getFloatNumbersForXAxis()) {\n System.out.println(f);\n }\n */\n\n }", "void createProject(IProjectDescription description, IProject proj,\n\t\t\tIProgressMonitor monitor) throws CoreException,\n\t\t\tOperationCanceledException {\n\t\ttry {\n\n\t\t\tmonitor.beginTask(\"\", 2000);\n\n\t\t\tproj.create(description, new SubProgressMonitor(monitor, 1000));\n\n\t\t\tif (monitor.isCanceled()) {\n\t\t\t\tthrow new OperationCanceledException();\n\t\t\t}\n\n\t\t\tproj.open(IResource.BACKGROUND_REFRESH, new SubProgressMonitor(\n\t\t\t\t\tmonitor, 1000));\n\n\t\t\t/*\n\t\t\t * Okay, now we have the project and we can do more things with it\n\t\t\t * before updating the perspective.\n\t\t\t */\n\t\t\tIContainer container = (IContainer) proj;\n\n\t\t\t/* Add an XHTML file */\n\t\t\t/*addFileToProject(container, new Path(\"index.html\"),\n\t\t\t\t\tJ15NewModel.openContentStream(\"Welcome to \"\n\t\t\t\t\t\t\t+ proj.getName(),\"5\"),monitor);*/\n\n\t\t\t/* Create the admin folder */\n\t\t\tfinal IFolder adminFolder = container.getFolder(new Path(\"admin\"));\n\t\t\tadminFolder.create(true, true, monitor);\n\t\t\t\n\t\t\tfinal IFolder adminModels = adminFolder.getFolder(new Path(\"models\"));\n\t\t\tadminModels.create(true, true, monitor);\n\t\t\t\n\t\t\tfinal IFolder adminControllers = adminFolder.getFolder(new Path(\"controllers\"));\n\t\t\tadminControllers.create(true, true, monitor);\n\t\t\t\n\t\t\tfinal IFolder adminViews = adminFolder.getFolder(new Path(\"views\"));\n\t\t\tadminViews.create(true, true, monitor);\n\t\t\t\n\t\t\tfinal IFolder adminTables = adminFolder.getFolder(new Path(\"tables\"));\n\t\t\tadminTables.create(true, true, monitor);\n\t\t\t\n\t\t\t/* Create the site folder */\n\t\t\tfinal IFolder siteFolder = container.getFolder(new Path(\"site\"));\n\t\t\tsiteFolder.create(true, true, monitor);\n\t\t\t\n\t\t\tfinal IFolder siteModels = siteFolder.getFolder(new Path(\"models\"));\n\t\t\tsiteModels.create(true, true, monitor);\n\t\t\t\n\t\t\tfinal IFolder siteViews = siteFolder.getFolder(new Path(\"views\"));\n\t\t\tsiteViews.create(true, true, monitor);\n\n\t\t\tInputStream resourceStream = this.getClass().getResourceAsStream(\n\t\t\t\t\t\"templates/blank-html.template\");\n\n\t\t\t/* Add blank HTML Files */\n\t\t\t\n\t\t\t/* Admin Folders first */\n\t\t\taddFileToProject(container, new Path(adminFolder.getName()\n\t\t\t\t\t+ Path.SEPARATOR + \"index.html\"),\n\t\t\t\t\tresourceStream, monitor);\n\t\t\t\n\t\t\tresourceStream.close();\n\t\t\tresourceStream = this.getClass().getResourceAsStream(\n\t\t\t\t\"templates/blank-html.template\");\n\t\t\t\n\t\t\taddFileToProject(container, new Path(adminFolder.getName()\n\t\t\t\t\t+ Path.SEPARATOR + adminModels.getName()\n\t\t\t\t\t+ Path.SEPARATOR + \"index.html\"),\n\t\t\t\t\tresourceStream, monitor);\n\t\t\t\n\t\t\tresourceStream.close();\n\t\t\tresourceStream = this.getClass().getResourceAsStream(\n\t\t\t\t\"templates/blank-html.template\");\n\t\t\t\n\t\t\taddFileToProject(container, new Path(adminFolder.getName()\n\t\t\t\t\t+ Path.SEPARATOR + adminControllers.getName()\n\t\t\t\t\t+ Path.SEPARATOR + \"index.html\"),\n\t\t\t\t\tresourceStream, monitor);\n\t\t\t\n\t\t\tresourceStream.close();\n\t\t\tresourceStream = this.getClass().getResourceAsStream(\n\t\t\t\t\"templates/blank-html.template\");\n\t\t\t\n\t\t\taddFileToProject(container, new Path(adminFolder.getName()\n\t\t\t\t\t+ Path.SEPARATOR + adminViews.getName()\n\t\t\t\t\t+ Path.SEPARATOR + \"index.html\"),\n\t\t\t\t\tresourceStream, monitor);\n\t\t\t\n\t\t\tresourceStream.close();\n\t\t\tresourceStream = this.getClass().getResourceAsStream(\n\t\t\t\t\"templates/blank-html.template\");\n\t\t\t\n\t\t\taddFileToProject(container, new Path(adminFolder.getName()\n\t\t\t\t\t+ Path.SEPARATOR + adminTables.getName()\n\t\t\t\t\t+ Path.SEPARATOR + \"index.html\"),\n\t\t\t\t\tresourceStream, monitor);\n\t\t\t\n\t\t\tresourceStream.close();\n\t\t\tresourceStream = this.getClass().getResourceAsStream(\n\t\t\t\t\"templates/blank-html.template\");\n\t\t\t\n\t\t\t/* Now the site folders */\n\t\t\taddFileToProject(container, new Path(siteFolder.getName()\n\t\t\t\t\t+ Path.SEPARATOR + \"index.html\"),\n\t\t\t\t\tresourceStream, monitor);\n\t\t\t\n\t\t\tresourceStream.close();\n\t\t\tresourceStream = this.getClass().getResourceAsStream(\n\t\t\t\t\"templates/blank-html.template\");\n\t\t\t\n\t\t\taddFileToProject(container, new Path(siteFolder.getName()\n\t\t\t\t\t+ Path.SEPARATOR + siteModels.getName()\n\t\t\t\t\t+ Path.SEPARATOR + \"index.html\"),\n\t\t\t\t\tresourceStream, monitor);\n\t\t\t\n\t\t\tresourceStream.close();\n\t\t\tresourceStream = this.getClass().getResourceAsStream(\n\t\t\t\t\"templates/blank-html.template\");\n\n\t\t\taddFileToProject(container, new Path(siteFolder.getName()\n\t\t\t\t\t+ Path.SEPARATOR + siteViews.getName()\n\t\t\t\t\t+ Path.SEPARATOR + \"index.html\"),\n\t\t\t\t\tresourceStream, monitor);\n\t\t\t\n\t\t\tresourceStream.close();\n\n\t\t\t/* All over! */\n\t\t} catch (IOException ioe) {\n\t\t\tIStatus status = new Status(IStatus.ERROR, \"J15Wizard\", IStatus.OK,\n\t\t\t\t\tioe.getLocalizedMessage(), null);\n\t\t\tthrow new CoreException(status);\n\t\t} finally {\n\t\t\tmonitor.done();\n\t\t}\n\t}", "@Override\n\tpublic void run(String... args) throws Exception {\n\n\t\tiProjectService.save(new Project(1L, \"Training Allocation to New Joinees\", \n\t\t\t\tLocalDate.of(2021, Month.JANUARY, 25)));\n\t\t\n\t\tiProjectService.save(new Project(2L, \"Machine Allocations and Transport\", \n\t\t\t\tLocalDate.of(2021, Month.JANUARY, 10)));\n\t\t\n\t\tOptional<Project> optional = iProjectService.findById(1L);\n\t\t\n\t\t if(optional.isPresent()) {\n\t\t\t Project project = optional.get();\n\t\t\t System.out.println(\"Project Details - \" + project.getId() + \" \" + project.getName());\n\t \t \n\t\t }\n\n\t}", "private static void createProjectsFolders() throws IOException {\n /*\n * .sagrada/\n * logs/\n */\n File logFolder = new File(Constants.Paths.LOG_FOLDER.getAbsolutePath());\n\n if (!logFolder.isDirectory() && !logFolder.mkdirs()) {\n throw new IOException(\"Could not directory structure: \" + (Constants.Paths.LOG_FOLDER.getAbsolutePath()));\n }\n }", "public ProjectFactoryImpl() {\r\n\t\tsuper();\r\n\t}", "private void createProjectAsync(IProgressMonitor monitor, ProjectInfo mainData, List<ProjectInfo> importData,\n boolean isAndroidProject) throws InvocationTargetException {\n monitor.beginTask(\"Create CMS Descriptor Project\", 100);\n try {\n IProject mainProject = null;\n\n if (mainData != null) {\n mainProject = createEclipseProject(\n new SubProgressMonitor(monitor, 50),\n mainData.getProject(),\n mainData.getDescription(),\n mainData.getParameters(),\n null,\n isAndroidProject);\n if (mainProject != null) {\n final IJavaProject javaProject = JavaCore.create(mainProject);\n }\n }\n } catch (CoreException e) {\n throw new InvocationTargetException(e);\n } catch (IOException e) {\n throw new InvocationTargetException(e);\n } finally {\n monitor.done();\n }\n }", "@PostMapping(value = \"/project\", consumes = \"application/json\", produces = \"application/json\")\n public ResponseEntity<?> addNewProject(@Valid @RequestBody Project newProject) throws URISyntaxException\n {\n newProject.setProjectid(0);\n newProject = projectService.save(newProject);\n\n // set the location header for the newly created resource\n HttpHeaders responseHeaders = new HttpHeaders();\n URI newProjectURI = ServletUriComponentsBuilder.fromCurrentRequest()\n .path(\"/{projectid}\")\n .buildAndExpand(newProject.getProjectid())\n .toUri();\n responseHeaders.setLocation(newProjectURI);\n\n return new ResponseEntity<>(null, responseHeaders, HttpStatus.CREATED);\n }", "public String createTaskDefinition(TaskDefinition tasDef) throws DaoRepositoryException;", "@Override\n\tpublic Integer addProject(ProjectInfo project) {\n\t\treturn sqlSession.insert(\"cn.sep.samp2.project.addProject\", project);\n\t}", "@Test(alwaysRun=true)\n public void addProject() {\n driver.findElement(By.xpath(\"//ul[contains(@class, 'nav-tabs')]//li[3]\")).click();\n assertThat(driver.getTitle(), equalTo(\"Manage Projects - MantisBT\"));\n //Click \"Create New Projects\" button\n driver.findElement(By.xpath(\"//form//button[contains(@class, 'btn-primary')]\")).click();\n //Check fields on the \"Add Project\" view\t\"Project Name Status Inherit Global Categories View Status Description\"\n List<String> expCategory = Arrays.asList(new String[]{\"* Project Name\", \"Status\", \"Inherit Global Categories\",\n \"View Status\", \"Description\"});\n List<WebElement> category = driver.findElements(By.className(\"category\"));\n List<String> actCategory = new ArrayList<>();\n for (WebElement categories : category) {\n actCategory.add(categories.getText());\n }\n assertThat(actCategory, equalTo(expCategory));\n //Fill Project inforamtion\n driver.findElement(By.id(\"project-name\")).sendKeys(\"SB\");\n driver.findElement(By.id(\"project-description\")).sendKeys(\"new one\");\n //Add project\n driver.findElement(By.xpath(\"//input[@value='Add Project']\")).click();\n //delete Created class\n driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n driver.findElement(By.xpath(\"//tr//a[contains(text(),'SB')]\")).click();\n driver.findElement(By.xpath(\"//input[@value ='Delete Project']\")).click();\n driver.findElement(By.xpath(\"//input[@value ='Delete Project']\")).click();\n }", "public void createRepository() throws VcsException {\n final FossilSimpleCommand fossilCommand = new FossilSimpleCommand(myProject, myRepoPath.getParentFile(), FCommandName.new_);\n fossilCommand.addParameters(myRepoPath.getPath());\n String result = fossilCommand.run();\n result = result.replace(\"\\r\", \"\");\n final String[] split = result.split(\"\\n\");\n final List<String> lines = new ArrayList<String>(3);\n for (String line : split) {\n if (! StringUtil.isEmptyOrSpaces(line)) {\n lines.add(line.trim());\n }\n }\n\n if (lines.size() != 3) {\n throw new FossilException(\"Can not parse 'new' output: '\" + result + \"'\");\n }\n final String[] expectedHeaders = {\"project-id:\", \"server-id:\", \"admin-user:\"};\n for (int i = 0; i < lines.size(); i++) {\n final String line = lines.get(i);\n if (! line.startsWith(expectedHeaders[i])) {\n throw new FossilException(\"Can not parse 'new' output, line #\" + (i + 1) + \": '\" + result + \"'\");\n }\n }\n myProjectId = new String(lines.get(0).substring(expectedHeaders[0].length() + 1));\n myServerId = new String(lines.get(1).substring(expectedHeaders[1].length()) + 1);\n final String userPswd = lines.get(2).substring(expectedHeaders[2].length()).trim();\n final int idxSpace = userPswd.indexOf(' ');\n if (idxSpace == -1) {\n throw new FossilException(\"Can not parse 'new' output, user-password area: '\" + result + \"'\");\n }\n myUserName = new String(userPswd.substring(0, idxSpace));\n final int quot1 = userPswd.indexOf('\"', idxSpace + 1);\n int quot2 = -1;\n if (quot1 >= 0) {\n quot2 = userPswd.indexOf('\"', quot1 + 1);\n }\n if (quot1 == -1 || quot2 == -1) {\n throw new FossilException(\"Can not parse 'new' output, user-password area: '\" + result + \"'\");\n }\n myPassword = userPswd.substring(quot1 + 1 , quot2);\n }", "protected Project createProjectWithClient(long id, Client client) {\n Project project = new Project();\n setAuditableEntity(project);\n project.setActive(true);\n project.setClient(client);\n ProjectStatus projectStatus = createProjectStatus(100000);\n project.setProjectStatus(projectStatus);\n project.setId(id);\n project.setCompany(client.getCompany());\n\n // persist object\n Query query = entityManager\n .createNativeQuery(\"insert into project (project_id, project_status_id, client_id, \"\n + \"company_id,name,active,sales_tax,po_box_number,payment_terms_id,\"\n + \"description,creation_date,creation_user,modification_date,\"\n + \"modification_user,is_deleted,is_manual_prize_setting)\"\n + \" values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)\");\n int idx = 1;\n query.setParameter(idx++, project.getId());\n query.setParameter(idx++, project.getProjectStatus().getId());\n query.setParameter(idx++, project.getClient().getId());\n query.setParameter(idx++, project.getCompany().getId());\n query.setParameter(idx++, project.getName());\n query.setParameter(idx++, project.isActive());\n query.setParameter(idx++, project.getSalesTax());\n query.setParameter(idx++, project.getPOBoxNumber());\n query.setParameter(idx++, project.getPaymentTermsId());\n query.setParameter(idx++, project.getDescription());\n query.setParameter(idx++, project.getCreateDate());\n query.setParameter(idx++, project.getCreateUsername());\n query.setParameter(idx++, project.getModifyDate());\n query.setParameter(idx++, project.getModifyUsername());\n query.setParameter(idx++, 0);\n query.setParameter(idx++, 0);\n query.executeUpdate();\n\n query = entityManager\n .createNativeQuery(\"insert into client_project (project_id, client_id) values (?,?)\");\n idx = 1;\n query.setParameter(idx++, project.getId());\n query.setParameter(idx++, project.getClient().getId());\n query.executeUpdate();\n \n return project;\n }", "public Project build() {\n return new Project(descriptor.build());\n }" ]
[ "0.6976646", "0.6976646", "0.6976646", "0.6961745", "0.6650083", "0.6635889", "0.66127825", "0.63241106", "0.61629725", "0.6062575", "0.59922945", "0.5957753", "0.5957043", "0.59304756", "0.58683455", "0.5852848", "0.5837739", "0.5815981", "0.5738684", "0.573479", "0.5721485", "0.5647597", "0.5638683", "0.56134814", "0.5605767", "0.55975246", "0.55757535", "0.55546546", "0.55145633", "0.5501684", "0.5496798", "0.54874825", "0.5468356", "0.5468189", "0.5452179", "0.54416627", "0.5435545", "0.54248995", "0.5410081", "0.53883433", "0.53883433", "0.5387186", "0.53759974", "0.5375728", "0.5366936", "0.5354164", "0.5340778", "0.53400064", "0.5333678", "0.5328028", "0.53193116", "0.53056556", "0.524884", "0.524676", "0.523875", "0.5238585", "0.522117", "0.5212348", "0.5203116", "0.5200555", "0.51980615", "0.51877064", "0.5173822", "0.5160337", "0.5158897", "0.51553035", "0.5152986", "0.5120104", "0.51083136", "0.5105041", "0.50849974", "0.5078938", "0.5064484", "0.5060915", "0.50597346", "0.5052216", "0.50489277", "0.5045124", "0.5038836", "0.5034534", "0.50307244", "0.50270694", "0.5026519", "0.4987385", "0.4978345", "0.4966962", "0.4962602", "0.4959909", "0.49518615", "0.49514678", "0.49469852", "0.49468312", "0.4945252", "0.49394816", "0.4939105", "0.4933485", "0.49217093", "0.49150032", "0.4908496", "0.49014547" ]
0.68486583
4
setTabPanel Panelcomponente suchen und durch ein neues Panel ersetzen
private Component setTabPanel(){ String componentKey = Integer.toString(focusL1) + "-" + Integer.toString(focusL2); Component wrapper = getComponentById(wrapperName); Component replacedPanel = getComponentById(panelName); Component panel; panel = panelMap.getPanelMap().get(componentKey); replacedPanel.replaceWith( panel ); return wrapper; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean setTabPannel(TabPanel tp){\n m_tp = tp;\n return true;\n \n }", "private void addPanel(TabComponent tabComp, PlotPanel pnl) {\n tabbedPanePlots.addTab(null, null, pnl, tabComp.getTitle());\n pnl.setParent(this);\n // replace the tab component and select this new tab\n tabbedPanePlots.setTabComponentAt(tabbedPanePlots.getTabCount() - 1, tabComp);\n tabbedPanePlots.setSelectedIndex(tabbedPanePlots.getTabCount() - 1);\n requestFocus();\n }", "protected abstract void doAddTab(GridTab tab, JPiereIADTabpanel tabPanel);", "public void init() {\n\t\ttabbed = new JTabbedPane();\n\t\ttabbed.insertTab(\"Sesion\", null, getPanelSesion(), \"Control de la sesion\", 0);\n\t\ttabbed.insertTab(\"Evolución bolsa\", null, new JPanel(), \"Control de los usuarios\", 1);\n\t\ttabbed.insertTab(\"Eventos\", null, new JPanel(), \"Control de los eventos\", 2);\n\t\ttabbed.insertTab(\"Control de Agentes\", null, getPanelAgentes(), \"Control de los agentes\", 3);\n\t\tgetContentPane().add(tabbed);\n\t\ttabbed.setEnabledAt(1, false);\n\t\ttabbed.setEnabledAt(2, false);\n\t\tsetSize(new Dimension(800, 600));\n\t}", "public void setPanel (JPanel panel)\n {\n // remove the old panel\n removeAll();\n\t// add the new one\n\tadd(panel, BorderLayout.CENTER);\n // swing doesn't properly repaint after adding/removing children\n revalidate();\n repaint();\n }", "private static void addPanel(MouseEvent evt, TabComponent tabComp, PlotPanel pnl) {\n EDACCPlotTabView tabView = new EDACCPlotTabView();\n tabView.setLocation(evt.getXOnScreen(), evt.getYOnScreen());\n if (tabViews.size() > 0) {\n tabView.setSize(tabViews.get(0).getSize());\n } else {\n tabView.updateTitle(\"\");\n }\n tabViews.add(tabView);\n tabComp.setParent(tabView);\n tabView.addPanel(tabComp, pnl);\n tabView.updateAdditionalInformations(pnl);\n tabView.updateTitle(pnl.getPlot().getPlotTitle());\n tabViewCountChanged();\n }", "private static void addPanelInMainTabView(TabComponent tc, PlotPanel pnl) {\n EDACCPlotTabView tabView = getMainTabView();\n if (tc == null) {\n tabView.addPanel(pnl);\n } else {\n tabView.addPanel(tc, pnl);\n }\n }", "protected JTabbedPane createSettingsTabbedPane() {\r\n JTabbedPane settingsTabbedPane = new JTabbedPane();\r\n JPanel borderPanel, borderPanel2, panel, tabPanel;\r\n tabPanel = new JPanel();\r\n borderPanel = new JPanel( new BorderLayout() );\r\n panel = new JPanel();\r\n panel.add( new JLabel( \"Maximum number of players:\" ) );\r\n panel.add( maxNumberOfPlayersComponent );\r\n borderPanel.add( panel, BorderLayout.NORTH );\r\n panel = new JPanel();\r\n panel.add( new JLabel( \"Select the width of the map:\" ) );\r\n panel.add( mapWidthComponent );\r\n borderPanel.add( panel, BorderLayout.CENTER );\r\n borderPanel2 = new JPanel( new BorderLayout() );\r\n panel = new JPanel();\r\n panel.add( new JLabel( \"Height of the map:\" ) );\r\n panel.add( mapHeightComponent );\r\n borderPanel2.add( panel, BorderLayout.NORTH );\r\n panel = new JPanel();\r\n panel.add( new JLabel( \"Select game type:\" ) );\r\n panel.add( gameTypeComponent );\r\n borderPanel2.add( panel, BorderLayout.CENTER );\r\n panel = new JPanel();\r\n panel.add( new JLabel( \"Game password:\" ) );\r\n panel.add( passwordComponent );\r\n borderPanel2.add( panel, BorderLayout.SOUTH );\r\n borderPanel.add( borderPanel2, BorderLayout.SOUTH );\r\n tabPanel.add( borderPanel );\r\n settingsTabbedPane.addTab( \"General\", tabPanel );\r\n tabPanel = new JPanel();\r\n borderPanel = new JPanel( new BorderLayout() );\r\n tabPanel.add( borderPanel );\r\n panel = new JPanel();\r\n panel.add( isKillLimitComponent );\r\n panel.add( killLimitComponent );\r\n borderPanel.add( panel, BorderLayout.NORTH );\r\n panel = new JPanel();\r\n panel.add( isTimeLimitComponent );\r\n panel.add( timeLimitComponent );\r\n panel.add( new JLabel( \"minute(s).\" ) );\r\n borderPanel.add( panel, BorderLayout.CENTER );\r\n settingsTabbedPane.addTab( \"Limits\", tabPanel );\r\n tabPanel = new JPanel();\r\n borderPanel = new JPanel( new BorderLayout() );\r\n panel = new JPanel();\r\n panel.add( new JLabel( \"Enter welcome message:\" ) );\r\n borderPanel.add( panel, BorderLayout.NORTH );\r\n panel = new JPanel();\r\n panel.add( new JScrollPane( welcomeMessageComponent ) );\r\n borderPanel.add( panel, BorderLayout.CENTER );\r\n tabPanel.add( borderPanel );\r\n settingsTabbedPane.addTab( \"Welcome\", tabPanel );\r\n tabPanel = new JPanel();\r\n borderPanel = new JPanel( new BorderLayout() );\r\n panel = new JPanel();\r\n panel.add( new JLabel( \"Amount of wall:\" ) );\r\n panel.add( amountOfWallComponent );\r\n panel.add( new JLabel( \"%.\" ) );\r\n borderPanel.add( panel, BorderLayout.NORTH );\r\n panel = new JPanel();\r\n panel.add( new JLabel( \"Amount of stone:\" ) );\r\n panel.add( amountOfStoneComponent );\r\n panel.add( new JLabel( \"%.\" ) );\r\n borderPanel.add( panel, BorderLayout.CENTER );\r\n panel = new JPanel();\r\n panel.add( new JLabel( \"Amount of water:\" ) );\r\n panel.add( amountOfWaterComponent );\r\n panel.add( new JLabel( \"%.\" ) );\r\n borderPanel.add( panel, BorderLayout.SOUTH );\r\n tabPanel.add( borderPanel );\r\n settingsTabbedPane.addTab( \"Map generating\", tabPanel );\r\n tabPanel = new JPanel();\r\n borderPanel = new JPanel( new BorderLayout() );\r\n panel = new JPanel();\r\n panel.add( new JLabel( \"Cycle/period time of the server:\" ) );\r\n panel.add( periodTimeComponent );\r\n panel.add( new JLabel( \"ms.\" ) );\r\n borderPanel.add( panel, BorderLayout.NORTH );\r\n panel = new JPanel();\r\n panel.add( new JLabel( \"Amount of wall rubbles:\" ) );\r\n panel.add( amountOfWallRubblesComponent );\r\n panel.add( new JLabel( \"%.\" ) );\r\n borderPanel.add( panel, BorderLayout.CENTER );\r\n panel = new JPanel();\r\n panel.add( new JLabel( \"Amount of blood:\" ) );\r\n panel.add( amountOfBloodComponent );\r\n panel.add( new JLabel( \"%.\" ) );\r\n borderPanel.add( panel, BorderLayout.SOUTH );\r\n tabPanel.add( borderPanel );\r\n settingsTabbedPane.addTab( \"Extra\", tabPanel );\r\n for ( int tabCounter = settingsTabbedPane.getTabCount() - 1; tabCounter >= 0; tabCounter-- )\r\n settingsTabbedPane.setMnemonicAt( tabCounter, settingsTabbedPane.getTitleAt( tabCounter ).charAt( 0 ) );\r\n return settingsTabbedPane;\r\n }", "private void initComponents() {\n panel1 = new JPanel();\n jtpPflegeakte = new JTabbedPane();\n\n //======== this ========\n setLayout(new BoxLayout(this, BoxLayout.PAGE_AXIS));\n\n //======== panel1 ========\n {\n panel1.setLayout(new FormLayout(\n \"default:grow\",\n \"default:grow\"));\n\n //======== jtpPflegeakte ========\n {\n jtpPflegeakte.setTabPlacement(SwingConstants.BOTTOM);\n jtpPflegeakte.addChangeListener(e -> jtpPflegeakteStateChanged(e));\n }\n panel1.add(jtpPflegeakte, CC.xy(1, 1, CC.FILL, CC.FILL));\n }\n add(panel1);\n // JFormDesigner - End of component initialization //GEN-END:initComponents\n }", "public void onModuleLoad() {\n setId(\"tab-\" + COMPRA_DIRECTA_TABBED);\n setTitle(\"Items\");\n setLayout(new FitLayout());\n setBaseCls(\"x-plain\");\n this.setClosable(true);\n this.setId(\"TPfun50151\");\n setIconCls(\"tab-icon\");\n\n Panel pan_borderLayout = new Panel();\n pan_borderLayout.setLayout(new BorderLayout());\n pan_borderLayout.setBaseCls(\"x-plain\");\n Panel pan_centrofin = new Panel();\n //pan_centro.setTitle(\"Lista de Clientes\");\n pan_centrofin.setLayout(new FormLayout());\n pan_centrofin.setWidth(1300);\n pan_centrofin.setHeight(600);\n\n Panel pan_norte = new Panel();\n pan_norte.setLayout(new TableLayout(3));\n pan_norte.setBaseCls(\"x-plain\");\n pan_norte.setHeight(98);\n pan_norte.setPaddings(5);\n\n Panel pan_sud = new Panel();\n pan_sud.setLayout(new TableLayout(3));\n pan_sud.setBaseCls(\"x-plain\");\n pan_sud.setHeight(120);\n pan_sud.setPaddings(5);\n\nif (opcion.equalsIgnoreCase(\"3\")) {\n lista1 = new ListaCalzadoPedidoTallaUnion();\n lista1.onModuleLoad4();\n opcionnueva = \"101\";\n }\n if (opcion.equalsIgnoreCase(\"6\")) {\n lista1 = new ListaCalzadoPedidoTallaUnion();\n lista1.onModuleLoad5();\n opcionnueva = \"100\";\n }\n if (opcion.equalsIgnoreCase(\"7\")) {\n lista1 = new ListaCalzadoPedidoTallaUnion();\n lista1.onModuleLoad5();\n opcionnueva = \"100\";\n }\n\n if (opcion.equalsIgnoreCase(\"10\")) {\n lista1 = new ListaCalzadoPedidoTallaUnion();\n lista1.onModuleLoad5();\n opcionnueva = \"100\";\n }\n //init\n if (opcion.equalsIgnoreCase(\"14\")) {\n lista1 = new ListaCalzadoPedidoTallaUnion();\n lista1.onModuleLoad33();\n opcionnueva = \"102\";\n }\n if (opcion.equalsIgnoreCase(\"15\")) {\n lista1 = new ListaCalzadoPedidoTallaUnion();\n lista1.onModuleLoad33();\n opcionnueva = \"102\";\n //lista1.onModuleLoad5(idmarca,codigo,coleccionM,estiloM,nombre);\n }\n if (opcion.equalsIgnoreCase(\"4\")) {\n lista1 = new ListaCalzadoPedidoTallaUnion();\n lista1.onModuleLoad33();\n opcionnueva = \"102\";\n }\n if (opcion.equalsIgnoreCase(\"2\")) {\n lista1 = new ListaCalzadoPedidoTallaUnion();\n lista1.onModuleLoad5();\n opcionnueva = \"100\";\n }\n if (opcion.equalsIgnoreCase(\"31\")) {\n lista1 = new ListaCalzadoPedidoTallaUnion();\n lista1.onModuleLoad5();\n opcionnueva = \"100\";\n }\n\n\n Panel pan_centro = lista1.getPanel();\n\n FormPanel for_panel1 = new FormPanel();\n for_panel1.setBaseCls(\"x-plain\");\n for_panel1.setWidth(330);\n for_panel1.setLabelWidth(100);\n tex_marca = new TextField(\"Marca\", \"marca\", 200);\n tex_marca.setValue(marca);\n tex_marca.setReadOnly(true);\ncom_estilo = new ComboBox(\"Estilos\", \"idestilo\");\ncom_estilo.focus();\n // tex_modeloCP = new TextField(\"Modelo CP\", \"idmodelo\", 200);\n //tex_modeloCP.setValue(\"idmodelo\");\n\n for_panel1.add(tex_marca);\n\n for_panel1.add(com_estilo);\n // for_panel1.add(tex_modeloCP);\n\n FormPanel for_panel2 = new FormPanel();\n for_panel2.setBaseCls(\"x-plain\");\n for_panel2.setWidth(330);\n for_panel2.setLabelWidth(100);\n\n but_anadir = new Button(\"Anadir modelo nuevo\");\n Panel pan_botonescliente = new Panel();\n pan_botonescliente.setLayout(new HorizontalLayout(2));\n pan_botonescliente.setBaseCls(\"x-plain\");\n pan_botonescliente.add(but_anadir);\n\n\n com_modeloCV = new ComboBox(\"Buscar Modelos Anadir\", \"idmodelo\",400);\n com_modeloCVA = new ComboBox(\"Modelo Unido\", \"idmodelo\",400);\n\ntex_modeloCP = new TextField(\"codigo Nuevo\", \"idmodelonuevo\", 400);\n tex_modeloCP.setDisabled(false);\n \n for_panel2.add(com_modeloCV);\n for_panel2.add(com_modeloCVA);\n //for_panel2.add(tex_modeloCP);\n for_panel2.add(new PaddedPanel(pan_botonescliente, 5, 5, 5, 5), new TableLayoutData(2));\n \n FormPanel for_panel3 = new FormPanel();\n for_panel3.setBaseCls(\"x-plain\");\n for_panel3.setWidth(300);\n for_panel3.setLabelWidth(100);\n\n dat_fecha = new DateField(\"Fecha\", \"d-m-Y\");\n Date date = new Date();\n dat_fecha.setValue(Utils.getStringOfDate(date));\n\n for_panel3.add(dat_fecha);\n\n\n\n pan_norte.add(new PaddedPanel(for_panel1, 10));\n pan_norte.add(new PaddedPanel(for_panel2, 10));\n pan_norte.add(new PaddedPanel(for_panel3, 10));\n// pan_norte.add(new PaddedPanel(for_panel12, 0, 0, 13, 10));\n\n FormPanel for_panel4 = new FormPanel();\n for_panel4.setBaseCls(\"x-plain\");\n tex_totalpares = new TextField(\"Total Pares sin unir\", \"totalpares\");\n tex_totalpares2 = new TextField(\"Total Pares unidos\", \"totalparesunidos\");\n tex_totalbs = new TextField(\"Total Bs\", \"totalbs\");\n\n tex_totalcaja = new TextField(\"Codigo\", \"totalcaja\");\n\n for_panel4.add(tex_totalpares);\n \n for_panel4.add(tex_totalpares2);\n for_panel4.add(tex_totalbs);\n\n FormPanel for_panel6 = new FormPanel();\n for_panel6.setBaseCls(\"x-plain\");\n tea_descripcion = new TextArea(\"Observacion\", \"observacion\");\n tea_descripcion.setWidth(\"100%\");\n\n for_panel6.add(tea_descripcion);\n\n Panel pan_botones = new Panel();\n pan_botones.setLayout(new HorizontalLayout(10));\n pan_botones.setBaseCls(\"x-plain\");\n // pan_botones.setHeight(40);\n but_aceptar = new Button(\"registrar union\");\n but_cancelar = new Button(\"Cancelar\");\n but_limpiar = new Button(\"Limpiar\");\n //but_verproducto = new Button(\"Ver Producto\");\n pan_botones.add(but_aceptar);\n pan_botones.add(but_cancelar);\n pan_botones.add(but_limpiar);\n //pan_botones.add(but_verproducto);\n\n pan_sud.add(new PaddedPanel(for_panel4, 0, 0, 13, 10));\n //pan_sud.add(new PaddedPanel(for_panel5, 0, 0, 13, 10));\n pan_sud.add(new PaddedPanel(for_panel6, 3, 0, 13, 10));\n pan_sud.add(new PaddedPanel(pan_botones, 10, 200, 10, 10), new TableLayoutData(3));\n\nif (opcionnueva.equalsIgnoreCase(\"3\")) {\n lista2 = new ListaCalzadoPedidoTallaUnion2();\n lista2.onModuleLoad4();\n opcionnueva = \"101\";\n }\n if (opcion.equalsIgnoreCase(\"6\")) {\n lista2 = new ListaCalzadoPedidoTallaUnion2();\n lista2.onModuleLoad5();\n opcionnueva = \"100\";\n }\n if (opcion.equalsIgnoreCase(\"7\")) {\n lista2 = new ListaCalzadoPedidoTallaUnion2();\n lista2.onModuleLoad5();\n opcionnueva = \"100\";\n }\n\n if (opcion.equalsIgnoreCase(\"10\")) {\n lista2 = new ListaCalzadoPedidoTallaUnion2();\n lista2.onModuleLoad5();\n opcionnueva = \"100\";\n }\n //init\n if (opcion.equalsIgnoreCase(\"14\")) {\n lista2 = new ListaCalzadoPedidoTallaUnion2();\n lista2.onModuleLoad33();\n opcionnueva = \"102\";\n }\n if (opcion.equalsIgnoreCase(\"15\")) {\n lista2 = new ListaCalzadoPedidoTallaUnion2();\n lista2.onModuleLoad33();\n opcionnueva = \"102\";\n //lista1.onModuleLoad5(idmarca,codigo,coleccionM,estiloM,nombre);\n }\n if (opcion.equalsIgnoreCase(\"4\")) {\n lista2 = new ListaCalzadoPedidoTallaUnion2();\n lista2.onModuleLoad33();\n opcionnueva = \"102\";\n }\n if (opcion.equalsIgnoreCase(\"2\")) {\n lista2 = new ListaCalzadoPedidoTallaUnion2();\n lista2.onModuleLoad5();\n opcionnueva = \"100\";\n }\n if (opcion.equalsIgnoreCase(\"31\")) {\n lista2 = new ListaCalzadoPedidoTallaUnion2();\n lista2.onModuleLoad5();\n opcionnueva = \"100\";\n }\n\n Panel pan_oeste = lista2.getPanel();\n pan_centrofin.add(pan_centro);\n pan_centrofin.add(pan_oeste);\n pan_borderLayout.add(pan_norte, new BorderLayoutData(RegionPosition.NORTH));\n pan_borderLayout.add(pan_centrofin, new BorderLayoutData(RegionPosition.CENTER));\n pan_borderLayout.add(pan_sud, new BorderLayoutData(RegionPosition.SOUTH));\n add(pan_borderLayout);\n\n initCombos();\n //initValues();\n addListeners();\n\n }", "private void setTab() {\n\t\tTabHost.TabSpec showSpec = host.newTabSpec(ShowFragment.TAG);\r\n\t\tshowSpec.setIndicator(showLayout);\r\n\t\tshowSpec.setContent(new Dumm(getBaseContext()));\r\n\t\thost.addTab(showSpec);\r\n\r\n\t\tTabHost.TabSpec addSpec = host.newTabSpec(AddRecordFrag.TAG);\r\n\t\taddSpec.setIndicator(addLayout);\r\n\t\taddSpec.setContent(new Dumm(getBaseContext()));\r\n\t\thost.addTab(addSpec);\r\n\r\n\t\tTabHost.TabSpec chartSpec = host.newTabSpec(ChartShowFrag.TAG);\r\n\t\tchartSpec.setIndicator(chartLayout);\r\n\t\tchartSpec.setContent(new Dumm(getBaseContext()));\r\n\t\thost.addTab(chartSpec);\r\n\t}", "public MundoJuego( JPanel panel ) {\r\n\t\tthis.panel = panel;\r\n\t}", "public interface ITabPanel \n{\n /** Update is required because the board or data has changed. */\n public final static int REQUIRED_UPDATE = 1;\n \n /** Update is suggested by the refresh. */\n public final static int REFRESH_UPDATE = 2;\n \n /**\n * Used to initialize the ITabPanel and give it a refrence to the main panel. \n * @param mainPanel The MainPanel.\n */\n public void init(MainPanel mainPanel);\n \n /**\n * Method that can be called by the main panel to update this panel.\n * @param updateType The type of update.\n */\n public void update(int updateType);\n \n /**\n * Method that can be called to disable or enable the board.\n * @param b Boolean value used to determine to enable (true) or\n * disable (false).\n */\n public void enablePanel(boolean b);\n}", "private void initialize() {\r\n\t\tString titulo = \"\";\r\n\t\tif(getOp()==0){\r\n\t\t\ttitulo = \"Novo cadastro\";\r\n\t\t}else{\r\n\t\t\ttitulo = \"Venda\";\r\n\t\t}\r\n\t\tthis.setTitle(titulo);\r\n\t\tthis.setResizable(false);\r\n\r\n\t\tabaPrincipal = new JTabbedPane();\r\n\t\tabaDados = new JPanel();\r\n\t\tabaComissao = new JPanel();\r\n\r\n\t\t//--Dados da empresa representada\r\n\t\tJLabel lblRepresentada = new JLabel(\"Representada\");\r\n\t\tJLabel lblCnpjRepresentada = new JLabel(\"CNPJ\");\r\n\t\ttxtCnpjRepresentada = new JFormattedTextField(setMascara(\"##.###.###/####-##\"));\r\n\t\tJLabel lblNmRepresentada = new JLabel(\"Nome da empresa\");\r\n\t\tcmbNmRepresentada = new JComboBox(getRepresentadas());\r\n\t\ttxtNmRepresentada = new JTextField(\"\",56);\r\n\t\tcmbNmRepresentada.setPreferredSize(new Dimension(450, 20));\r\n\r\n\t\t//--Dados da empresa cliente\r\n\t\tJLabel lblCliente = new JLabel(\"Comprador\");\r\n\t\tJLabel lblCnpjCliente = new JLabel(\"CNPJ\");\r\n\t\ttxtCnpjCliente = new JFormattedTextField(setMascara(\"##.###.###/####-##\"));\r\n\t\tJLabel lblNmCliente = new JLabel(\"Nome da empresa\");\r\n\t\tcmbNmCliente = new JComboBox(getClientes());\r\n\t\ttxtNmCliente = new JTextField(\"\",40);\r\n\t\tcmbNmCliente.setPreferredSize(new Dimension(450, 20));\r\n\r\n\t\t//--Dados da empresa representada para guia comissao\r\n\t\tJLabel lblRepresentada2 = new JLabel(\"Representada\");\r\n\t\tJLabel lblCnpjRepresentada2 = new JLabel(\"CNPJ\");\r\n\t\ttxtCnpjRepresentada2 = new JFormattedTextField(setMascara(\"##.###.###/####-##\"));\r\n\t\tJLabel lblNmRepresentada2 = new JLabel(\"Nome da empresa\");\r\n\t\tcmbNmRepresentada2 = new JComboBox(getRepresentadas());\r\n\t\ttxtNmRepresentada2 = new JTextField(\"\",56);\r\n\t\tcmbNmRepresentada2.setPreferredSize(new Dimension(450, 20));\r\n\r\n\t\t//--Dados da empresa cliente para guia comissao\r\n\t\tJLabel lblCliente2 = new JLabel(\"Comprador\");\r\n\t\tJLabel lblCnpjCliente2 = new JLabel(\"CNPJ\");\r\n\t\ttxtCnpjCliente2 = new JFormattedTextField(setMascara(\"##.###.###/####-##\"));\r\n\t\tJLabel lblNmCliente2 = new JLabel(\"Nome da empresa\");\r\n\t\tcmbNmCliente2 = new JComboBox(getClientes());\r\n\t\ttxtNmCliente2 = new JTextField(\"\",40);\r\n\t\tcmbNmCliente2.setPreferredSize(new Dimension(450, 20));\r\n\r\n\t\t//--Dados da venda\r\n\t\tJLabel lblVenda = new JLabel(\"Venda realizada\");\r\n\t\tJLabel lblNtFiscal = new JLabel(\"Nota fiscal\");\r\n\t\ttxtNtFiscal = new JTextField(\"\",10);\r\n\t\tJLabel lblNtPedido = new JLabel(\"Pedido\");\r\n\t\ttxtNtPedido = new JTextField(\"\",10);\r\n\t\tJLabel lblDtVenda = new JLabel(\"Data da venda\");\r\n\t\ttxtDtVenda = new JFormattedTextField(setMascara(\"##/##/####\"));\r\n\t\tJLabel lblNmProduto = new JLabel(\"Produto\");\r\n\t\ttxtNmProduto = new JFormattedTextField(setMascara(\"*********************************************\"));\r\n\t\tJLabel lblVlProduto = new JLabel(\"Valor do produto\");\r\n\t\t//txtVlProduto = new JTextField(moneyFormat.format(DEFAULT_AMOUNT), 10);\r\n\t\ttxtVlProduto = new JTextField();\r\n\t\tJLabel lblMedida = new JLabel(\"Unidade de medida\");\r\n\t\tcmbMedida = new JComboBox(getUnidades());\r\n\t\tJLabel lblQtProduto = new JLabel(\"Quantidade\");\r\n\t\ttxtQtProduto = new JFormattedTextField(setMascara(\"######\"));\r\n\t\tJLabel lblVlAcrescido = new JLabel(\"Valor à acrescentar\");\r\n\t\ttxtVlAcrescido = new JTextField();\r\n\t\tJLabel lblVlFinal = new JLabel(\"Valor final da venda\");\r\n\t\ttxtVlFinal = new JTextField(\"\",10);\r\n\t\tJLabel lblDtEntrega = new JLabel(\"Data da entrega\");\r\n\t\ttxtDtEntrega = new JFormattedTextField(setMascara(\"##/##/####\"));\r\n\r\n\t\t//--Dados da venda para a guia comissão\r\n\t\tJLabel lblVenda2 = new JLabel(\"Venda realizada\");\r\n\t\tJLabel lblNtFiscal2 = new JLabel(\"Nota fiscal\");\r\n\t\ttxtNtFiscal2 = new JFormattedTextField(setMascara(\"********************\"));\r\n\t\tJLabel lblDtVenda2 = new JLabel(\"Data da venda\");\r\n\t\ttxtDtVenda2 = new JFormattedTextField(setMascara(\"##/##/####\"));\r\n\t\tJLabel lblVlFinal2 = new JLabel(\"Valor final da venda\");\r\n\t\ttxtVlFinal2 = new JFormattedTextField(setMascara(\"********************\"));\r\n\t\tJLabel lblDtEntrega2 = new JLabel(\"Data da entrega\");\r\n\t\ttxtDtEntrega2 = new JFormattedTextField(setMascara(\"##/##/####\"));\r\n\r\n\t\t//--Dados do vendedor\r\n\t\tJLabel lblVendedor = new JLabel(\"Vendedor\");\r\n\t\tJLabel lblMatricula = new JLabel(\"Matrícula\");\r\n\t\ttxtVendedor = new JTextField(\"\",10);\r\n\t\tJLabel lblNmVendedor = new JLabel(\"Nome do vendedor\");\r\n\t\tcmbVendedores = new JComboBox(getVendedores());\r\n\t\ttxtNmVendedor = new JTextField(\"\",40);\r\n\t\tcmbVendedores.setPreferredSize(new Dimension(450, 20));\r\n\t\tchkComissionado = new JCheckBox(\"Comissionado\");\r\n\r\n\t\t//--Dados do vendedor para aguia comissão\r\n\t\tJLabel lblVendedor2 = new JLabel(\"Vendedor\");\r\n\t\tJLabel lblMatricula2 = new JLabel(\"Matrícula\");\r\n\t\ttxtVendedor2 = new JTextField(\"\",10);\r\n\t\tJLabel lblNmVendedor2 = new JLabel(\"Nome do vendedor\");\r\n\t\tcmbVendedores2 = new JComboBox(getVendedores());\r\n\t\ttxtNmVendedor2 = new JTextField(\"\",40);\r\n\t\tcmbVendedores2.setPreferredSize(new Dimension(450, 20));\r\n\r\n\t\tJLabel lblObs = new JLabel(\"Observações\");\r\n\t\ttxtObs = new JTextArea();\r\n\t\tJScrollPane jspTxtObs = new JScrollPane(txtObs);\r\n\t\tjspTxtObs.setPreferredSize(new Dimension(40, 100));\r\n\r\n\t\t//--Guia comissão\r\n\t\tJLabel lblComissao = new JLabel(\"Comissão\");\r\n\t\ttxtComissao = new JTextField();\r\n\r\n\t\tbtnConfirmarComissao = new JButton(\"Confirmar\");\r\n\r\n\t\tlblDivisao = new JLabel(\"___________________________________________________________________________________________________________________\");\r\n\t\tbtnRelatorio = new JButton(\"Relatório\");\r\n\t\tbtnConfirmar = new JButton(\"Confirmar\");\r\n\t\tbtnCancelar = new JButton(\"Cancelar\");\r\n\r\n\t\tBox linhaUm = Box.createHorizontalBox();\r\n\t\tBox linhaDois = Box.createHorizontalBox();\r\n\t\tBox linhaTres = Box.createHorizontalBox();\r\n\t\tBox linhaQuatro = Box.createHorizontalBox();\r\n\t\tBox linhaCinco = Box.createHorizontalBox();\r\n\t\tBox linhaSeis = Box.createHorizontalBox();\r\n\t\tBox linhaSete = Box.createHorizontalBox();\r\n\t\tBox linhaOito = Box.createHorizontalBox();\r\n\t\tBox linhaNove = Box.createHorizontalBox();\r\n\t\tBox linhaDez = Box.createHorizontalBox();\r\n\t\tBox linhaOnze = Box.createHorizontalBox();\r\n\r\n\t\tBox linhaDoze = Box.createHorizontalBox();\r\n\t\tBox linhaTreze = Box.createHorizontalBox();\r\n\r\n\t\tlinhaUm.add(lblCliente);\r\n\t\tlinhaDois.add(lblCnpjCliente);\r\n\t\tlinhaDois.add(txtCnpjCliente);\r\n\t\tlinhaDois.add(Box.createHorizontalStrut(5));\r\n\t\tlinhaDois.add(lblNmCliente);\r\n\r\n\t\tlinhaTres.add(lblRepresentada);\r\n\t\tlinhaQuatro.add(lblCnpjRepresentada);\r\n\t\tlinhaQuatro.add(txtCnpjRepresentada);\r\n\t\tlinhaQuatro.add(Box.createHorizontalStrut(5));\r\n\t\tlinhaQuatro.add(lblNmRepresentada);\r\n\r\n\r\n\t\tlinhaCinco.add(lblVenda);\r\n\t\tlinhaSeis.add(lblNtPedido);\r\n\t\tlinhaSeis.add(txtNtPedido);\r\n\t\tlinhaSeis.add(Box.createHorizontalStrut(5));\r\n\t\tlinhaSeis.add(lblNtFiscal);\r\n\t\tlinhaSeis.add(txtNtFiscal);\r\n\t\tlinhaSeis.add(Box.createHorizontalStrut(5));\t\t\r\n\t\tlinhaSeis.add(lblDtVenda);\r\n\t\tlinhaSeis.add(txtDtVenda);\r\n\t\tlinhaSeis.add(Box.createHorizontalStrut(5));\t\r\n\t\tlinhaSeis.add(lblDtEntrega);\r\n\t\tlinhaSeis.add(txtDtEntrega);\t\r\n\t\tlinhaSete.add(lblNmProduto);\r\n\t\tlinhaSete.add(txtNmProduto);\r\n\t\tlinhaOito.add(lblVlProduto);\r\n\t\tlinhaOito.add(txtVlProduto);\r\n\t\tlinhaOito.add(Box.createHorizontalStrut(5));\t\r\n\t\tlinhaOito.add(lblMedida);\r\n\t\tlinhaOito.add(cmbMedida);\r\n\t\tlinhaOito.add(Box.createHorizontalStrut(5));\t\r\n\t\tlinhaOito.add(lblQtProduto);\r\n\t\tlinhaOito.add(txtQtProduto);\r\n\t\tlinhaOito.add(Box.createHorizontalStrut(5));\t\r\n\t\tlinhaOito.add(lblVlAcrescido);\r\n\t\tlinhaOito.add(txtVlAcrescido);\r\n\t\tlinhaNove.add(lblVlFinal);\r\n\t\tlinhaNove.add(txtVlFinal);\r\n\t\tlinhaNove.add(Box.createHorizontalStrut(5));\t\r\n\t\tlinhaNove.add(chkComissionado);\r\n\t\tlinhaDez.add(lblObs);\r\n\t\tlinhaOnze.add(jspTxtObs);\r\n\r\n\t\tBox linhaA = Box.createHorizontalBox();\r\n\t\tBox linhaB = Box.createHorizontalBox();\r\n\t\tBox linhaC = Box.createHorizontalBox();\r\n\t\tBox linhaD = Box.createHorizontalBox();\r\n\r\n\t\tBox linhaG = Box.createHorizontalBox();\r\n\t\tBox linhaH = Box.createHorizontalBox();\r\n\t\tBox linhaI = Box.createHorizontalBox();\r\n\t\tBox linhaJ = Box.createHorizontalBox();\r\n\t\tBox linhaL = Box.createHorizontalBox();\r\n\t\tBox linhaM = Box.createHorizontalBox();\r\n\t\tBox linhaN = Box.createHorizontalBox();\r\n\t\tBox linhaO = Box.createHorizontalBox();\r\n\t\tBox linhaP = Box.createHorizontalBox();\r\n\r\n\t\tlinhaA.add(lblVendedor);\r\n\t\tlinhaB.add(lblMatricula);\r\n\t\tlinhaB.add(txtVendedor);\r\n\t\tlinhaB.add(Box.createHorizontalStrut(5));\r\n\t\tlinhaB.add(lblNmVendedor);\r\n\r\n\t\tlinhaL.add(lblVendedor2);\r\n\t\tlinhaM.add(lblMatricula2);\r\n\t\tlinhaM.add(txtVendedor2);\r\n\t\tlinhaM.add(Box.createHorizontalStrut(5));\r\n\t\tlinhaM.add(lblNmVendedor2);\r\n\r\n\r\n\t\tlinhaN.add(lblNtFiscal2);\r\n\t\tlinhaN.add(txtNtFiscal2);\r\n\t\tlinhaN.add(Box.createHorizontalStrut(5));\r\n\t\tlinhaN.add(lblDtVenda2);\r\n\t\tlinhaN.add(txtDtVenda2);\r\n\t\tlinhaN.add(Box.createHorizontalStrut(5));\r\n\t\tlinhaN.add(lblDtEntrega2);\r\n\t\tlinhaN.add(txtDtEntrega2);\r\n\r\n\t\tlinhaO.add(lblVlFinal2);\r\n\t\tlinhaO.add(txtVlFinal2);\r\n\t\tlinhaO.add(Box.createHorizontalStrut(5));\r\n\t\tlinhaO.add(lblComissao);\r\n\t\tlinhaO.add(txtComissao);\r\n\t\tlinhaO.add(Box.createHorizontalStrut(5));\r\n\t\tlinhaO.add(btnConfirmarComissao);\t\r\n\r\n\t\tlinhaP.add(lblVenda2);\r\n\r\n\t\tlinhaG.add(lblCliente2);\r\n\t\tlinhaH.add(lblCnpjCliente2);\r\n\t\tlinhaH.add(txtCnpjCliente2);\r\n\t\tlinhaH.add(Box.createHorizontalStrut(5));\r\n\t\tlinhaH.add(lblNmCliente2);\r\n\r\n\t\tlinhaI.add(lblRepresentada2);\r\n\t\tlinhaJ.add(lblCnpjRepresentada2);\r\n\t\tlinhaJ.add(txtCnpjRepresentada2);\r\n\t\tlinhaJ.add(Box.createHorizontalStrut(5));\r\n\t\tlinhaJ.add(lblNmRepresentada2);\r\n\r\n\t\tBox comissao = Box.createVerticalBox();\r\n\r\n\t\tif(getOp()==0){\r\n\t\t\tlinhaDois.add(cmbNmCliente);\r\n\t\t\tlinhaQuatro.add(cmbNmRepresentada);\r\n\t\t\tlinhaB.add(cmbVendedores);\r\n\t\t\tlinhaM.add(cmbVendedores2);\r\n\t\t\tlinhaH.add(cmbNmCliente2);\r\n\t\t\tlinhaJ.add(cmbNmRepresentada2);\r\n\t\t}else{\r\n\t\t\tlinhaDois.add(txtNmCliente);\r\n\t\t\tlinhaQuatro.add(txtNmRepresentada);\r\n\t\t\tlinhaB.add(txtNmVendedor);\r\n\t\t\tlinhaM.add(txtNmVendedor2);\r\n\t\t\tlinhaH.add(txtNmCliente2);\r\n\t\t\tlinhaJ.add(txtNmRepresentada2);\r\n\t\t}\r\n\r\n\t\tcomissao.add(linhaG);\r\n\t\tcomissao.add(Box.createVerticalStrut(5));\t\t\r\n\t\tcomissao.add(linhaH);\r\n\t\tcomissao.add(Box.createVerticalStrut(20));\r\n\t\tcomissao.add(linhaI);\r\n\t\tcomissao.add(Box.createVerticalStrut(5));\r\n\t\tcomissao.add(linhaJ);\r\n\t\tcomissao.add(Box.createVerticalStrut(20));\r\n\t\tcomissao.add(linhaL);\t\r\n\t\tcomissao.add(Box.createVerticalStrut(5));\r\n\t\tcomissao.add(linhaM);\r\n\t\tcomissao.add(Box.createVerticalStrut(20));\r\n\t\tcomissao.add(linhaP);\r\n\t\tcomissao.add(Box.createVerticalStrut(5));\r\n\t\tcomissao.add(linhaN);\r\n\t\tcomissao.add(Box.createVerticalStrut(5));\r\n\t\tcomissao.add(linhaO);\r\n\r\n\r\n\t\tlinhaDoze.add(lblDivisao);\r\n\t\tlinhaTreze.add(btnRelatorio);\r\n\t\tlinhaTreze.add(Box.createHorizontalStrut(5));\r\n\t\tlinhaTreze.add(btnConfirmar);\r\n\t\tlinhaTreze.add(Box.createHorizontalStrut(5));\r\n\t\tlinhaTreze.add(btnCancelar);\r\n\r\n\t\tBox linhas = Box.createVerticalBox();\r\n\t\tlinhas.add(linhaUm);\r\n\t\tlinhas.add(Box.createVerticalStrut(5));\t\t\r\n\t\tlinhas.add(linhaDois);\r\n\t\tlinhas.add(Box.createVerticalStrut(20));\r\n\t\tlinhas.add(linhaTres);\r\n\t\tlinhas.add(Box.createVerticalStrut(5));\r\n\t\tlinhas.add(linhaQuatro);\r\n\t\tlinhas.add(Box.createVerticalStrut(20));\r\n\t\tlinhas.add(linhaA);\r\n\t\tlinhas.add(Box.createVerticalStrut(5));\r\n\t\tlinhas.add(linhaB);\r\n\t\tlinhas.add(linhaC);\r\n\t\tlinhas.add(linhaD);\r\n\t\tlinhas.add(Box.createVerticalStrut(20));\r\n\t\tlinhas.add(linhaCinco);\t\r\n\t\tlinhas.add(Box.createVerticalStrut(5));\r\n\t\tlinhas.add(linhaSeis);\r\n\t\tlinhas.add(Box.createVerticalStrut(5));\r\n\t\tlinhas.add(linhaSete);\r\n\t\tlinhas.add(Box.createVerticalStrut(5));\r\n\t\tlinhas.add(linhaOito);\r\n\t\tlinhas.add(Box.createVerticalStrut(5));\r\n\t\tlinhas.add(linhaNove);\t\t\r\n\t\tlinhas.add(Box.createVerticalStrut(10));\r\n\t\tlinhas.add(linhaDez);\r\n\t\tlinhas.add(linhaOnze);\r\n\t\tlinhas.add(Box.createVerticalStrut(5));\r\n\t\tlinhas.add(linhaOnze);\r\n\r\n\t\tBox principal = Box.createVerticalBox();\t\t\t\t\t\t\r\n\r\n\t\tabaDados.add(linhas);\r\n\t\tabaComissao.add(comissao);\r\n\r\n\t\tabaPrincipal.addTab(\"Dados da venda\", null, abaDados, null);\r\n\r\n\r\n\t\tprincipal.add(abaPrincipal);\r\n\t\tprincipal.add(linhaDoze);\r\n\t\tprincipal.add(Box.createVerticalStrut(10));\r\n\t\tprincipal.add(linhaTreze);\r\n\r\n\t\t//--Ações \r\n\t\tbtnCancelar.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tdispose();\r\n\t\t\t}});\r\n\t\tbtnConfirmarComissao.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\r\n\t\t\t}});\r\n\t\tjContentPane = new JPanel();\r\n\t\tjContentPane.add(principal);\r\n\t\tgetContentPane().add(jContentPane);\r\n\t\tpack();\r\n\r\n\t\t//------------Ações\r\n\t\ttxtVlProduto.addFocusListener(new FocusAdapter() {\r\n\t\t\tpublic void focusLost(FocusEvent e) {\r\n\t\t\t\ttry{\r\n\t\t\t\t\tdouble valor = Double.parseDouble(txtVlProduto.getText().replace(\".\",\",\").replace(\",\",\".\"));\r\n\t\t\t\t\tNumberFormat nf = NumberFormat.getCurrencyInstance();\r\n\t\t\t\t\tString valorFormatado = nf.format(valor);\r\n\t\t\t\t\ttxtVlProduto.setText(valorFormatado);\r\n\t\t\t\t\tif(txtVlProduto.getText().trim().equals(\"\") || txtVlProduto.equals(\"R$ 0,00\")){\r\n\t\t\t\t\t\ttxtVlProduto.setText(\"\");\r\n\t\t\t\t\t\ttxtVlProduto.grabFocus();\r\n\t\t\t\t\t}\r\n\t\t\t\t}catch(Exception ex){\r\n\t\t\t\t\ttxtVlProduto.setText(\"\");\r\n\t\t\t\t\ttxtVlProduto.grabFocus();\t\t\t\t\t\r\n\t\t\t\t}}\r\n\t\t});\r\n\r\n\t\tbtnConfirmarComissao.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tVenda cadastrar = new Venda();\r\n\t\t\t\tcadastrar.ajustaDados(txtCnpjRepresentada.getText(), txtNmRepresentada2.getText(), txtCnpjCliente.getText(), txtNmCliente2.getText(), txtNtFiscal.getText(), txtDtVenda.getText(), txtNmProduto.getText(), txtVlProduto.getText(), (String) cmbMedida.getSelectedItem(), txtQtProduto.getText(), txtVlAcrescido.getText(), txtVlFinal.getText(), txtDtEntrega.getText(), txtVendedor.getText(), txtNmVendedor2.getText(), txtObs.getText(), txtNtPedido.getText());\r\n\t\t\t\tif(cadastrar.validaDados()>0){\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Encontrada inconsistências nos dados informados:\\n\"+cadastrar.getMsgStatus(),\"Erro\",2);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tif(op==1){\r\n\t\t\t\t\t\tif (JOptionPane.showConfirmDialog(new JFrame(),\r\n\t\t\t\t\t\t\t\t\"Deseja alterar o valor da comissão desta venda?\\n\\nNota fiscal nº \"+txtNtFiscal.getText(), \"Confirmação\",\r\n\t\t\t\t\t\t\t\tJOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION){\r\n\t\t\t\t\t\t\tcadastrar.ajustaComissao(txtComissao.getText().trim());\r\n\t\t\t\t\t\t\tcadastrar.alterarComissao();\r\n\t\t\t\t\t\t\ttxtComissao.setEditable(false);\r\n\t\t\t\t\t\t\tchkComissionado.setSelected(true);\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\t\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tcadastrar.ajustaComissao(txtComissao.getText().trim());\r\n\t\t\t\t\t\tcadastrar.cadastrarComissao();\t\r\n\t\t\t\t\t\ttxtComissao.setEditable(false);\r\n\t\t\t\t\t\tchkComissionado.setSelected(true);\r\n\t\t\t\t\t}\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}});\r\n\t\tbtnConfirmar.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\ttry{\r\n\t\t\t\t\tVenda cadastrar = new Venda();\r\n\t\t\t\t\tcadastrar.ajustaDados(txtCnpjRepresentada.getText(), (String) cmbNmRepresentada.getSelectedItem(), txtCnpjCliente.getText(), (String) cmbNmCliente.getSelectedItem(), txtNtFiscal.getText(), txtDtVenda.getText(), txtNmProduto.getText(), txtVlProduto.getText(), (String) cmbMedida.getSelectedItem(), txtQtProduto.getText(), txtVlAcrescido.getText(), txtVlFinal.getText(), txtDtEntrega.getText(), txtVendedor.getText(), (String) cmbVendedores.getSelectedItem(), txtObs.getText(), txtNtPedido.getText());\r\n\t\t\t\t\tif(cadastrar.validaDados()>0){\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Encontrada inconsistências nos dados informados:\\n\"+cadastrar.getMsgStatus(),\"Erro\",2);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(cadastrar.verificaExiste()==0){\r\n\t\t\t\t\t\t\tif (JOptionPane.showConfirmDialog(new JFrame(),\r\n\t\t\t\t\t\t\t\t\t\"Deseja concluir o cadastro?\\n\\nOs dados cadastrados de venda não poderam mais serem alterados.\", \"Confirmação\",\r\n\t\t\t\t\t\t\t\t\tJOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION){\r\n\t\t\t\t\t\t\t\tif(getPermissao()==1){\r\n\t\t\t\t\t\t\t\t\tabaPrincipal.addTab(\"Comissão\", null, abaComissao, null);\t\r\n\t\t\t\t\t\t\t\t\tajustaGuiaComissao();\r\n\t\t\t\t\t\t\t\t\ttxtComissao.setEditable(true);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tcadastrar.cadastrar();\t\r\n\t\t\t\t\t\t\t\tdesabilitaCampos();\r\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Venda ja está cadastrada.\\n\\nNota fiscal nº \"+txtNtFiscal.getText(),\"Erro\",2);\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}catch(Exception er){\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Valor final da venda fora do limite suportado\",\"Erro\",2);\r\n\t\t\t\t\thabilitaCampos();\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t}});\r\n\t\tbtnRelatorio.addActionListener(new ActionListener() {\r\n\t\t\t@SuppressWarnings(\"deprecation\")\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tVenda gerar = new Venda();\r\n\t\t\t\tgerar.gerarRelatorio(getPermissao(), (String) cmbNmCliente.getSelectedItem(), (String) cmbNmRepresentada.getSelectedItem(), (String) cmbVendedores.getSelectedItem(), \"/ /\", \"/ /\", txtNtFiscal.getText().trim()).show();\r\n\t\t\t}});\r\n\t\ttxtDtVenda.setInputVerifier(new InputVerifier() {\r\n\t\t\tpublic boolean verify(JComponent component) {\r\n\t\t\t\tif(((JTextComponent) component).getText().trim().equals(\"/ /\")){\r\n\t\t\t\t\ttxtDtVenda.setText(\"\");\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tVenda consultar = new Venda();\r\n\t\t\t\t\tif(consultar.validaData(txtDtVenda.getText())>0){\r\n\t\t\t\t\t\ttxtDtVenda.setText(\"\");\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\"Data de venda inválida\",\"Erro\",2);\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\treturn ((JFormattedTextField) txtDtVenda).isEditValid();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\ttxtDtEntrega.setInputVerifier(new InputVerifier() {\r\n\t\t\tpublic boolean verify(JComponent component) {\r\n\t\t\t\tif(((JTextComponent) component).getText().trim().equals(\"/ /\")){\r\n\t\t\t\t\ttxtDtEntrega.setText(\"\");\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\"Data de entrega inválida\",\"Erro\",2);\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tVenda consultar = new Venda();\r\n\t\t\t\t\tif(consultar.validaData(txtDtEntrega.getText())>0){\r\n\t\t\t\t\t\ttxtDtEntrega.setText(\"\");\r\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\"Data de entrega inválida\",\"Erro\",2);\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif(consultar.validaDataEntrega(txtDtVenda.getText(), txtDtEntrega.getText())>0){\r\n\t\t\t\t\t\t\ttxtDtEntrega.setText(\"\");\r\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\"Data de entrega inválida\",\"Erro\",2);\r\n\t\t\t\t\t\t\treturn false;\t\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\treturn ((JFormattedTextField) txtDtVenda).isEditValid();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\ttxtQtProduto.addFocusListener(new FocusAdapter() {\r\n\t\t\tpublic void focusLost(FocusEvent e) {\r\n\t\t\t\ttry{\r\n\t\t\t\t\tif(txtQtProduto.getText().trim().equals(\"\") || txtQtProduto.getText().trim().equals(\"000000\")){\r\n\t\t\t\t\t\ttxtQtProduto.grabFocus();\r\n\t\t\t\t\t}\t\r\n\t\t\t\t}catch(Exception ex){\r\n\t\t\t\t\ttxtQtProduto.setText(\"000001\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\ttxtVlAcrescido.addFocusListener(new FocusAdapter() {\r\n\t\t\tpublic void focusLost(FocusEvent e) {\r\n\t\t\t\ttry{\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\tdouble valor = Double.parseDouble(txtVlAcrescido.getText().replace(\".\",\",\").replace(\",\",\".\"));\r\n\t\t\t\t\t\tNumberFormat nf = NumberFormat.getCurrencyInstance();\r\n\t\t\t\t\t\tString valorFormatado = nf.format(valor);\r\n\t\t\t\t\t\ttxtVlAcrescido.setText(valorFormatado);\t\r\n\t\t\t\t\t}catch(Exception ex){\r\n\t\t\t\t\t\ttxtVlAcrescido.setText(\"R$ 0,00\");\r\n\t\t\t\t\t};\r\n\t\t\t\t\tdouble vl = Double.parseDouble(txtVlProduto.getText().replace(\".\",\"\").replace(\",\",\".\").substring(3));\r\n\t\t\t\t\t//double vl = Double.parseDouble(txtVlProduto.getText().replace(\".\",\",\").replace(\",\",\".\").substring(3));\r\n\t\t\t\t\tdouble qt = Double.parseDouble(txtQtProduto.getText().trim());\r\n\t\t\t\t\t/*if(txtQtProduto.getText().trim().equals(\"\")){\r\n\t\t\t\t\ttxtQtProduto.setText(\"000000\");\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tqt = Double.parseDouble(txtQtProduto.getText().trim());\t\r\n\t\t\t\t\t}*/\t\t\t\t\t\r\n\t\t\t\t\tdouble vlAcres = Double.parseDouble(txtVlAcrescido.getText().replace(\".\",\"\").replace(\",\",\".\").substring(3));\r\n\t\t\t\t\tdouble total = (qt * vl)+vlAcres;\r\n\t\t\t\t\tBigDecimal bd = new BigDecimal (total);\r\n\t\t\t\t\tbd.add (new BigDecimal (total));\r\n\t\t\t\t\tDecimalFormat df = new DecimalFormat(\"#,##0.00\", new DecimalFormatSymbols(LOCAL));\r\n\t\t\t\t\tString s = df.format(bd);\r\n\t\t\t\t\ttxtVlFinal.setText(\"R$ \"+s);\t\r\n\t\t\t\t}catch(Exception ex){\r\n\t\t\t\t\t//txtVlProduto.grabFocus();\r\n\t\t\t\t}}\r\n\t\t});\r\n\t\ttxtComissao.addFocusListener(new FocusAdapter() {\r\n\t\t\tpublic void focusLost(FocusEvent e) {\r\n\t\t\t\ttry{\r\n\t\t\t\t\tdouble valor = Double.parseDouble(txtComissao.getText().replace(\".\",\",\").replace(\",\",\".\"));\r\n\t\t\t\t\tNumberFormat nf = NumberFormat.getCurrencyInstance();\r\n\t\t\t\t\tString valorFormatado = nf.format(valor);\r\n\t\t\t\t\ttxtComissao.setText(valorFormatado);\t\r\n\t\t\t\t}catch(Exception ex){\r\n\t\t\t\t\ttxtComissao.setText(\"\");\r\n\t\t\t\t\t//txtComissao.grabFocus();\r\n\t\t\t\t}}\r\n\t\t});\r\n\r\n\t\t//-Combobox\r\n\t\tcmbNmCliente.addItemListener(new ItemListener() {\r\n\t\t\tpublic void itemStateChanged(ItemEvent e) {\r\n\t\t\t\tif (e.getStateChange() == ItemEvent.SELECTED){\r\n\t\t\t\t\tVenda consultar = new Venda();\r\n\t\t\t\t\ttxtCnpjCliente.setText(consultar.cnpjCliente((String) cmbNmCliente.getSelectedItem()));\r\n\t\t\t\t}\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tcmbNmRepresentada.addItemListener(new ItemListener() {\r\n\t\t\tpublic void itemStateChanged(ItemEvent e) {\r\n\t\t\t\tif (e.getStateChange() == ItemEvent.SELECTED){\r\n\t\t\t\t\tVenda consultar = new Venda();\r\n\t\t\t\t\ttxtCnpjRepresentada.setText(consultar.cnpjRepresentada((String) cmbNmRepresentada.getSelectedItem()));\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tcmbVendedores.addItemListener(new ItemListener() {\r\n\t\t\tpublic void itemStateChanged(ItemEvent e) {\r\n\t\t\t\tif (e.getStateChange() == ItemEvent.SELECTED){\r\n\t\t\t\t\tVenda consultar = new Venda();\r\n\t\t\t\t\ttxtVendedor.setText(consultar.codFuncionario((String) cmbVendedores.getSelectedItem()));\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public void setPanelConfiguration(){\n\t\tthis.panelConfiguration.setStructurePanel();\n\t\tthis.panelConfiguration.setPanelConfiguration();\n\t}", "private void $$$setupUI$$$() {\n panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n rootTabControl = new JTabbedPane();\n panel1.add(rootTabControl, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(200, 200), null, 0, false));\n }", "public Messagespace(PetalEditor petal_editor,\n Model petal_model) {\n super(new GridLayout(1,1));\n\n this.petal_editor = petal_editor;\n this.petal_model = petal_model;\n this.editor = editor;\n\n JTabbedPane tabbedPane = new JTabbedPane();\n tabbedPane.setTabPlacement(JTabbedPane.RIGHT);\n\n\n s_errorsTextArea = new JTextArea();\n s_errorsTextArea.setRows(Constants.TEXTROWS);\n JPanel errorsPanel = new JPanel(new GridLayout(1,1));\n errorsPanel.add(new JScrollPane(s_errorsTextArea));\n tabbedPane.addTab(ERRORS, errorsPanel);\n\n s_statisticsTextArea = new JTextArea();\n s_statisticsTextArea.setRows(Constants.TEXTROWS);\n JPanel statisticsPanel = new JPanel(new GridLayout(1,1));\n statisticsPanel.add(new JScrollPane(s_statisticsTextArea));\n tabbedPane.addTab(STATISTICS, statisticsPanel);\n\n s_messagesTextArea = new JTextArea();\n s_messagesTextArea.setRows(Constants.TEXTROWS);\n JPanel messagesPanel = new JPanel(new GridLayout(1,1));\n messagesPanel.add(new JScrollPane(s_messagesTextArea));\n tabbedPane.addTab(MESSAGES, messagesPanel);\n\n add(tabbedPane);\n\n setBorder(new LineBorder(Color.black,1));\n\n s_errorsTextArea.setEditable(false);\n s_statisticsTextArea.setEditable(false);\n s_messagesTextArea.setEditable(false);\n\n tabbedPane.setSelectedIndex(MESSAGES_ID);\n \n \n\n }", "public void onModuleLoad() {\n\t\tTabLayoutPanel tabPanel = new TabLayoutPanel(2.5, Unit.EM);\n\t\tFlexTable ft3 = new FlexTable();\n\t\tFlexCellFormatter cf3 = ft3.getFlexCellFormatter();\n\t\tDecoratorPanel dp3 = new DecoratorPanel();\n\t\tHorizontalPanel hp = new HorizontalPanel();\n\t\tButton plusButton = new Button(\"+\");\n\t\tButton minusButton = new Button(\"-\");\n\t\tButton devideButton = new Button(\"/\");\n\t\tButton multiplyButton = new Button(\"*\");\n\t\thp.add(plusButton);\n\t\thp.add(minusButton);\n\t\thp.add(devideButton);\n\t\thp.add(multiplyButton);\n\t\tfinal TextBox l1 = new TextBox();\n\t\tfinal TextBox l2 = new TextBox();\n\t\tfinal Label wynik = new Label();\n\t\tft3.setHTML(0,0,\"Podaj pierwsza liczbe:\");\n\t\tft3.setWidget(0,1, l1);\n\t\tft3.setHTML(1,0, \"Podaj druga liczbe:\");\n\t\tft3.setWidget(1,1,l2);\n\t\tft3.setHTML(2,0, \"Wybierz operacje:\");\n\t\tft3.setWidget(2, 1, hp);\n\t\tft3.setHTML(3,0, \"Wynik\");\n\t\tft3.setWidget(3,1, wynik);\n\t\tdp3.add(ft3);\n\t\t//RootPanel.get(\"mainContainer\").add(hp);\n\t\t//pan1.add(hp);\n\t\ttabPanel.add(dp3, new HTML(\"Prosty kalkulator\"));\n\t\tfinal TextBox t1 = new TextBox();\n\t\tfinal ListBox list = new ListBox();\n\t\tlist.addItem(\"2\");\n\t\tlist.addItem(\"4\");\n\t\tlist.addItem(\"8\");\n\t\tlist.addItem(\"16\");\n\t\tfinal Label wynik10 = new Label();\n\t\tFlexTable ft = new FlexTable();\n\t\tButton przeliczButton = new Button(\"Przelicz\");\n\t\tft.setHTML(0, 0, \"Podaj liczbe w systemie 10:\");\n\t\tft.setWidget(0, 1, t1);\n\t\tft.setHTML(1, 0, \"Podaj docelowy system liczbowy:\");\n\t\tft.setWidget(1, 1, list);\n\t\tft.setHTML(2, 0, \"Wynik:\");\n\t\tft.setWidget(2, 1, wynik10);\n\t\tft.setWidget(3, 0, przeliczButton);\n\t\tFlexCellFormatter cf = ft.getFlexCellFormatter();\n\t\tDecoratorPanel dp = new DecoratorPanel();\n\t\tcf.setColSpan(3,0,2);\n\t\tcf.setHorizontalAlignment(3,0,HasHorizontalAlignment.ALIGN_CENTER);\n\t\tdp.setWidget(ft);\n\t\ttabPanel.add(dp, new HTML(\"Przeliczanie z 10 na inne\"));\n\t\tFlexTable ft2 = new FlexTable();\n\t\tFlexCellFormatter cf2 = ft2.getFlexCellFormatter();\n\t\tDecoratorPanel dp2 = new DecoratorPanel();\n\t\tfinal TextBox t2 = new TextBox();\n\t\tfinal ListBox list2 = new ListBox();\n\t\tlist2.addItem(\"2\");\n\t\tlist2.addItem(\"4\");\n\t\tlist2.addItem(\"8\");\n\t\tlist2.addItem(\"16\");\n\t\tButton przelicztoButton = new Button(\"Przelicz\");\n\t\tfinal Label wynik20 = new Label();\n\t\tft2.setHTML(0, 0, \"Podaj system w jakim zapisana jest liczba:\");\n\t\tft2.setWidget(0, 1, list2);\n\t\tft2.setHTML(1, 0, \"Podaj liczbe:\");\n\t\tft2.setWidget(1, 1, t2);\n\t\tft2.setHTML(2, 0, \"Wynik:\");\n\t\tft2.setWidget(2, 1, wynik20);\n\t\tft2.setWidget(3, 0, przelicztoButton);\n\t\tcf2.setColSpan(3,0,2);\n\t\tcf2.setHorizontalAlignment(3,0,HasHorizontalAlignment.ALIGN_CENTER);\n\t\tdp2.setWidget(ft2);\n\t\t//RootPanel.get(\"mainContainer\").add(tabPanel);\n\t\ttabPanel.add(dp2, new HTML(\"Przeliczanie do systemu 10\"));\n\t\tRootLayoutPanel.get().add(tabPanel);\n\t\tprzelicztoButton.addClickHandler(new ClickHandler() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tcalcService.przeliczto10(t2.getText(), Integer.parseInt(list.getItemText(list.getSelectedIndex())), new AsyncCallback<Integer>() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\twynik.setText(SERVER_ERROR);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onSuccess(Integer result) {\n\t\t\t\t\t\twynik20.setText(\" \" + result);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tprzeliczButton.addClickHandler(new ClickHandler() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tcalcService.przelicz10(Integer.parseInt(t1.getText()), Integer.parseInt(list.getItemText(list.getSelectedIndex())), new AsyncCallback<String>() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\twynik.setText(SERVER_ERROR);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onSuccess(String result) {\n\t\t\t\t\t\twynik10.setText(\" \" + result);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tplusButton.addClickHandler(new ClickHandler() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tcalcService.dodaj(Integer.parseInt(l1.getText()), Integer.parseInt(l2.getText()), new AsyncCallback<Integer>() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\twynik.setText(SERVER_ERROR);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onSuccess(Integer result) {\n\t\t\t\t\t\twynik.setText(\"\" + result);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tminusButton.addClickHandler(new ClickHandler() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tcalcService.odejmij(Integer.parseInt(l1.getText()), Integer.parseInt(l2.getText()), new AsyncCallback<Integer>() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\twynik.setText(SERVER_ERROR);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onSuccess(Integer result) {\n\t\t\t\t\t\twynik.setText(\"\" + result);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tdevideButton.addClickHandler(new ClickHandler() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tcalcService.dziel(Integer.parseInt(l1.getText()), Integer.parseInt(l2.getText()), new AsyncCallback<Double>() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\twynik.setText(SERVER_ERROR);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onSuccess(Double result) {\n\t\t\t\t\t\twynik.setText(\"\" + result);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tmultiplyButton.addClickHandler(new ClickHandler() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tcalcService.mnoz(Integer.parseInt(l1.getText()), Integer.parseInt(l2.getText()), new AsyncCallback<Double>() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\twynik.setText(SERVER_ERROR);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onSuccess(Double result) {\n\t\t\t\t\t\twynik.setText(\"\" + result);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t}", "private void setPanel(final Panel PANEL)\r\n\t{\r\n\t\tthis.panel = PANEL;\r\n\t}", "public void setFrameAdminUsuariosBloq(FrameAdminUsuariosBloq panel) {\n \tadminBloq = panel;\n }", "@NbBundle.Messages({\"DomainDetailsPanel.miniTimelineTitle.text=Timeline\"})\n @ThreadConfined(type = ThreadConfined.ThreadType.AWT)\n void configureArtifactTabs(String tabName) {\n selectedTabName = tabName;\n if (StringUtils.isBlank(selectedTabName)) {\n selectedTabName = Bundle.DomainDetailsPanel_miniTimelineTitle_text();\n }\n selectTab();\n jTabbedPane1.addChangeListener(new ChangeListener() {\n @Override\n public void stateChanged(ChangeEvent e) {\n if (jTabbedPane1.getSelectedIndex() >= 0) {\n String newTabTitle = jTabbedPane1.getTitleAt(jTabbedPane1.getSelectedIndex());\n if (selectedTabName == null || !selectedTabName.equals(newTabTitle)) {\n selectedTabName = newTabTitle;\n Component selectedComponent = jTabbedPane1.getSelectedComponent();\n if (selectedComponent instanceof DomainArtifactsTabPanel) {\n runDomainWorker((DomainArtifactsTabPanel) selectedComponent, true);\n } else if (selectedComponent instanceof MiniTimelinePanel) {\n runMiniTimelineWorker((MiniTimelinePanel) selectedComponent, true);\n }\n }\n }\n }\n });\n }", "public FeePanel(String admnissionNo, JTabbedPane student_admission_tabbedpane_details, String year) {\n try {\n initComponents();\n tabedPane=student_admission_tabbedpane_details;\n admno=admnissionNo;\n this.year=year;\n txt_fee_no.setVisible(false);\n combo_year.setSelectedItem(this.year);\n txt_fee_module.setText(admno); \n lbl_pay_no.setVisible(false);\n txt_fee_no.setVisible(false);\n radio_fee_module_cash.setActionCommand(\"Cash\");\n radio_fee_module_cash.setSelected(true);\n radio_fee_module_cheque.setActionCommand(\"Cheque\");\n radio_fee_module_receipt.setActionCommand(\"Receipt\");\n dbconn=new DatabaseConnect();\n conn=dbconn.dbConnect();\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(FeePanel.class.getName()).log(Level.SEVERE, null, ex);\n } catch (SQLException ex) {\n Logger.getLogger(FeePanel.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public TabControlPanel(JTabbedPane jtp, MyTabPreviewPainter previewPainter) {\n super();\n this.jtp = jtp;\n this.closed = new LinkedList<>();\n\n this.setLayout(new BorderLayout());\n JPanel contents = getContents(jtp, previewPainter);\n contents.setOpaque(false);\n RadianceThemingCortex.ComponentOrParentScope.setButtonIgnoreMinimumSize(contents, true);\n this.add(contents, BorderLayout.CENTER);\n }", "private void setupPanels() {\n for (String className : PANEL_CLASS_NAMES) {\n try {\n Class<?> c = Class.forName(className);\n Object p = c.newInstance();\n VisualizationPanel panel = (VisualizationPanel) p;\n panel.setGcTraceSet(gcTraceSet);\n gcTraceSet.addListener(panel.getListener());\n panels.add(panel);\n tabbedPane.addTab(panel.getPanelName(), panel.getPanel());\n } catch (ClassNotFoundException e) {\n ErrorReporting.warning(className + \" not found\");\n } catch (InstantiationException e) {\n ErrorReporting.warning(\"could not instantiate \" + className);\n } catch (IllegalAccessException e) {\n ErrorReporting.warning(\"could not access constructor of \" + className);\n } catch (ClassCastException e) {\n ErrorReporting.warning(\"could not cast \" + className + \" to VisualizationPanel\");\n }\n }\n ErrorReporting.fatalError(panels.size() > TRACE_MANAGEMENT_PANEL_INDEX,\n \"There must be at least one panel set up, \" +\n \"the trace management panel.\");\n try {\n traceManagementPanel =\n (TraceManagementPanel) panels.get(TRACE_MANAGEMENT_PANEL_INDEX);\n } catch (ClassCastException e) {\n ErrorReporting.fatalError(\"could not cast panel with index \" +\n TRACE_MANAGEMENT_PANEL_INDEX + \" to TraceManagementPanel\");\n }\n ErrorReporting.fatalError(traceManagementPanel != null,\n \"The trace management panel should not be null\");\n }", "public void habilitaPanel() {\n\n\t\tthis.panelFondo.setEnabled(true);\n\t\tlabelImagen.setEnabled(true);\n\t\t//comboNombreCarta.setEnabled(true);\n\t\tthis.jScrollPane1.setEnabled(true);\n\t\tthis.jScrollPane1.getVerticalScrollBar().setEnabled(true);\n\t\tjScrollPane1.getHorizontalScrollBar().setEnabled(true);\n\t\tthis.jScrollPane2.setEnabled(true);\n\t\tthis.jScrollPane2.getVerticalScrollBar().setEnabled(true);\n\t\tjScrollPane2.getHorizontalScrollBar().setEnabled(true);\n\t\tlistaSeleccionadas.setEnabled(true);\n\t\tlistaDisponibles.setEnabled(true);\n\t\tthis.labelFondo.setEnabled(true);\n\t\ttextoNumeroCartas.setEnabled(true);\n\t\ttextoRaza.setEnabled(true);\n\t\tbotCargar.setEnabled(true);\n\t\tbotGuardar.setEnabled(true);\n\t\tbotGuardarComo.setEnabled(true);\n\t\tbotSalir.setEnabled(true);\n\t\tbotAyuda.setEnabled(true);\n\t\tbotNuevaBaraja.setEnabled(true);\n\t\ttextoBarajaCargada.setEnabled(true);\n\t\tthis.setEnabled(true);\n this.NumeroPuntos.setEnabled(true);\n\n\t}", "public void addPanel(PlotPanel pnl) {\n addPanel(new TabComponent(this, null), pnl);\n }", "public void habilitaPanel() {\n\t\t// contentPane.setEnabled(true);\n\t\tpanelPrincipal.setEnabled(true);\n\t\tpanelBotones.setEnabled(true);\n\t\tboton1Jugador.setEnabled(true);\n\t\tbotonJuegoRed.setEnabled(true);\n\t\tbotonEditar.setEnabled(true);\n\t\tbotonDemo.setEnabled(true);\n\t\tbotonReglas.setEnabled(true);\n\t\tbotonAyuda.setEnabled(true);\n\t\tbotonRecibir.setEnabled(true);\n\t\tbotonEnviar.setEnabled(true);\n\t\tbotonDescargaSobre.setEnabled(true);\n\t\tbotonSalir.setEnabled(true);\n\t\tlabelFondo.setEnabled(true);\n\t\tlabelDibujo.setEnabled(true);\n\n\t}", "private void setupTab() {\n setLayout(new BorderLayout());\n JSplitPane mainSplit = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);\n mainSplit.setDividerLocation(160);\n mainSplit.setBorder(BorderFactory.createEmptyBorder());\n\n // set up the MBean tree panel (left pane)\n tree = new XTree(this);\n tree.setCellRenderer(new XTreeRenderer());\n tree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);\n tree.addTreeSelectionListener(this);\n tree.addTreeWillExpandListener(this);\n tree.addMouseListener(ml);\n JScrollPane theScrollPane = new JScrollPane(tree, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,\n JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);\n JPanel treePanel = new JPanel(new BorderLayout());\n treePanel.add(theScrollPane, BorderLayout.CENTER);\n mainSplit.add(treePanel, JSplitPane.LEFT, 0);\n\n // set up the MBean sheet panel (right pane)\n viewer = new XDataViewer(this);\n sheet = new XSheet(this);\n mainSplit.add(sheet, JSplitPane.RIGHT, 0);\n\n add(mainSplit);\n }", "private void initComponents() {\n\t\tjtpHojaValores = new JideTabbedPane();\r\n\t\tspHistorialSueldos = new JScrollPane();\r\n\t\tpanelDatosPersonales = new JPanel();\r\n\t\tbtnImprimirSueldos = new JButton();\r\n\t\tlblEmpleado = new JLabel();\r\n\t\ttxtEmpleado = new JTextField();\r\n\t\tbtnBuscarEmpleado = new JButton();\r\n\t\tlblEmpleado2 = new JLabel();\r\n\t\ttxtContrato = new JTextField();\r\n\t\tbtnBuscarContrato = new JButton();\r\n\t\tcbUnirContratos = new JCheckBox();\r\n\t\tspTblSueldos = new JScrollPane();\r\n\t\ttblSueldos = new JTable();\r\n\t\tspDeudas = new JScrollPane();\r\n\t\tpanelDeudas = new JPanel();\r\n\t\tbtnImprimirDeudas = new JButton();\r\n\t\tcbDeudaDetallada = new JCheckBox();\r\n\t\tspTblDeudas = new JScrollPane();\r\n\t\ttblDeudas = new JTable();\r\n\t\tspVacaciones = new JScrollPane();\r\n\t\tpanelVacaciones = new JPanel();\r\n\t\tbtnImprimirVac = new JButton();\r\n\t\tpanelBotonesFormacion = new JPanel();\r\n\t\tspTblVacaciones = new JScrollPane();\r\n\t\ttblVacaciones = new JTable();\r\n\t\tspBeneficios = new JScrollPane();\r\n\t\tpanelBeneficios = new JPanel();\r\n\t\tcbFechaTipoRol = new JCheckBox();\r\n\t\tbtnImprimirBeneficios = new JButton();\r\n\t\tspTblBeneficios = new JScrollPane();\r\n\t\ttblBeneficios = new JTable();\r\n\t\tCellConstraints cc = new CellConstraints();\r\n\r\n\t\t//======== this ========\r\n\t\tsetName(\"Hoja de Valores\");\r\n\t\tsetLayout(new FormLayout(\r\n\t\t\t\"default:grow\",\r\n\t\t\t\"fill:default:grow\"));\r\n\r\n\t\t//======== jtpHojaValores ========\r\n\t\t{\r\n\t\t\t\r\n\t\t\t//======== spHistorialSueldos ========\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t//======== panelDatosPersonales ========\r\n\t\t\t\t{\r\n\t\t\t\t\tpanelDatosPersonales.setLayout(new FormLayout(\r\n\t\t\t\t\t\tnew ColumnSpec[] {\r\n\t\t\t\t\t\t\tnew ColumnSpec(Sizes.dluX(10)),\r\n\t\t\t\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\t\t\t\tFormFactory.DEFAULT_COLSPEC,\r\n\t\t\t\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\t\t\t\tnew ColumnSpec(Sizes.dluX(160)),\r\n\t\t\t\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\t\t\t\tFormFactory.DEFAULT_COLSPEC,\r\n\t\t\t\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\t\t\t\tnew ColumnSpec(ColumnSpec.FILL, Sizes.dluX(70), FormSpec.DEFAULT_GROW),\r\n\t\t\t\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\t\t\t\tnew ColumnSpec(Sizes.dluX(10))\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tnew RowSpec[] {\r\n\t\t\t\t\t\t\tnew RowSpec(Sizes.dluY(10)),\r\n\t\t\t\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\r\n\t\t\t\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\r\n\t\t\t\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\r\n\t\t\t\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\r\n\t\t\t\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\t\t\t\tnew RowSpec(Sizes.dluY(12)),\r\n\t\t\t\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\r\n\t\t\t\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\t\t\t\tnew RowSpec(RowSpec.CENTER, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),\r\n\t\t\t\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\t\t\t\tnew RowSpec(Sizes.dluY(10))\r\n\t\t\t\t\t\t}));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//---- btnImprimirSueldos ----\r\n\t\t\t\t\tbtnImprimirSueldos.setText(\"IS\");\r\n\t\t\t\t\tpanelDatosPersonales.add(btnImprimirSueldos, cc.xywh(3, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//---- lblEmpleado ----\r\n\t\t\t\t\tlblEmpleado.setText(\"Empleado: \");\r\n\t\t\t\t\tpanelDatosPersonales.add(lblEmpleado, cc.xywh(3, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//---- txtEmpleado ----\r\n\t\t\t\t\ttxtEmpleado.setEditable(false);\r\n\t\t\t\t\tpanelDatosPersonales.add(txtEmpleado, cc.xy(5, 5));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//---- btnBuscarEmpleado ----\r\n\t\t\t\t\tbtnBuscarEmpleado.setText(\"BE\");\r\n\t\t\t\t\tpanelDatosPersonales.add(btnBuscarEmpleado, cc.xywh(7, 5, 1, 1, CellConstraints.LEFT, CellConstraints.FILL));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//---- lblEmpleado2 ----\r\n\t\t\t\t\tlblEmpleado2.setText(\"Contrato: \");\r\n\t\t\t\t\tpanelDatosPersonales.add(lblEmpleado2, cc.xywh(3, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//---- txtContrato ----\r\n\t\t\t\t\ttxtContrato.setEditable(false);\r\n\t\t\t\t\tpanelDatosPersonales.add(txtContrato, cc.xy(5, 7));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//---- btnBuscarContrato ----\r\n\t\t\t\t\tbtnBuscarContrato.setText(\"BC\");\r\n\t\t\t\t\tpanelDatosPersonales.add(btnBuscarContrato, cc.xywh(7, 7, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//---- cbUnirContratos ----\r\n\t\t\t\t\tcbUnirContratos.setText(\"Unir contratos\");\r\n\t\t\t\t\tpanelDatosPersonales.add(cbUnirContratos, cc.xywh(3, 9, 3, 1));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//======== spTblSueldos ========\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//---- tblSueldos ----\r\n\t\t\t\t\t\ttblSueldos.setPreferredScrollableViewportSize(new Dimension(450, 140));\r\n\t\t\t\t\t\ttblSueldos.setModel(new DefaultTableModel(\r\n\t\t\t\t\t\t\tnew Object[][] {\r\n\t\t\t\t\t\t\t\t{\"\", null, null},\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\tnew String[] {\r\n\t\t\t\t\t\t\t\t\"Incremento\", \"Fecha cambio\", \"Sueldo ($)\"\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tboolean[] columnEditable = new boolean[] {\r\n\t\t\t\t\t\t\t\tfalse, false, false\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\tpublic boolean isCellEditable(int rowIndex, int columnIndex) {\r\n\t\t\t\t\t\t\t\treturn columnEditable[columnIndex];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tspTblSueldos.setViewportView(tblSueldos);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tpanelDatosPersonales.add(spTblSueldos, cc.xywh(3, 13, 7, 3));\r\n\t\t\t\t}\r\n\t\t\t\tspHistorialSueldos.setViewportView(panelDatosPersonales);\r\n\t\t\t}\r\n\t\t\tjtpHojaValores.addTab(\"Historial de Sueldos\", spHistorialSueldos);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//======== spDeudas ========\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t//======== panelDeudas ========\r\n\t\t\t\t{\r\n\t\t\t\t\tpanelDeudas.setLayout(new FormLayout(\r\n\t\t\t\t\t\tnew ColumnSpec[] {\r\n\t\t\t\t\t\t\tnew ColumnSpec(Sizes.dluX(10)),\r\n\t\t\t\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\t\t\t\tFormFactory.DEFAULT_COLSPEC,\r\n\t\t\t\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\t\t\t\tnew ColumnSpec(Sizes.dluX(90)),\r\n\t\t\t\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\t\t\t\tFormFactory.DEFAULT_COLSPEC,\r\n\t\t\t\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\t\t\t\tnew ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),\r\n\t\t\t\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\t\t\t\tnew ColumnSpec(Sizes.dluX(10))\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tnew RowSpec[] {\r\n\t\t\t\t\t\t\tnew RowSpec(Sizes.dluY(10)),\r\n\t\t\t\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\r\n\t\t\t\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\r\n\t\t\t\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\r\n\t\t\t\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\t\t\t\tnew RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),\r\n\t\t\t\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\t\t\t\tnew RowSpec(Sizes.dluY(10))\r\n\t\t\t\t\t\t}));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//---- btnImprimirDeudas ----\r\n\t\t\t\t\tbtnImprimirDeudas.setText(\"ID\");\r\n\t\t\t\t\tpanelDeudas.add(btnImprimirDeudas, cc.xywh(3, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//---- cbDeudaDetallada ----\r\n\t\t\t\t\tcbDeudaDetallada.setText(\"Detallado\");\r\n\t\t\t\t\tpanelDeudas.add(cbDeudaDetallada, cc.xywh(3, 5, 3, 1));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//======== spTblDeudas ========\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//---- tblDeudas ----\r\n\t\t\t\t\t\ttblDeudas.setPreferredScrollableViewportSize(new Dimension(450, 140));\r\n\t\t\t\t\t\ttblDeudas.setModel(new DefaultTableModel(\r\n\t\t\t\t\t\t\tnew Object[][] {\r\n\t\t\t\t\t\t\t\t{null, null, null, null, null, null},\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\tnew String[] {\r\n\t\t\t\t\t\t\t\t\"Rubro\", \"Descripci\\u00f3n\", \"Tipo Rol\", \"Fecha Cobro\", \"Estado\", \"Valor\"\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tboolean[] columnEditable = new boolean[] {\r\n\t\t\t\t\t\t\t\tfalse, false, false, false, false, false\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\tpublic boolean isCellEditable(int rowIndex, int columnIndex) {\r\n\t\t\t\t\t\t\t\treturn columnEditable[columnIndex];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tspTblDeudas.setViewportView(tblDeudas);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tpanelDeudas.add(spTblDeudas, cc.xywh(3, 7, 7, 3));\r\n\t\t\t\t}\r\n\t\t\t\tspDeudas.setViewportView(panelDeudas);\r\n\t\t\t}\r\n\t\t\tjtpHojaValores.addTab(\"Deudas\", spDeudas);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//======== spVacaciones ========\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t//======== panelVacaciones ========\r\n\t\t\t\t{\r\n\t\t\t\t\tpanelVacaciones.setLayout(new FormLayout(\r\n\t\t\t\t\t\tnew ColumnSpec[] {\r\n\t\t\t\t\t\t\tnew ColumnSpec(Sizes.dluX(10)),\r\n\t\t\t\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\t\t\t\tFormFactory.DEFAULT_COLSPEC,\r\n\t\t\t\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\t\t\t\tFormFactory.DEFAULT_COLSPEC,\r\n\t\t\t\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\t\t\t\tnew ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),\r\n\t\t\t\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\t\t\t\tnew ColumnSpec(Sizes.dluX(10))\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tnew RowSpec[] {\r\n\t\t\t\t\t\t\tnew RowSpec(Sizes.dluY(10)),\r\n\t\t\t\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\t\t\t\tnew RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW),\r\n\t\t\t\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\r\n\t\t\t\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\r\n\t\t\t\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\t\t\t\tnew RowSpec(RowSpec.CENTER, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),\r\n\t\t\t\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\t\t\t\tnew RowSpec(Sizes.dluY(10))\r\n\t\t\t\t\t\t}));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//---- btnImprimirVac ----\r\n\t\t\t\t\tbtnImprimirVac.setText(\"IV\");\r\n\t\t\t\t\tpanelVacaciones.add(btnImprimirVac, cc.xywh(3, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//======== panelBotonesFormacion ========\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tpanelBotonesFormacion.setLayout(new FormLayout(\r\n\t\t\t\t\t\t\tnew ColumnSpec[] {\r\n\t\t\t\t\t\t\t\tFormFactory.DEFAULT_COLSPEC,\r\n\t\t\t\t\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\t\t\t\t\tFormFactory.DEFAULT_COLSPEC,\r\n\t\t\t\t\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\t\t\t\t\tFormFactory.DEFAULT_COLSPEC\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\tRowSpec.decodeSpecs(\"default\")));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tpanelVacaciones.add(panelBotonesFormacion, cc.xywh(3, 5, 5, 1));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//======== spTblVacaciones ========\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//---- tblVacaciones ----\r\n\t\t\t\t\t\ttblVacaciones.setPreferredScrollableViewportSize(new Dimension(450, 160));\r\n\t\t\t\t\t\ttblVacaciones.setModel(new DefaultTableModel(\r\n\t\t\t\t\t\t\tnew Object[][] {\r\n\t\t\t\t\t\t\t\t{null, null, null, null},\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\tnew String[] {\r\n\t\t\t\t\t\t\t\t\"Periodo(Fecha Ini - Fecha Fin)\", \"Dias Tomados\", \"Fecha Inicio\", \"Fecha Fin\"\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tboolean[] columnEditable = new boolean[] {\r\n\t\t\t\t\t\t\t\tfalse, false, false, false\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\tpublic boolean isCellEditable(int rowIndex, int columnIndex) {\r\n\t\t\t\t\t\t\t\treturn columnEditable[columnIndex];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tspTblVacaciones.setViewportView(tblVacaciones);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tpanelVacaciones.add(spTblVacaciones, cc.xywh(3, 7, 5, 3));\r\n\t\t\t\t}\r\n\t\t\t\tspVacaciones.setViewportView(panelVacaciones);\r\n\t\t\t}\r\n\t\t\tjtpHojaValores.addTab(\"Vacaciones\", spVacaciones);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//======== spBeneficios ========\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t//======== panelBeneficios ========\r\n\t\t\t\t{\r\n\t\t\t\t\tpanelBeneficios.setLayout(new FormLayout(\r\n\t\t\t\t\t\tnew ColumnSpec[] {\r\n\t\t\t\t\t\t\tnew ColumnSpec(Sizes.dluX(10)),\r\n\t\t\t\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\t\t\t\tFormFactory.DEFAULT_COLSPEC,\r\n\t\t\t\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\t\t\t\tnew ColumnSpec(Sizes.dluX(90)),\r\n\t\t\t\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\t\t\t\tFormFactory.DEFAULT_COLSPEC,\r\n\t\t\t\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\t\t\t\tFormFactory.DEFAULT_COLSPEC,\r\n\t\t\t\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\t\t\t\tnew ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),\r\n\t\t\t\t\t\t\tFormFactory.LABEL_COMPONENT_GAP_COLSPEC,\r\n\t\t\t\t\t\t\tnew ColumnSpec(Sizes.dluX(10))\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tnew RowSpec[] {\r\n\t\t\t\t\t\t\tnew RowSpec(Sizes.dluY(10)),\r\n\t\t\t\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\r\n\t\t\t\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\r\n\t\t\t\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\t\t\t\tFormFactory.DEFAULT_ROWSPEC,\r\n\t\t\t\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\t\t\t\tnew RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),\r\n\t\t\t\t\t\t\tFormFactory.LINE_GAP_ROWSPEC,\r\n\t\t\t\t\t\t\tnew RowSpec(Sizes.dluY(10))\r\n\t\t\t\t\t\t}));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//---- cbFechaTipoRol ----\r\n\t\t\t\t\tcbFechaTipoRol.setText(\"Fecha(Mes/A\\u00f1o) de Tipo de Rol\");\r\n\t\t\t\t\tpanelBeneficios.add(cbFechaTipoRol, cc.xywh(3, 5, 3, 1));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//---- btnImprimirBeneficios ----\r\n\t\t\t\t\tbtnImprimirBeneficios.setText(\"IBS\");\r\n\t\t\t\t\tpanelBeneficios.add(btnImprimirBeneficios, cc.xywh(3, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT));\r\n\t\t\t\t\t\r\n\t\t\t\t\t//======== spTblBeneficios ========\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//---- tblBeneficios ----\r\n\t\t\t\t\t\ttblBeneficios.setPreferredScrollableViewportSize(new Dimension(450, 160));\r\n\t\t\t\t\t\ttblBeneficios.setModel(new DefaultTableModel(\r\n\t\t\t\t\t\t\tnew Object[][] {\r\n\t\t\t\t\t\t\t\t{null, null, null, null, null},\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\tnew String[] {\r\n\t\t\t\t\t\t\t\t\"Tipo\", \"Fecha Inicio\", \"Fecha Fin\", \"Estado\", \"Valor \"\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tboolean[] columnEditable = new boolean[] {\r\n\t\t\t\t\t\t\t\tfalse, false, false, false, false\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\tpublic boolean isCellEditable(int rowIndex, int columnIndex) {\r\n\t\t\t\t\t\t\t\treturn columnEditable[columnIndex];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tspTblBeneficios.setViewportView(tblBeneficios);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tpanelBeneficios.add(spTblBeneficios, cc.xywh(3, 7, 9, 3));\r\n\t\t\t\t}\r\n\t\t\t\tspBeneficios.setViewportView(panelBeneficios);\r\n\t\t\t}\r\n\t\t\tjtpHojaValores.addTab(\"Beneficios\", spBeneficios);\r\n\t\t\t\r\n\t\t}\r\n\t\tadd(jtpHojaValores, cc.xy(1, 1));\r\n\t\t// JFormDesigner - End of component initialization //GEN-END:initComponents\r\n\t}", "public void asetaPanelli(JPanel panel)\n {\n pane.removeAll();\n pane.add(panel);\n Refresh();\n }", "public void inhabilitaPanel() {\n\n\t\t//comboNombreCarta.setEnabled(false);\n\t\tjScrollPane1.setEnabled(false);\n\t\tjScrollPane1.getVerticalScrollBar().setEnabled(false);\n\t\tjScrollPane1.getHorizontalScrollBar().setEnabled(false);\n\t\tjScrollPane2.setEnabled(false);\n\t\tjScrollPane2.getVerticalScrollBar().setEnabled(false);\n\t\tjScrollPane2.getHorizontalScrollBar().setEnabled(false);\n\t\tlistaSeleccionadas.setEnabled(false);\n\t\tlistaDisponibles.setEnabled(false);\n\t\tlabelFondo.setEnabled(false);\n\t\ttextoNumeroCartas.setEnabled(false);\n\t\ttextoRaza.setEnabled(false);\n\t\tbotCargar.setEnabled(false);\n\t\tbotGuardar.setEnabled(false);\n\t\tbotGuardarComo.setEnabled(false);\n\t\tbotSalir.setEnabled(false);\n\t\tbotAyuda.setEnabled(false);\n\t\tbotNuevaBaraja.setEnabled(false);\n\t\ttextoBarajaCargada.setEnabled(false);\n\t\tthis.panelFondo.setEnabled(false);\n\t\tlabelImagen.setEnabled(false);\n this.NumeroPuntos.setEnabled(false);\n\n\t}", "public Modulo1() {\n initComponents();\n setLocationRelativeTo(null);\n setResizable(false);\n //línea para habilitar o deshabilitar pestañas\n //jTabbedPane.removeTabAt(0);\n \n }", "private void createTabs(){\n canvasPanel = new JPanel();\n canvasPanel.setLayout(new BorderLayout());\n canvasPanel.add(mCanvas, BorderLayout.CENTER);\n canvasPanel.setMinimumSize(new Dimension(100,50));\n \n // Create the options and properties panel\n optionPanel = new JPanel();\n optionPanel.setLayout(new FlowLayout());\n\n // Set the size\n optionPanel.setMinimumSize(new Dimension(30,30));\t\n optionPanel.setPreferredSize(new Dimension(200,10));\n\n // Create the log area\n mLogArea = new JTextArea(5,20);\n mLogArea.setMargin(new Insets(5,5,5,5));\n mLogArea.setEditable(false);\n JScrollPane logScrollPane = new JScrollPane(mLogArea);\n \n // Das SplitPanel wird in optionPanel (links) und canvasPanel (rechts) unterteilt\n JSplitPane split = new JSplitPane();\n split.setOrientation(JSplitPane.HORIZONTAL_SPLIT);\n split.setLeftComponent(canvasPanel);\n split.setRightComponent(optionPanel);\n \n JSplitPane splitLog = new JSplitPane();\n splitLog.setOrientation(JSplitPane.VERTICAL_SPLIT);\n splitLog.setBottomComponent(logScrollPane);\n splitLog.setTopComponent(split);\n splitLog.setResizeWeight(1);\n \n mMainFrame.add(splitLog, BorderLayout.CENTER); \n }", "public void actPanel(String aux){\n\t\tint index=this.a.getTabbedPane().getSelectedIndex();\n\t\ta.getTabbedPane().setVisible(false);\n\t\t\n\t\t//usuario=this.obtenerUsuarios();\n\t\tVector<Usuario>medi=new Vector<Usuario>();\n\t\tVector<Usuario>tec=new Vector<Usuario>();\n\t\tfor(int i=0;i<usuario.size();i++){\n\t\t\tif(usuario.get(i).getRol().equals(\"medico\")){\n\t\t\t\tif(usuario.get(i).getUser().toLowerCase().contains(aux.toLowerCase()) || aux.equals(\"\")){\n\t\t\t\t\tmedi.add(usuario.get(i));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif(usuario.get(i).getUser().toLowerCase().contains(aux.toLowerCase()) || aux.equals(\"\")){\n\t\t\t\t\ttec.add(usuario.get(i));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\ta.actPanel(medi, tec,elimi,this);\n\t\tthis.a.getTabbedPane().setSelectedIndex(index);\n\n\t\ta.getTabbedPane().setVisible(true);\n\t}", "public void setTabTitle(ChatPanel chatPanel, String title)\n {\n int index = this.chatTabbedPane.indexOfComponent(chatPanel);\n\n if(index > -1)\n this.chatTabbedPane.setTitleAt(index, title);\n }", "public static void setActiveTab(Tab tab) {\n\n try {\n controller.tabPane.getTabs().add(controller.appointmentTab);\n controller.tabPane.getTabs().add(controller.bookingTab);\n controller.tabPane.getTabs().add(controller.customerTab);\n controller.tabPane.getTabs().add(controller.employeeTab);\n controller.tabPane.getTabs().add(controller.malfunctionTab);\n controller.tabPane.getTabs().add(controller.statisticTab);\n controller.tabPane.getTabs().add(controller.vehicleTab);\n\n SingleSelectionModel<Tab> selectionModel = controller.tabPane.getSelectionModel();\n\n selectionModel.select(tab);\n } catch (NullPointerException e) {\n e.printStackTrace();\n }\n }", "public void tabChange() {\r\n\t}", "TabbelPane() {\r\n\t\t\tpanelDB = new JPanelCluster(\"mine\", new EventFromDb());\r\n\t\t\tpanelFile = new JPanelCluster(\"store from file\", new EventFromFile());\r\n\t\t\tImageIcon icon = new ImageIcon(\"database.png\");\r\n\t\t\tImage image = icon.getImage();\r\n\t\t\tImage newimage = image.getScaledInstance(20, 20, java.awt.Image.SCALE_SMOOTH);\r\n\t\t\ticon.setImage(newimage);\r\n\t\t\tschermata.addTab(\"DB\", icon, panelDB);\r\n\t\t\ticon = new ImageIcon(\"file.png\");\r\n\t\t\timage = icon.getImage();\r\n\t\t\tnewimage = image.getScaledInstance(20, 20, java.awt.Image.SCALE_SMOOTH);\r\n\t\t\ticon.setImage(newimage);\r\n\t\t\tschermata.addTab(\"file\", icon, panelFile);\r\n\t\t\tsetVisible(true);\r\n\t\t}", "private void addControl() {\n // Gan adapter va danh sach tab\n PagerAdapter adapter = new PagerAdapter(getSupportFragmentManager());\n // Them noi dung cac tab\n adapter.AddFragment(new TourMapTab());\n adapter.AddFragment(new TourInfoTab());\n adapter.AddFragment(new TourMapImageTab());\n // Set adapter danh sach tab\n ViewPager viewPager = ActivityManager.getInstance().activityTourTabsBinding.viewpager;\n TabLayout tabLayout = ActivityManager.getInstance().activityTourTabsBinding.tablayout;\n viewPager.setAdapter(adapter);\n tabLayout.setupWithViewPager(viewPager);\n // Them vach ngan cach cac tab\n View root = tabLayout.getChildAt(0);\n if (root instanceof LinearLayout) {\n ((LinearLayout) root).setShowDividers(LinearLayout.SHOW_DIVIDER_MIDDLE);\n GradientDrawable drawable = new GradientDrawable();\n drawable.setColor(getResources().getColor(R.color.colorPrimaryDark));\n drawable.setSize(2, 1);\n ((LinearLayout) root).setDividerPadding(10);\n ((LinearLayout) root).setDividerDrawable(drawable);\n }\n // Icon cac tab\n tabLayout.getTabAt(0).setIcon(R.drawable.tour_map_icon_select);\n tabLayout.getTabAt(1).setIcon(R.mipmap.tour_info_icon);\n tabLayout.getTabAt(2).setIcon(R.mipmap.tour_map_image_icon);\n\n // Doi mau tab icon khi click\n tabLayout.addOnTabSelectedListener(new TabLayout.ViewPagerOnTabSelectedListener(viewPager) {\n @Override\n public void onTabSelected(TabLayout.Tab tab) {\n super.onTabSelected(tab);\n switch (tab.getPosition()){\n case 0:\n tab.setIcon(R.drawable.tour_map_icon_select);\n break;\n case 1:\n tab.setIcon(R.drawable.tour_info_icon_select);\n break;\n case 2:\n tab.setIcon(R.mipmap.tour_map_image_icon_select);\n break;\n default:\n break;\n }\n }\n\n @Override\n public void onTabUnselected(TabLayout.Tab tab) {\n super.onTabUnselected(tab);\n switch (tab.getPosition()){\n case 0:\n tab.setIcon(R.mipmap.tour_map_icon);\n break;\n case 1:\n tab.setIcon(R.mipmap.tour_info_icon);\n break;\n case 2:\n tab.setIcon(R.mipmap.tour_map_image_icon);\n break;\n default:\n break;\n }\n }\n\n @Override\n public void onTabReselected(TabLayout.Tab tab) {\n super.onTabReselected(tab);\n }\n }\n );\n }", "private void setupTabs() {\n }", "private void initComponents() {\n\n panFrm = new javax.swing.JPanel();\n tabFrm = new javax.swing.JTabbedPane();\n panGrl = new javax.swing.JPanel();\n panGrlCab = new javax.swing.JPanel();\n panTit = new javax.swing.JPanel();\n lblTit = new javax.swing.JLabel();\n panCab = new javax.swing.JPanel();\n txtCodCtaHab = new javax.swing.JTextField();\n butCtaHab = new javax.swing.JButton();\n txtNomCtaHab = new javax.swing.JTextField();\n txtNumCtaHab = new javax.swing.JTextField();\n lblCtaHab = new javax.swing.JLabel();\n butCtaDeb = new javax.swing.JButton();\n txtNomCtaDeb = new javax.swing.JTextField();\n txtNumCtaDeb = new javax.swing.JTextField();\n txtCodCtaDeb = new javax.swing.JTextField();\n lblCtaDeb = new javax.swing.JLabel();\n butTipDoc = new javax.swing.JButton();\n txtDesLarTipDoc = new javax.swing.JTextField();\n txtDesCorTipDoc = new javax.swing.JTextField();\n txtCodTipDoc = new javax.swing.JTextField();\n lblTitTipDoc = new javax.swing.JLabel();\n panGrlGrp = new javax.swing.JPanel();\n jPanel1 = new javax.swing.JPanel();\n spnGrlGrpUsu = new javax.swing.JScrollPane();\n tblDatGrpUsu = new javax.swing.JTable();\n jPanel2 = new javax.swing.JPanel();\n optGrp = new javax.swing.JRadioButton();\n optUsu = new javax.swing.JRadioButton();\n panPie = new javax.swing.JPanel();\n panGrlCta = new javax.swing.JPanel();\n chkSelAct = new javax.swing.JCheckBox();\n chkSelPas = new javax.swing.JCheckBox();\n chkSelPat = new javax.swing.JCheckBox();\n chkSelIng = new javax.swing.JCheckBox();\n chkSelCos = new javax.swing.JCheckBox();\n chkSelGto = new javax.swing.JCheckBox();\n chkSelOtrIng = new javax.swing.JCheckBox();\n chkSelOtrGto = new javax.swing.JCheckBox();\n panDat = new javax.swing.JPanel();\n panCtaUsr = new javax.swing.JPanel();\n spnPlaCta = new javax.swing.JScrollPane();\n tblDatPlaCta = new javax.swing.JTable();\n panTooBar = new javax.swing.JPanel();\n\n setClosable(true);\n setIconifiable(true);\n setMaximizable(true);\n setResizable(true);\n addInternalFrameListener(new javax.swing.event.InternalFrameListener() {\n public void internalFrameActivated(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameClosed(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameClosing(javax.swing.event.InternalFrameEvent evt) {\n exitForm(evt);\n }\n public void internalFrameDeactivated(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameDeiconified(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameIconified(javax.swing.event.InternalFrameEvent evt) {\n }\n public void internalFrameOpened(javax.swing.event.InternalFrameEvent evt) {\n }\n });\n\n panFrm.setLayout(new java.awt.BorderLayout());\n\n panGrl.setLayout(new java.awt.BorderLayout());\n\n panGrlCab.setPreferredSize(new java.awt.Dimension(0, 100));\n panGrlCab.setLayout(new java.awt.BorderLayout());\n\n panTit.setLayout(new java.awt.BorderLayout());\n\n lblTit.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n lblTit.setText(\"jLabel1\");\n lblTit.setVerticalTextPosition(javax.swing.SwingConstants.TOP);\n panTit.add(lblTit, java.awt.BorderLayout.NORTH);\n\n panGrlCab.add(panTit, java.awt.BorderLayout.NORTH);\n\n panCab.setLayout(null);\n panCab.add(txtCodCtaHab);\n txtCodCtaHab.setBounds(80, 60, 50, 20);\n\n butCtaHab.setText(\"...\");\n butCtaHab.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n butCtaHabActionPerformed(evt);\n }\n });\n panCab.add(butCtaHab);\n butCtaHab.setBounds(460, 60, 30, 23);\n\n txtNomCtaHab.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtNomCtaHabActionPerformed(evt);\n }\n });\n txtNomCtaHab.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusGained(java.awt.event.FocusEvent evt) {\n txtNomCtaHabFocusGained(evt);\n }\n public void focusLost(java.awt.event.FocusEvent evt) {\n txtNomCtaHabFocusLost(evt);\n }\n });\n panCab.add(txtNomCtaHab);\n txtNomCtaHab.setBounds(228, 60, 230, 20);\n\n txtNumCtaHab.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtNumCtaHabActionPerformed(evt);\n }\n });\n txtNumCtaHab.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusGained(java.awt.event.FocusEvent evt) {\n txtNumCtaHabFocusGained(evt);\n }\n public void focusLost(java.awt.event.FocusEvent evt) {\n txtNumCtaHabFocusLost(evt);\n }\n });\n panCab.add(txtNumCtaHab);\n txtNumCtaHab.setBounds(131, 60, 96, 20);\n\n lblCtaHab.setText(\"Cuenta de haber:\");\n panCab.add(lblCtaHab);\n lblCtaHab.setBounds(10, 60, 120, 14);\n\n butCtaDeb.setText(\"...\");\n butCtaDeb.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n butCtaDebActionPerformed(evt);\n }\n });\n panCab.add(butCtaDeb);\n butCtaDeb.setBounds(460, 34, 30, 23);\n\n txtNomCtaDeb.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtNomCtaDebActionPerformed(evt);\n }\n });\n txtNomCtaDeb.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusGained(java.awt.event.FocusEvent evt) {\n txtNomCtaDebFocusGained(evt);\n }\n public void focusLost(java.awt.event.FocusEvent evt) {\n txtNomCtaDebFocusLost(evt);\n }\n });\n panCab.add(txtNomCtaDeb);\n txtNomCtaDeb.setBounds(228, 34, 230, 20);\n\n txtNumCtaDeb.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtNumCtaDebActionPerformed(evt);\n }\n });\n txtNumCtaDeb.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusGained(java.awt.event.FocusEvent evt) {\n txtNumCtaDebFocusGained(evt);\n }\n public void focusLost(java.awt.event.FocusEvent evt) {\n txtNumCtaDebFocusLost(evt);\n }\n });\n panCab.add(txtNumCtaDeb);\n txtNumCtaDeb.setBounds(131, 34, 96, 20);\n panCab.add(txtCodCtaDeb);\n txtCodCtaDeb.setBounds(80, 34, 50, 20);\n\n lblCtaDeb.setText(\"Cuenta de debe:\");\n panCab.add(lblCtaDeb);\n lblCtaDeb.setBounds(10, 34, 120, 14);\n\n butTipDoc.setText(\"...\");\n butTipDoc.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n butTipDocActionPerformed(evt);\n }\n });\n panCab.add(butTipDoc);\n butTipDoc.setBounds(460, 10, 30, 23);\n\n txtDesLarTipDoc.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtDesLarTipDocActionPerformed(evt);\n }\n });\n txtDesLarTipDoc.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusGained(java.awt.event.FocusEvent evt) {\n txtDesLarTipDocFocusGained(evt);\n }\n public void focusLost(java.awt.event.FocusEvent evt) {\n txtDesLarTipDocFocusLost(evt);\n }\n });\n panCab.add(txtDesLarTipDoc);\n txtDesLarTipDoc.setBounds(228, 10, 230, 20);\n\n txtDesCorTipDoc.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n txtDesCorTipDocActionPerformed(evt);\n }\n });\n txtDesCorTipDoc.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusGained(java.awt.event.FocusEvent evt) {\n txtDesCorTipDocFocusGained(evt);\n }\n public void focusLost(java.awt.event.FocusEvent evt) {\n txtDesCorTipDocFocusLost(evt);\n }\n });\n panCab.add(txtDesCorTipDoc);\n txtDesCorTipDoc.setBounds(131, 10, 96, 20);\n panCab.add(txtCodTipDoc);\n txtCodTipDoc.setBounds(80, 10, 50, 20);\n\n lblTitTipDoc.setText(\"Tipo de documento:\");\n panCab.add(lblTitTipDoc);\n lblTitTipDoc.setBounds(10, 10, 120, 14);\n\n panGrlCab.add(panCab, java.awt.BorderLayout.CENTER);\n\n panGrl.add(panGrlCab, java.awt.BorderLayout.NORTH);\n\n panGrlGrp.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Grupo de usuarios\"));\n panGrlGrp.setLayout(new java.awt.BorderLayout());\n\n jPanel1.setLayout(new java.awt.BorderLayout());\n\n tblDatGrpUsu.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null}\n },\n new String [] {\n \"Title 1\", \"Title 2\", \"Title 3\", \"Title 4\"\n }\n ));\n spnGrlGrpUsu.setViewportView(tblDatGrpUsu);\n\n jPanel1.add(spnGrlGrpUsu, java.awt.BorderLayout.CENTER);\n\n jPanel2.setPreferredSize(new java.awt.Dimension(100, 34));\n jPanel2.setLayout(null);\n\n optGrp.setSelected(true);\n optGrp.setText(\"Por Grupo\");\n optGrp.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n optGrpActionPerformed(evt);\n }\n });\n jPanel2.add(optGrp);\n optGrp.setBounds(0, 0, 220, 16);\n\n optUsu.setText(\"Por Usuario\");\n optUsu.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n optUsuActionPerformed(evt);\n }\n });\n jPanel2.add(optUsu);\n optUsu.setBounds(0, 16, 290, 16);\n\n jPanel1.add(jPanel2, java.awt.BorderLayout.NORTH);\n\n panGrlGrp.add(jPanel1, java.awt.BorderLayout.CENTER);\n\n panGrl.add(panGrlGrp, java.awt.BorderLayout.CENTER);\n\n panPie.setPreferredSize(new java.awt.Dimension(10, 40));\n panPie.setLayout(new java.awt.BorderLayout());\n\n panGrlCta.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Cuentas\"));\n panGrlCta.setPreferredSize(new java.awt.Dimension(0, 40));\n panGrlCta.setLayout(null);\n\n chkSelAct.setSelected(true);\n chkSelAct.setText(\"Activo\");\n panGrlCta.add(chkSelAct);\n chkSelAct.setBounds(6, 15, 80, 18);\n\n chkSelPas.setSelected(true);\n chkSelPas.setText(\"Pasivo\");\n panGrlCta.add(chkSelPas);\n chkSelPas.setBounds(82, 15, 80, 18);\n\n chkSelPat.setSelected(true);\n chkSelPat.setText(\"Patrimonio\");\n panGrlCta.add(chkSelPat);\n chkSelPat.setBounds(158, 15, 80, 18);\n\n chkSelIng.setSelected(true);\n chkSelIng.setText(\"Ingresos\");\n panGrlCta.add(chkSelIng);\n chkSelIng.setBounds(234, 15, 80, 18);\n\n chkSelCos.setSelected(true);\n chkSelCos.setText(\"Costos\");\n panGrlCta.add(chkSelCos);\n chkSelCos.setBounds(310, 15, 80, 18);\n\n chkSelGto.setSelected(true);\n chkSelGto.setText(\"Gastos\");\n panGrlCta.add(chkSelGto);\n chkSelGto.setBounds(386, 15, 80, 18);\n\n chkSelOtrIng.setSelected(true);\n chkSelOtrIng.setText(\"Otros Ingresos\");\n panGrlCta.add(chkSelOtrIng);\n chkSelOtrIng.setBounds(462, 15, 100, 18);\n\n chkSelOtrGto.setSelected(true);\n chkSelOtrGto.setText(\"Otros Gastos\");\n panGrlCta.add(chkSelOtrGto);\n chkSelOtrGto.setBounds(558, 15, 100, 18);\n\n panPie.add(panGrlCta, java.awt.BorderLayout.NORTH);\n\n panGrl.add(panPie, java.awt.BorderLayout.SOUTH);\n\n tabFrm.addTab(\"General\", panGrl);\n\n panDat.setLayout(new java.awt.BorderLayout());\n\n panCtaUsr.setLayout(new java.awt.BorderLayout());\n\n tblDatPlaCta.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null}\n },\n new String [] {\n \"Title 1\", \"Title 2\", \"Title 3\", \"Title 4\"\n }\n ));\n spnPlaCta.setViewportView(tblDatPlaCta);\n\n panCtaUsr.add(spnPlaCta, java.awt.BorderLayout.CENTER);\n\n panDat.add(panCtaUsr, java.awt.BorderLayout.CENTER);\n\n tabFrm.addTab(\"Reporte\", panDat);\n\n panFrm.add(tabFrm, java.awt.BorderLayout.CENTER);\n\n panTooBar.setLayout(new java.awt.BorderLayout());\n panFrm.add(panTooBar, java.awt.BorderLayout.SOUTH);\n\n getContentPane().add(panFrm, java.awt.BorderLayout.CENTER);\n\n java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();\n setBounds((screenSize.width-700)/2, (screenSize.height-450)/2, 700, 450);\n }", "private JPanel getContents(final JTabbedPane jtp,\n final MyTabPreviewPainter mainTabPreviewPainter) {\n FormBuilder builder = FormBuilder.create().\n columns(\"right:pref, 4dlu, fill:min:grow(1), 2dlu, fill:min:grow(1)\").\n rows(\"p, 2dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu, \"\n + \"p, 3dlu, p, 7dlu, p, 2dlu, p, 0dlu, p, 0dlu, p, 0dlu, p, 7dlu,\"\n + \"p, 2dlu, p, 3dlu, p, 0dlu, p, 3dlu, p, 3dlu, p, 7dlu, \"\n + \"p, 2dlu, p, 0dlu, p, 0dlu, p, 0dlu, p, 7dlu, p, 2dlu, p, 3dlu, p\").\n columnGroups(new int[][] { { 3, 5 } });\n\n int row = 1;\n builder.addSeparator(\"General\").xyw(1, row, 5);\n\n final JComboBox<String> addKindCombo = new JComboBox<>(\n new String[] { \"regular\", \"null\", \"modified\" });\n JButton addNewTabButton = new JButton(\"Add\");\n addNewTabButton.addActionListener(actionEvent -> {\n String selectedKind = (String) addKindCombo.getSelectedItem();\n if (\"null\".equals(selectedKind)) {\n SwingUtilities.invokeLater(() -> jtp.addTab(\"null tab\", null));\n return;\n }\n\n final int count = 1 + jtp.getTabCount();\n final JComponent tabComp = new NumberedPanel(count);\n if (\"modified\".equals(selectedKind)) {\n RadianceThemingCortex.ComponentScope.setTabContentsModified(tabComp, true);\n }\n SwingUtilities.invokeLater(() -> jtp.addTab(\"tab\" + count, tabComp));\n });\n row += 2;\n\n builder.addLabel(\"Add tab\").xy(1, row);\n builder.add(addKindCombo).xy(3, row);\n builder.add(addNewTabButton).xy(5, row);\n\n final JComboBox<String> placementCombo = new JComboBox<>(\n new String[] { \"top\", \"bottom\", \"left\", \"right\" });\n placementCombo.addActionListener(actionEvent -> {\n String selected = (String) placementCombo.getSelectedItem();\n if (\"top\".equals(selected))\n jtp.setTabPlacement(JTabbedPane.TOP);\n if (\"bottom\".equals(selected))\n jtp.setTabPlacement(JTabbedPane.BOTTOM);\n if (\"left\".equals(selected))\n jtp.setTabPlacement(JTabbedPane.LEFT);\n if (\"right\".equals(selected))\n jtp.setTabPlacement(JTabbedPane.RIGHT);\n });\n row += 2;\n builder.addLabel(\"Placement\").xy(1, row);\n builder.add(placementCombo).xyw(3, row, 3);\n\n try {\n final JComboBox<TabOverviewKind> overviewKindCombo = new FlexiComboBox<>(\n TabOverviewKind.GRID, TabOverviewKind.MENU_CAROUSEL,\n TabOverviewKind.ROUND_CAROUSEL) {\n @Override\n public String getCaption(TabOverviewKind item) {\n return item.getName();\n }\n };\n overviewKindCombo.addActionListener(actionEvent -> mainTabPreviewPainter\n .setTabOverviewKind((TabOverviewKind) overviewKindCombo.getSelectedItem()));\n row += 2;\n builder.addLabel(\"Overview kind\").xy(1, row);\n builder.add(overviewKindCombo).xyw(3, row, 3);\n } catch (NoClassDefFoundError ncdfe) {\n }\n\n final JCheckBox useScrollLayout = new JCheckBox(\"Uses scroll layout\");\n useScrollLayout.setSelected(false);\n useScrollLayout.addActionListener(actionEvent -> jtp\n .setTabLayoutPolicy(useScrollLayout.isSelected() ? JTabbedPane.SCROLL_TAB_LAYOUT\n : JTabbedPane.WRAP_TAB_LAYOUT));\n row += 2;\n builder.addLabel(\"Layout\").xy(1, row);\n builder.add(useScrollLayout).xyw(3, row, 3);\n\n final JComboBox<TabContentPaneBorderKind> contentBorderCombo = new JComboBox<>(new TabContentPaneBorderKind[] {\n TabContentPaneBorderKind.DOUBLE_PLACEMENT,\n TabContentPaneBorderKind.SINGLE_PLACEMENT });\n contentBorderCombo.setSelectedItem(TabContentPaneBorderKind.DOUBLE_PLACEMENT);\n contentBorderCombo.addActionListener(actionEvent -> {\n TabContentPaneBorderKind contentBorderKind = (TabContentPaneBorderKind) contentBorderCombo\n .getSelectedItem();\n RadianceThemingCortex.ComponentScope.setTabContentPaneBorderKind(jtp, contentBorderKind);\n jtp.updateUI();\n jtp.repaint();\n });\n row += 2;\n builder.addLabel(\"Content border\").xy(1, row);\n builder.add(contentBorderCombo).xyw(3, row, 3);\n\n JButton enableAll = new JButton(\"+ all\");\n enableAll.addActionListener(actionEvent -> {\n for (int i = 0; i < jtp.getTabCount(); i++) {\n jtp.setEnabledAt(i, true);\n }\n });\n\n JButton disableAll = new JButton(\"- all\");\n disableAll.addActionListener(actionEvent -> {\n for (int i = 0; i < jtp.getTabCount(); i++) {\n jtp.setEnabledAt(i, false);\n }\n });\n\n row += 2;\n builder.addLabel(\"Enable all\").xy(1, row);\n builder.add(enableAll).xy(3, row);\n builder.add(disableAll).xy(5, row);\n\n JButton closeAllEnabled = new JButton(\"Close\");\n closeAllEnabled.addActionListener(actionEvent -> {\n Set<Component> toRemove = new HashSet<>();\n for (int i = 0; i < jtp.getTabCount(); i++) {\n if (jtp.isEnabledAt(i))\n toRemove.add(jtp.getComponentAt(i));\n }\n for (Component comp : toRemove)\n jtp.remove(comp);\n });\n\n JButton restoreClosed = new JButton(\"Restore\");\n restoreClosed.addActionListener(actionEvent -> {\n for (Component tnp : closed) {\n jtp.addTab(\"restored\", tnp);\n }\n });\n\n row += 2;\n builder.addLabel(\"Close all\").xy(1, row);\n builder.add(closeAllEnabled).xy(3, row);\n builder.add(restoreClosed).xy(5, row);\n\n row += 2;\n builder.addSeparator(\"Single Tab\").xyw(1, row, 5);\n\n final JComboBox<Integer> tabSelectorCombo = new JComboBox<>(new TabComboBoxModel(this.jtp));\n //tabSelectorCombo.setRenderer(new TabCellRenderer());\n jtp.addContainerListener(new ContainerAdapter() {\n @Override\n public void componentAdded(ContainerEvent e) {\n ((TabComboBoxModel) tabSelectorCombo.getModel()).changed();\n }\n\n @Override\n public void componentRemoved(ContainerEvent e) {\n ((TabComboBoxModel) tabSelectorCombo.getModel()).changed();\n }\n });\n\n row += 2;\n builder.addLabel(\"Select\").xy(1, row);\n builder.add(tabSelectorCombo).xyw(3, row, 3);\n\n final JButton markAsModified = new JButton(\"-> modified\");\n markAsModified.addActionListener(actionEvent -> {\n if (tabSelectorCombo.getSelectedItem() == null)\n return;\n Component comp = jtp.getComponentAt((Integer) tabSelectorCombo.getSelectedItem());\n if ((comp != null) && (comp instanceof JComponent)) {\n RadianceThemingCortex.ComponentScope.setTabContentsModified((JComponent) comp, true);\n }\n });\n final JButton markAsUnmodified = new JButton(\"-> unmodified\");\n markAsUnmodified.addActionListener(actionEvent -> {\n if (tabSelectorCombo.getSelectedItem() == null)\n return;\n Component comp = jtp.getComponentAt((Integer) tabSelectorCombo.getSelectedItem());\n if ((comp != null) && (comp instanceof JComponent)) {\n RadianceThemingCortex.ComponentScope.setTabContentsModified((JComponent) comp, false);\n }\n });\n row += 2;\n builder.addLabel(\"Modified\").xy(1, row);\n builder.add(markAsModified).xy(3, row);\n builder.add(markAsUnmodified).xy(5, row);\n\n final JButton runModifiedAnimOnClose = new JButton(\"Animate on X\");\n runModifiedAnimOnClose.addActionListener(actionEvent -> {\n if (tabSelectorCombo.getSelectedItem() == null)\n return;\n Component comp = jtp.getComponentAt((Integer) tabSelectorCombo.getSelectedItem());\n if ((comp != null) && (comp instanceof JComponent)) {\n JComponent jc = (JComponent) comp;\n RadianceThemingCortex.ComponentScope.setRunModifiedAnimationOnTabCloseButton(jc, true);\n }\n });\n final JButton runModifiedAnimOnTab = new JButton(\"Animate on tab\");\n runModifiedAnimOnTab.addActionListener(actionEvent -> {\n if (tabSelectorCombo.getSelectedItem() == null)\n return;\n Component comp = jtp.getComponentAt((Integer) tabSelectorCombo.getSelectedItem());\n if ((comp != null) && (comp instanceof JComponent)) {\n JComponent jc = (JComponent) comp;\n RadianceThemingCortex.ComponentScope.setRunModifiedAnimationOnTabCloseButton(jc, false);\n }\n });\n row += 2;\n builder.add(runModifiedAnimOnClose).xy(3, row);\n builder.add(runModifiedAnimOnTab).xy(5, row);\n\n final JButton showCloseButton = new JButton(\"+ close button\");\n showCloseButton.addActionListener(actionEvent -> {\n if (tabSelectorCombo.getSelectedItem() == null)\n return;\n Component comp = jtp.getComponentAt((Integer) tabSelectorCombo.getSelectedItem());\n if ((comp != null) && (comp instanceof JComponent)) {\n JComponent jc = (JComponent) comp;\n RadianceThemingCortex.ComponentScope.setTabCloseButtonVisible(jc, true);\n jtp.repaint();\n }\n });\n final JButton hideCloseButton = new JButton(\"- close button\");\n hideCloseButton.addActionListener(actionEvent -> {\n if (tabSelectorCombo.getSelectedItem() == null)\n return;\n Component comp = jtp.getComponentAt((Integer) tabSelectorCombo.getSelectedItem());\n if ((comp != null) && (comp instanceof JComponent)) {\n JComponent jc = (JComponent) comp;\n RadianceThemingCortex.ComponentScope.setTabCloseButtonVisible(jc, false);\n jtp.repaint();\n }\n });\n\n JButton closeButton = new JButton(\"Close\");\n closeButton.addActionListener(actionEvent -> SwingUtilities.invokeLater(() -> {\n if (tabSelectorCombo.getSelectedItem() == null)\n return;\n Component comp = jtp.getComponentAt((Integer) tabSelectorCombo.getSelectedItem());\n jtp.removeTabAt((Integer) tabSelectorCombo.getSelectedItem());\n closed.add(comp);\n jtp.repaint();\n }));\n\n JButton selectButton = new JButton(\"Select\");\n selectButton.addActionListener(actionEvent -> SwingUtilities.invokeLater(() -> {\n if (tabSelectorCombo.getSelectedItem() == null)\n return;\n jtp.setSelectedIndex((Integer) tabSelectorCombo.getSelectedItem());\n }));\n row += 2;\n builder.addLabel(\"Tab op\").xy(1, row);\n builder.add(closeButton).xy(3, row);\n builder.add(selectButton).xy(5, row);\n\n row += 2;\n builder.addSeparator(\"Close Button Single\").xyw(1, row, 5);\n\n row += 2;\n builder.addLabel(\"Visible\").xy(1, row);\n builder.add(showCloseButton).xy(3, row);\n builder.add(hideCloseButton).xy(5, row);\n\n return builder.getPanel();\n }", "private void initTab()\n {\n \n }", "public TabComboBoxModel(JTabbedPane jtp) {\n this.jtp = jtp;\n }", "public void setSelectedTab(int arg0) {\n\n\t}", "@Override\n public void setupPanel()\n {\n\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n mainPnl = new javax.swing.JPanel();\n rsTabPanel = new javax.swing.JTabbedPane();\n jPanel4 = new javax.swing.JPanel();\n mainSPn = new javax.swing.JScrollPane();\n jPanel2 = new javax.swing.JPanel();\n mainSPI = new javax.swing.JScrollPane();\n\n setBackground(new java.awt.Color(254, 254, 254));\n setPreferredSize(new java.awt.Dimension(845, 589));\n\n mainPnl.setBackground(new java.awt.Color(254, 254, 254));\n mainPnl.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n mainPnl.setPreferredSize(new java.awt.Dimension(807, 74));\n\n rsTabPanel.setBackground(new java.awt.Color(255, 255, 255));\n rsTabPanel.setForeground(new java.awt.Color(94, 55, 16));\n rsTabPanel.setFont(new java.awt.Font(\"宋体\", 1, 15)); // NOI18N\n\n jPanel4.setBackground(new java.awt.Color(254, 254, 254));\n\n mainSPn.setBackground(new java.awt.Color(255, 255, 255));\n mainSPn.setBorder(null);\n\n org.jdesktop.layout.GroupLayout jPanel4Layout = new org.jdesktop.layout.GroupLayout(jPanel4);\n jPanel4.setLayout(jPanel4Layout);\n jPanel4Layout.setHorizontalGroup(\n jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(mainSPn, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 816, Short.MAX_VALUE)\n );\n jPanel4Layout.setVerticalGroup(\n jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(mainSPn, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 532, Short.MAX_VALUE)\n );\n\n rsTabPanel.addTab(\"票卡类型\", jPanel4);\n\n jPanel2.setBackground(new java.awt.Color(254, 254, 254));\n\n mainSPI.setBackground(new java.awt.Color(254, 254, 254));\n mainSPI.setBorder(null);\n\n org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(mainSPI, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 816, Short.MAX_VALUE)\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(mainSPI, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 532, Short.MAX_VALUE)\n );\n\n rsTabPanel.addTab(\"证件类型\", jPanel2);\n\n org.jdesktop.layout.GroupLayout mainPnlLayout = new org.jdesktop.layout.GroupLayout(mainPnl);\n mainPnl.setLayout(mainPnlLayout);\n mainPnlLayout.setHorizontalGroup(\n mainPnlLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(rsTabPanel)\n );\n mainPnlLayout.setVerticalGroup(\n mainPnlLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(mainPnlLayout.createSequentialGroup()\n .add(rsTabPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 564, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(0, 1, Short.MAX_VALUE))\n );\n\n rsTabPanel.getAccessibleContext().setAccessibleName(\"票卡类型\");\n\n org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()\n .addContainerGap()\n .add(mainPnl, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 825, Short.MAX_VALUE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .addContainerGap()\n .add(mainPnl, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 569, Short.MAX_VALUE)\n .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n }", "private void setTabLayout() {\n View view = LayoutInflater.from(getApplicationContext()).inflate(R.layout.tab_layout_item, null);\n TextView title = (TextView) view.findViewById(R.id.item_tablayout_title_txt);\n ImageView imgIcon = (ImageView) view.findViewById(R.id.item_tablayout_img);\n title.setText(Constants.MOVIES);\n imgIcon.setImageResource(R.mipmap.ic_home);\n mTabLayout.getTabAt(0).setCustomView(view);\n\n view =\n LayoutInflater.from(getApplicationContext()).inflate(R.layout.tab_layout_item, null);\n title = (TextView) view.findViewById(R.id.item_tablayout_title_txt);\n count = (TextView) view.findViewById(R.id.item_tablayout_count_txt);\n imgIcon = (ImageView) view.findViewById(R.id.item_tablayout_img);\n title.setText(Constants.FAVOURITE);\n imgIcon.setImageResource(R.mipmap.ic_favorite);\n count.setVisibility(View.VISIBLE);\n mTabLayout.getTabAt(1).setCustomView(view);\n\n view =\n LayoutInflater.from(getApplicationContext()).inflate(R.layout.tab_layout_item, null);\n title = (TextView) view.findViewById(R.id.item_tablayout_title_txt);\n imgIcon = (ImageView) view.findViewById(R.id.item_tablayout_img);\n title.setText(Constants.SETTINGS);\n imgIcon.setImageResource(R.mipmap.ic_settings);\n mTabLayout.getTabAt(2).setCustomView(view);\n\n view =\n LayoutInflater.from(getApplicationContext()).inflate(R.layout.tab_layout_item, null);\n title = (TextView) view.findViewById(R.id.item_tablayout_title_txt);\n imgIcon = (ImageView) view.findViewById(R.id.item_tablayout_img);\n title.setText(Constants.ABOUT);\n imgIcon.setImageResource(R.mipmap.ic_info);\n mTabLayout.getTabAt(3).setCustomView(view);\n }", "private PanelManager(FlowClient frame) {\r\n\t\t// Swing necessities\r\n\t\tlayout = new CardLayout();\r\n\t\tthis.frame = frame;\r\n\t\tthis.setLayout(layout);\r\n\t\tsetBorder(FlowClient.EMPTY_BORDER);\r\n\r\n\t\t// Creates new panels and adds them to the cardlayout stack\r\n\t\teditTabs = new EditTabs();\r\n\r\n\t\tloginPane = new LoginPane(this);\r\n\t\tadd(loginPane, \"loginPane\");\r\n\r\n\t\tCreateAccountPane createAccountPane = new CreateAccountPane(this);\r\n\t\tadd(createAccountPane, \"createPane\");\r\n\r\n\t\teditPane = new EditPane(this);\r\n\t\tadd(editPane, \"editPane\");\r\n\r\n\t\tdebugPane = new DebugPane(this);\r\n\t\tadd(debugPane, \"debugPane\");\r\n\r\n\t\tSettingsPane settingsTabs = new SettingsPane(this);\r\n\t\tadd(settingsTabs, \"settingsPane\");\r\n\r\n\t\thistoryPane = new HistoryPane(this);\r\n\t\tadd(historyPane, \"historyPane\");\r\n\t}", "private void setupPanels() {\n\t\tsplitPanel.addEast(east, Window.getClientWidth() / 5);\n\t\tsplitPanel.add(battleMatCanvasPanel);\n\t\tpanelsSetup = true;\n\t}", "public Tabs() {\n initComponents();\n }", "public void tabChanged()\n {\n super.tabChanged();\n }", "private void addChatTab(ChatPanel chatPanel)\n {\n ChatSession chatSession = chatPanel.getChatSession();\n String chatName = chatSession.getChatName();\n\n ChatPanel currentChatPanel = getCurrentChat();\n\n if (currentChatPanel == null)\n {\n this.mainPanel.add(chatPanel, BorderLayout.CENTER);\n }\n else if (getChatTabCount() == 0)\n {\n ChatSession firstChatSession = currentChatPanel.getChatSession();\n\n // Add first two tabs to the tabbed pane.\n chatTabbedPane.addTab( firstChatSession.getChatName(),\n firstChatSession.getChatStatusIcon(),\n currentChatPanel);\n\n chatTabbedPane.addTab( chatName,\n chatSession.getChatStatusIcon(),\n chatPanel);\n\n // When added to the tabbed pane, the first chat panel should\n // rest the selected component.\n chatTabbedPane.setSelectedComponent(currentChatPanel);\n\n //add the chatTabbedPane to the window\n this.mainPanel.add(chatTabbedPane, BorderLayout.CENTER);\n this.mainPanel.validate();\n }\n else\n {\n // The tabbed pane already contains tabs.\n\n chatTabbedPane.addTab(\n chatName,\n chatSession.getChatStatusIcon(),\n chatPanel);\n\n chatTabbedPane.getParent().validate();\n }\n }", "private void showTab() {\n if (parentTab != null) {\n tab = parentTab.getTab(this);\n if (tab != null) {\n // FIXME: this should be added by the constructor or by the panel that adds this\n // tab\n // tab.getComponent().addStyleName(\"example-queries-tab\");\n tab.setEnabled(true);\n\n if (!(parentTab.getSelectedTab() instanceof ResultViewPanel)) {\n parentTab.setSelectedTab(tab);\n }\n }\n }\n\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel2 = new javax.swing.JPanel();\n btnSave = new javax.swing.JButton();\n btnRefresh = new javax.swing.JButton();\n btnSettings = new javax.swing.JButton();\n lblCoordinates = new javax.swing.JLabel();\n splitPane = new javax.swing.JSplitPane();\n tabbedPanePlots = new javax.swing.JTabbedPane();\n pnlAdditionalInformations = new javax.swing.JPanel();\n jScrollPane2 = new javax.swing.JScrollPane();\n txtAdditionalInformations = new javax.swing.JEditorPane();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);\n setName(\"Form\"); // NOI18N\n\n org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(edacc.EDACCApp.class).getContext().getResourceMap(EDACCPlotTabView.class);\n jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString(\"jPanel2.border.title\"))); // NOI18N\n jPanel2.setName(\"jPanel2\"); // NOI18N\n\n javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(edacc.EDACCApp.class).getContext().getActionMap(EDACCPlotTabView.class, this);\n btnSave.setAction(actionMap.get(\"btnSave\")); // NOI18N\n btnSave.setText(resourceMap.getString(\"btnSave.text\")); // NOI18N\n btnSave.setName(\"btnSave\"); // NOI18N\n\n btnRefresh.setAction(actionMap.get(\"btnRefresh\")); // NOI18N\n btnRefresh.setText(resourceMap.getString(\"btnRefresh.text\")); // NOI18N\n btnRefresh.setName(\"btnRefresh\"); // NOI18N\n\n btnSettings.setAction(actionMap.get(\"btnSettings\")); // NOI18N\n btnSettings.setText(resourceMap.getString(\"btnSettings.text\")); // NOI18N\n btnSettings.setName(\"btnSettings\"); // NOI18N\n\n lblCoordinates.setText(resourceMap.getString(\"lblCoordinates.text\")); // NOI18N\n lblCoordinates.setName(\"lblCoordinates\"); // NOI18N\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(btnSave)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnRefresh)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnSettings)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 340, Short.MAX_VALUE)\n .addComponent(lblCoordinates)\n .addContainerGap())\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnSave)\n .addComponent(btnRefresh)\n .addComponent(btnSettings)\n .addComponent(lblCoordinates))\n );\n\n splitPane.setDividerLocation(200);\n splitPane.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);\n splitPane.setResizeWeight(1.0);\n splitPane.setName(\"splitPane\"); // NOI18N\n\n tabbedPanePlots.setName(\"tabbedPanePlots\"); // NOI18N\n tabbedPanePlots.setPreferredSize(new java.awt.Dimension(100, 100));\n tabbedPanePlots.addChangeListener(new javax.swing.event.ChangeListener() {\n public void stateChanged(javax.swing.event.ChangeEvent evt) {\n tabbedPanePlotsStateChanged(evt);\n }\n });\n tabbedPanePlots.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {\n public void mouseMoved(java.awt.event.MouseEvent evt) {\n tabbedPanePlotsMouseMoved(evt);\n }\n });\n splitPane.setTopComponent(tabbedPanePlots);\n\n pnlAdditionalInformations.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString(\"pnlAdditionalInformations.border.title\"))); // NOI18N\n pnlAdditionalInformations.setName(\"pnlAdditionalInformations\"); // NOI18N\n\n jScrollPane2.setName(\"jScrollPane2\"); // NOI18N\n\n txtAdditionalInformations.setContentType(resourceMap.getString(\"txtAdditionalInformations.contentType\")); // NOI18N\n txtAdditionalInformations.setName(\"txtAdditionalInformations\"); // NOI18N\n jScrollPane2.setViewportView(txtAdditionalInformations);\n\n javax.swing.GroupLayout pnlAdditionalInformationsLayout = new javax.swing.GroupLayout(pnlAdditionalInformations);\n pnlAdditionalInformations.setLayout(pnlAdditionalInformationsLayout);\n pnlAdditionalInformationsLayout.setHorizontalGroup(\n pnlAdditionalInformationsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 617, Short.MAX_VALUE)\n );\n pnlAdditionalInformationsLayout.setVerticalGroup(\n pnlAdditionalInformationsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 208, Short.MAX_VALUE)\n );\n\n splitPane.setRightComponent(pnlAdditionalInformations);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(splitPane, javax.swing.GroupLayout.DEFAULT_SIZE, 631, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(splitPane, javax.swing.GroupLayout.DEFAULT_SIZE, 441, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n\n pack();\n }", "private void PintaTabla() {\n panel.getTablaClientes().setModel(tabla);\n panel.getTablaClientes().getColumnModel().getColumn(0).setPreferredWidth(0);\n panel.getTablaClientes().getColumnModel().getColumn(0).setMaxWidth(0);\n panel.getTablaClientes().getColumnModel().getColumn(0).setMinWidth(0);\n panel.getPanelTabla().setViewportView(panel.getTablaClientes());\n }", "public void inhabilitaPanel() {\n\t\t// contentPane.setEnabled(false);\n\t\tpanelPrincipal.setEnabled(false);\n\t\tpanelBotones.setEnabled(false);\n\t\tboton1Jugador.setEnabled(false);\n\t\tbotonJuegoRed.setEnabled(false);\n\t\tbotonEditar.setEnabled(false);\n\t\tbotonDemo.setEnabled(false);\n\t\tbotonReglas.setEnabled(false);\n\t\tbotonAyuda.setEnabled(false);\n\t\tbotonRecibir.setEnabled(false);\n\t\tbotonEnviar.setEnabled(false);\n\t\tbotonDescargaSobre.setEnabled(false);\n\t\tbotonSalir.setEnabled(false);\n\t\tlabelFondo.setEnabled(false);\n\t\tlabelDibujo.setEnabled(false);\n\n\t}", "public void setTableroController(TableroController tabcontroller) {\n\t\t\n\t}", "public void applyTab();", "private void initTabs() {\n\t\tJPanel newTab = new JPanel();\r\n\t\taddTab(\"\", newTab); //$NON-NLS-1$\r\n\t\tsetTabComponentAt(0, new NewPaneButton());\r\n\t\tsetEnabledAt(0, false);\r\n\t\t// Add a new pane\r\n\t\taddPane();\r\n }", "public MainFrame(){\n\t\ttry {\n\t\t\tUIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n\t\t} catch (ClassNotFoundException | IllegalAccessException | UnsupportedLookAndFeelException | InstantiationException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tnbRules = 1;\n \tnbTabs = 0;\n \tbasePanel = new JPanel();\n \tbasePanel.setLayout(new FlowLayout(FlowLayout.CENTER));\n \ttabs = new JTabbedPane(SwingConstants.TOP);\n\n \tJToolBar toolBar = new JToolBar();\n newGen = new JButton(\"Nouvelle génération\");\n newGen.addActionListener(new Listener(\"Tab\",this));\n toolBar.add(newGen);\n example = new JButton(\"Exemples\");\n example.addActionListener(new Listener(\"Example\", this));\n toolBar.add(example);\n help = new JButton(\"Aide\");\n help.addActionListener(new Listener(\"Help\",this));\n toolBar.add(help);\n\n this.setTitle(\"L-system interface\");\n this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tDimension windowDimension = new Dimension(Constants.INITIAL_WIDTH, Constants.INITIAL_HEIGHT);\n this.setSize(windowDimension);\n this.setLocationRelativeTo(null);\n this.add(tabs);\n this.add(toolBar, BorderLayout.NORTH);\n this.setPreferredSize(windowDimension);\n newComponent((byte)1);\n\t\trenameTabs();\n\t\tthis.setResizable(false);\n }", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 752, 842);\r\n\t\t// frame.setSize(700, 500);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n\t\tJTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);\r\n\t\tGroupLayout groupLayout = new GroupLayout(frame.getContentPane());\r\n\t\tgroupLayout.setHorizontalGroup(groupLayout.createParallelGroup(Alignment.LEADING).addComponent(tabbedPane,\r\n\t\t\t\tGroupLayout.DEFAULT_SIZE, 512, Short.MAX_VALUE));\r\n\t\tgroupLayout.setVerticalGroup(groupLayout.createParallelGroup(Alignment.LEADING).addComponent(tabbedPane,\r\n\t\t\t\tGroupLayout.DEFAULT_SIZE, 381, Short.MAX_VALUE));\r\n\t\ttabbedPane.setPreferredSize(new Dimension(700, 850));\r\n\t\tJScrollPane scrollFrame = new JScrollPane(tabbedPane);\r\n\t\ttabbedPane.setAutoscrolls(true);\r\n\t\tscrollFrame.setPreferredSize(new Dimension(200, 300));\r\n\t\tframe.getContentPane().add(scrollFrame);\r\n\r\n\t\tPanel panel = new Panel();\r\n\t\ttabbedPane.addTab(\"Parameters\", null, panel, null);\r\n\t\tpanel.setLayout(null);\r\n\r\n\t\tJLabel lblNewLabel = new JLabel(\"Financial Transaction\");\r\n\t\tlblNewLabel.setBounds(10, 11, 141, 22);\r\n\t\tpanel.add(lblNewLabel);\r\n\r\n\t\tJLabel lblTransactionType = new JLabel(\"Transaction Type :\");\r\n\t\tlblTransactionType.setBounds(10, 44, 117, 22);\r\n\t\tpanel.add(lblTransactionType);\r\n\r\n\t\ttextField_btMap1 = new JTextField();\r\n\t\ttextField_btMap1.setBounds(180, 94, 468, 20);\r\n\t\tpanel.add(textField_btMap1);\r\n\t\ttextField_btMap1.setText(\"1111001000111110010001001000000100101000111001001001000000000000\");\r\n\t\ttextField_btMap1.setColumns(10);\r\n\r\n\t\ttextField_btMap2 = new JTextField();\r\n\t\ttextField_btMap2.setColumns(10);\r\n\t\ttextField_btMap2.setBounds(180, 119, 468, 20);\r\n\t\ttextField_btMap2.setText(\"0000000000000000000000000000000000000110000000000000000000110000\");\r\n\t\tpanel.add(textField_btMap2);\r\n\r\n\t\tChoice choice = new Choice();\r\n\t\tchoice.setBounds(180, 44, 113, 20);\r\n\t\tchoice.add(\"Fund Transfer\");\r\n\t\tchoice.add(\"Balance Enquiry\");\r\n\t\tchoice.add(\"Mini-Statement\");\r\n\t\tchoice.add(\"Purchase\");\r\n\t\tchoice.add(\"Reversal\");\r\n\t\tpanel.add(choice);\r\n\t\tchoice.addItemListener(new ItemListener() {\r\n\t\t\tpublic void itemStateChanged(ItemEvent arg0) {\r\n\t\t\t\tif (choice.getSelectedItem().equalsIgnoreCase(\"Fund Transfer\")) {\r\n\t\t\t\t\ttextField_ProcessCode.setText(\"400000\");\r\n\t\t\t\t\ttextField_messageCode.setText(\"0200\");\r\n\t\t\t\t\ttextField_hexValues1.setText(\"F23E448128E49000\");\r\n\t\t\t\t\ttextField_hexValues2.setText(\"0000000006000030\");\r\n\t\t\t\t\ttextField_btMap1.setText(hex.ConverthexToBinary(textField_hexValues1.getText()));\r\n\t\t\t\t\ttextField_btMap2.setText(hex.ConverthexToBinary(textField_hexValues2.getText()));\r\n\t\t\t\t} else if (choice.getSelectedItem().equalsIgnoreCase(\"Balance Enquiry\")) {\r\n\t\t\t\t\ttextField_ProcessCode.setText(\"301000\");\r\n\t\t\t\t\ttextField_messageCode.setText(\"0200\");\r\n\t\t\t\t\ttextField_hexValues1.setText(\"F23E448128E49000\");\r\n\t\t\t\t\ttextField_hexValues2.setText(\"0000000006000030\");\r\n\t\t\t\t\ttextField_btMap1.setText(hex.ConverthexToBinary(textField_hexValues1.getText()));\r\n\t\t\t\t\ttextField_btMap2.setText(hex.ConverthexToBinary(textField_hexValues2.getText()));\r\n\t\t\t\t} else if (choice.getSelectedItem().equalsIgnoreCase(\"Mini-Statement\")) {\r\n\t\t\t\t\ttextField_ProcessCode.setText(\"350000\");\r\n\t\t\t\t\ttextField_messageCode.setText(\"0200\");\r\n\t\t\t\t\ttextField_hexValues1.setText(\"F23E448128E49000\");\r\n\t\t\t\t\ttextField_hexValues2.setText(\"0000000006000030\");\r\n\t\t\t\t\ttextField_btMap1.setText(hex.ConverthexToBinary(textField_hexValues1.getText()));\r\n\t\t\t\t\ttextField_btMap2.setText(hex.ConverthexToBinary(textField_hexValues2.getText()));\r\n\t\t\t\t} else if (choice.getSelectedItem().equalsIgnoreCase(\"Purchase\")) {\r\n\t\t\t\t\ttextField_ProcessCode.setText(\"001000\");\r\n\t\t\t\t\ttextField_messageCode.setText(\"0200\");\r\n\t\t\t\t\ttextField_hexValues1.setText(\"F23E448128E49000\");\r\n\t\t\t\t\ttextField_hexValues2.setText(\"0000000006000030\");\r\n\t\t\t\t\ttextField_btMap1.setText(hex.ConverthexToBinary(textField_hexValues1.getText()));\r\n\t\t\t\t\ttextField_btMap2.setText(hex.ConverthexToBinary(textField_hexValues2.getText()));\r\n\t\t\t\t} else if (choice.getSelectedItem().equalsIgnoreCase(\"Reversal\")) {\r\n\t\t\t\t\ttextField_ProcessCode.setText(\"400000\");\r\n\t\t\t\t\ttextField_messageCode.setText(\"0420\");\r\n\t\t\t\t\ttextField_hexValues1.setText(\"F23A44810EE48000\");\r\n\t\t\t\t\ttextField_hexValues2.setText(\"0000004006000000\");\r\n\t\t\t\t\ttextField_btMap1.setText(hex.ConverthexToBinary(textField_hexValues1.getText()));\r\n\t\t\t\t\ttextField_btMap2.setText(hex.ConverthexToBinary(textField_hexValues2.getText()));\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tJLabel lblProcessCode = new JLabel(\"Process Code:\");\r\n\t\tlblProcessCode.setBounds(10, 72, 86, 14);\r\n\t\tpanel.add(lblProcessCode);\r\n\r\n\t\ttextField_ProcessCode = new JTextField();\r\n\t\ttextField_ProcessCode.setBounds(180, 69, 113, 20);\r\n\t\ttextField_ProcessCode.setText(\"400000\");\r\n\t\tpanel.add(textField_ProcessCode);\r\n\t\ttextField_ProcessCode.setEditable(false);\r\n\t\ttextField_ProcessCode.setColumns(10);\r\n\r\n\t\tJLabel lblMessageCode = new JLabel(\"Message Code\");\r\n\t\tlblMessageCode.setBounds(302, 46, 86, 18);\r\n\t\tpanel.add(lblMessageCode);\r\n\r\n\t\ttextField_messageCode = new JTextField();\r\n\t\ttextField_messageCode.setBounds(294, 69, 86, 20);\r\n\t\ttextField_messageCode.setText(\"0200\");\r\n\t\tpanel.add(textField_messageCode);\r\n\t\ttextField_messageCode.setEditable(false);\r\n\t\ttextField_messageCode.setColumns(10);\r\n\r\n\t\tJLabel lblBitmapstr = new JLabel(\"BitHPMapStr1 :\");\r\n\t\tlblBitmapstr.setBounds(10, 97, 92, 14);\r\n\t\tpanel.add(lblBitmapstr);\r\n\r\n\t\tJLabel lblBithpmapstr = new JLabel(\"BitHPMapStr2 :\");\r\n\t\tlblBithpmapstr.setBounds(10, 122, 92, 14);\r\n\t\tpanel.add(lblBithpmapstr);\r\n\r\n\t\ttextField_hexValues1 = new JTextField();\r\n\t\ttextField_hexValues1.setBounds(180, 147, 144, 20);\r\n\t\ttextField_hexValues1.setText(\"F23E448128E49000\");\r\n\t\tpanel.add(textField_hexValues1);\r\n\t\ttextField_hexValues1.setColumns(10);\r\n\r\n\t\ttextField_hexValues2 = new JTextField();\r\n\t\ttextField_hexValues2.setColumns(10);\r\n\t\ttextField_hexValues2.setBounds(334, 147, 146, 20);\r\n\t\ttextField_hexValues2.setText(\"0000000006000030\");\r\n\t\tpanel.add(textField_hexValues2);\r\n\r\n\t\tJLabel lblHexValues = new JLabel(\"Hex Values\");\r\n\t\tlblHexValues.setBounds(10, 147, 70, 14);\r\n\t\tpanel.add(lblHexValues);\r\n\r\n\t\tJLabel lblFromAccount = new JLabel(\"Source MainCode :\");\r\n\t\tlblFromAccount.setBounds(10, 172, 117, 22);\r\n\t\tpanel.add(lblFromAccount);\r\n\r\n\t\tJLabel lblToAccount = new JLabel(\"Destination MainCode: \");\r\n\t\tlblToAccount.setBounds(10, 194, 141, 22);\r\n\t\tpanel.add(lblToAccount);\r\n\r\n\t\ttextField_from = new JTextField();\r\n\t\ttextField_from.addKeyListener(new KeyAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void keyTyped(KeyEvent e) {\r\n\t\t\t\tif (textField_from.getText().length() >= 28) {\r\n\t\t\t\t\te.consume();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\ttextField_from.setBounds(180, 173, 199, 20);\r\n\t\tpanel.add(textField_from);\r\n\t\ttextField_from.setColumns(10);\r\n\r\n\t\ttextField_To = new JTextField();\r\n\t\ttextField_To.addKeyListener(new KeyAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void keyTyped(KeyEvent e) {\r\n\t\t\t\tif (textField_To.getText().length() >= 28) {\r\n\t\t\t\t\te.consume();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\ttextField_To.setColumns(10);\r\n\t\ttextField_To.setBounds(180, 195, 199, 20);\r\n\t\tpanel.add(textField_To);\r\n\r\n\t\tJLabel lblTerminalId = new JLabel(\"Terminal ID: \");\r\n\t\tlblTerminalId.setBounds(10, 224, 86, 14);\r\n\t\tpanel.add(lblTerminalId);\r\n\r\n\t\ttextField_terminal = new JTextField();\r\n\t\ttextField_terminal.setBounds(180, 221, 102, 20);\r\n\t\tpanel.add(textField_terminal);\r\n\t\ttextField_terminal.setColumns(10);\r\n\r\n\t\tJLabel lblAmount = new JLabel(\"Amount :\");\r\n\t\tlblAmount.setBounds(10, 249, 62, 20);\r\n\t\tpanel.add(lblAmount);\r\n\r\n\t\ttextField_Amount = new JTextField();\r\n\t\ttextField_Amount.addKeyListener(new KeyAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void keyTyped(KeyEvent e) {\r\n\t\t\t\tif (textField_Amount.getText().length() >= 12) {\r\n\t\t\t\t\te.consume();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\ttextField_Amount.setBounds(180, 252, 102, 20);\r\n\t\tpanel.add(textField_Amount);\r\n\t\ttextField_Amount.setColumns(10);\r\n\r\n\t\tButton button = new Button(\"Next\");\r\n\t\tbutton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\ttabbedPane.setSelectedIndex(1);\r\n\t\t\t\tTranDate d = new TranDate();\r\n\t\t\t\tRandom rnd = new Random();\r\n\t\t\t\ttextField_Ac1.setText(textField_from.getText());\r\n\t\t\t\ttextField_amount.setText(textField_Amount.getText());\r\n\t\t\t\ttextField_Ac2.setText(textField_To.getText());\r\n\t\t\t\ttextField_Terminal.setText(textField_terminal.getText());\r\n\t\t\t\ttextField_proCode.setText(textField_ProcessCode.getText());\r\n\t\t\t\ttextField_primary.setText(textField_hexValues1.getText());\r\n\t\t\t\ttextField_secondarybtmap.setText(textField_hexValues2.getText());\r\n\t\t\t\ttextField_Date.setText(d.getTranDateTime());\r\n\t\t\t\ttextField.setText(String.valueOf(100000 + rnd.nextInt(900000)));\r\n\t\t\t\ttextField_1_time.setText(d.getTimeLocal());\r\n\t\t\t\ttextField_DateLocal.setText(d.getLocalSettle());\r\n\t\t\t\ttextField_DateExp.setText(d.getexpDate());\r\n\t\t\t\ttextField_1.setText(d.getLocalSettle());\r\n\t\t\t\ttextField_retrival.setText(String.valueOf(d.generateRandom(12)));\r\n\r\n\t\t\t\tif (textField_messageCode.getText().equals(\"0420\")) {\r\n\t\t\t\t\t// reversalfield();\r\n//\t\t\t\t\ttextField_primary.setText(\"F23A44810EE48000\");\r\n//\t\t\t\t\ttextField_secondarybtmap.setText(\"0000004006000000\");\r\n\t\t\t\t\ttextField_OriData.setEnabled(true);\r\n\t\t\t\t\ttextField_DateExp.setEnabled(false);\r\n\t\t\t\t\ttextField_DateExp.setEnabled(false);\r\n\t\t\t\t\ttextField_track.setEnabled(false);\r\n\t\t\t\t\ttextField_PIN.setEnabled(false);\r\n\t\t\t\t\ttextField_123.setEnabled(false);\r\n\t\t\t\t\ttextField_124.setEnabled(false);\r\n\t\t\t\t\ttextField_authorization.setEnabled(true);\r\n\t\t\t\t\ttextField_responseCODE.setEnabled(true);\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttextField_authorization.setEnabled(false);\r\n\t\t\t\t\ttextField_responseCODE.setEnabled(false);\r\n\t\t\t\t\ttextField_OriData.setEnabled(false);\r\n\t\t\t\t\ttextField_DateExp.setEnabled(true);\r\n\t\t\t\t\ttextField_DateExp.setEnabled(true);\r\n\t\t\t\t\ttextField_track.setEnabled(true);\r\n\t\t\t\t\ttextField_PIN.setEnabled(true);\r\n\t\t\t\t\ttextField_123.setEnabled(true);\r\n\t\t\t\t\ttextField_124.setEnabled(true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tbutton.setBounds(10, 283, 70, 22);\r\n\t\tbutton.setEnabled(false);\r\n\t\tpanel.add(button);\r\n\r\n\t\tJLabel lblNewLabel_52 = new JLabel(\"Password : \");\r\n\t\tlblNewLabel_52.setFont(new Font(\"SansSerif\", Font.BOLD, 12));\r\n\t\tlblNewLabel_52.setBounds(180, 12, 81, 18);\r\n\t\tpanel.add(lblNewLabel_52);\r\n\r\n\t\ttextField_2 = new JPasswordField();\r\n\t\ttextField_2.setBounds(264, 12, 163, 20);\r\n\t\tpanel.add(textField_2);\r\n\t\ttextField_2.setColumns(10);\r\n\r\n\t\tJLabel lblNewLabel_53 = new JLabel(\"Locked\");\r\n\t\tlblNewLabel_53.setForeground(Color.RED);\r\n\t\tlblNewLabel_53.setBounds(571, 15, 54, 14);\r\n\t\tpanel.add(lblNewLabel_53);\r\n\t\tframe.addWindowListener(new WindowAdapter() {\r\n\t\t\tpublic void windowOpened(WindowEvent e) {\r\n\t\t\t\ttextField_2.requestFocus();\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tJLabel lblNewLabel_54 = new JLabel(\"Status : \");\r\n\t\tlblNewLabel_54.setFont(new Font(\"Cambria\", Font.PLAIN, 12));\r\n\t\tlblNewLabel_54.setBounds(523, 15, 54, 14);\r\n\t\tpanel.add(lblNewLabel_54);\r\n\r\n\t\ttabbedPane.addTab(\"Values\", null, panel_1, null);\r\n\r\n\t\tJLabel lblNewLabel_1 = new JLabel(\"0. Primary BitMap: \");\r\n\t\tlblNewLabel_1.setBounds(20, 30, 126, 17);\r\n\r\n\t\ttextField_primary = new JTextField();\r\n\t\ttextField_primary.setBounds(178, 28, 140, 20);\r\n\t\ttextField_primary.setColumns(10);\r\n\r\n\t\tJLabel lblSecondayBitMap = new JLabel(\"1. Seconday Bit Map: \");\r\n\t\tlblSecondayBitMap.setBounds(20, 51, 126, 20);\r\n\r\n\t\ttextField_secondarybtmap = new JTextField();\r\n\t\ttextField_secondarybtmap.setBounds(178, 51, 140, 20);\r\n\t\ttextField_secondarybtmap.setColumns(10);\r\n\r\n\t\tJLabel lblNewLabel_2 = new JLabel(\"2. Primry Account Number:\");\r\n\t\tlblNewLabel_2.setBounds(20, 79, 160, 14);\r\n\r\n\t\ttextField_PAN = new JTextField();\r\n\t\ttextField_PAN.addKeyListener(new KeyAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void keyTyped(KeyEvent e) {\r\n\t\t\t\tif (textField_PAN.getText().length() >= 19) {\r\n\t\t\t\t\te.consume();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\ttextField_PAN.setBounds(178, 76, 140, 20);\r\n\t\ttextField_PAN.setColumns(10);\r\n\r\n\t\tJLabel lblNewLabel_3 = new JLabel(\"4. Amount :\");\r\n\t\tlblNewLabel_3.setBounds(20, 104, 91, 14);\r\n\r\n\t\ttextField_amount = new JTextField();\r\n\t\ttextField_amount.addKeyListener(new KeyAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void keyTyped(KeyEvent e) {\r\n\t\t\t\tif (textField_amount.getText().length() >= 12) {\r\n\t\t\t\t\te.consume();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\ttextField_amount.setBounds(178, 101, 140, 20);\r\n\t\ttextField_amount.setColumns(10);\r\n\r\n\t\tJLabel lblNewLabel_4 = new JLabel(\"7. Transmission Date :\");\r\n\t\tlblNewLabel_4.setBounds(20, 129, 148, 14);\r\n\r\n\t\ttextField_Date = new JTextField();\r\n\t\ttextField_Date.addKeyListener(new KeyAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void keyTyped(KeyEvent e) {\r\n\t\t\t\tif (textField_Date.getText().length() >= 12) {\r\n\t\t\t\t\te.consume();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\ttextField_Date.setBounds(178, 127, 140, 23);\r\n\t\ttextField_Date.setText(\"\");\r\n\t\ttextField_Date.setColumns(10);\r\n\r\n\t\tJLabel lblNewLabel_5 = new JLabel(\"11. System Trace :\");\r\n\t\tlblNewLabel_5.setBounds(20, 154, 114, 14);\r\n\r\n\t\ttextField = new JTextField();\r\n\t\ttextField.addKeyListener(new KeyAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void keyTyped(KeyEvent e) {\r\n\t\t\t\tif (textField.getText().length() >= 6) {\r\n\t\t\t\t\te.consume();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\ttextField.setBounds(178, 151, 140, 20);\r\n\t\ttextField.setColumns(10);\r\n\r\n\t\tJLabel lblNewLabel_6 = new JLabel(\"12. Time, Local : \");\r\n\t\tlblNewLabel_6.setBounds(20, 179, 114, 14);\r\n\r\n\t\ttextField_1_time = new JTextField();\r\n\t\ttextField_1_time.addKeyListener(new KeyAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void keyTyped(KeyEvent e) {\r\n\t\t\t\tif (textField_1_time.getText().length() >= 6) {\r\n\t\t\t\t\te.consume();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\ttextField_1_time.setBounds(178, 176, 104, 20);\r\n\t\ttextField_1_time.setColumns(10);\r\n\r\n\t\tJLabel lblNewLabel_7 = new JLabel(\"13. Date, Local :\");\r\n\t\tlblNewLabel_7.setBounds(20, 204, 91, 14);\r\n\r\n\t\ttextField_DateLocal = new JTextField();\r\n\t\ttextField_DateLocal.addKeyListener(new KeyAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void keyTyped(KeyEvent e) {\r\n\t\t\t\tif (textField_DateLocal.getText().length() >= 4) {\r\n\t\t\t\t\te.consume();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\ttextField_DateLocal.setBounds(178, 201, 68, 20);\r\n\t\ttextField_DateLocal.setColumns(10);\r\n\r\n\t\tJLabel lblNewLabel_8 = new JLabel(\"14. Date, Exp\");\r\n\t\tlblNewLabel_8.setBounds(20, 229, 91, 14);\r\n\r\n\t\ttextField_DateExp = new JTextField();\r\n\t\ttextField_DateExp.addKeyListener(new KeyAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void keyTyped(KeyEvent e) {\r\n\t\t\t\tif (textField_DateExp.getText().length() >= 4) {\r\n\t\t\t\t\te.consume();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\ttextField_DateExp.setBounds(178, 226, 68, 20);\r\n\t\ttextField_DateExp.setColumns(10);\r\n\r\n\t\tlblNewLabel_48 = new JLabel(\"90. Original Data Element :\");\r\n\t\tlblNewLabel_48.setBounds(328, 54, 168, 14);\r\n\t\tpanel_1.add(lblNewLabel_48);\r\n\r\n\t\ttextField_OriData = new JTextField();\r\n\t\ttextField_OriData.addKeyListener(new KeyAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void keyTyped(KeyEvent e) {\r\n\t\t\t\tif (textField_OriData.getText().length() >= 42) {\r\n\t\t\t\t\te.consume();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\ttextField_OriData.setColumns(10);\r\n\t\ttextField_OriData.setBounds(328, 76, 350, 20);\r\n\t\ttextField_OriData.setEnabled(false);\r\n\t\tpanel_1.add(textField_OriData);\r\n\r\n\t\tJLabel lblNewLabel_9 = new JLabel(\"15. Date Settle :\");\r\n\t\tlblNewLabel_9.setBounds(20, 254, 91, 14);\r\n\r\n\t\ttextField_1 = new JTextField();\r\n\t\ttextField_1.addKeyListener(new KeyAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void keyTyped(KeyEvent e) {\r\n\t\t\t\tif (textField_1.getText().length() >= 4) {\r\n\t\t\t\t\te.consume();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\ttextField_1.setBounds(178, 248, 68, 20);\r\n\t\ttextField_1.setColumns(10);\r\n\t\tpanel_1.setLayout(null);\r\n\t\tpanel_1.add(lblNewLabel_1);\r\n\t\tpanel_1.add(textField_primary);\r\n\t\tpanel_1.add(lblSecondayBitMap);\r\n\t\tpanel_1.add(textField_secondarybtmap);\r\n\t\tpanel_1.add(lblNewLabel_2);\r\n\t\tpanel_1.add(textField_PAN);\r\n\t\tpanel_1.add(lblNewLabel_3);\r\n\t\tpanel_1.add(textField_amount);\r\n\t\tpanel_1.add(lblNewLabel_4);\r\n\t\tpanel_1.add(textField_Date);\r\n\t\tpanel_1.add(lblNewLabel_5);\r\n\t\tpanel_1.add(textField);\r\n\t\tpanel_1.add(lblNewLabel_6);\r\n\t\tpanel_1.add(textField_1_time);\r\n\t\tpanel_1.add(lblNewLabel_7);\r\n\t\tpanel_1.add(textField_DateLocal);\r\n\t\tpanel_1.add(lblNewLabel_8);\r\n\t\tpanel_1.add(textField_DateExp);\r\n\t\tpanel_1.add(lblNewLabel_9);\r\n\t\tpanel_1.add(textField_1);\r\n\r\n\t\tJLabel lblNewLabel_10 = new JLabel(\"18. Merchant Type : \");\r\n\t\tlblNewLabel_10.setBounds(20, 279, 126, 14);\r\n\t\tpanel_1.add(lblNewLabel_10);\r\n\r\n\t\ttextField_Merchant = new JTextField();\r\n\t\ttextField_Merchant.addKeyListener(new KeyAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void keyTyped(KeyEvent e) {\r\n\t\t\t\tif (textField_Merchant.getText().length() >= 4) {\r\n\t\t\t\t\te.consume();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\ttextField_Merchant.setBounds(178, 276, 41, 20);\r\n\t\tpanel_1.add(textField_Merchant);\r\n\t\ttextField_Merchant.setColumns(10);\r\n\r\n\t\tJLabel lblNewLabel_11 = new JLabel(\"22. Point of service :\");\r\n\t\tlblNewLabel_11.setBounds(20, 307, 134, 14);\r\n\t\tpanel_1.add(lblNewLabel_11);\r\n\r\n\t\ttextField_Service = new JTextField();\r\n\t\ttextField_Service.addKeyListener(new KeyAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void keyTyped(KeyEvent e) {\r\n\t\t\t\tif (textField_Service.getText().length() >= 3) {\r\n\t\t\t\t\te.consume();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\ttextField_Service.setBounds(178, 304, 30, 20);\r\n\t\tpanel_1.add(textField_Service);\r\n\t\ttextField_Service.setColumns(10);\r\n\r\n\t\tJLabel lblNewLabel_12 = new JLabel(\"25. Point of condition : \");\r\n\t\tlblNewLabel_12.setBounds(20, 332, 148, 14);\r\n\t\tpanel_1.add(lblNewLabel_12);\r\n\r\n\t\ttextField_condition = new JTextField();\r\n\t\ttextField_condition.addKeyListener(new KeyAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void keyTyped(KeyEvent e) {\r\n\t\t\t\tif (textField_condition.getText().length() >= 2) {\r\n\t\t\t\t\te.consume();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\ttextField_condition.setBounds(178, 329, 19, 20);\r\n\t\tpanel_1.add(textField_condition);\r\n\t\ttextField_condition.setColumns(10);\r\n\r\n\t\tJLabel lblNewLabel_13 = new JLabel(\"32. Acquirer Id :\");\r\n\t\tlblNewLabel_13.setBounds(20, 357, 126, 14);\r\n\t\tpanel_1.add(lblNewLabel_13);\r\n\r\n\t\ttextField_Acquirer = new JTextField();\r\n\t\ttextField_Acquirer.addKeyListener(new KeyAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void keyTyped(KeyEvent e) {\r\n\t\t\t\tif (textField_Acquirer.getText().length() >= 8) {\r\n\t\t\t\t\te.consume();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\ttextField_Acquirer.setBounds(178, 354, 140, 20);\r\n\t\tpanel_1.add(textField_Acquirer);\r\n\t\ttextField_Acquirer.setColumns(10);\r\n\r\n\t\tJLabel lblNewLabel_14 = new JLabel(\"35. Track 2 data : \");\r\n\t\tlblNewLabel_14.setBounds(20, 382, 126, 14);\r\n\t\tpanel_1.add(lblNewLabel_14);\r\n\r\n\t\ttextField_track = new JTextField();\r\n\t\ttextField_track.setBounds(178, 379, 140, 20);\r\n\t\tpanel_1.add(textField_track);\r\n\t\ttextField_track.setColumns(10);\r\n\r\n\t\tJLabel lblNewLabel_15 = new JLabel(\"37. Retrieval ref : \");\r\n\t\tlblNewLabel_15.setBounds(20, 407, 104, 14);\r\n\t\tpanel_1.add(lblNewLabel_15);\r\n\r\n\t\ttextField_retrival = new JTextField();\r\n\t\ttextField_retrival.addKeyListener(new KeyAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void keyTyped(KeyEvent e) {\r\n\t\t\t\tif (textField_retrival.getText().length() >= 12) {\r\n\t\t\t\t\te.consume();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\ttextField_retrival.setBounds(177, 404, 91, 20);\r\n\t\tpanel_1.add(textField_retrival);\r\n\t\ttextField_retrival.setColumns(10);\r\n\r\n\t\tJLabel lblNewLabel_16 = new JLabel(\"41. Terminal Id :\");\r\n\t\tlblNewLabel_16.setBounds(20, 431, 126, 14);\r\n\t\tpanel_1.add(lblNewLabel_16);\r\n\r\n\t\ttextField_Terminal = new JTextField();\r\n\t\ttextField_Terminal.addKeyListener(new KeyAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void keyTyped(KeyEvent e) {\r\n\t\t\t\tif (textField_Terminal.getText().length() >= 8) {\r\n\t\t\t\t\te.consume();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\ttextField_Terminal.setBounds(178, 428, 140, 20);\r\n\t\tpanel_1.add(textField_Terminal);\r\n\t\ttextField_Terminal.setColumns(10);\r\n\r\n\t\tJLabel lblNewLabel_17 = new JLabel(\"42. Card Identification : \");\r\n\t\tlblNewLabel_17.setBounds(20, 456, 134, 14);\r\n\t\tpanel_1.add(lblNewLabel_17);\r\n\r\n\t\ttextField_cardidentity = new JTextField();\r\n\t\ttextField_cardidentity.addKeyListener(new KeyAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void keyTyped(KeyEvent e) {\r\n\t\t\t\tif (textField_cardidentity.getText().length() >= 15) {\r\n\t\t\t\t\te.consume();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\ttextField_cardidentity.setBounds(178, 453, 140, 20);\r\n\t\tpanel_1.add(textField_cardidentity);\r\n\t\ttextField_cardidentity.setColumns(10);\r\n\r\n\t\tJLabel lblNewLabel_18 = new JLabel(\"43. Card Location :\");\r\n\t\tlblNewLabel_18.setBounds(20, 478, 114, 14);\r\n\t\tpanel_1.add(lblNewLabel_18);\r\n\r\n\t\ttextField_cardlocation = new JTextField();\r\n\t\ttextField_cardlocation.addKeyListener(new KeyAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void keyTyped(KeyEvent e) {\r\n\t\t\t\tif (textField_cardlocation.getText().length() >= 40) {\r\n\t\t\t\t\te.consume();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\ttextField_cardlocation.setBounds(178, 475, 140, 20);\r\n\t\tpanel_1.add(textField_cardlocation);\r\n\t\ttextField_cardlocation.setColumns(10);\r\n\r\n\t\tJLabel lblNewLabel_19 = new JLabel(\"46. Additional data iso : \");\r\n\t\tlblNewLabel_19.setBounds(20, 499, 148, 14);\r\n\t\tpanel_1.add(lblNewLabel_19);\r\n\r\n\t\ttextField_field46 = new JTextField();\r\n\t\ttextField_field46.setBounds(178, 496, 318, 20);\r\n\t\tpanel_1.add(textField_field46);\r\n\t\ttextField_field46.setColumns(10);\r\n\r\n\t\tJLabel lblNewLabel_20 = new JLabel(\"49. Currency Code : \");\r\n\t\tlblNewLabel_20.setBounds(20, 524, 126, 14);\r\n\t\tpanel_1.add(lblNewLabel_20);\r\n\r\n\t\ttextField_Currency = new JTextField();\r\n\t\ttextField_Currency.setBounds(178, 521, 30, 20);\r\n\t\ttextField_Currency.setText(\"524\");\r\n\t\ttextField_Currency.setEditable(false);\r\n\t\tpanel_1.add(textField_Currency);\r\n\t\ttextField_Currency.setColumns(10);\r\n\r\n\t\tJLabel lblNewLabel_21 = new JLabel(\"52. PIN :\");\r\n\t\tlblNewLabel_21.setBounds(20, 549, 126, 14);\r\n\t\tpanel_1.add(lblNewLabel_21);\r\n\r\n\t\tJLabel lblNewLabel_22 = new JLabel(\"102. Account 1 :\");\r\n\t\tlblNewLabel_22.setBounds(20, 574, 126, 14);\r\n\t\tpanel_1.add(lblNewLabel_22);\r\n\r\n\t\tJLabel lblAccount = new JLabel(\"103. Account 2 :\");\r\n\t\tlblAccount.setBounds(20, 599, 126, 14);\r\n\t\tpanel_1.add(lblAccount);\r\n\r\n\t\tJLabel lblReservedPrivateUse = new JLabel(\"123. Reserved private : 123\");\r\n\t\tlblReservedPrivateUse.setBounds(20, 624, 160, 14);\r\n\t\tpanel_1.add(lblReservedPrivateUse);\r\n\r\n\t\tJLabel lblReservedPrivateUse_1 = new JLabel(\"124. Reserved private : 124\");\r\n\t\tlblReservedPrivateUse_1.setBounds(20, 651, 160, 14);\r\n\t\tpanel_1.add(lblReservedPrivateUse_1);\r\n\r\n\t\ttextField_PIN = new JTextField();\r\n\t\ttextField_PIN.addKeyListener(new KeyAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void keyTyped(KeyEvent e) {\r\n\t\t\t\tif (textField_PIN.getText().length() >= 16) {\r\n\t\t\t\t\te.consume();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\ttextField_PIN.setBounds(178, 546, 140, 20);\r\n\t\tpanel_1.add(textField_PIN);\r\n\t\ttextField_PIN.setColumns(10);\r\n\r\n\t\ttextField_Ac1 = new JTextField();\r\n\t\ttextField_Ac1.addKeyListener(new KeyAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void keyTyped(KeyEvent e) {\r\n\t\t\t\tif (textField_Ac1.getText().length() >= 28) {\r\n\t\t\t\t\te.consume();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\ttextField_Ac1.setColumns(10);\r\n\t\ttextField_Ac1.setBounds(178, 571, 140, 20);\r\n\t\tpanel_1.add(textField_Ac1);\r\n\r\n\t\ttextField_Ac2 = new JTextField();\r\n\t\ttextField_Ac2.addKeyListener(new KeyAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void keyTyped(KeyEvent e) {\r\n\t\t\t\tif (textField_Ac2.getText().length() >= 28) {\r\n\t\t\t\t\te.consume();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\ttextField_Ac2.setColumns(10);\r\n\t\ttextField_Ac2.setBounds(178, 596, 140, 20);\r\n\t\tpanel_1.add(textField_Ac2);\r\n\r\n\t\ttextField_123 = new JTextField();\r\n\t\ttextField_123.setColumns(10);\r\n\t\ttextField_123.setBounds(188, 621, 140, 20);\r\n\t\tpanel_1.add(textField_123);\r\n\r\n\t\ttextField_124 = new JTextField();\r\n\t\ttextField_124.setColumns(10);\r\n\t\ttextField_124.setBounds(190, 648, 140, 20);\r\n\t\tpanel_1.add(textField_124);\r\n\t\t// button placement\r\n\r\n\t\tJLabel lblNewLabel_46 = new JLabel(\"3. Pro Code : \");\r\n\t\tlblNewLabel_46.setBounds(333, 31, 84, 14);\r\n\t\tpanel_1.add(lblNewLabel_46);\r\n\r\n\t\ttextField_proCode = new JTextField();\r\n\t\ttextField_proCode.addKeyListener(new KeyAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void keyTyped(KeyEvent e) {\r\n\t\t\t\tif (textField_proCode.getText().length() >= 6) {\r\n\t\t\t\t\te.consume();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\ttextField_proCode.setBounds(427, 28, 75, 20);\r\n\t\tpanel_1.add(textField_proCode);\r\n\t\ttextField_proCode.setColumns(10);\r\n\r\n\t\tJButton btnNewButton = new JButton(\"Next\");\r\n\t\tbtnNewButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\ttabbedPane.setSelectedIndex(3);\r\n\t\t\t\tscrollFrame.getViewport().setViewPosition(new Point(0, 0));\r\n\t\t\t\tframe.invalidate();\r\n\t\t\t\tframe.validate();\r\n\t\t\t\tframe.repaint();\r\n\t\t\t\tif (textField_messageCode.getText().equals(\"0420\")) {\r\n\t\t\t\t\teditorPane.setText(MakeISO8583Reversal());\r\n\t\t\t\t} else {\r\n\t\t\t\t\teditorPane.setText(Makeiso8583());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tbtnNewButton.setBounds(20, 676, 91, 23);\r\n\t\tbtnNewButton.setEnabled(false);\r\n\t\tpanel_1.add(btnNewButton);\r\n\r\n\t\tJLabel lblNewLabel_49 = new JLabel(\"38. Authorization identity: \");\r\n\t\tlblNewLabel_49.setBounds(338, 101, 148, 17);\r\n\t\tpanel_1.add(lblNewLabel_49);\r\n\r\n\t\ttextField_authorization = new JTextField();\r\n\t\ttextField_authorization.addKeyListener(new KeyAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void keyTyped(KeyEvent e) {\r\n\t\t\t\tif (textField_authorization.getText().length() >= 6) {\r\n\t\t\t\t\te.consume();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\ttextField_authorization.setBounds(496, 101, 91, 20);\r\n\t\tpanel_1.add(textField_authorization);\r\n\t\ttextField_authorization.setColumns(10);\r\n\r\n\t\tJLabel lblNewLabel_50 = new JLabel(\"39. Response Code :\");\r\n\t\tlblNewLabel_50.setBounds(337, 129, 134, 14);\r\n\t\tpanel_1.add(lblNewLabel_50);\r\n\r\n\t\ttextField_responseCODE = new JTextField();\r\n\t\ttextField_responseCODE.setColumns(10);\r\n\t\ttextField_responseCODE.setBounds(454, 126, 54, 20);\r\n\t\tpanel_1.add(textField_responseCODE);\r\n\r\n\t\tJPanel panel_3 = new JPanel();\r\n\t\ttabbedPane.addTab(\"Custom1\", null, panel_3, null);\r\n\t\tpanel_3.setLayout(null);\r\n\r\n\t\tJLabel lblNewLabel_47 = new JLabel(\"Amount Settle: \");\r\n\t\tlblNewLabel_47.setBounds(10, 22, 91, 19);\r\n\t\tpanel_3.add(lblNewLabel_47);\r\n\r\n\t\ttextField_amt_settle = new JTextField();\r\n\t\ttextField_amt_settle.setBounds(111, 21, 118, 20);\r\n\t\tpanel_3.add(textField_amt_settle);\r\n\t\ttextField_amt_settle.setColumns(10);\r\n\t\t/*\r\n\t\t * Custom can be added For on and off fields. Dynamic Version is more effective\r\n\t\t */\r\n\t\t// JPanel panel_4 = new JPanel();\r\n\t\t// tabbedPane.addTab(\"Custom2\", null, panel_4, null);\r\n\r\n\t\t// JPanel panel_5 = new JPanel();\r\n\t\t// tabbedPane.addTab(\"Custom3\", null, panel_5, null);\r\n\r\n\t\tJPanel panel_2 = new JPanel();\r\n\t\ttabbedPane.addTab(\"Connect\", null, panel_2, null);\r\n\t\tpanel_2.setLayout(null);\r\n\r\n\t\tJLabel lblNewLabel_23 = new JLabel(\"Server :\");\r\n\t\tlblNewLabel_23.setBounds(10, 21, 52, 20);\r\n\t\tpanel_2.add(lblNewLabel_23);\r\n\r\n\t\tJLabel lblPort = new JLabel(\"Port :\");\r\n\t\tlblPort.setBounds(195, 21, 43, 20);\r\n\t\tpanel_2.add(lblPort);\r\n\r\n\t\ttextField_Server = new JTextField();\r\n\t\ttextField_Server.setBounds(69, 21, 116, 20);\r\n\t\tpanel_2.add(textField_Server);\r\n\t\ttextField_Server.setColumns(10);\r\n\r\n\t\ttextField_Port = new JTextField();\r\n\t\ttextField_Port.setBounds(233, 21, 58, 20);\r\n\t\tpanel_2.add(textField_Port);\r\n\t\ttextField_Port.setColumns(10);\r\n\r\n\t\teditorPane.setBounds(10, 75, 681, 90);\r\n\t\tpanel_2.add(editorPane);\r\n\r\n\t\tJEditorPane editorPane_1 = new JEditorPane();\r\n\t\teditorPane_1.setBounds(10, 196, 681, 90);\r\n\t\tpanel_2.add(editorPane_1);\r\n\r\n\t\tJLabel lblNewLabel_24 = new JLabel(\"Request :\");\r\n\t\tlblNewLabel_24.setBounds(10, 52, 83, 12);\r\n\t\tpanel_2.add(lblNewLabel_24);\r\n\r\n\t\tJLabel lblResponse = new JLabel(\"Response :\");\r\n\t\tlblResponse.setBounds(10, 173, 73, 12);\r\n\t\tpanel_2.add(lblResponse);\r\n\r\n\t\tJLabel lblNewLabel_25 = new JLabel(\"Response List\");\r\n\t\tlblNewLabel_25.setFont(new Font(\"Tahoma\", Font.BOLD, 11));\r\n\t\tlblNewLabel_25.setBounds(10, 311, 104, 20);\r\n\t\tpanel_2.add(lblNewLabel_25);\r\n\r\n\t\tJLabel lblNewLabel_26 = new JLabel(\"Response Code : \");\r\n\t\tlblNewLabel_26.setBounds(286, 345, 104, 14);\r\n\t\tpanel_2.add(lblNewLabel_26);\r\n\r\n\t\ttextField_responseCode = new JTextField();\r\n\t\ttextField_responseCode.setBounds(412, 345, 43, 20);\r\n\t\tpanel_2.add(textField_responseCode);\r\n\t\ttextField_responseCode.setColumns(10);\r\n\r\n\t\tJLabel lblNewLabel_27 = new JLabel(\"Account identification 1 :\");\r\n\t\tlblNewLabel_27.setBounds(273, 528, 148, 14);\r\n\t\tpanel_2.add(lblNewLabel_27);\r\n\r\n\t\ttextField_Acc1 = new JTextField();\r\n\t\ttextField_Acc1.setBounds(431, 525, 203, 20);\r\n\t\tpanel_2.add(textField_Acc1);\r\n\t\ttextField_Acc1.setColumns(10);\r\n\r\n\t\tJLabel lblNewLabel_28 = new JLabel(\"Unsuccessful\");\r\n\t\tlblNewLabel_28.setFont(new Font(\"Tahoma\", Font.BOLD, 11));\r\n\t\tlblNewLabel_28.setBounds(395, 21, 95, 19);\r\n\t\tpanel_2.add(lblNewLabel_28);\r\n\t\tJEditorPane editorPane_2 = new JEditorPane();\r\n\t\teditorPane_2.setBounds(115, 631, 536, 77);\r\n\t\tpanel_2.add(editorPane_2);\r\n\r\n\t\tJLabel lblNewLabel_42 = new JLabel(\"Additional Data[N] : \");\r\n\t\tlblNewLabel_42.setBounds(274, 475, 147, 14);\r\n\t\tpanel_2.add(lblNewLabel_42);\r\n\r\n\t\tJLabel lblAdditionalDatap = new JLabel(\"Additional Data[P] : \");\r\n\t\tlblAdditionalDatap.setBounds(274, 503, 116, 14);\r\n\t\tpanel_2.add(lblAdditionalDatap);\r\n\r\n\t\tButton button_1 = new Button(\"Connect\");\r\n\t\tbutton_1.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif (textField_Server.getText().isEmpty() || textField_Port.getText().isEmpty()) {\r\n\t\t\t\t\tT2PSwing.infoBox(\"Server/Port Can't be empty\", \"Fatal Error\");\r\n\t\t\t\t} else if (!isInteger(textField_Port.getText())) {\r\n\t\t\t\t\tT2PSwing.infoBox(\"Port is not numeric\", \"Critical error\");\r\n\t\t\t\t} else { /* Everything fine, continue */\r\n\t\t\t\t\tHashMap<String/* Field names */, JTextField/* textFields */> fieldmap = new HashMap<>();\r\n\t\t\t\t\tfieldmap.put(\"PrimaryBitmap\", textField_priBit_res);\r\n\t\t\t\t\tfieldmap.put(\"BitmapExtended\", textField_bt_Ex_res);\r\n\t\t\t\t\tfieldmap.put(\"Pan\", textField_PANRes);\r\n\t\t\t\t\tfieldmap.put(\"Amount\", textField_AmtRes);\r\n\t\t\t\t\tfieldmap.put(\"TranDate\", textField_TranDate_res);\r\n\t\t\t\t\tfieldmap.put(\"SystemTrace\", textField_SysTrace_res);\r\n\t\t\t\t\tfieldmap.put(\"TimeLocal\", textField_TimeLocal_res);\r\n\t\t\t\t\tfieldmap.put(\"LocalTran\", textField_LocalTranRes);\r\n\t\t\t\t\tfieldmap.put(\"DateSettle\", textField_Datesettleres);\r\n\t\t\t\t\tfieldmap.put(\"AuthCode\", textField_auth_res);\r\n\t\t\t\t\tfieldmap.put(\"AdditionalAm\", textField_AddAm_res);\r\n\t\t\t\t\tfieldmap.put(\"ResponseCode\", textField_responseCode);\r\n\t\t\t\t\tfieldmap.put(\"TerminalId\", textField_Teminal_res);\r\n\t\t\t\t\tfieldmap.put(\"AcquirerID\", textField_Acquirer_res);\r\n\t\t\t\t\tfieldmap.put(\"MerchantType\", textField_merchan_res);\r\n\t\t\t\t\tfieldmap.put(\"RetrievalRef\", textField_retRes);\r\n\t\t\t\t\tfieldmap.put(\"Currency\", textField_Curr_res);\r\n\t\t\t\t\tfieldmap.put(\"AdditionalDataNational\", textField_adDataN);\r\n\t\t\t\t\tfieldmap.put(\"AdditionalDataPriate\", textField_AdDataP);\r\n\t\t\t\t\tfieldmap.put(\"Account1\", textField_Acc1);\r\n\t\t\t\t\tfieldmap.put(\"Account2\", textField_Acc2);\r\n\t\t\t\t\tnew Thread(() -> {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tsocket = new Socket(textField_Server.getText(), Integer.parseInt(textField_Port.getText()));\r\n\t\t\t\t\t\t\tISOSender is = new ISOSender(socket, editorPane.getText(), editorPane_1, lblNewLabel_28,\r\n\t\t\t\t\t\t\t\t\tfieldmap, lblNewLabel_42, lblAdditionalDatap);\r\n\t\t\t\t\t\t\tis.Field48(editorPane_2, textField_ProcessCode, textField_messageCode);\r\n\t\t\t\t\t\t\tis.run();\r\n\r\n\t\t\t\t\t\t\t// ISOResponse ISR = new ISOResponse(socket,Makeiso8583());\r\n\t\t\t\t\t\t\t// ISR.run();\r\n\t\t\t\t\t\t} catch (NumberFormatException | IOException e1) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\tT2PSwing.infoBox(\"Connection Problem occured \" + e1.toString(), \"Critical error\");\r\n\t\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}).start();\r\n\r\n\t\t\t\t\t// lblNewLabel_28.setText(\"Successful\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tbutton_1.setBounds(303, 19, 73, 22);\r\n\t\tbutton_1.setEnabled(false);\r\n\t\tpanel_2.add(button_1);\r\n\r\n\t\tJLabel lblNewLabel_29 = new JLabel(\"Primary BitMap :\");\r\n\t\tlblNewLabel_29.setBounds(10, 342, 104, 20);\r\n\t\tpanel_2.add(lblNewLabel_29);\r\n\r\n\t\ttextField_priBit_res = new JTextField();\r\n\t\ttextField_priBit_res.setBounds(115, 342, 148, 20);\r\n\t\tpanel_2.add(textField_priBit_res);\r\n\t\ttextField_priBit_res.setColumns(10);\r\n\r\n\t\tJLabel lblNewLabel_30 = new JLabel(\"Bit Map Ex :\");\r\n\t\tlblNewLabel_30.setBounds(10, 373, 73, 14);\r\n\t\tpanel_2.add(lblNewLabel_30);\r\n\r\n\t\ttextField_bt_Ex_res = new JTextField();\r\n\t\ttextField_bt_Ex_res.setBounds(115, 370, 148, 20);\r\n\t\tpanel_2.add(textField_bt_Ex_res);\r\n\t\ttextField_bt_Ex_res.setColumns(10);\r\n\r\n\t\tJLabel lblNewLabel_31 = new JLabel(\"PAN :\");\r\n\t\tlblNewLabel_31.setBounds(10, 398, 52, 14);\r\n\t\tpanel_2.add(lblNewLabel_31);\r\n\r\n\t\ttextField_PANRes = new JTextField();\r\n\t\ttextField_PANRes.setColumns(10);\r\n\t\ttextField_PANRes.setBounds(115, 395, 148, 20);\r\n\t\tpanel_2.add(textField_PANRes);\r\n\r\n\t\tJLabel lblNewLabel_32 = new JLabel(\"Amount :\");\r\n\t\tlblNewLabel_32.setBounds(10, 423, 73, 14);\r\n\t\tpanel_2.add(lblNewLabel_32);\r\n\r\n\t\ttextField_AmtRes = new JTextField();\r\n\t\ttextField_AmtRes.setColumns(10);\r\n\t\ttextField_AmtRes.setBounds(115, 420, 148, 20);\r\n\t\tpanel_2.add(textField_AmtRes);\r\n\r\n\t\tJLabel lblNewLabel_33 = new JLabel(\"Tran Date: \");\r\n\t\tlblNewLabel_33.setBounds(10, 448, 83, 14);\r\n\t\tpanel_2.add(lblNewLabel_33);\r\n\r\n\t\ttextField_TranDate_res = new JTextField();\r\n\t\ttextField_TranDate_res.setColumns(10);\r\n\t\ttextField_TranDate_res.setBounds(115, 447, 148, 20);\r\n\t\tpanel_2.add(textField_TranDate_res);\r\n\r\n\t\tJLabel lblNewLabel_34 = new JLabel(\"System Trace :\");\r\n\t\tlblNewLabel_34.setBounds(10, 478, 95, 14);\r\n\t\tpanel_2.add(lblNewLabel_34);\r\n\r\n\t\ttextField_SysTrace_res = new JTextField();\r\n\t\ttextField_SysTrace_res.setColumns(10);\r\n\t\ttextField_SysTrace_res.setBounds(115, 475, 148, 20);\r\n\t\tpanel_2.add(textField_SysTrace_res);\r\n\r\n\t\tJLabel lblNewLabel_35 = new JLabel(\"Time local :\");\r\n\t\tlblNewLabel_35.setBounds(10, 503, 83, 14);\r\n\t\tpanel_2.add(lblNewLabel_35);\r\n\r\n\t\ttextField_TimeLocal_res = new JTextField();\r\n\t\ttextField_TimeLocal_res.setColumns(10);\r\n\t\ttextField_TimeLocal_res.setBounds(115, 500, 148, 20);\r\n\t\tpanel_2.add(textField_TimeLocal_res);\r\n\r\n\t\tJLabel lblNewLabel_36 = new JLabel(\"Date, Local Tran :\");\r\n\t\tlblNewLabel_36.setBounds(10, 528, 104, 14);\r\n\t\tpanel_2.add(lblNewLabel_36);\r\n\r\n\t\ttextField_LocalTranRes = new JTextField();\r\n\t\ttextField_LocalTranRes.setColumns(10);\r\n\t\ttextField_LocalTranRes.setBounds(115, 525, 148, 20);\r\n\t\tpanel_2.add(textField_LocalTranRes);\r\n\r\n\t\tJLabel lblNewLabel_37 = new JLabel(\"Date Settle : \");\r\n\t\tlblNewLabel_37.setBounds(10, 553, 77, 14);\r\n\t\tpanel_2.add(lblNewLabel_37);\r\n\r\n\t\ttextField_Datesettleres = new JTextField();\r\n\t\ttextField_Datesettleres.setColumns(10);\r\n\t\ttextField_Datesettleres.setBounds(115, 550, 148, 20);\r\n\t\tpanel_2.add(textField_Datesettleres);\r\n\r\n\t\tJLabel lblNewLabel_38 = new JLabel(\"Merchant Type :\");\r\n\t\tlblNewLabel_38.setBounds(286, 423, 104, 14);\r\n\t\tpanel_2.add(lblNewLabel_38);\r\n\r\n\t\ttextField_merchan_res = new JTextField();\r\n\t\ttextField_merchan_res.setColumns(10);\r\n\t\ttextField_merchan_res.setBounds(411, 420, 148, 20);\r\n\t\tpanel_2.add(textField_merchan_res);\r\n\r\n\t\tJLabel lblNewLabel_39 = new JLabel(\"Acquirer ID :\");\r\n\t\tlblNewLabel_39.setBounds(286, 398, 83, 14);\r\n\t\tpanel_2.add(lblNewLabel_39);\r\n\r\n\t\ttextField_Acquirer_res = new JTextField();\r\n\t\ttextField_Acquirer_res.setColumns(10);\r\n\t\ttextField_Acquirer_res.setBounds(411, 395, 148, 20);\r\n\t\tpanel_2.add(textField_Acquirer_res);\r\n\r\n\t\tJLabel lblNewLabel_40 = new JLabel(\"Auth Identity res :\");\r\n\t\tlblNewLabel_40.setBounds(10, 578, 104, 14);\r\n\t\tpanel_2.add(lblNewLabel_40);\r\n\r\n\t\ttextField_auth_res = new JTextField();\r\n\t\ttextField_auth_res.setColumns(10);\r\n\t\ttextField_auth_res.setBounds(115, 575, 148, 20);\r\n\t\tpanel_2.add(textField_auth_res);\r\n\r\n\t\tJLabel lblNewLabel_41 = new JLabel(\"Terminal ID: \");\r\n\t\tlblNewLabel_41.setBounds(286, 373, 90, 14);\r\n\t\tpanel_2.add(lblNewLabel_41);\r\n\r\n\t\ttextField_Teminal_res = new JTextField();\r\n\t\ttextField_Teminal_res.setColumns(10);\r\n\t\ttextField_Teminal_res.setBounds(411, 370, 148, 20);\r\n\t\tpanel_2.add(textField_Teminal_res);\r\n\r\n\t\ttextField_adDataN = new JTextField();\r\n\t\ttextField_adDataN.setColumns(10);\r\n\t\ttextField_adDataN.setBounds(431, 475, 220, 20);\r\n\t\tpanel_2.add(textField_adDataN);\r\n\r\n\t\ttextField_AdDataP = new JTextField();\r\n\t\ttextField_AdDataP.setColumns(10);\r\n\t\ttextField_AdDataP.setBounds(412, 500, 239, 20);\r\n\t\tpanel_2.add(textField_AdDataP);\r\n\r\n\t\tJLabel lblNewLabel_43 = new JLabel(\"Curr Code : \");\r\n\t\tlblNewLabel_43.setBounds(286, 450, 90, 14);\r\n\t\tpanel_2.add(lblNewLabel_43);\r\n\r\n\t\ttextField_Curr_res = new JTextField();\r\n\t\ttextField_Curr_res.setColumns(10);\r\n\t\ttextField_Curr_res.setBounds(412, 447, 66, 20);\r\n\t\tpanel_2.add(textField_Curr_res);\r\n\r\n\t\tJLabel lblAccountIdentification = new JLabel(\"Account identification 2 :\");\r\n\t\tlblAccountIdentification.setBounds(273, 553, 148, 14);\r\n\t\tpanel_2.add(lblAccountIdentification);\r\n\r\n\t\ttextField_Acc2 = new JTextField();\r\n\t\ttextField_Acc2.setColumns(10);\r\n\t\ttextField_Acc2.setBounds(431, 550, 203, 20);\r\n\t\tpanel_2.add(textField_Acc2);\r\n\r\n\t\tJLabel lblNewLabel_44 = new JLabel(\"Field 48 [Mini] :\");\r\n\t\tlblNewLabel_44.setBounds(20, 655, 95, 20);\r\n\t\tpanel_2.add(lblNewLabel_44);\r\n\r\n\t\ttextField_AddAm_res = new JTextField();\r\n\t\ttextField_AddAm_res.setColumns(10);\r\n\t\ttextField_AddAm_res.setBounds(136, 603, 606, 23);\r\n\t\tpanel_2.add(textField_AddAm_res);\r\n\r\n\t\tJLabel lblNewLabel_45 = new JLabel(\"Additional Amounts : \");\r\n\t\tlblNewLabel_45.setBounds(10, 606, 123, 20);\r\n\t\tpanel_2.add(lblNewLabel_45);\r\n\r\n\t\tJLabel lblNewLabel_51 = new JLabel(\"Retrieval Ref :\");\r\n\t\tlblNewLabel_51.setBounds(286, 578, 104, 14);\r\n\t\tpanel_2.add(lblNewLabel_51);\r\n\r\n\t\ttextField_retRes = new JTextField();\r\n\t\ttextField_retRes.setBounds(412, 575, 151, 20);\r\n\t\tpanel_2.add(textField_retRes);\r\n\t\ttextField_retRes.setColumns(10);\r\n\r\n\t\tJButton btnNewButton_2 = new JButton(\"Bulk\");\r\n\t\tbtnNewButton_2.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif (!isInteger(textFieldBulknumber.getText())) {\r\n\t\t\t\t\tT2PSwing.infoBox(\"Bulk is not numeric\", \"Critical error\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (rbFT.isSelected()) {\r\n\t\t\t\t\t\tinputs = 0;\r\n\t\t\t\t\t\tSystem.out.println(\"FT\" + rbFT.isSelected());\r\n\t\t\t\t\t} else if (rbBI.isSelected()) {\r\n\t\t\t\t\t\tinputs = 1;\r\n\t\t\t\t\t\tSystem.out.println(\"BE\" + rbBI.isSelected());\r\n\t\t\t\t\t} else if (rbMS.isSelected()) {\r\n\t\t\t\t\t\tinputs = 2;\r\n\t\t\t\t\t\tSystem.out.println(\"MS\" + rbMS.isSelected());\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\tString servername = textField_Server.getText();\r\n\t\t\t\t\tint port = Integer.parseInt(textField_Port.getText());\r\n\t\t\t\t\tint requirednooftransaction = Integer.parseInt(textFieldBulknumber.getText());\r\n\t\t\t\t\tHashMap<String/* Field names */, JTextField/* textFields */> fieldmap = new HashMap<>();\r\n\t\t\t\t\tfieldmap.put(\"PrimaryBitmap\", textField_priBit_res);\r\n\t\t\t\t\tfieldmap.put(\"BitmapExtended\", textField_bt_Ex_res);\r\n\t\t\t\t\tfieldmap.put(\"Pan\", textField_PANRes);\r\n\t\t\t\t\tfieldmap.put(\"Amount\", textField_AmtRes);\r\n\t\t\t\t\tfieldmap.put(\"TranDate\", textField_TranDate_res);\r\n\t\t\t\t\tfieldmap.put(\"SystemTrace\", textField_SysTrace_res);\r\n\t\t\t\t\tfieldmap.put(\"TimeLocal\", textField_TimeLocal_res);\r\n\t\t\t\t\tfieldmap.put(\"LocalTran\", textField_LocalTranRes);\r\n\t\t\t\t\tfieldmap.put(\"DateSettle\", textField_Datesettleres);\r\n\t\t\t\t\tfieldmap.put(\"AuthCode\", textField_auth_res);\r\n\t\t\t\t\tfieldmap.put(\"AdditionalAm\", textField_AddAm_res);\r\n\t\t\t\t\tfieldmap.put(\"ResponseCode\", textField_responseCode);\r\n\t\t\t\t\tfieldmap.put(\"TerminalId\", textField_Teminal_res);\r\n\t\t\t\t\tfieldmap.put(\"AcquirerID\", textField_Acquirer_res);\r\n\t\t\t\t\tfieldmap.put(\"MerchantType\", textField_merchan_res);\r\n\t\t\t\t\tfieldmap.put(\"RetrievalRef\", textField_retRes);\r\n\t\t\t\t\tfieldmap.put(\"Currency\", textField_Curr_res);\r\n\t\t\t\t\tfieldmap.put(\"AdditionalDataNational\", textField_adDataN);\r\n\t\t\t\t\tfieldmap.put(\"AdditionalDataPriate\", textField_AdDataP);\r\n\t\t\t\t\tfieldmap.put(\"Account1\", textField_Acc1);\r\n\t\t\t\t\tfieldmap.put(\"Account2\", textField_Acc2);\r\n\t\t\t\t\tnew Thread(() -> {\r\n\t\t\t\t\t\tBulkRequestor br = new BulkRequestor(servername, Makeiso8583Bulk(), port,\r\n\t\t\t\t\t\t\t\trequirednooftransaction, inputs, editorPane_1, lblNewLabel_28, fieldmap, lblNewLabel_42,\r\n\t\t\t\t\t\t\t\tlblAdditionalDatap, editorPane_2, textField_ProcessCode, textField_messageCode);\r\n\t\t\t\t\t\tbr.start();\r\n\t\t\t\t\t}).start();\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnNewButton_2.setBounds(578, 20, 66, 23);\r\n\t\tpanel_2.add(btnNewButton_2);\r\n\r\n\t\ttextFieldBulknumber = new JTextField();\r\n\t\ttextFieldBulknumber.setBounds(486, 21, 73, 20);\r\n\t\tpanel_2.add(textFieldBulknumber);\r\n\t\ttextFieldBulknumber.setColumns(10);\r\n\r\n\t\trbBI = new JRadioButton(\"BI\");\r\n\t\trbBI.setBounds(455, 47, 58, 23);\r\n\t\tpanel_2.add(rbBI);\r\n\r\n\t\trbFT = new JRadioButton(\"FT\");\r\n\t\trbFT.setBounds(395, 47, 52, 23);\r\n\t\tpanel_2.add(rbFT);\r\n\t\trbMS = new JRadioButton(\"MS\");\r\n\t\trbMS.setBounds(526, 47, 58, 23);\r\n\t\tpanel_2.add(rbMS);\r\n\r\n\t\tButtonGroup buttonGroup = new ButtonGroup();\r\n\t\tbuttonGroup.add(rbFT);\r\n\t\tbuttonGroup.add(rbBI);\r\n\t\tbuttonGroup.add(rbMS);\r\n\r\n\t\tJButton btnNewButton_3 = new JButton(\"BOL\");\r\n\t\tbtnNewButton_3.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnNewButton_3.setBounds(578, 47, 56, 23);\r\n\t\tpanel_2.add(btnNewButton_3);\r\n\r\n\t\t// buttonGroup.add(new JRadioButton('Label2', true));\r\n\r\n\t\tJButton btnNewButton_1 = new JButton(\"Unlock\");\r\n\t\tbtnNewButton_1.addActionListener(new ActionListener() {\r\n\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif (textField_2.getPassword().length == 0) {\r\n\t\t\t\t\tT2PSwing.infoBox(\"Enter Password\", \"Empty Error\");\r\n\t\t\t\t} else if (textField_2.getPassword().length > 1) {\r\n\t\t\t\t\tEncryptAndDecryptAndReturn end = new EncryptAndDecryptAndReturn(\r\n\t\t\t\t\t\t\tString.valueOf(textField_2.getPassword()));\r\n\t\t\t\t\tif (end.passwordisCorrect()) {\r\n\t\t\t\t\t\tpasswordmatch = true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tT2PSwing.infoBox(\"Password incorrect, Tries left :\" + (triesleft - 1) + \"\",\r\n\t\t\t\t\t\t\t\t\"Authentication Error\");\r\n\t\t\t\t\t\ttriesleft -= 1;\r\n\t\t\t\t\t\tif (triesleft == 0) {\r\n\t\t\t\t\t\t\tSystem.exit(0);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tT2PSwing.infoBox(\"Error Occured\", \"Fatal Error\");\r\n\t\t\t\t}\r\n\t\t\t\tif (passwordmatch) {\r\n\t\t\t\t\tlblNewLabel_53.setForeground(Color.GREEN);\r\n\t\t\t\t\tlblNewLabel_53.setText(\"Unlocked\");\r\n\t\t\t\t\tbutton.setEnabled(true);\r\n\t\t\t\t\tbtnNewButton.setEnabled(true);\r\n\t\t\t\t\tbutton_1.setEnabled(true);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t\tbtnNewButton_1.setBounds(437, 11, 77, 23);\r\n\t\tpanel.add(btnNewButton_1);\r\n\r\n\t}", "public Menu() {\n initComponents();\n //lblPictureF1.setSize(50,40);\n establecertamanio(\"./salidaGUI/img_defecto.png\",lblPictureF1);\n jTabbedPane1.getModel().getSelectedIndex();\n /*Component object =jTabbedPane1.getComponent(0);\n System.out.println(\"A:\"+object.getAccessibleContext().getAccessibleName());*/\n \n System.out.println(jTabbedPane1.getTabCount());\n \n /*for (Component object : jTabbedPane1.getComponents()) {\n object.setEnabled(false);\n }*/\n }", "private void addToPanel(){\n getContentPane().add(jdpFondo);\n jtpcContenedor.add(jtpPanel);\n\tjtpcContenedor.add(jtpPanel2);\n jdpFondo.add(jtpcContenedor, BorderLayout.CENTER);\n jdpFondo.add(jpnlPanelPrincilal);\n }", "public FrameTablero(Partida partida) {\r\n\r\n this.partida = partida;\r\n c = getContentPane();\r\n setBounds(450, 150, 820, 630);\r\n setBackground(new Color(204, 204, 204));\r\n setDefaultCloseOperation(EXIT_ON_CLOSE);\r\n setTitle(\"Dots\");\r\n setResizable(false);\r\n c.setLayout(null);\r\n pnlMain.setBounds(0, 0, 600, 600);\r\n pnlMain.setBackground(new Color(255, 255, 255));\r\n c.add(pnlMain);\r\n dibujarCasillas();\r\n dibujarPuntos();\r\n int punt = partida.getTablero().getPuntaje();\r\n int mov = partida.getTablero().getMovimientos();\r\n String name = partida.getNombre();\r\n gYs = new JButton(\"GUARDAR Y SALIR\");\r\n ingresar = new JButton(\"INGRESAR\");\r\n salir = new JButton(\"SALIR\");\r\n puntaje = new JLabel(\"PUNTAJE: \" + punt);\r\n movimientos = new JLabel(\"MOVIMIENTOS: \" + mov);\r\n nombre = new JLabel(\"NOMBRE: \" + name);\r\n //botones\r\n gYs.setBounds(650, 510, 150, 30);\r\n gYs.setBackground(Color.ORANGE);\r\n gYs.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n ColeccionTablero coleccion = new ColeccionTablero();\r\n try {\r\n coleccion.escribirPartida(partida.getTablero());\r\n dispose();\r\n } catch (FileNotFoundException ex) {\r\n ex.getMessage();\r\n }\r\n\r\n }\r\n });\r\n ingresar.setBounds(650, 270, 150, 90);\r\n ingresar.setBackground(Color.CYAN);\r\n ingresar.setSize(100, 80);\r\n ingresar.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n try {\r\n partida.getTablero().recibirPos(cords);\r\n partida.getTablero().jugada(cords);\r\n refrescarTablero();\r\n\r\n } catch (FileNotFoundException ex) {\r\n ex.getMessage();\r\n }\r\n }\r\n });\r\n salir.setBounds(650, 550, 80, 30);\r\n salir.setBackground(Color.ORANGE);\r\n salir.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n dispose();\r\n }\r\n });\r\n //\r\n puntaje.setBounds(650, 50, 100, 50);\r\n movimientos.setBounds(650, 70, 120, 50);\r\n nombre.setBounds(650, 10, 100, 50);\r\n //agregar al tablero\r\n c.add(gYs);\r\n c.add(salir);\r\n c.add(ingresar);\r\n c.add(puntaje);\r\n c.add(movimientos);\r\n c.add(nombre);\r\n }", "private void modificarComponentesPanelPadre() {\n panelCrearArticuloClienteDistribuidor_labelTitulo.setText(panelCrearArticuloClienteDistribuidor_labelTitulo.getText() + \"Distribuidor\");\n }", "public JTabbedPane createPanel()\r\n {\r\n\r\n /** LoadTabPaneData Thread - Inner class that will load the historic data on the AWT\r\n * Thread as to not muck up things on the GUI thread\r\n * The Thread will die after it loads everything.\r\n */\r\n class LoadTabPaneDataTask extends TimerTask\r\n {\r\n // Handle to main outer class\r\n WatchListTableModule watchListTableModule = null;\r\n\r\n /** \r\n * LoadTabPaneDataTask constructor\r\n */\r\n public LoadTabPaneDataTask(WatchListTableModule watchListTableModule)\r\n {\r\n this.watchListTableModule = watchListTableModule;\r\n }\r\n\r\n /** \r\n * LoadTabPaneDataTask::run() this method simply invokes. \r\n * WatchListTableModule::loadPersistantWatchLists() method.\r\n * The method will populate all watchlists to be loaded on\r\n * the JTabbedPane then it dies off\r\n */\r\n public void run()\r\n {\r\n debug(\"LoadTabPaneDataTask::run() - calling watchListTableModule.loadPersistantWatchLists()\");\r\n watchListTableModule.loadPersistantWatchLists();\r\n this.cancel();\r\n }\r\n }\r\n\r\n // Create an Application Properties instance\r\n appProps = new AppProperties(getString(\"WatchListTableModule.application_ini_filename\"));\r\n // Setup our Time Delays\r\n standardDelay = ONE_SECOND * ParseData.parseNum(getString(\"WatchListTableModule.standard_time_delay\"), ONE_MINUTE);\r\n extendedDelay = ONE_SECOND * ParseData.parseNum(getString(\"WatchListTableModule.extended_time_delay\"), ONE_HOUR);\r\n\r\n // Create our Basic Tabbed Pane and Listener ( inner class )\r\n tabPane = new JTabbedPane();\r\n tabPane.addChangeListener(new TabPaneListener());\r\n\r\n // Load the Tab Pane Data on the Util Event Thread as \r\n // to get our screen up and going as fast as possible\r\n // So we can get out of here - This Inner class thread\r\n // invokes method\r\n // loadPersistantWatchLists();\r\n TimerTask tabPaneTask = new LoadTabPaneDataTask(this);\r\n Timer timer = new Timer(true); // Deamon\r\n timer.schedule(tabPaneTask, ONE_SECOND);\r\n\r\n return tabPane;\r\n }", "protected abstract void updateTabState();", "public void irAPanelAbierto() {\r\n //Seleccionar PerfilPanel\r\n itemClicked(jpanePerfil, jpaneActivePerfil, jlblPerfil, 1);\r\n }", "public TabPanel() {\n this(null, null, null);\n }", "public GroupTabControl(GUIControl gui, ClientConnectionControl ccc, JTabbedPane tb) {\n grouptabs = new HashMap();\n guicontrol = gui;\n concontrol = ccc;\n tbMain = tb;\n }", "private void showTab(int tab) {\n switch (tab) {\n case OUTING_TAB_EXPENSES:\n switchToExpensesTab();\n break;\n case OUTING_TAB_BUDDIES:\n switchToBuddiesTab();\n break;\n }\n\n this.activeTab = tab;\n }", "public void setPanels() {\n\t\tframe.setPreferredSize(new Dimension(3000, 2000));\n\n\t\tcontainer.setBackground(lightGray);\n\t\tcontainer.setPreferredSize(new Dimension(2300, 120));\n\t\tcontainer.setBorder(BorderFactory.createLineBorder(black));\n\n\t\tagePanel.setBackground(lightGray);\n\t\tagePanel.setPreferredSize(new Dimension(2400, 120));\n\t\tagePanel.setBorder(BorderFactory.createLineBorder(black));\n\n\t\theightPanel.setBackground(lightGray);\n\t\theightPanel.setPreferredSize(new Dimension(1200, 120));\n\t\theightPanel.setBorder(BorderFactory.createLineBorder(black));\n\n\t\tweightPanel.setBackground(lightGray);\n\t\tweightPanel.setPreferredSize(new Dimension(850, 120));\n\t\tweightPanel.setBorder(BorderFactory.createLineBorder(black));\n\n\t\thairPanel.setBackground(lightGray);\n\t\thairPanel.setPreferredSize(new Dimension(900, 120));\n\t\thairPanel.setBorder(BorderFactory.createLineBorder(black));\n\n\t\teyePanel.setBackground(lightGray);\n\t\teyePanel.setPreferredSize(new Dimension(900, 120));\n\t\teyePanel.setBorder(BorderFactory.createLineBorder(black));\n\n\t\tabilitySelectionPanel.setBackground(lightGray);\n\t\tabilitySelectionPanel.setPreferredSize(new Dimension(2400, 120));\n\t\tabilitySelectionPanel.setBorder(BorderFactory.createLineBorder(black));\n\n\t\tphysicalAbilityPanel.setBackground(lightGray);\n\t\tphysicalAbilityPanel.setPreferredSize(new Dimension(2400, 400));\n\t\tphysicalAbilityPanel.setBorder(BorderFactory.createLineBorder(black));\n\n\t\tmentalAbilityPanel.setBackground(lightGray);\n\t\tmentalAbilityPanel.setPreferredSize(new Dimension(2400, 400));\n\t\tmentalAbilityPanel.setBorder(BorderFactory.createLineBorder(black));\n\t}", "public CategoryNew(JTabbedPane tabs,JPanel parent) {\n this.parent=parent;\n this.tabs=tabs;\n initComponents();\n ErrorLabel.setVisible(false);\n }", "@Override\n\t\t \n\t\t\tpublic void stateChanged(ChangeEvent evt) {\n\t\t JTabbedPane pane = (JTabbedPane)evt.getSource();\n\t\t int sel = pane.getSelectedIndex();\n\t\t if (sel == 0) {\n\t\t \tbPanel.setVisible(true);\n\t\t }\n\t\t else if (sel == 1) {\n\t\t \tbPanel.setVisible(false);\n\t\t }\n\t\t else if (sel == 2) {\n\t\t \tbPanel.setVisible(false);\n\t\t }\n\t\t }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jTabbedPane1 = new javax.swing.JTabbedPane();\n jPanel1 = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jTable1 = new javax.swing.JTable();\n jPanel2 = new javax.swing.JPanel();\n visualizationScrollPane = new javax.swing.JScrollPane();\n visualisationPanel = new javax.swing.JPanel();\n jPanel3 = new javax.swing.JPanel();\n xComboBox = new javax.swing.JComboBox();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n yComboBox = new javax.swing.JComboBox();\n jButton1 = new javax.swing.JButton();\n jLabel3 = new javax.swing.JLabel();\n jSlider1 = new javax.swing.JSlider();\n\n jTabbedPane1.addChangeListener(new javax.swing.event.ChangeListener() {\n public void stateChanged(javax.swing.event.ChangeEvent evt) {\n jTabbedPane1StateChanged(evt);\n }\n });\n jTabbedPane1.addComponentListener(new java.awt.event.ComponentAdapter() {\n public void componentShown(java.awt.event.ComponentEvent evt) {\n jTabbedPane1ComponentShown(evt);\n }\n });\n\n jScrollPane1.setViewportView(jTable1);\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 539, Short.MAX_VALUE)\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 369, Short.MAX_VALUE)\n );\n\n java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle(\"pikater/gui/java/improved/Strings\"); // NOI18N\n jTabbedPane1.addTab(bundle.getString(\"DATA\"), jPanel1); // NOI18N\n\n visualizationScrollPane.addComponentListener(new java.awt.event.ComponentAdapter() {\n public void componentShown(java.awt.event.ComponentEvent evt) {\n visualizationScrollPaneComponentShown(evt);\n }\n });\n visualizationScrollPane.addFocusListener(new java.awt.event.FocusAdapter() {\n public void focusGained(java.awt.event.FocusEvent evt) {\n visualizationScrollPaneFocusGained(evt);\n }\n });\n\n visualisationPanel.setLayout(new java.awt.GridBagLayout());\n visualizationScrollPane.setViewportView(visualisationPanel);\n\n jLabel1.setText(\"X\");\n\n jLabel2.setText(\"Y\");\n\n yComboBox.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n yComboBoxActionPerformed(evt);\n }\n });\n\n jButton1.setText(bundle.getString(\"UPDATE_PLOT\")); // NOI18N\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jLabel3.setText(bundle.getString(\"POINT_SIZE\")); // NOI18N\n\n jSlider1.setMaximum(20);\n jSlider1.setMinimum(1);\n jSlider1.setPaintLabels(true);\n jSlider1.setSnapToTicks(true);\n jSlider1.setValue(5);\n\n javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);\n jPanel3.setLayout(jPanel3Layout);\n jPanel3Layout.setHorizontalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(xComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 163, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(yComboBox, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 225, Short.MAX_VALUE)\n .addComponent(jButton1)\n .addContainerGap())\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel3)\n .addGap(1, 1, 1)\n .addComponent(jSlider1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())))\n );\n jPanel3Layout.setVerticalGroup(\n jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel3Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jSlider1, javax.swing.GroupLayout.DEFAULT_SIZE, 24, Short.MAX_VALUE)\n .addComponent(xComboBox)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(jLabel3)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(yComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton1))\n .addContainerGap())\n );\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(visualizationScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 539, Short.MAX_VALUE)\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(visualizationScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 284, Short.MAX_VALUE))\n );\n\n jTabbedPane1.addTab(bundle.getString(\"VISALISATION\"), jPanel2); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 544, Short.MAX_VALUE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 396, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n pack();\n }", "private void createNetworksPanel() {\n\t\ttabs = new ArrayList<>();\n\t\tnetworksPanel = new JTabbedPane();\n\t\tthis.add(networksPanel, BorderLayout.CENTER);\n\t}", "public void testSetCurrentPanel() {\n System.out.println(\"setCurrentPanel\");\n Object id = null;\n Wizard instance = new Wizard();\n instance.setCurrentPanel(id);\n }", "public Component getTabComponent();", "@Override\n\t\tpublic void setPane(JPanel pane) {\n\t\t\t\n\t\t}", "private void $$$setupUI$$$() {\n panel1 = new JPanel();\n panel1.setLayout(new FormLayout(\"fill:d:grow\", \"center:d:grow,top:4dlu:noGrow,center:max(d;4px):noGrow\"));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new FlowLayout(FlowLayout.RIGHT, 5, 5));\n CellConstraints cc = new CellConstraints();\n panel1.add(panel2, cc.xy(1, 3));\n saveButton = new JButton();\n this.$$$loadButtonText$$$(saveButton, ResourceBundle.getBundle(\"bundles/button\").getString(\"Save\"));\n panel2.add(saveButton);\n tabbedPane = new JTabbedPane();\n panel1.add(tabbedPane, cc.xy(1, 1, CellConstraints.DEFAULT, CellConstraints.FILL));\n final JScrollPane scrollPane1 = new JScrollPane();\n tabbedPane.addTab(ResourceBundle.getBundle(\"bundles/label\").getString(\"countryBorder\"), scrollPane1);\n countryBorderTable = new JTable();\n scrollPane1.setViewportView(countryBorderTable);\n final JScrollPane scrollPane2 = new JScrollPane();\n tabbedPane.addTab(ResourceBundle.getBundle(\"bundles/label\").getString(\"provinceBorder_title\"), scrollPane2);\n provinceBorderTable = new JTable();\n provinceBorderTable.setToolTipText(\"\");\n scrollPane2.setViewportView(provinceBorderTable);\n }", "@SuppressWarnings(\"empty-statement\")\n public JFrame_Accueil(int numTab) throws Exception {\n initComponents();\n // On centre la fenetre\n this.setLocationRelativeTo(null);\n // Lors du retour sur la page d accueil l onglet correspondant au formulaire\n // qui vient d etre ferme sera visible\n this.tab = numTab;\n jTabPane_Accueil.setSelectedIndex(tab);\n // Initialisation des tables Client et Prospect\n tableClient();\n tableProspect();\n // Au lancement de l application le compteur d instance = 0 \n if(JFrame_Accueil.comptInstance == 0){\n // Donc initialisation du compteur de numero d identification pour la \n // creation d un prospect\n Prospect.dernierIdCreer();\n }\n // On increment le compteur a chaque instanciation\n JFrame_Accueil.comptInstance++;\n // Appelle de la methode pour cacher les boutons si table vide\n hideButton();\n // Methode pour rendre inaccessible des options du menu si certaines conditions\n // ne sont pas remplies\n showMenuListClient();\n showMenuListProspect();\n }", "private void configure_tabs() {\n Objects.requireNonNull(tabs.getTabAt(0)).setIcon(R.drawable.baseline_map_white_24);\n Objects.requireNonNull(Objects.requireNonNull(tabs.getTabAt(0)).getIcon()).setColorFilter(getResources().getColor(R.color.colorIconSelected), PorterDuff.Mode.SRC_IN);\n Objects.requireNonNull(tabs.getTabAt(1)).setIcon(R.drawable.baseline_view_list_white_24);\n Objects.requireNonNull(Objects.requireNonNull(tabs.getTabAt(1)).getIcon()).setColorFilter(getResources().getColor(R.color.colorIconNotSelected), PorterDuff.Mode.SRC_IN);\n Objects.requireNonNull(tabs.getTabAt(2)).setIcon(R.drawable.baseline_people_white_24);\n Objects.requireNonNull(Objects.requireNonNull(tabs.getTabAt(2)).getIcon()).setColorFilter(getResources().getColor(R.color.colorIconNotSelected), PorterDuff.Mode.SRC_IN);\n swipeRefreshLayout.setEnabled(false);\n\n // Set on Tab selected listener\n tabs.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {\n @Override\n public void onTabSelected(TabLayout.Tab tab) {\n // Change color of the tab -> orange\n if (tab.getIcon() != null)\n tab.getIcon().setColorFilter(getApplicationContext().getResources().getColor(R.color.colorIconSelected), PorterDuff.Mode.SRC_IN);\n\n // set the current page position\n current_page = tab.getPosition();\n\n // if the current page is the ListMatesFragment, remove the searchView\n if(mToolbar_navig_utils!=null){\n if(current_page==2)\n mToolbar_navig_utils.getSearchView().setVisibility(View.GONE);\n else\n mToolbar_navig_utils.getSearchView().setVisibility(View.VISIBLE);\n }\n\n // refresh title toolbar (different according to the page selected)\n if(mToolbar_navig_utils !=null)\n mToolbar_navig_utils.refresh_text_toolbar();\n\n // Disable pull to refresh when mapView is displayed\n if(tab.getPosition()==0)\n swipeRefreshLayout.setEnabled(false);\n else\n swipeRefreshLayout.setEnabled(true);\n }\n\n @Override\n public void onTabUnselected(TabLayout.Tab tab) {\n\n // if the searchView is opened, close it\n if(mToolbar_navig_utils !=null) {\n if (mToolbar_navig_utils.getSearchView() != null) {\n if (!mToolbar_navig_utils.getSearchView().isIconified()) {\n mToolbar_navig_utils.getSearchView().setIconified(true);\n\n // Recover the previous list of places nearby generated\n switch (current_page) {\n case 0:\n getPageAdapter().getMapsFragment().recover_previous_state();\n break;\n case 1:\n getPageAdapter().getListRestoFragment().recover_previous_state();\n break;\n }\n }\n }\n }\n\n // Change color of the tab -> black\n if (tab.getIcon() != null)\n tab.getIcon().setColorFilter(getApplicationContext().getResources().getColor(R.color.colorIconNotSelected), PorterDuff.Mode.SRC_IN);\n }\n\n @Override\n public void onTabReselected(TabLayout.Tab tab) {\n }\n });\n }", "private void initComponents() {\n jSplitPane1 = new javax.swing.JSplitPane();\n pnlTree = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n jtrLocal = new DnDTree();\n pnlTab = new javax.swing.JPanel();\n jtpApps = new javax.swing.JTabbedPane();\n\n jSplitPane1.setDividerLocation(260);\n\n pnlTree.setBorder(javax.swing.BorderFactory.createTitledBorder(\n NbBundle.getMessage(\n EditDistributionVisualPanel2.class,\n \"EditDistributionVisualPanel2.pnlTree.border.title\"))); // NOI18N\n\n jtrLocal.setDragEnabled(true);\n jScrollPane1.setViewportView(jtrLocal);\n\n final javax.swing.GroupLayout pnlTreeLayout = new javax.swing.GroupLayout(pnlTree);\n pnlTree.setLayout(pnlTreeLayout);\n pnlTreeLayout.setHorizontalGroup(\n pnlTreeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(\n jScrollPane1,\n javax.swing.GroupLayout.DEFAULT_SIZE,\n 246,\n Short.MAX_VALUE));\n pnlTreeLayout.setVerticalGroup(\n pnlTreeLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(\n jScrollPane1,\n javax.swing.GroupLayout.Alignment.TRAILING,\n javax.swing.GroupLayout.DEFAULT_SIZE,\n 238,\n Short.MAX_VALUE));\n\n jSplitPane1.setLeftComponent(pnlTree);\n\n final javax.swing.GroupLayout pnlTabLayout = new javax.swing.GroupLayout(pnlTab);\n pnlTab.setLayout(pnlTabLayout);\n pnlTabLayout.setHorizontalGroup(\n pnlTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(\n jtpApps,\n javax.swing.GroupLayout.Alignment.TRAILING,\n javax.swing.GroupLayout.DEFAULT_SIZE,\n 200,\n Short.MAX_VALUE));\n pnlTabLayout.setVerticalGroup(\n pnlTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(\n jtpApps,\n javax.swing.GroupLayout.Alignment.TRAILING,\n javax.swing.GroupLayout.DEFAULT_SIZE,\n 266,\n Short.MAX_VALUE));\n\n jSplitPane1.setRightComponent(pnlTab);\n\n final javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(\n jSplitPane1,\n javax.swing.GroupLayout.Alignment.TRAILING,\n javax.swing.GroupLayout.DEFAULT_SIZE,\n 471,\n Short.MAX_VALUE));\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(\n jSplitPane1,\n javax.swing.GroupLayout.Alignment.TRAILING,\n javax.swing.GroupLayout.DEFAULT_SIZE,\n 270,\n Short.MAX_VALUE));\n }", "public RSMLGUI() {\r\n\t super(\"RSML Exporter\");\r\n\t instance = this;\r\n\t tp = new JTabbedPane();\r\n\t tp.setFont(font);\r\n\t tp.setSize(300, 600);\r\n\t getContentPane().add(tp);\r\n\t tp.addTab(\"Data transfer\", getDataTransfersTab()); \r\n\t \t\r\n\t pack();\r\n\t setVisible(true);\r\n }", "private void updateTabButtons() {\n\t\tif (currentTab == null || currentTab.equals(\"history\")) {\n\t\t\thistory.setDisable(true);\n\t\t\tlanguage.setDisable(false);\n\t\t} else if (currentTab == null || currentTab.equals(\"language\")) {\n\t\t\tlanguage.setDisable(true);\n\t\t\thistory.setDisable(false);\n\t\t}\n\t}", "public MoeHistoryChart(SimulationTab tab) {\n\t\tthis.tab = tab;\n\t\t\n\t\tchartPanel = new SNChartPanel();\n\t\tchartPanel.setPreferredSize(new Dimension(600,400));\n\t\tsetLeftComponent(chartPanel);\n\t\t\n\t\tJPanel controlPanel = new JPanel();\n\t\tcontrolPanel.setLayout(new GridBagLayout());\n\t\tcontrolPanel.setBorder(BorderFactory.createTitledBorder(\"Chart Options\"));\n\t\tGridBagConstraints c = new GridBagConstraints();\n\t\tc.insets = new Insets(2,2,2,2);\n\t\tc.gridx = 0;\n\t\tc.gridy = 0;\n\t\tc.weightx = 1;\n\t\tc.weighty = 0;\n\t\tc.gridwidth = 2;\n\t\tc.gridy = 0;\n\t\tc.anchor = GridBagConstraints.LINE_START;\n\t\tc.fill = GridBagConstraints.BOTH;\n\t\tmoeCombo = new JComboBox();\n\t\tfor(MoeType t : MoeType.values()) {\n\t\t\tmoeCombo.addItem(t);\n\t\t}\n\t\tmoeCombo.addItemListener(new ItemListener() {\n\t\t\tpublic void itemStateChanged(ItemEvent e) {\n\t\t\t\tif(e.getStateChange()==ItemEvent.SELECTED) {\n\t\t\t\t\tupdateView();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tcontrolPanel.add(moeCombo, c);\n\t\tc.gridx--;\n\t\tc.gridy++;\n\t\tc.gridwidth = 1;\n\t\tc.weighty = 0;\n\t\tc.weightx = 0;\n\t\tc.gridx = 0;\n\t\tc.anchor = GridBagConstraints.LINE_END;\n\t\tc.fill = GridBagConstraints.NONE;\n\t\tJLabel totalMetricLabel = new JLabel(\"Total: \");\n\t\tcontrolPanel.add(totalMetricLabel, c);\n\t\tc.gridy++;\n\t\tJLabel metricLabel = new JLabel(\"Filtered: \");\n\t\tcontrolPanel.add(metricLabel, c);\n\t\tc.gridx++;\n\t\tc.gridy--;\n\t\tc.weightx = 1;\n\t\tc.anchor = GridBagConstraints.LINE_START;\n\t\tc.fill = GridBagConstraints.BOTH;\n\t\ttotalValueLabel = new JLabel(\"\");\n\t\tcontrolPanel.add(totalValueLabel, c);\n\t\tc.gridy++;\n\t\tvalueLabel = new JLabel(\"\");\n\t\tcontrolPanel.add(valueLabel, c);\n\t\tc.gridx--;\n\t\tc.gridy++;\n\t\tc.gridwidth = 2;\n\t\tc.weightx = 1;\n\t\tc.weighty = 1;\n\t\tlocationsModel = new CheckBoxTableModel<Location>();\n\t\tlocationsModel.addTableModelListener(new TableModelListener() {\n\t\t\tpublic void tableChanged(TableModelEvent e) {\n\t\t\t\tupdateChart();\n\t\t\t}\n\t\t});\n\t\tJTable locationsTable = new JTable(locationsModel);\n\t\tlocationsTable.getTableHeader().setReorderingAllowed(false);\n\t\tlocationsTable.getColumnModel().getColumn(0).setHeaderValue(\"\");\n\t\tlocationsTable.getColumnModel().getColumn(0).setMaxWidth(25);\n\t\tlocationsTable.getColumnModel().getColumn(1).setHeaderValue(\"Filter Locations\");\n\t\tlocationsTable.getColumnModel().getColumn(0).setHeaderRenderer(new VisibilityTableCellHeaderRenderer());\n\t\tlocationsTable.setShowGrid(false);\n\t\tJScrollPane locationsScroll = new JScrollPane(locationsTable);\n\t\tlocationsScroll.setPreferredSize(new Dimension(150,200));\n\t\tcontrolPanel.add(locationsScroll, c);\n\t\tc.gridy++;\n\t\tc.weighty = 0;\n\t\tc.fill = GridBagConstraints.NONE;\n\t\tJPanel buttonPanel = new JPanel();\n\t\tbuttonPanel.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 0));\n\t\tJButton selectAllButton = new JButton(\"Select All\");\n\t\tselectAllButton.setToolTipText(\"Select All Locations\");\n\t\tselectAllButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlocationsModel.selectAll();\n\t\t\t}\n\t\t});\n\t\tbuttonPanel.add(selectAllButton);\n\t\tJButton deselectAllButton = new JButton(\"Deselect All\");\n\t\tdeselectAllButton.setToolTipText(\"Deselect All Locations\");\n\t\tdeselectAllButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlocationsModel.deselectAll();\n\t\t\t}\n\t\t});\n\t\tbuttonPanel.add(deselectAllButton);\n\t\tcontrolPanel.add(buttonPanel, c);\n\t\tc.gridy++;\n\t\tJPanel prop = new JPanel();\n\t\tprop.setPreferredSize(new Dimension(1,15));\n\t\tcontrolPanel.add(prop, c);\n\n\t\tc.gridy++;\n\t\tc.anchor = GridBagConstraints.LINE_START;\n\t\tlinearizeDataCheck = new JCheckBox(\"Linearize Data\", true);\n\t\tlinearizeDataCheck.addItemListener(new ItemListener() {\n\t\t\tpublic void itemStateChanged(ItemEvent e) {\n\t\t\t\tupdateChart();\n\t\t\t}\n\t\t});\n\t\tcontrolPanel.add(linearizeDataCheck, c);\n\t\t\n\t\tcontrolPanel.setMinimumSize(new Dimension(150,50));\n\t\tsetRightComponent(controlPanel);\n\n\t\tsetName(\"Measures History\");\n\t\tsetOneTouchExpandable(true);\n\t\tsetDividerSize(10);\n\t\tsetBorder(BorderFactory.createEmptyBorder());\n\t\tsetResizeWeight(1);\n\t\tsetDividerLocation(700);\n\t}", "public void setCurrentPanel(WindowPanel panel) {\n\t\t\n\t\tLOG.log(\"Setting the current panel.\");\n\t\t\n\t\tCURRENT_PANEL = panel;\n\t\t\n\t\tcreateContentPane();\n\t\tthis.setContentPane(CONTENT_PANE);\n\t\t\n\t\tCURRENT_PANEL.build();\n\t\tCONTENT_PANE.add(CURRENT_PANEL, BorderLayout.CENTER);\n\t\t\n\t}", "private void $$$setupUI$$$() {\n MainPanel = new JPanel();\n MainPanel.setLayout(new GridBagLayout());\n MainPanel.setBackground(new Color(-2171407));\n MainPanel.setFocusTraversalPolicyProvider(true);\n MainPanel.setFocusable(false);\n MainPanel.setMinimumSize(new Dimension(90, 100));\n MainPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), null, TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, null, null));\n SelectionTabs = new JTabbedPane();\n SelectionTabs.setBackground(new Color(-8817257));\n GridBagConstraints gbc;\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.weightx = 1.0;\n gbc.weighty = 1.0;\n gbc.anchor = GridBagConstraints.NORTH;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n MainPanel.add(SelectionTabs, gbc);\n SelectionTabs.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), null, TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, null, null));\n DestinationsTab = new JPanel();\n DestinationsTab.setLayout(new GridBagLayout());\n DestinationsTab.setBackground(new Color(-2171407));\n SelectionTabs.addTab(\"Destinations\", DestinationsTab);\n DestinationsTab.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), null, TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, null, null));\n DomesticDropdown = new JComboBox();\n DomesticDropdown.setBackground(new Color(-8817257));\n final DefaultComboBoxModel defaultComboBoxModel1 = new DefaultComboBoxModel();\n defaultComboBoxModel1.addElement(\"Select Destination\");\n defaultComboBoxModel1.addElement(\"Boston (United Airlines)\");\n defaultComboBoxModel1.addElement(\"D.C. (American Airlines)\");\n DomesticDropdown.setModel(defaultComboBoxModel1);\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.NORTHWEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n DestinationsTab.add(DomesticDropdown, gbc);\n DomesticTitle = new JLabel();\n DomesticTitle.setText(\"Domestic Destinations\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.weighty = 1.0;\n DestinationsTab.add(DomesticTitle, gbc);\n InternationalTitle = new JLabel();\n InternationalTitle.setText(\"International Destinations\");\n gbc = new GridBagConstraints();\n gbc.gridx = 3;\n gbc.gridy = 0;\n gbc.weighty = 1.0;\n DestinationsTab.add(InternationalTitle, gbc);\n USA = new JLabel();\n USA.setIcon(new ImageIcon(getClass().getResource(\"/USAicon.png\")));\n USA.setInheritsPopupMenu(false);\n USA.setText(\"\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 2;\n gbc.weighty = 1.0;\n DestinationsTab.add(USA, gbc);\n Overseas = new JLabel();\n Overseas.setIcon(new ImageIcon(getClass().getResource(\"/Earthicon.png\")));\n Overseas.setText(\"\");\n gbc = new GridBagConstraints();\n gbc.gridx = 3;\n gbc.gridy = 2;\n gbc.weighty = 1.0;\n DestinationsTab.add(Overseas, gbc);\n InternationalDropdown = new JComboBox();\n InternationalDropdown.setBackground(new Color(-8817257));\n final DefaultComboBoxModel defaultComboBoxModel2 = new DefaultComboBoxModel();\n defaultComboBoxModel2.addElement(\"Select Destination\");\n defaultComboBoxModel2.addElement(\"Tokyo (Japan Airlines)\");\n defaultComboBoxModel2.addElement(\"Dublin (Aer Lingus)\");\n InternationalDropdown.setModel(defaultComboBoxModel2);\n gbc = new GridBagConstraints();\n gbc.gridx = 3;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.NORTHWEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n DestinationsTab.add(InternationalDropdown, gbc);\n DestinationSubmitButton = new JButton();\n DestinationSubmitButton.setBackground(new Color(-8817257));\n DestinationSubmitButton.setText(\"Submit\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 3;\n gbc.gridwidth = 2;\n gbc.gridheight = 6;\n gbc.weightx = 1.0;\n gbc.anchor = GridBagConstraints.SOUTH;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n DestinationsTab.add(DestinationSubmitButton, gbc);\n HotelTab = new JPanel();\n HotelTab.setLayout(new GridBagLayout());\n HotelTab.setBackground(new Color(-2171407));\n SelectionTabs.addTab(\"Hotel\", HotelTab);\n HotelTab.setBorder(BorderFactory.createTitledBorder(BorderFactory.createRaisedBevelBorder(), null, TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, null, null));\n HotelBoston = new JPanel();\n HotelBoston.setLayout(new GridBagLayout());\n HotelBoston.setBackground(new Color(-2171407));\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.weightx = 1.0;\n gbc.anchor = GridBagConstraints.NORTHWEST;\n HotelTab.add(HotelBoston, gbc);\n HotelBoston.setBorder(BorderFactory.createTitledBorder(BorderFactory.createRaisedBevelBorder(), \"Hotel Commonwealth\", TitledBorder.CENTER, TitledBorder.TOP, null, null));\n BostonHotel = new JLabel();\n BostonHotel.setHorizontalAlignment(0);\n BostonHotel.setHorizontalTextPosition(0);\n BostonHotel.setIcon(new ImageIcon(getClass().getResource(\"/HotelCommonwealth.jpg\")));\n BostonHotel.setText(\"\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.weighty = 1.0;\n gbc.anchor = GridBagConstraints.WEST;\n HotelBoston.add(BostonHotel, gbc);\n SelectBoston = new JButton();\n SelectBoston.setLabel(\"Select\");\n SelectBoston.setText(\"Select\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 0;\n gbc.weightx = 1.0;\n gbc.weighty = 1.0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n HotelBoston.add(SelectBoston, gbc);\n HotelDC = new JPanel();\n HotelDC.setLayout(new GridBagLayout());\n HotelDC.setBackground(new Color(-2171407));\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 0;\n gbc.gridheight = 2;\n gbc.weightx = 1.0;\n gbc.anchor = GridBagConstraints.NORTHEAST;\n HotelTab.add(HotelDC, gbc);\n HotelDC.setBorder(BorderFactory.createTitledBorder(BorderFactory.createRaisedBevelBorder(), \"Trump International\", TitledBorder.CENTER, TitledBorder.DEFAULT_POSITION, null, null));\n TrumpInt = new JLabel();\n TrumpInt.setIcon(new ImageIcon(getClass().getResource(\"/DCHotel.png\")));\n TrumpInt.setText(\"\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.weighty = 1.0;\n gbc.anchor = GridBagConstraints.WEST;\n HotelDC.add(TrumpInt, gbc);\n SelectDC = new JButton();\n SelectDC.setText(\"Select\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 0;\n gbc.weightx = 1.0;\n gbc.weighty = 1.0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n HotelDC.add(SelectDC, gbc);\n HotelDublin = new JPanel();\n HotelDublin.setLayout(new GridBagLayout());\n HotelDublin.setBackground(new Color(-2171407));\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 1;\n gbc.gridheight = 2;\n gbc.weightx = 1.0;\n gbc.weighty = 1.0;\n gbc.anchor = GridBagConstraints.SOUTHWEST;\n HotelTab.add(HotelDublin, gbc);\n HotelDublin.setBorder(BorderFactory.createTitledBorder(BorderFactory.createRaisedBevelBorder(), \"The Westbury\", TitledBorder.CENTER, TitledBorder.DEFAULT_POSITION, null, null));\n Westbury = new JLabel();\n Westbury.setIcon(new ImageIcon(getClass().getResource(\"/HotelDublin.jpg\")));\n Westbury.setText(\"\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.weighty = 1.0;\n gbc.anchor = GridBagConstraints.WEST;\n HotelDublin.add(Westbury, gbc);\n SelectDublin = new JButton();\n SelectDublin.setText(\"Select\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 0;\n gbc.weightx = 1.0;\n gbc.weighty = 1.0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n HotelDublin.add(SelectDublin, gbc);\n HotelTokyo = new JPanel();\n HotelTokyo.setLayout(new GridBagLayout());\n HotelTokyo.setBackground(new Color(-2171407));\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 2;\n gbc.weightx = 1.0;\n gbc.weighty = 1.0;\n gbc.anchor = GridBagConstraints.SOUTHEAST;\n HotelTab.add(HotelTokyo, gbc);\n HotelTokyo.setBorder(BorderFactory.createTitledBorder(BorderFactory.createRaisedBevelBorder(), \"Aman Tokyo\", TitledBorder.CENTER, TitledBorder.TOP, null, null));\n AmanTokyo = new JLabel();\n AmanTokyo.setIcon(new ImageIcon(getClass().getResource(\"/HotelTokyo.jpg\")));\n AmanTokyo.setText(\"\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.weighty = 1.0;\n gbc.anchor = GridBagConstraints.WEST;\n HotelTokyo.add(AmanTokyo, gbc);\n SelectTokyo = new JButton();\n SelectTokyo.setText(\"Select\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 0;\n gbc.weightx = 1.0;\n gbc.weighty = 1.0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n HotelTokyo.add(SelectTokyo, gbc);\n RentalTab = new JPanel();\n RentalTab.setLayout(new GridBagLayout());\n RentalTab.setBackground(new Color(-2171407));\n SelectionTabs.addTab(\"Car Rental\", RentalTab);\n CarBoston = new JLabel();\n CarBoston.setIcon(new ImageIcon(getClass().getResource(\"/BostonCar.png\")));\n CarBoston.setText(\"\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.weightx = 1.0;\n gbc.weighty = 1.0;\n RentalTab.add(CarBoston, gbc);\n CarDC = new JLabel();\n CarDC.setIcon(new ImageIcon(getClass().getResource(\"/DCcar.jpg\")));\n CarDC.setInheritsPopupMenu(true);\n CarDC.setText(\"\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 0;\n gbc.gridheight = 3;\n gbc.weightx = 1.0;\n gbc.weighty = 1.0;\n RentalTab.add(CarDC, gbc);\n CarTokyo = new JLabel();\n CarTokyo.setIcon(new ImageIcon(getClass().getResource(\"/TokyoCar.jpg\")));\n CarTokyo.setText(\"\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 4;\n gbc.weightx = 1.0;\n gbc.weighty = 1.0;\n RentalTab.add(CarTokyo, gbc);\n CarDublin = new JLabel();\n CarDublin.setIcon(new ImageIcon(getClass().getResource(\"/DublinCar.jpg\")));\n CarDublin.setText(\"\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 4;\n gbc.weightx = 1.0;\n gbc.weighty = 1.0;\n RentalTab.add(CarDublin, gbc);\n hertzDCButton = new JButton();\n hertzDCButton.setText(\"Hertz D.C.\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 3;\n gbc.weightx = 1.0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n RentalTab.add(hertzDCButton, gbc);\n hertzTokyoButton = new JButton();\n hertzTokyoButton.setText(\"Hertz Tokyo\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 5;\n gbc.weightx = 1.0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n RentalTab.add(hertzTokyoButton, gbc);\n hertzDublinButton = new JButton();\n hertzDublinButton.setText(\"Hertz Dublin\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 5;\n gbc.weightx = 1.0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n RentalTab.add(hertzDublinButton, gbc);\n hertzBostonButton = new JButton();\n hertzBostonButton.setText(\"Hertz Boston\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 3;\n gbc.weightx = 1.0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n RentalTab.add(hertzBostonButton, gbc);\n ExcursionsTab = new JPanel();\n ExcursionsTab.setLayout(new GridBagLayout());\n ExcursionsTab.setBackground(new Color(-2171407));\n SelectionTabs.addTab(\"Excursions\", ExcursionsTab);\n ActivityFoodie = new JPanel();\n ActivityFoodie.setLayout(new GridBagLayout());\n ActivityFoodie.setBackground(new Color(-2171407));\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.weightx = 1.0;\n gbc.weighty = 1.0;\n gbc.anchor = GridBagConstraints.WEST;\n ExcursionsTab.add(ActivityFoodie, gbc);\n ActivityFoodie.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), \"Foodie Package\", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.TOP, null, null));\n FoodieButton = new JButton();\n FoodieButton.setText(\"Select\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 0;\n gbc.weightx = 1.0;\n gbc.weighty = 1.0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n ActivityFoodie.add(FoodieButton, gbc);\n FoodiePic = new JLabel();\n FoodiePic.setIcon(new ImageIcon(getClass().getResource(\"/FOODIE.png\")));\n FoodiePic.setText(\"\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.weighty = 1.0;\n ActivityFoodie.add(FoodiePic, gbc);\n ActivityHistory = new JPanel();\n ActivityHistory.setLayout(new GridBagLayout());\n ActivityHistory.setBackground(new Color(-2171407));\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 3;\n gbc.gridwidth = 11;\n gbc.weightx = 1.0;\n gbc.weighty = 1.0;\n gbc.anchor = GridBagConstraints.WEST;\n ExcursionsTab.add(ActivityHistory, gbc);\n ActivityHistory.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), \"History Package\", TitledBorder.LEFT, TitledBorder.TOP, this.$$$getFont$$$(null, -1, -1, ActivityHistory.getFont()), null));\n HistoryButton = new JButton();\n HistoryButton.setText(\"Select\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 0;\n gbc.weightx = 1.0;\n gbc.weighty = 1.0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n ActivityHistory.add(HistoryButton, gbc);\n HistoryPic = new JLabel();\n HistoryPic.setIcon(new ImageIcon(getClass().getResource(\"/history.png\")));\n HistoryPic.setText(\"\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.weighty = 1.0;\n gbc.anchor = GridBagConstraints.WEST;\n ActivityHistory.add(HistoryPic, gbc);\n ActivitySpa = new JPanel();\n ActivitySpa.setLayout(new GridBagLayout());\n ActivitySpa.setBackground(new Color(-2171407));\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 2;\n gbc.gridwidth = 11;\n gbc.weightx = 1.0;\n gbc.weighty = 1.0;\n gbc.anchor = GridBagConstraints.WEST;\n ExcursionsTab.add(ActivitySpa, gbc);\n ActivitySpa.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), \"Spa Package\", TitledBorder.LEFT, TitledBorder.TOP, null, null));\n SpaButton = new JButton();\n SpaButton.setText(\"Select\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 0;\n gbc.weightx = 1.0;\n gbc.weighty = 1.0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n ActivitySpa.add(SpaButton, gbc);\n SpaPic = new JLabel();\n SpaPic.setIcon(new ImageIcon(getClass().getResource(\"/Spa.png\")));\n SpaPic.setText(\"\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.weighty = 1.0;\n gbc.anchor = GridBagConstraints.WEST;\n ActivitySpa.add(SpaPic, gbc);\n ActivityNature = new JPanel();\n ActivityNature.setLayout(new GridBagLayout());\n ActivityNature.setBackground(new Color(-2171407));\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 1;\n gbc.gridwidth = 3;\n gbc.weightx = 1.0;\n gbc.weighty = 1.0;\n gbc.anchor = GridBagConstraints.WEST;\n ExcursionsTab.add(ActivityNature, gbc);\n ActivityNature.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), \"Nature Package\", TitledBorder.LEFT, TitledBorder.TOP, null, null));\n NatureButton = new JButton();\n NatureButton.setText(\"Select\");\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 0;\n gbc.weightx = 1.0;\n gbc.weighty = 1.0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n ActivityNature.add(NatureButton, gbc);\n NaturePic = new JLabel();\n NaturePic.setIcon(new ImageIcon(getClass().getResource(\"/nature.jpg\")));\n NaturePic.setText(\"\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.weighty = 1.0;\n gbc.anchor = GridBagConstraints.WEST;\n ActivityNature.add(NaturePic, gbc);\n SummaryTab = new JPanel();\n SummaryTab.setLayout(new GridBagLayout());\n SummaryTab.setBackground(new Color(-2171407));\n SelectionTabs.addTab(\"Selection Summary\", SummaryTab);\n SummaryDestinationField = new JTextArea();\n SummaryDestinationField.setBackground(new Color(-2171407));\n SummaryDestinationField.setOpaque(true);\n SummaryDestinationField.setPreferredSize(new Dimension(500, 100));\n SummaryDestinationField.setText(\"\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.fill = GridBagConstraints.VERTICAL;\n SummaryTab.add(SummaryDestinationField, gbc);\n SummaryHotelField = new JTextArea();\n SummaryHotelField.setBackground(new Color(-2171407));\n SummaryHotelField.setPreferredSize(new Dimension(500, 100));\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 1;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n SummaryTab.add(SummaryHotelField, gbc);\n SummaryCarField = new JTextArea();\n SummaryCarField.setBackground(new Color(-2171407));\n SummaryCarField.setPreferredSize(new Dimension(500, 100));\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 2;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n SummaryTab.add(SummaryCarField, gbc);\n SummaryExcursionsField = new JTextArea();\n SummaryExcursionsField.setBackground(new Color(-2171407));\n SummaryExcursionsField.setPreferredSize(new Dimension(500, 100));\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 3;\n gbc.anchor = GridBagConstraints.WEST;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n SummaryTab.add(SummaryExcursionsField, gbc);\n }", "private void initializePatientInfoTab() {\r\n\r\n patientTab = new JPanel(new GridBagLayout());\r\n patientTab.setBackground(MainGUI.backgroundColor);\r\n patientTab.setBorder(BorderFactory.createLineBorder(Color.BLACK, 1));\r\n patientTabConstraints = new GridBagConstraints();\r\n\r\n // create labels\r\n pInfo_firstNameLabel = new JLabel(\"First Name:\");\r\n pInfo_middleNameLabel = new JLabel(\"Middle Name:\");\r\n pInfo_lastNameLabel = new JLabel(\"Last Name:\");\r\n pInfo_ssnLabel = new JLabel(\"Social Security #:\");\r\n pInfo_dobLabel = new JLabel(\"Date of Birth:\");\r\n pInfo_phoneNumberLabel = new JLabel(\"Phone Number:\");\r\n pInfo_streetLabel = new JLabel(\"Street:\");\r\n pInfo_cityLabel = new JLabel(\"City:\");\r\n pInfo_stateLabel = new JLabel(\"State:\");\r\n pInfo_zipCodeLabel = new JLabel(\"Zip Code:\");\r\n pInfo_userLabel = new JLabel(\"Username:\");\r\n pInfo_pwLabel = new JLabel(\"Password:\");\r\n pInfo_policyLabel = new JLabel(\"Policy:\");\r\n\r\n pInfo_firstNameLabel.setForeground(MainGUI.fontColor);\r\n pInfo_middleNameLabel.setForeground(MainGUI.fontColor);\r\n pInfo_lastNameLabel.setForeground(MainGUI.fontColor);\r\n pInfo_ssnLabel.setForeground(MainGUI.fontColor);\r\n pInfo_dobLabel.setForeground(MainGUI.fontColor);\r\n pInfo_phoneNumberLabel.setForeground(MainGUI.fontColor);\r\n pInfo_streetLabel.setForeground(MainGUI.fontColor);\r\n pInfo_cityLabel.setForeground(MainGUI.fontColor);\r\n pInfo_stateLabel.setForeground(MainGUI.fontColor);\r\n pInfo_zipCodeLabel.setForeground(MainGUI.fontColor);\r\n pInfo_userLabel.setForeground(MainGUI.fontColor);\r\n pInfo_pwLabel.setForeground(MainGUI.fontColor);\r\n pInfo_policyLabel.setForeground(MainGUI.fontColor);\r\n\r\n // create text fields\r\n pInfo_firstNameTextField = new JTextField(12);\r\n pInfo_middleNameTextField = new JTextField(12);\r\n pInfo_lastNameTextField = new JTextField(12);\r\n pInfo_ssnTextField = new JTextField(12);\r\n pInfo_dobTextField = new JTextField(12);\r\n pInfo_phoneNumberTextField = new JTextField(12);\r\n pInfo_addressTextField = new JTextField(12);\r\n pInfo_cityTextField = new JTextField(12);\r\n pInfo_zipCodeTextField = new JTextField(12);\r\n pInfo_userField = new JTextField(12);\r\n pInfo_pwField = new JTextField(12);\r\n\r\n // combo box\r\n pInfo_stateComboBox = new JComboBox<>(pInfo_states);\r\n\r\n String[] policyOptions = {\"Yes\", \"No\"};\r\n pInfo_policyComboBox = new JComboBox<>(policyOptions);\r\n\r\n // create buttons\r\n pInfo_updateInfoButton = new JButton(\"Update Existing Patient\");\r\n pInfo_submitNewInfoButton = new JButton(\"Create New Patient File\");\r\n\r\n pInfo_updateInfoButton.setForeground(MainGUI.fontColor);\r\n pInfo_submitNewInfoButton.setForeground(MainGUI.fontColor);\r\n\r\n // add components to the patient info panel\r\n\r\n // last name label\r\n patientTabConstraints.gridx = 10;\r\n patientTabConstraints.gridy = 10;\r\n patientTabConstraints.weightx = 1;\r\n patientTabConstraints.weighty = 0.4;\r\n patientTabConstraints.anchor = GridBagConstraints.WEST;\r\n patientTabConstraints.insets = new Insets(0, 20, 0, 0);\r\n patientTab.add(pInfo_lastNameLabel, patientTabConstraints);\r\n\r\n // add first name label\r\n patientTabConstraints.gridx = 20;\r\n patientTab.add(pInfo_firstNameLabel, patientTabConstraints);\r\n\r\n // add middle name label\r\n patientTabConstraints.gridx = 30;\r\n patientTab.add(pInfo_middleNameLabel, patientTabConstraints);\r\n\r\n // add ssn label\r\n patientTabConstraints.gridx = 10;\r\n patientTabConstraints.gridy = 20;\r\n patientTab.add(pInfo_ssnLabel, patientTabConstraints);\r\n\r\n // add username label\r\n patientTabConstraints.gridx = 20;\r\n patientTab.add(pInfo_userLabel, patientTabConstraints);\r\n\r\n // add password label\r\n patientTabConstraints.gridx = 30;\r\n patientTab.add(pInfo_pwLabel, patientTabConstraints);\r\n\r\n // add policy label\r\n patientTabConstraints.gridx = 20;\r\n patientTabConstraints.gridy = 30;\r\n patientTab.add(pInfo_policyLabel, patientTabConstraints);\r\n\r\n // add DOB label\r\n patientTabConstraints.gridx = 10;\r\n patientTab.add(pInfo_dobLabel, patientTabConstraints);\r\n\r\n // add phone # label\r\n patientTabConstraints.gridy = 40;\r\n patientTabConstraints.weighty = 1;\r\n patientTabConstraints.anchor = GridBagConstraints.NORTHWEST;\r\n patientTabConstraints.insets = new Insets(10, 20, 0, 0);\r\n patientTab.add(pInfo_phoneNumberLabel, patientTabConstraints);\r\n\r\n // add address label\r\n patientTabConstraints.gridy = 50;\r\n patientTabConstraints.anchor = GridBagConstraints.SOUTHWEST;\r\n patientTabConstraints.insets = new Insets(0, 20, 10, 0);\r\n patientTab.add(pInfo_streetLabel, patientTabConstraints);\r\n\r\n // add city label\r\n patientTabConstraints.gridy = 60;\r\n patientTabConstraints.weighty = 0.4;\r\n patientTabConstraints.anchor = GridBagConstraints.WEST;\r\n patientTabConstraints.insets = new Insets(0, 20, 0, 0);\r\n patientTab.add(pInfo_cityLabel, patientTabConstraints);\r\n\r\n // add state label\r\n patientTabConstraints.gridy = 70;\r\n patientTab.add(pInfo_stateLabel, patientTabConstraints);\r\n\r\n // add zip label\r\n patientTabConstraints.gridy = 80;\r\n patientTab.add(pInfo_zipCodeLabel, patientTabConstraints);\r\n\r\n // add last name text field\r\n patientTabConstraints.gridy = 10;\r\n patientTabConstraints.anchor = GridBagConstraints.EAST;\r\n patientTabConstraints.insets = new Insets(0, 0, 0, 40);\r\n patientTab.add(pInfo_lastNameTextField, patientTabConstraints);\r\n\r\n // add first name text field\r\n patientTabConstraints.gridx = 20;\r\n patientTabConstraints.insets = new Insets(0, 0, 0, 60);\r\n patientTab.add(pInfo_firstNameTextField, patientTabConstraints);\r\n\r\n // add middle name text field\r\n patientTabConstraints.gridx = 30;\r\n patientTab.add(pInfo_middleNameTextField, patientTabConstraints);\r\n\r\n // add ssn textfield\r\n patientTabConstraints.gridx = 10;\r\n patientTabConstraints.gridy = 20;\r\n patientTabConstraints.insets = new Insets(0, 0, 0, 40);\r\n patientTab.add(pInfo_ssnTextField, patientTabConstraints);\r\n\r\n // add username textfield\r\n patientTabConstraints.gridx = 20;\r\n patientTabConstraints.insets = new Insets(0, 0, 0, 60);\r\n patientTab.add(pInfo_userField, patientTabConstraints);\r\n\r\n // add password textfield\r\n patientTabConstraints.gridx = 30;\r\n patientTab.add(pInfo_pwField, patientTabConstraints);\r\n\r\n // add policy combo box\r\n patientTabConstraints.gridx = 20;\r\n patientTabConstraints.gridy = 30;\r\n patientTabConstraints.anchor = GridBagConstraints.CENTER;\r\n patientTabConstraints.insets = new Insets(0, 0, 0, 0);\r\n patientTab.add(pInfo_policyComboBox, patientTabConstraints);\r\n\r\n // add DOB textfield\r\n patientTabConstraints.gridx = 10;\r\n patientTabConstraints.anchor = GridBagConstraints.EAST;\r\n patientTabConstraints.insets = new Insets(0, 0, 0, 40);\r\n patientTab.add(pInfo_dobTextField, patientTabConstraints);\r\n\r\n // add phone number text field\r\n patientTabConstraints.gridy = 40;\r\n patientTabConstraints.anchor = GridBagConstraints.NORTHEAST;\r\n patientTabConstraints.insets = new Insets(10, 0, 0, 40);\r\n patientTab.add(pInfo_phoneNumberTextField, patientTabConstraints);\r\n\r\n // add address text field\r\n patientTabConstraints.gridy = 50;\r\n patientTabConstraints.anchor = GridBagConstraints.SOUTHEAST;\r\n patientTabConstraints.insets = new Insets(0, 0, 10, 40);\r\n patientTab.add(pInfo_addressTextField, patientTabConstraints);\r\n\r\n // add city text field\r\n patientTabConstraints.gridy = 60;\r\n patientTabConstraints.anchor = GridBagConstraints.EAST;\r\n patientTabConstraints.insets = new Insets(0, 0, 0, 40);\r\n patientTab.add(pInfo_cityTextField, patientTabConstraints);\r\n\r\n // add state combo box\r\n patientTabConstraints.gridy = 70;\r\n patientTab.add(pInfo_stateComboBox, patientTabConstraints);\r\n\r\n // add zip code text field\r\n patientTabConstraints.gridy = 80;\r\n patientTab.add(pInfo_zipCodeTextField, patientTabConstraints);\r\n\r\n // add update existing patient button\r\n patientTabConstraints.gridx = 20;\r\n patientTabConstraints.gridy = 70;\r\n patientTabConstraints.ipady = 10;\r\n patientTabConstraints.anchor = GridBagConstraints.CENTER;\r\n patientTab.add(pInfo_updateInfoButton, patientTabConstraints);\r\n\r\n // add submit new patient info button\r\n patientTabConstraints.gridy = 80;\r\n patientTab.add(pInfo_submitNewInfoButton, patientTabConstraints);\r\n\r\n }", "public void cambiarPanel(String panel) {\n\n cambiarPanel.show(panelContenedor, panel);\n }", "public ControlTabbedPanel(Object _visual) {\n super(_visual);\n }", "public AdministrationPanel(JFrame parent) {\n this.parent = parent;\n initComponents();\n\n tv = new TabView();\n eap = new EmployeeAdministrationPanel(parent);\n vap = new CarAdministrationPanel(parent);\n tv.addNewTab(\"Medarbejder\", eap);\n tv.addNewTab(\"Biler\", vap);\n\n add(tv, BorderLayout.CENTER);\n }", "private void initializeBillingTab() {\r\n\r\n billingTab = new JPanel(new GridBagLayout());\r\n billingTab.setBackground(MainGUI.backgroundColor);\r\n billingTab.setBorder(BorderFactory.createLineBorder(Color.BLACK, 1));\r\n billingTabConstraints = new GridBagConstraints();\r\n\r\n billing_patientBillingLabel = new JLabel(\"Patient Billing\");\r\n billing_instructionLabel = new JLabel(\"First Search patient, then select billing code\");\r\n billing_fullNameLabel = new JLabel(\"Patient Full Name:\");\r\n billing_billCodeLabel = new JLabel(\"Billing Code:\");\r\n billing_policyLabel = new JLabel(\"Policy:\");\r\n billing_amtDueLabel = new JLabel(\"Amount Due:\");\r\n billing_patientBillingLabel.setFont(new java.awt.Font\r\n (billing_patientBillingLabel.getFont().getFontName(), Font.PLAIN, 40));\r\n billing_instructionLabel.setFont(new java.awt.Font\r\n (billing_patientBillingLabel.getFont().getFontName(), Font.PLAIN, 20));\r\n billing_historyLabel = new JLabel(\"Payment & Appointment History:\");\r\n\r\n billing_fullNameField = new JTextField(12);\r\n billing_fullNameField.setEditable(false);\r\n billing_fullNameField.setBackground(Color.white);\r\n billing_ssnField = new JTextField(12);\r\n billing_amtDueField = new JTextField(12);\r\n billing_amtDueField.setEditable(false);\r\n billing_amtDueField.setBackground(Color.white);\r\n billing_policyField = new JTextField(12);\r\n billing_policyField.setEditable(false);\r\n billing_policyField.setBackground(Color.white);\r\n\r\n String[] billingCodeOptions = {\"CHECKUP\", \"PHYSICAL\", \"DIAGNOSTIC\"};\r\n\r\n billing_codeCB = new JComboBox<String>(billingCodeOptions);\r\n\r\n // initialize text area\r\n billing_patientHistoryTextArea = new JTextArea();\r\n billing_patientHistoryTextArea.setEditable(false);\r\n billing_patientHistoryTextArea.setLineWrap(true);\r\n\r\n billing_historyScrollPane = new JScrollPane(billing_patientHistoryTextArea);\r\n billing_historyScrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);\r\n\r\n billing_calculateButton = new JButton(\"Calculate Payment\");\r\n\r\n billing_patientBillingLabel.setForeground(MainGUI.fontColor);\r\n billing_fullNameLabel.setForeground(MainGUI.fontColor);\r\n billing_billCodeLabel.setForeground(MainGUI.fontColor);\r\n billing_policyLabel.setForeground(MainGUI.fontColor);\r\n billing_amtDueLabel.setForeground(MainGUI.fontColor);\r\n billing_historyLabel.setForeground(MainGUI.fontColor);\r\n\r\n billing_calculateButton.setForeground(MainGUI.fontColor);\r\n\r\n // add contents to Billing tab\r\n\r\n // add patient billing label\r\n billingTabConstraints.gridx = 10;\r\n billingTabConstraints.gridy = 10;\r\n billingTabConstraints.gridwidth = 40;\r\n billingTabConstraints.weighty = 0.2;\r\n billingTabConstraints.anchor = GridBagConstraints.NORTH;\r\n billingTabConstraints.insets = new Insets(20, 0, 0, 0);\r\n billingTab.add(billing_patientBillingLabel, billingTabConstraints);\r\n\r\n // add billing instruction label\r\n billingTabConstraints.insets = new Insets(70, 0, 0, 0);\r\n billingTabConstraints.weighty = 0.1;\r\n billingTab.add(billing_instructionLabel, billingTabConstraints);\r\n\r\n // add patient name label\r\n billingTabConstraints.gridy = 20;\r\n billingTabConstraints.weightx = 0.2;\r\n billingTabConstraints.gridwidth = 10;\r\n billingTabConstraints.anchor = GridBagConstraints.EAST;\r\n billingTabConstraints.insets = new Insets(0, 0, 0, 20);\r\n billingTab.add(billing_fullNameLabel, billingTabConstraints);\r\n\r\n // add billing code label\r\n billingTabConstraints.gridy = 30;\r\n billingTab.add(billing_billCodeLabel, billingTabConstraints);\r\n\r\n // add policy label\r\n billingTabConstraints.gridy = 40;\r\n billingTab.add(billing_policyLabel, billingTabConstraints);\r\n\r\n // add name field\r\n billingTabConstraints.gridx = 20;\r\n billingTabConstraints.gridy = 20;\r\n billingTabConstraints.weightx = 0.4;\r\n billingTabConstraints.anchor = GridBagConstraints.WEST;\r\n billingTabConstraints.insets = new Insets(0, 30, 0, 0);\r\n billingTab.add(billing_fullNameField, billingTabConstraints);\r\n\r\n // add billing code combo box\r\n billingTabConstraints.gridy = 30;\r\n billingTab.add(billing_codeCB, billingTabConstraints);\r\n\r\n // add policy textfield\r\n billingTabConstraints.gridy = 40;\r\n billingTab.add(billing_policyField, billingTabConstraints);\r\n\r\n // add amount due label\r\n billingTabConstraints.gridx = 30;\r\n billingTabConstraints.gridy = 30;\r\n billingTabConstraints.weightx = 0.2;\r\n billingTabConstraints.anchor = GridBagConstraints.WEST;\r\n billingTab.add(billing_amtDueLabel, billingTabConstraints);\r\n billingTabConstraints.insets = new Insets(0, 0, 0, 0);\r\n\r\n // add amount due field\r\n billingTabConstraints.gridx = 40;\r\n billingTabConstraints.weightx = 0.5;\r\n billingTabConstraints.insets = new Insets(0, 0, 0, 80);\r\n billingTab.add(billing_amtDueField, billingTabConstraints);\r\n\r\n // add calculate button\r\n billingTabConstraints.gridx = 30;\r\n billingTabConstraints.gridy = 40;\r\n billingTabConstraints.weightx = 0.2;\r\n billingTabConstraints.ipady = 10;\r\n billingTabConstraints.gridwidth = 20;\r\n billingTabConstraints.anchor = GridBagConstraints.WEST;\r\n billingTabConstraints.insets = new Insets(0, 70, 20, 0);\r\n billingTab.add(billing_calculateButton, billingTabConstraints);\r\n\r\n // add patient history label\r\n billingTabConstraints.gridx = 10;\r\n billingTabConstraints.gridy = 50;\r\n billingTabConstraints.ipady = 0;\r\n billingTabConstraints.gridwidth = 10;\r\n billingTabConstraints.insets = new Insets(0, 30, 0, 0);\r\n billingTab.add(billing_historyLabel, billingTabConstraints);\r\n\r\n // add patient history text area (wrapped in scroll pane)\r\n billingTabConstraints.gridx = 10;\r\n billingTabConstraints.gridy = 60;\r\n billingTabConstraints.gridwidth = 40;\r\n billingTabConstraints.gridheight = 20;\r\n billingTabConstraints.fill = GridBagConstraints.BOTH;\r\n billingTabConstraints.insets = new Insets(0, 0, 0, 0);\r\n billingTab.add(billing_historyScrollPane, billingTabConstraints);\r\n\r\n\r\n }", "private void initComponents() {\n\n jTabbedPane1 = new javax.swing.JTabbedPane();\n jPanel2 = new javax.swing.JPanel();\n jLabel3 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n addBtn1 = new javax.swing.JButton();\n jLabel14 = new javax.swing.JLabel();\n jTextField2 = new javax.swing.JTextField();\n jLabel15 = new javax.swing.JLabel();\n jTextField3 = new javax.swing.JTextField();\n resetBtn1 = new javax.swing.JButton();\n countLabel1 = new javax.swing.JLabel();\n jTextField4 = new javax.swing.JTextField();\n jLabel16 = new javax.swing.JLabel();\n jLabel5 = new javax.swing.JLabel();\n jTextField7 = new javax.swing.JTextField();\n jLabel6 = new javax.swing.JLabel();\n jTextField8 = new javax.swing.JTextField();\n jLabel8 = new javax.swing.JLabel();\n jTextField9 = new javax.swing.JTextField();\n filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 32767));\n jPanel4 = new javax.swing.JPanel();\n jLabel4 = new javax.swing.JLabel();\n jLabel9 = new javax.swing.JLabel();\n jTextField5 = new javax.swing.JTextField();\n addBtn2 = new javax.swing.JButton();\n jLabel17 = new javax.swing.JLabel();\n jTextField6 = new javax.swing.JTextField();\n jLabel18 = new javax.swing.JLabel();\n resetBtn2 = new javax.swing.JButton();\n countLabel2 = new javax.swing.JLabel();\n jTextField11 = new javax.swing.JTextField();\n jLabel10 = new javax.swing.JLabel();\n jTextField12 = new javax.swing.JTextField();\n jLabel11 = new javax.swing.JLabel();\n jTextField13 = new javax.swing.JTextField();\n filler2 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 0), new java.awt.Dimension(0, 32767));\n jPanel1 = new javax.swing.JPanel();\n jLabel2 = new javax.swing.JLabel();\n clearBtn = new javax.swing.JButton();\n saveBtn = new javax.swing.JButton();\n dirLabel = new javax.swing.JLabel();\n jLabel1 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Label Printer\");\n setLocation(new java.awt.Point(320, 200));\n setMinimumSize(new java.awt.Dimension(742, 356));\n\n jTabbedPane1.addChangeListener(new javax.swing.event.ChangeListener() {\n public void stateChanged(javax.swing.event.ChangeEvent evt) {\n jTabbedPane1StateChanged(evt);\n }\n });\n\n jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Template\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.BELOW_TOP));\n jPanel2.setMaximumSize(new java.awt.Dimension(480, 203));\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);\n jLabel3.setText(\"ID\");\n\n jLabel7.setText(\"Total\");\n\n jTextField1.setFont(new java.awt.Font(\"Tahoma\", 0, 16)); // NOI18N\n jTextField1.setName(\"ID\"); // NOI18N\n\n addBtn1.setText(\"Add\");\n addBtn1.setMaximumSize(new java.awt.Dimension(66, 25));\n addBtn1.setMinimumSize(new java.awt.Dimension(66, 25));\n addBtn1.setPreferredSize(new java.awt.Dimension(66, 25));\n addBtn1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n addBtn1ActionPerformed(evt);\n }\n });\n\n jLabel14.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel14.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);\n jLabel14.setText(\"First Name\");\n\n jTextField2.setFont(new java.awt.Font(\"Tahoma\", 0, 16)); // NOI18N\n jTextField2.setName(\"FirstName\"); // NOI18N\n\n jLabel15.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel15.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);\n jLabel15.setText(\"Address\");\n\n jTextField3.setFont(new java.awt.Font(\"Tahoma\", 0, 16)); // NOI18N\n jTextField3.setName(\"Surname\"); // NOI18N\n\n resetBtn1.setText(\"Reset\");\n resetBtn1.setMaximumSize(new java.awt.Dimension(60, 25));\n resetBtn1.setMinimumSize(new java.awt.Dimension(60, 25));\n resetBtn1.setPreferredSize(new java.awt.Dimension(60, 25));\n resetBtn1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n resetBtn1ActionPerformed(evt);\n }\n });\n\n countLabel1.setBackground(javax.swing.UIManager.getDefaults().getColor(\"text\"));\n countLabel1.setText(\"0\");\n countLabel1.setName(\"count\"); // NOI18N\n\n jTextField4.setFont(new java.awt.Font(\"Tahoma\", 0, 16)); // NOI18N\n jTextField4.setName(\"Address\"); // NOI18N\n\n jLabel16.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel16.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);\n jLabel16.setText(\"Surname\");\n\n jLabel5.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);\n jLabel5.setText(\"Country\");\n\n jTextField7.setFont(new java.awt.Font(\"Tahoma\", 0, 16)); // NOI18N\n jTextField7.setName(\"Country\"); // NOI18N\n\n jLabel6.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);\n jLabel6.setText(\"Short Form\");\n\n jTextField8.setFont(new java.awt.Font(\"Tahoma\", 0, 16)); // NOI18N\n jTextField8.setName(\"ShortForm\"); // NOI18N\n\n jLabel8.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel8.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);\n jLabel8.setText(\"Post Code\");\n\n jTextField9.setFont(new java.awt.Font(\"Tahoma\", 0, 16)); // NOI18N\n jTextField9.setName(\"Postcode\"); // NOI18N\n\n org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel2Layout.createSequentialGroup()\n .add(28, 28, 28)\n .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jPanel2Layout.createSequentialGroup()\n .add(88, 88, 88)\n .add(jLabel7)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)\n .add(countLabel1)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(resetBtn1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 66, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(18, 18, 18)\n .add(addBtn1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .add(jPanel2Layout.createSequentialGroup()\n .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)\n .add(jLabel15, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(org.jdesktop.layout.GroupLayout.LEADING, jLabel14, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(org.jdesktop.layout.GroupLayout.LEADING, jLabel3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(org.jdesktop.layout.GroupLayout.LEADING, jLabel16, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)\n .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jPanel2Layout.createSequentialGroup()\n .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)\n .add(org.jdesktop.layout.GroupLayout.LEADING, jTextField2)\n .add(org.jdesktop.layout.GroupLayout.LEADING, jTextField1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 142, Short.MAX_VALUE)\n .add(jTextField3))\n .add(7, 7, 7)\n .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jPanel2Layout.createSequentialGroup()\n .add(20, 20, 20)\n .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)\n .add(jLabel5)\n .add(jLabel6)\n .add(jLabel8)))\n .add(filler1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)\n .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jTextField7, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE)\n .add(jTextField8)\n .add(jTextField9)))\n .add(jTextField4))))\n .add(28, 28, 28))\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jPanel2Layout.createSequentialGroup()\n .add(filler1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)\n .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(jLabel3)\n .add(jTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(jLabel5)\n .add(jTextField7, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)\n .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(jLabel14)\n .add(jTextField2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(jLabel6)\n .add(jTextField8, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)\n .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(jLabel16)\n .add(jTextField3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(jLabel8)\n .add(jTextField9, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .add(21, 21, 21)\n .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(jTextField4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(jLabel15))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)\n .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(jLabel7)\n .add(addBtn1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(resetBtn1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(countLabel1))\n .addContainerGap(36, Short.MAX_VALUE))\n );\n\n jTabbedPane1.addTab(\"Mailing\", jPanel2);\n jPanel2.getAccessibleContext().setAccessibleName(\"mailingTab\");\n\n jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Template\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.BELOW_TOP));\n jPanel4.setMaximumSize(new java.awt.Dimension(480, 203));\n\n jLabel4.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);\n jLabel4.setText(\"Code\");\n\n jLabel9.setText(\"Total\");\n\n jTextField5.setFont(new java.awt.Font(\"Tahoma\", 0, 16)); // NOI18N\n jTextField5.setName(\"Code\"); // NOI18N\n\n addBtn2.setText(\"Add\");\n addBtn2.setMaximumSize(new java.awt.Dimension(66, 25));\n addBtn2.setMinimumSize(new java.awt.Dimension(66, 25));\n addBtn2.setPreferredSize(new java.awt.Dimension(66, 25));\n addBtn2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n addBtn2ActionPerformed(evt);\n }\n });\n\n jLabel17.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel17.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);\n jLabel17.setText(\"City\");\n\n jTextField6.setFont(new java.awt.Font(\"Tahoma\", 0, 16)); // NOI18N\n jTextField6.setName(\"City\"); // NOI18N\n\n jLabel18.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel18.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);\n jLabel18.setText(\"Address\");\n jLabel18.setName(\"Address\"); // NOI18N\n\n resetBtn2.setText(\"Reset\");\n resetBtn2.setMaximumSize(new java.awt.Dimension(60, 25));\n resetBtn2.setMinimumSize(new java.awt.Dimension(60, 25));\n resetBtn2.setPreferredSize(new java.awt.Dimension(60, 25));\n resetBtn2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n resetBtn2ActionPerformed(evt);\n }\n });\n\n countLabel2.setBackground(javax.swing.UIManager.getDefaults().getColor(\"text\"));\n countLabel2.setText(\"0\");\n countLabel2.setName(\"count\"); // NOI18N\n\n jTextField11.setFont(new java.awt.Font(\"Tahoma\", 0, 16)); // NOI18N\n jTextField11.setName(\"Address\"); // NOI18N\n\n jLabel10.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel10.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);\n jLabel10.setText(\"Client\");\n\n jTextField12.setFont(new java.awt.Font(\"Tahoma\", 0, 16)); // NOI18N\n jTextField12.setName(\"Client\"); // NOI18N\n\n jLabel11.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n jLabel11.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);\n jLabel11.setText(\"Zip\");\n\n jTextField13.setFont(new java.awt.Font(\"Tahoma\", 0, 16)); // NOI18N\n jTextField13.setName(\"Zip\"); // NOI18N\n\n org.jdesktop.layout.GroupLayout jPanel4Layout = new org.jdesktop.layout.GroupLayout(jPanel4);\n jPanel4.setLayout(jPanel4Layout);\n jPanel4Layout.setHorizontalGroup(\n jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel4Layout.createSequentialGroup()\n .add(28, 28, 28)\n .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jPanel4Layout.createSequentialGroup()\n .add(88, 88, 88)\n .add(jLabel9)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)\n .add(countLabel2)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(resetBtn2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 66, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(18, 18, 18)\n .add(addBtn2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .add(jPanel4Layout.createSequentialGroup()\n .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)\n .add(jLabel18, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 55, Short.MAX_VALUE)\n .add(org.jdesktop.layout.GroupLayout.LEADING, jLabel17, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(org.jdesktop.layout.GroupLayout.LEADING, jLabel4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)\n .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jPanel4Layout.createSequentialGroup()\n .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jTextField5, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE)\n .add(jTextField6))\n .add(28, 28, 28)\n .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(org.jdesktop.layout.GroupLayout.TRAILING, filler2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(org.jdesktop.layout.GroupLayout.TRAILING, jLabel10)\n .add(org.jdesktop.layout.GroupLayout.TRAILING, jLabel11))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)\n .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jTextField13)\n .add(jTextField12, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 187, Short.MAX_VALUE)))\n .add(jTextField11))))\n .add(28, 28, 28))\n );\n jPanel4Layout.setVerticalGroup(\n jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jPanel4Layout.createSequentialGroup()\n .add(filler2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)\n .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(jLabel4)\n .add(jTextField5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(jLabel10)\n .add(jTextField12, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .add(30, 30, 30)\n .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(jLabel17)\n .add(jTextField6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(jLabel11)\n .add(jTextField13, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .add(31, 31, 31)\n .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(jTextField11, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(jLabel18))\n .add(27, 27, 27)\n .add(jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(jLabel9)\n .add(addBtn2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(resetBtn2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(countLabel2))\n .addContainerGap(34, Short.MAX_VALUE))\n );\n\n jTabbedPane1.addTab(\"Identity\", jPanel4);\n\n jPanel1.setPreferredSize(new java.awt.Dimension(140, 242));\n\n jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/resources/Barcode.jpg\"))); // NOI18N\n\n clearBtn.setText(\"Clear\");\n clearBtn.setMaximumSize(new java.awt.Dimension(75, 30));\n clearBtn.setMinimumSize(new java.awt.Dimension(75, 30));\n clearBtn.setPreferredSize(new java.awt.Dimension(75, 28));\n clearBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n clearBtnActionPerformed(evt);\n }\n });\n\n saveBtn.setText(\"Save\");\n saveBtn.setMaximumSize(new java.awt.Dimension(75, 30));\n saveBtn.setMinimumSize(new java.awt.Dimension(75, 30));\n saveBtn.setPreferredSize(new java.awt.Dimension(75, 30));\n saveBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n saveBtnActionPerformed(evt);\n }\n });\n\n org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jPanel1Layout.createSequentialGroup()\n .add(18, 18, 18)\n .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jLabel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(jPanel1Layout.createSequentialGroup()\n .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)\n .add(org.jdesktop.layout.GroupLayout.LEADING, saveBtn, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 112, Short.MAX_VALUE)\n .add(org.jdesktop.layout.GroupLayout.LEADING, clearBtn, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .add(0, 0, Short.MAX_VALUE)))\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .add(jLabel2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 144, Short.MAX_VALUE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(clearBtn, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(18, 18, 18)\n .add(saveBtn, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n );\n\n dirLabel.setFont(new java.awt.Font(\"Tahoma\", 2, 12)); // NOI18N\n dirLabel.setForeground(new java.awt.Color(51, 51, 51));\n dirLabel.setVerticalAlignment(javax.swing.SwingConstants.TOP);\n dirLabel.setAlignmentX(0.2F);\n\n jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/resources/logo.png\"))); // NOI18N\n\n org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .add(21, 21, 21)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .add(jTabbedPane1)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 144, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(jLabel1)))\n .add(dirLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .addContainerGap()\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .add(jLabel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 40, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .add(jTabbedPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 297, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(dirLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 26, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n jTabbedPane1.getAccessibleContext().setAccessibleName(\"Templates\");\n\n getAccessibleContext().setAccessibleName(\"labelPrinter\");\n\n pack();\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\twin.change(\"jpanel01\");\n\t\t\t}", "private void swapPanels(JPanel panel){\n setVisible(false);\n getParent().add(panel);\n panel.setVisible(true); \n }", "public void add(TabLike tab){\n TabLabel btn = tabLabelCreator.create(tab.getName(), this);\n\n tab.setVisible(tabs.isEmpty());\n btn.setDisable(tabs.isEmpty());\n if (tabs.isEmpty()){\n selected = btn;\n }\n\n tabs.add(tab);\n nameTab.getChildren().add(btn);\n tabContent.getChildren().add(tab);\n tab.setContainer(this);\n }", "private void mostrarTablero() {\n Jugada objJugada = null;\n if (! this.objJuegoTresEnRaya.getMovimientos().estaVacia())\n objJugada = this.objJuegoTresEnRaya.getMovimientos().ultimo();\n\n if (objJugada == null) {\n tab0x0.setEnabled(true);\n tab0x1.setEnabled(true);\n tab0x2.setEnabled(true);\n \n tab1x0.setEnabled(true);\n tab1x1.setEnabled(true);\n tab1x2.setEnabled(true);\n \n tab2x0.setEnabled(true);\n tab2x1.setEnabled(true);\n tab2x2.setEnabled(true);\n \n tab0x0.setText(\"\");\n tab0x1.setText(\"\");\n tab0x2.setText(\"\");\n \n tab1x0.setText(\"\");\n tab1x1.setText(\"\");\n tab1x2.setText(\"\");\n \n tab2x0.setText(\"\");\n tab2x1.setText(\"\");\n tab2x2.setText(\"\");\n return;\n }\n \n if (objJugada.getTablero(0, 0) > 0) {\n tab0x0.setEnabled(false);\n tab0x0.setText(getTexto(objJugada.getTablero(0, 0)));\n }\n if (objJugada.getTablero(0, 1) > 0) {\n tab0x1.setEnabled(false);\n tab0x1.setText(getTexto(objJugada.getTablero(0, 1)));\n }\n if (objJugada.getTablero(0, 2) > 0) {\n tab0x2.setEnabled(false);\n tab0x2.setText(getTexto(objJugada.getTablero(0, 2)));\n }\n\n if (objJugada.getTablero(1, 0) > 0) {\n tab1x0.setEnabled(false);\n tab1x0.setText(getTexto(objJugada.getTablero(1, 0)));\n }\n if (objJugada.getTablero(1, 1) > 0) {\n tab1x1.setEnabled(false);\n tab1x1.setText(getTexto(objJugada.getTablero(1, 1)));\n }\n if (objJugada.getTablero(1, 2) > 0) {\n tab1x2.setEnabled(false);\n tab1x2.setText(getTexto(objJugada.getTablero(1, 2)));\n }\n\n if (objJugada.getTablero(2, 0) > 0) {\n tab2x0.setEnabled(false);\n tab2x0.setText(getTexto(objJugada.getTablero(2, 0)));\n }\n if (objJugada.getTablero(2, 1) > 0) {\n tab2x1.setEnabled(false);\n tab2x1.setText(getTexto(objJugada.getTablero(2, 1)));\n }\n if (objJugada.getTablero(2, 2) > 0) {\n tab2x2.setEnabled(false);\n tab2x2.setText(getTexto(objJugada.getTablero(2, 2)));\n }\n \n this.numNodosResultLabel.setText(\"\" + objJuegoTresEnRaya.getNumeroNodosUltima());\n \n if (objJuegoTresEnRaya.estaTerminado()) {\n tab0x0.setEnabled(false);\n tab0x1.setEnabled(false);\n tab0x2.setEnabled(false);\n \n tab1x0.setEnabled(false);\n tab1x1.setEnabled(false);\n tab1x2.setEnabled(false);\n \n tab2x0.setEnabled(false);\n tab2x1.setEnabled(false);\n tab2x2.setEnabled(false);\n \n this.quienGanoResultLabel.setText(getTexto(objJuegoTresEnRaya.getQuienGano()));\n }\n }", "public void updateInicioAdmin(PanelInicioAdmin panel) {\n \tcontentPane.remove(inicioAdmin);\n \tinicioAdmin = panel;\n \tcontroladorAdmin(contMain);\n \tcontroladorHome(contMain);\n \tinicioAdmin.setProyectosButton();\n \tinicioAdmin.getTabla().clearSelection();\n \tcontentPane.add(inicioAdmin, \"inicioAdmin\");\n }" ]
[ "0.75046873", "0.6797909", "0.67349833", "0.66032326", "0.6601165", "0.6527853", "0.65052223", "0.64948833", "0.64933884", "0.6491914", "0.64770496", "0.6346815", "0.6345956", "0.6338059", "0.6330645", "0.62918603", "0.628628", "0.62659156", "0.6265339", "0.6257116", "0.62525684", "0.6239778", "0.62381876", "0.6236242", "0.62337774", "0.6204769", "0.61959934", "0.6194521", "0.61563927", "0.61554617", "0.6150863", "0.6149177", "0.61202186", "0.6099652", "0.6090004", "0.6080081", "0.6076001", "0.60500264", "0.60490143", "0.6042596", "0.60349095", "0.60241175", "0.60199296", "0.60150635", "0.6008026", "0.6005082", "0.6004409", "0.6003747", "0.6001496", "0.5999247", "0.5992478", "0.5973675", "0.59704113", "0.59641075", "0.59533405", "0.59530556", "0.59529155", "0.594644", "0.59237725", "0.5921895", "0.59154165", "0.59043455", "0.5902637", "0.59007716", "0.58965755", "0.58852303", "0.5881901", "0.5879254", "0.58735", "0.58709747", "0.5863637", "0.58587015", "0.58509725", "0.5843265", "0.5836932", "0.5834832", "0.58343834", "0.58324444", "0.5828223", "0.5823594", "0.5815499", "0.58093363", "0.58093256", "0.5806737", "0.58065015", "0.5801327", "0.58002603", "0.5799742", "0.57982004", "0.5797228", "0.57935935", "0.5791272", "0.5787413", "0.5786332", "0.5783479", "0.5777538", "0.57707393", "0.57675636", "0.5764149", "0.5755371" ]
0.78295827
0
Save the id of the person who recently hosted the meeting
public static void saveLastMeetingHostId(int userId) { SP_UTILS.put(SPDataConstant.KEY_LAST_MEETING_HOST_ID, userId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Meeting save(Meeting meeting) {\n\t\tmeeting.setCreationTs(System.currentTimeMillis());\n\t\tmeeting = repo.save(meeting);\n\n\t\t// send e-mail notification\n\t\tsendEmail(meeting);\n\t\treturn meeting;\n\t}", "ParticipantId getId();", "public static int getLastMeetingHostId() {\n return SP_UTILS.getInt(SPDataConstant.KEY_LAST_MEETING_HOST_ID, SPDataConstant.VALUE_LAST_MEETING_HOST_ID_DEFAULT);\n }", "public void save(MeetingTable nt) {\n\t\tgetSession().save(nt);\r\n\t\t\r\n\t}", "public void putMeeting(Meeting meeting) throws Exception;", "private void saveNote() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"E,MMM d, hh:mm a\");\n String lastSavedDate = sdf.format(new Date());\n String id;\n boolean isNew = true;\n if (oldNote != null && oldNote.getId() != null && !oldNote.getId().isEmpty()) {\n id = oldNote.getId();\n isNew = false;\n } else\n id = UUID.randomUUID().toString();\n Note note = new Note(id, etTitle.getText().toString().trim(), lastSavedDate, etNote.getText().toString().trim());\n note.setNew(isNew);\n Intent returnIntent = new Intent();\n returnIntent.putExtra(\"NEW_NOTE\", note);\n setResult(Activity.RESULT_OK, returnIntent);\n finish();\n }", "@Override\n public void save() {\n String query = null;\n super.save();\n ((DataUser) user).save();\n\n if (getId() == 0) {\n String[] values = {super.getId() + \"\", \"\" + getUser().getId()};\n\n query = Database.compose(\n \"INSERT INTO case_workers (person_id, user_id)\",\n \"VALUES('\" + String.join(\"','\", values) + \"')\",\n \"RETURNING id\"\n );\n } else {\n query = Database.compose(\n \"UPDATE case_workers SET\",\n \"person_id = \" + super.getId() + \",\",\n \"user_id = \" + getUser().getId() + \"\",\n \"WHERE id = \" + getId()\n );\n\n }\n\n Database.getInstance().query(query, rs -> {\n if (id == 0) {\n id = rs.getInt(1);\n }\n });\n }", "private String getPersistentId(ShibbolethResolutionContext resolutionContext) throws AttributeResolutionException {\n SAMLProfileRequestContext requestContext = resolutionContext.getAttributeRequestContext();\n ArrayList<PersistentIdEntry> entries = new ArrayList<PersistentIdEntry>();\n String localId = getLocalId(resolutionContext);\n\n try {\n DBCollection collection = db.getCollection(mongoCollection);\n BasicDBObject query = new BasicDBObject();\n query.put(\"localEntity\", requestContext.getLocalEntityId());\n query.put(\"peerEntity\", requestContext.getInboundMessageIssuer());\n query.put(\"localId\", localId);\n query.put(\"deactivationTime\", new BasicDBObject(\"$exists\", false));\n\n log.debug(\"Data connector {} trying to fetch persistentId for principal: {}\", getId(), localId);\n\n DBCursor result = collection.find(query);\n\n PersistentIdEntry entry;\n while(result.hasNext()) {\n DBObject r = result.next();\n entry = new PersistentIdEntry();\n entry.setLocalEntityId((String) r.get(\"localEntity\"));\n entry.setPeerEntityId((String) r.get(\"peerEntity\"));\n entry.setPrincipalName((String) r.get(\"principalName\"));\n entry.setPersistentId((String) r.get(\"persistentId\"));\n entry.setLocalId((String) r.get(\"localId\"));\n entry.setCreationTime((Date) r.get(\"creationTime\"));\n entry.setDeactivationTime((Date) r.get(\"deactivationTime\"));\n entry.setLastVisitTime(new Date());\n\n // Update last visit time\n BasicDBObject updateQuery = new BasicDBObject(\"$set\", new BasicDBObject(\"lastVisitTime\", entry.getLastVisitTime()));\n collection.update(r, updateQuery);\n\n entries.add(entry);\n }\n\n if (entries == null || entries.size() == 0) {\n log.debug(\"Data connector {} did not find a persistentId for principal: {}, generating a new one.\", getId(), localId);\n entry = createPersistentId(resolutionContext, localId);\n savePersistentId(entry);\n entries.add(entry);\n }\n } catch (MongoException e) {\n log.error(\"MongoDB query failed\", e);\n }\n\n return entries.get(0).getPersistentId();\n }", "protected void savePersistentId(PersistentIdEntry entry) {\n try {\n DBCollection collection = db.getCollection(mongoCollection);\n BasicDBObject query = new BasicDBObject();\n query.put(\"localEntity\", entry.getLocalEntityId());\n query.put(\"peerEntity\", entry.getPeerEntityId());\n query.put(\"principalName\", entry.getPrincipalName());\n query.put(\"localId\", entry.getLocalId());\n query.put(\"persistentId\", entry.getPersistentId());\n query.put(\"creationTime\", entry.getCreationTime());\n query.put(\"lastVisitTime\", entry.getLastVisitTime());\n\n collection.insert(query);\n\n } catch (MongoException e) {\n log.error(\"Failed to save persistent ID to the database\", e);\n }\n }", "public void setLastClearMessagesDate(Person person)\n{\nif(person==null || person.getNumber()==null)\n{\n return;\n}\n //HibernateUtil.trBegin();\nperson=getById(person.getNumber());\n\nsave(person);\n //HibernateUtil.trEnd();\n}", "Long onPassivate() {\n\t\treturn _personId;\n\t}", "void AddMeeting (Meeting m) throws Exception;", "public int addMeeting(Meeting meeting)\n throws Exception\n {\n Connection connection = null;\n int meetingId = -1;\n \n if(meeting == null)\n return -1;\n \n try\n {\n connection = ConnectionManager.getConnection();\n PreparedStatement pstmt = connection.prepareStatement(\"insert into meetings (project_id,title,start_time,end_time,meeting_notes,created_by,created_on) values (?,?,?,?,?,?,?)\", ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);\n pstmt.setInt(1, meeting.getProjectId());\n pstmt.setString(2, meeting.getTitle());\n \n // start time\n if(meeting.getStartTime() != null)\n { \n pstmt.setTimestamp(3, new Timestamp(meeting.getStartTime().getTimeInMillis()));\n }\n else\n { \n pstmt.setDate(3, null);\n }\n \n // end time\n if(meeting.getEndTime() != null)\n { \n pstmt.setTimestamp(4, new Timestamp(meeting.getEndTime().getTimeInMillis()));\n }\n else\n { \n pstmt.setDate(4, null);\n }\n \n // TODO: Add meeting notes.\n pstmt.setString(5, null);//meeting.getMeetingNotes());\n pstmt.setInt(6, meeting.getCreatedBy());\n pstmt.setTimestamp(7, new Timestamp(Calendar.getInstance().getTimeInMillis()));\n \n pstmt.executeUpdate();\n \n pstmt = connection.prepareStatement(\"select IDENTITY_VAL_LOCAL() from meetings\", ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);\n ResultSet rs = pstmt.executeQuery();\n meetingId = -1;\n if(rs.first())\n {\n meetingId = rs.getInt(1);\n \n //\n // Meeting Attendees...\n //\n if(meeting.getAttendees() != null && meeting.getAttendees().length > 0)\n {\n \tint attendees[] = meeting.getAttendees();\n \tpstmt = connection.prepareStatement(\"insert into meeting_attendees (meeting_id, account_id) values (?,?)\");\n \tfor(int i = 0; i < attendees.length; i++)\n \t{\n pstmt.setInt(1, meetingId);\n \t\tpstmt.setInt(2, attendees[i]);\n \t\tpstmt.addBatch();\n \t}\n \tpstmt.executeBatch();\n }\n \n //\n // Agenda Items\n //\n if(meeting.getAgendaItems() != null && meeting.getAgendaItems().length > 0)\n {\n MeetingAgendaItem agendaItems[] = meeting.getAgendaItems();\n pstmt = connection.prepareStatement(\"insert into meeting_agenda_items (meeting_id, title, notes, ordinal) values (?,?,?,?)\");\n // just leave notes null until we figure out how to present it.\n for(int i = 0; i < agendaItems.length; i++)\n {\n pstmt.setInt(1, meetingId);\n pstmt.setString(2, agendaItems[i].getTitle());\n pstmt.setString(3, null);\n pstmt.setInt(4, i);\n \n pstmt.addBatch();\n }\n pstmt.executeBatch();\n }\n \n //\n // Followup Items\n //\n if(meeting.getFollowupItems() != null && meeting.getFollowupItems().length > 0)\n {\n MeetingFollowupItem followupItems[] = meeting.getFollowupItems();\n pstmt = connection.prepareStatement(\"insert into meeting_followup_items (meeting_id, title, text, ordinal) values (?, ?, ?, ?)\");\n \n for(int i = 0; i < followupItems.length; i++)\n {\n pstmt.setInt(1, meetingId);\n //pstmt.setString(2, followupItems[i]);\n pstmt.setString(3, null);\n pstmt.setInt(4, i);\n \n pstmt.addBatch();\n }\n pstmt.executeBatch();\n }\n }\n \n rs.close();\n pstmt.close();\n }\n catch(SQLException se)\n {\n se.printStackTrace();\n }\n catch(Exception e)\n {\n \te.printStackTrace();\n }\n finally\n {\n try\n {\n if(connection != null)\n {\n connection.close();\n }\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n }\n \n return meetingId;\n }", "public final Long save() {\n\t\tid = Ollie.save(this);\n\t\tOllie.putEntity(this);\n\t\tnotifyChange();\n\t\treturn id;\n\t}", "int getEnterId();", "int getEnterId();", "int getEnterId();", "int getEnterId();", "void saveOrUpdateElective(Long id, String meetingName, Long lecturerId,\r\n\t\t\tList<Long> roomIds, Long cohortId, int numberOfAppointments,\r\n\t\t\tDate startDate, Date endDate);", "String getExistingId();", "public long getPersonId();", "void lookupAndSaveNewPerson();", "public void putMeetingOnly(Meeting meeting) throws Exception;", "public void setPersonId(long personId);", "public Integer getCreatedPersonId() {\n return createdPersonId;\n }", "public void insertMeetingRecord(Meeting meeting) {\n SQLiteDatabase db = dbHelper.getDatabase();\n ContentValues cv = new ContentValues();\n\n // Note: derived from RaceDay.xml.\n cv.put(SchemaConstants.MEETING_DATE, meeting.getMeetingDate());\n cv.put(SchemaConstants.MEETING_ABANDONED, meeting.getAbandoned());\n cv.put(SchemaConstants.MEETING_VENUE, meeting.getVenueName());\n cv.put(SchemaConstants.MEETING_HI_RACE, meeting.getHiRaceNo());\n cv.put(SchemaConstants.MEETING_CODE, meeting.getMeetingCode());\n cv.put(SchemaConstants.MEETING_ID, meeting.getMeetingId());\n cv.put(SchemaConstants.MEETING_TRACK_DESC, meeting.getTrackDescription());\n cv.put(SchemaConstants.MEETING_TRACK_RATING, meeting.getTrackRating());\n cv.put(SchemaConstants.MEETING_WEATHER_DESC, meeting.getTrackWeather());\n\n try {\n db.beginTransaction();\n db.insertOrThrow(SchemaConstants.MEETINGS_TABLE, null, cv);\n db.setTransactionSuccessful();\n } catch (SQLException ex) {\n Log.d(context.getClass().getCanonicalName(), ex.getMessage());\n } finally {\n db.endTransaction();\n }\n }", "@Override\n\tpublic void saveQuestion(Domanda domanda) {\n\t\tint lastID = getLastID()+1;\n\t\tdomanda.setId(lastID);\n\t\tDB db = getDB();\n\t\tMap<Long, Domanda> domande = db.getTreeMap(\"domande\");\n\t\tlong hash = (long) domanda.getId().hashCode();\n\t\tdomande.put(hash, domanda);\n\t\tdb.commit();\n\t}", "static void saveUserDeadline(Context context, Date deadline) {\n\n context.getSharedPreferences(FILE_NAME, 0)\n .edit()\n .putLong(USER_DEADLINE_KEY, deadline.getTime())\n .apply();\n }", "public void setCurrentPersonId(int personId) {\n currentPersonId = personId;\n }", "public int getPeopleActivityInstanceId()\r\n {\r\n return mPeopleActivityInstanceId;\r\n }", "String getTheirPartyId();", "void receiveTransaction(IMeeting meeting, String userId);", "public void savePerson() {\n\t\tSystem.out.println(\"save person\");\n\t}", "public void savePerson() {\n\t\tSystem.out.println(\"save person\");\n\t}", "@Override\n public void saveCase(int currentUserID) {\n IDNum = Business.getInstance().getData().saveCase(this, info);\n Business.getInstance().getData().saveCreatedCaseLog(currentUserID, \n IDNum, \n Business.getInstance().getCalendar().getTodaysDateString(), \n Business.getInstance().getCalendar().getTodaysTimeString());\n \n }", "public String GiveEventID(){\n \tRandom x = new Random();\n \tString pool = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\n \tString newid = \"\";\n \tfor(int i = 0;i<26;i++){\n \t\tnewid+=pool.charAt(x.nextInt(36));\n \t}\n \tJSONArray ja = fetchAllNotes(TimeT.getName(),new String[] {TimeT.getFields()[0]},new String[] {newid});\n \tif(ja.length()!=0)\n \t\tnewid = GiveEventID();\n \treturn newid;\n \t\n }", "public int getLastUserId();", "public int getLastAliveId() {\n\t\treturn this.aliveId;\n\t}", "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 }", "public void savePerson() {\n\t\tSystem.out.println(\"save--person\");\n\t}", "@Override\n public void create(ScheduledInterview scheduledInterview) {\n long generatedId = new Random().nextLong();\n ScheduledInterview storedScheduledInterview =\n ScheduledInterview.create(\n generatedId,\n scheduledInterview.when(),\n scheduledInterview.interviewerId(),\n scheduledInterview.intervieweeId(),\n scheduledInterview.meetLink(),\n scheduledInterview.position(),\n scheduledInterview.shadowId());\n data.put(generatedId, storedScheduledInterview);\n }", "public void setParticipantsToday (byte p) {\n\t\tParticipantsToday = p;\n\t}", "public int getId(){\r\n return localId;\r\n }", "@Override\n\tpublic int writeRecord(int meetingID, Object o, String username) {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long getCreateBy() {\n\t\treturn _candidate.getCreateBy();\n\t}", "@Override\r\n\tpublic String addnewMeeting(String userID, String roomID, Date startDate, Date endDate) {\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"in addition\");\r\n\t\tSession session = factory.openSession();\r\n\t\tsession.beginTransaction();\r\n\t\t\r\n\t\t\r\n\t\tUser user=new User();\r\n\t\tuser.setUserID(userID);\r\n\r\n\t\tMeetingRoom meetingRoom=new MeetingRoom();\r\n\t\tmeetingRoom.setmRoomID(roomID);\r\n\t\t\r\n\t\tMeetingTimings meetingTimings=new MeetingTimings();\r\n\t\tmeetingTimings.setEndTime(endDate);\r\n\t\tmeetingTimings.setStartTime(startDate);\r\n\t\t\r\n\t\tmeetingTimings.setMeetingRoom(meetingRoom);\r\n\t\t\r\n\t\tBookedMeeting meeting=new BookedMeeting();\r\n\t\tmeeting.setEndTime(endDate);\r\n\t\tmeeting.setStartTime(startDate);\r\n\t\tmeeting.setBookingID(userID+\"-\"+roomID+\"-\"+meetingTimings.getStartTime().hashCode()+\"-\"+meetingTimings.getEndTime().hashCode());\r\n\t\tmeeting.setMeetingRoom(meetingRoom);\r\n\t\tmeeting.setUser(user);\r\n\t\t\r\n\t\t//uncomment to add new user or meeting room\r\n\t\t//session.save(user);\r\n\t\t//session.save(meetingRoom);\r\n\t\t\r\n\t\ttry {\r\n\t\t\tsession.save(meetingTimings);\r\n\t\t}\r\n\t\tcatch(HibernateException E) {\r\n\t\t\tSystem.out.println(\"Exception caught while saving meeting timings\"+E);\r\n\t\t}\r\n\t\t\r\n\t\ttry{\r\n\t\t\tsession.save(meeting);\r\n\t\t}\r\n\t\tcatch(HibernateException E) {\r\n\t\t\tSystem.out.println(\"Exception caught while saving meeting booked\"+E);\r\n\t\t\t\r\n\t\t}\r\n\t\t// session.persist(entity);\r\n\t\ttry{\r\n\t\t\tsession.getTransaction().commit();\r\n\t\t\tsession.close();\r\n\t\t}\r\n\t\tcatch(Exception E) {\r\n\t\t\tSystem.out.println(\"Exception caught while saving and closing session\"+E);\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\t\r\n\t\t\r\n\t return \"success\";\r\n\r\n\t}", "public Meeting getMeeting(String id) throws Exception;", "public static Result meet(Integer id) {\n Skier loggedInSkier = Session.authenticateSession(request().cookie(COOKIE_NAME));\n if(loggedInSkier==null)\n return redirect(\"/\");\n else {\n\n String time = Form.form().bindFromRequest().get(\"time\");\n List<Skier> skierList = new ArrayList<Skier>();\n skierList.add(loggedInSkier);\n skierList.add(Skier.FIND.byId(id));\n String lift = Form.form().bindFromRequest().get(\"lift\");\n DateFormat df = new SimpleDateFormat(\"HH:mm\");\n Meeting m;\n try {\n Calendar calDate = Calendar.getInstance();\n Calendar calTime = Calendar.getInstance();\n calTime.setTime(new Date(df.parse(time).getTime()));\n calDate.set(Calendar.HOUR_OF_DAY, calTime.get(Calendar.HOUR_OF_DAY));\n calDate.set(Calendar.MINUTE, calTime.get(Calendar.MINUTE));\n calDate.set(Calendar.SECOND, 0);\n\n m= new Meeting(Lift.getByName(lift), skierList, calDate.getTime());\n m.save();\n } catch (Exception e) {\n return ok(toJson(e));\n }\n return ok(toJson(Meeting.getBySkier(loggedInSkier)));\n }\n }", "private void saveMeetup() {\n if (!binding.infoField.getText().toString().isEmpty()) {\n PassNewInfo mHost = (PassNewInfo) this.getTargetFragment();\n mHost.passMeetupInformation(type.toLowerCase(), binding.infoField.getText().toString());\n }\n dismiss();\n }", "public BookedActivity getNewlyAddSavedTrip();", "private long getOwnID(){\n return authenticationController.getMember() == null ? -1 :authenticationController.getMember().getID();\n }", "void setUserCreated(final Long userCreated);", "public void saveJob(View v){\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference mySavedJobsRef = database.getReference(\"Users\").child(currentUser.getUid().toString()).child(\"savedjobs\");\n //Dont save your own jobs\n if(!currentUser.getUid().toString().equals(jobPost.getUserid())) {\n mySavedJobsRef.addListenerForSingleValueEvent(\n new ToggleAddIDVEListener(ViewSingleJobActivity.this,jobPost.getPostid()));\n }\n }", "int getOwnerID();", "private void save() {\n Saver.saveTeam(team);\n }", "@Override\r\n\tpublic void save(ExecuteTask executeTask) {\n\t\tString sql = \"INSERT INTO executetask(et_member_id,et_task_id,et_comments) VALUES(?,?,?)\";\r\n\t\tupdate(sql,executeTask.getMemberId(),executeTask.getTaskId(),executeTask.getComments());\r\n\t}", "@Override\n\tpublic void save(HrUserPoint hrUserPoint) {\n\t\tthis.sessionFactory.getCurrentSession().save(hrUserPoint);\n\t}", "public int getParticipantId() {\r\n\t\treturn participantId;\r\n\t}", "Long getUserCreated();", "void updateLastAccessed(int id);", "public static void saveNewestMeetingDate(long timestamp) {\n SP_UTILS.put(SPDataConstant.KEY_LAST_MEETING_PUBLISH_DATE, timestamp);\n }", "public void savePatientDetails(View view){\r\n\t\tsaveToSQLite();\r\n createCalendarEntry();\r\n\t\tToast.makeText(this, \"Saved. Reminder created.\", Toast.LENGTH_SHORT).show();\r\n\t}", "private void saveTask(){\n \tZadatakApp app = (ZadatakApp)getApplicationContext();\n \t\n \tTask task = new Task();\n \ttask.set(Task.Attributes.Name, nameText);\n \ttask.set(Task.Attributes.Duedate, datePicker);\n \ttask.set(Task.Attributes.Hours, lengthText);\n \ttask.set(Task.Attributes.Progress, progressBar);\n \ttask.set(Task.Attributes.Priority, priorityBox);\n \t\n \t// Save it to the database either as a new task or over an old task\n \tif (editmode) { app.dbman.editTask(id, task); }\n \telse { app.dbman.insertTask(task); }\n \t\n \t// A task has been added or changed, rescedule\n \tapp.schedule();\n \t\n \tapp.toaster(\"NEW / EDITED TASK\");\n \t\n \t// Quit the activity\n \tfinish();\n }", "String getCreatorId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "public 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 }", "public void savePerson() {\n\t\tthis.personService.savePerson();\n\t}", "private int getTeacherID(){\n return getSharedPreferences(\"TEACHER_INFO\", Context.MODE_PRIVATE).\n getInt(\"ID_TEACHER\",0);\n }", "private void saveTournament(Tournament tournament) {\n System.out.println(\"Saving\");\n TournamentEntity entity = new TournamentEntity();\n entity.setId(tournament.getId());\n entity.setWinnerId(tournament.getFightersRemaining().get(0).getId());\n tournamentRepository.save(entity);\n }", "protected void recordPatientVisit() {\r\n\r\n\t\t// obtain unique android id for the device\r\n\t\tString android_device_id = Secure.getString(getApplicationContext().getContentResolver(),\r\n Secure.ANDROID_ID); \r\n\t\t\r\n\t\t// add the patient record to the DB\r\n\t\tgetSupportingLifeService().createPatientAssessment(getPatientAssessment(), android_device_id);\r\n\t}", "public void savePendingRequest(PendingRequest pendingRequest);", "public int getPersonId() {\n return personId;\n }", "public java.lang.String getCreatedById() {\r\n return createdById;\r\n }", "public java.lang.String getCreatedById() {\r\n return createdById;\r\n }", "public void setCreatedByUser(long createdByUser);", "public String getCreatepersonid() {\r\n return createpersonid;\r\n }", "UserInfo setId(long id);", "public static void storeID(long l, Context cont)\n\t{\n\t\tSharedPreferences.Editor editor = cont.getSharedPreferences(\"StatPump\", 0).edit();\n\t\teditor.putLong(\"Use ID\", l);\n\t\teditor.commit();\n\t}", "private String getNewConversationId( )\r\n {\r\n return UUID.randomUUID( ).toString( );\r\n }", "private void saveCopyPresentationForSync(String presentationId, String userId, String accountId, String newPresentationId) {\n\t\t\n\t}", "public void saveDetails() {\n\t\tTimelineUpdater timelineUpdater = TimelineUpdater.getCurrentInstance(\":mainForm:timeline\");\n\t\tmodel.update(event, timelineUpdater);\n\n\t\tFacesMessage msg =\n\t\t new FacesMessage(FacesMessage.SEVERITY_INFO, \"The booking details \" + getRoom() + \" have been saved\", null);\n\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\t}", "java.lang.String getFriendId();" ]
[ "0.6151675", "0.57801014", "0.57732415", "0.57566607", "0.5718748", "0.5667488", "0.5552365", "0.55135536", "0.55035734", "0.54712856", "0.54326606", "0.5421438", "0.54112947", "0.5406151", "0.5381622", "0.5381622", "0.5381622", "0.5381622", "0.53803325", "0.5339141", "0.53382295", "0.53294605", "0.5309032", "0.5305953", "0.52623343", "0.52369684", "0.5232593", "0.5229378", "0.5217362", "0.5209569", "0.5203921", "0.52026147", "0.5190484", "0.5190484", "0.51846015", "0.5182741", "0.5173566", "0.5167188", "0.5158794", "0.51537466", "0.5152261", "0.5141129", "0.5140465", "0.5139603", "0.5135364", "0.51195914", "0.511341", "0.50951016", "0.5084329", "0.50634974", "0.50541884", "0.504792", "0.5041791", "0.5038305", "0.5036405", "0.50257516", "0.5020715", "0.5014098", "0.49966365", "0.49935293", "0.4988158", "0.4986822", "0.49799782", "0.49735808", "0.49731362", "0.49731362", "0.49731362", "0.49731362", "0.49731362", "0.49731362", "0.49731362", "0.49731362", "0.49731362", "0.49731362", "0.49731362", "0.49731362", "0.49731362", "0.49731362", "0.49731362", "0.49731362", "0.49731362", "0.49731362", "0.49731362", "0.49638167", "0.49635282", "0.49584454", "0.49568728", "0.49551886", "0.49543425", "0.4953184", "0.4952053", "0.4952053", "0.49488157", "0.49481064", "0.49383348", "0.49307922", "0.49299657", "0.49229398", "0.4918381", "0.4918306" ]
0.69388175
0
Get the id of the last chairperson
public static int getLastMeetingHostId() { return SP_UTILS.getInt(SPDataConstant.KEY_LAST_MEETING_HOST_ID, SPDataConstant.VALUE_LAST_MEETING_HOST_ID_DEFAULT); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int getLastID() {\n\t\t\n\t\tArrayList<Integer> domandeIdList = new ArrayList<>();\n\t\tdomandeIdList.add(0);\n\t\tDB db = getDB();\n\t\tMap<Long, Domanda> domande = db.getTreeMap(\"domande\");\n\t\t\n\t\tfor(Map.Entry<Long, Domanda> domanda : domande.entrySet())\n\t\t\tif(domanda.getValue() instanceof Domanda)\n\t\t\t\tdomandeIdList.add(domanda.getValue().getId());\n\t\t\n\t\tInteger id = Collections.max(domandeIdList);\n\t\treturn id;\n\t}", "public ResultSet getLastPatientId() {\n\t\t\n\t\treturn dbObject.select(\"SELECT `patientId` FROM `patients` ORDER BY patientId DESC LIMIT 1\");\n\t}", "@Override\r\n\tpublic int getLastId() {\n\t\treturn adminDAO.getLastId();\r\n\t}", "public int getHighestChromID();", "private static int getNextID() {\n return persons.get(persons.size() - 1).getId() + 1;\n }", "@Query(value = \"select last_insert_id() from orden limit 1;\",nativeQuery = true)\n\tpublic Integer getLastId();", "private int getLastIDRisposte() {\n\n\t\tArrayList<Integer> risposteIdList = new ArrayList<>();\n\t\trisposteIdList.add(0);\n\t\tDB db = getDB();\t\t\n\t\tMap<Long, Risposta> risposte = db.getTreeMap(\"risposte\");\n\t\t\n\t\tfor(Map.Entry<Long, Risposta> risposta : risposte.entrySet())\n\t\t\tif(risposta.getValue() instanceof Risposta)\n\t\t\t\trisposteIdList.add(risposta.getValue().getId());\n\t\t\n\t\tInteger id = Collections.max(risposteIdList);\n\t\treturn id;\n\t}", "public int getLastUserId();", "private void getLastId() {\n for (int i = 0; i < remindersTable.getRowCount(); i++) {\n if (parseInt(remindersTable.getValueAt(i, 7).toString()) > maxId) {\n maxId = parseInt(remindersTable.getValueAt(i, 7).toString());\n }\n }\n }", "public Integer getLastUpdatorId() {\n return lastUpdatorId;\n }", "public int getLastAliveId() {\n\t\treturn this.aliveId;\n\t}", "public long getPersonId();", "@Override\n public Long getLastInsertId() {\n Long lastId = 0L;\n Map<String, Object> paramMap = new HashMap<>();\n paramMap.put(\"lastID\", lastId);\n jdbc.query(SELECT_LAST_INSERT_ID, paramMap, rowMapper);\n return lastId;\n }", "public static int idUltimoRegistroEntradaSalida(){\n\t\tint idRegistro=-1;\n\t\tString sql = \"SELECT MAX(id) as ultimoId FROM registro_entrada_salida\";\n\t\tPreparedStatement comando;\n\t\tResultSet resultadoConsulta;\n\t\ttry {\n\t\t\tcomando = conexion.prepareStatement(sql);\n\t\t\tresultadoConsulta = comando.executeQuery();\n\t\t\twhile(resultadoConsulta.next()){\n\t\t\t\tidRegistro = resultadoConsulta.getInt(\"ultimoId\");\n\t\t\t}\n\t\t\treturn idRegistro;\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 idRegistro;\n\t}", "public static int getLastPesananID(){\n return LAST_PESANAN_ID;\n }", "String getLastInt();", "public int getMaxID(){\n return recipes.get(recipes.size() - 1).getID();\n }", "public int getLastSavedId() {\n\t\tNativeQuery query = session.createNativeQuery(\"SELECT Id FROM terms ORDER BY Id DESC LIMIT 1\");\n\t\t// int lastUpdatedValue=(int)query;\n\t\tint lastUpdatedValue = ((Number) query.getSingleResult()).intValue();\n\t\tSystem.out.println(\"the result is\" + lastUpdatedValue);\n\t\treturn lastUpdatedValue;\n\t}", "@Override\n\tpublic String getId() {\n\t\tString pName = ctx.getCallerPrincipal().getName();\n\t\tPerson p = userEJB.findPerson(pName);\n\t\tString id = p.getId()+\"\";\n\t\treturn id;\n\t\t\n\t}", "public Long getMaxHospitalID() {\n\t\tConnection conn = null; // Resets the connection to the database\n\t\tLong max = new Long(0);\n\t\t\n\t\ttry {\n\t\t\tconn = dataSource.getConnection();\n\t\t\t\n\t\t\tString sql = \"Select max(id) from hospital\";\n\t\t\tPreparedStatement ps = conn.prepareStatement(sql);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\t\n\t\t\tif (rs.next()) {\n\t\t\t\tmax = rs.getLong(1);\n\t\t\t}\n\t\t\t\n\t\t\trs.close();\n\t\t\tps.close();\n\t\t\treturn max;\n\t\t} catch (SQLException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t} finally {\n\t\t\tif (conn != null) {\n\t\t\t\ttry {\n\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException e) {}\n\t\t\t}\n\t\t}\n\t}", "public long getLastTweetId() {\n return tweetAdapter.getItem(tweetAdapter.getCount()-1).getTweetId();\n }", "int getMaxID() throws DatabaseNotAccessibleException;", "protected long getLastUID() throws Exception {\n\t\tif(psmt != null) {\n\t\t\tResultSet rs = psmt.getGeneratedKeys();\n\t\t\tif(rs.next())\n\t\t\t\treturn rs.getLong(1);\n\t\t}\n\t\treturn -1L;\n\t}", "public int getLast() {\n\treturn _last;\n }", "protected abstract int getLastTokenId();", "public static int getMaxId() {\r\n\t\treturn maxId++;\r\n\t}", "@Override\n\tpublic long getLastSavedId() throws SQLException {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int getMaxID() {\n\t\tResultSet resultSet = null;\n\t\tint max = 0;\n\t\ttry {\n\t\t\tresultSet = DBManager.getInstance().readFromDB(\"SELECT max(planeid) from fleet\");\n\t\t\tresultSet.next();\n\t\t\tmax = resultSet.getInt(1);\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif(max == 0) {\n\t\t\treturn 999;\n\t\t}\n\t\treturn max;\n\t}", "public int getLast() {\n\t\treturn last;\n\t}", "public jkt.hms.masters.business.Users getLastChgBy () {\n\t\treturn lastChgBy;\n\t}", "public jkt.hms.masters.business.Users getLastChgBy () {\n\t\treturn lastChgBy;\n\t}", "public jkt.hms.masters.business.Users getLastChgBy () {\n\t\treturn lastChgBy;\n\t}", "public int getHighestId() {\n final SQLiteStatement statement = db.compileStatement(\"SELECT MAX(_id) FROM Games\");\n return (int) statement.simpleQueryForLong();\n }", "public Integer generateID(){\n String sqlSelect = \"SELECT max(id) from friends\";\n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n int maxId=0;\n try {\n connection = new DBConnection().connect();\n statement = connection.createStatement();\n resultSet = statement.executeQuery(sqlSelect);\n while (resultSet.next())\n maxId = resultSet.getInt(1);\n \n } catch (SQLException e) {\n System.err.print(\"err in select \" + e);\n } finally {\n try {\n if (resultSet != null) {\n resultSet.close();\n }\n if (statement != null) {\n statement.close();\n }\n if (connection != null) {\n connection.close();\n }\n } catch (SQLException e) {\n System.err.print(\"err in close select \" + e);\n }\n }\n\n return ++maxId;\n }", "public Long getIdPerson() {\n\t\treturn this.idPerson;\n\t}", "private static String getLastDateFromDb(int personsId) {\n String lastDate = \"\";\n String lastDateQuery = \"SELECT lastdate FROM users WHERE idusers = \" + personsId + \";\";\n ResultSet resultDate = DbConnector.selectQuery(lastDateQuery);\n try {\n resultDate.next();\n lastDate = resultDate.getString(\"lastdate\");\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n }\n if (lastDate==null) {\n lastDate = \"\";\n }\n return lastDate;\n }", "@Override\n public Persona Last() {\n return array.get(tamano - 1);\n }", "int getOtherId();", "@Override\n\tpublic long getId() {\n\t\treturn _phieugiahan.getId();\n\t}", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "public Integer getLastUpdUserId() {\n return (Integer) get(6);\n }", "private static synchronized String getNextID() {\r\n\t\tlastID = lastID.add(BigInteger.valueOf(1));\r\n\t\t\r\n\t\treturn lastID.toString();\r\n\t}", "private long generateID() {\n\t\treturn ++lastID;\n\t}", "public synchronized String getLastPostId() {\n try {\n this.connect();\n Post lastPost = linkedin.groupOperations().getGroupDetails(groupId).getPosts().getPosts().get(0);\n return lastPost.getId();\n } catch (Exception e) {\n log.debug(\"An exception occured when reading id of the last inserted post from group: \" + groupId);\n }\n return null;\n }", "Integer getId();", "Integer getId();", "Integer getId();", "public int getLastOrderId() {\r\n ArrayList<OrderRecord> result = new ArrayList<>();\r\n String sqlQuery = \"SELECT * FROM `orders`\";\r\n try {\r\n PreparedStatement p = myConn.prepareStatement(sqlQuery);\r\n ResultSet rs = p.executeQuery(sqlQuery);\r\n rs.last();\r\n return rs.getInt(\"id\");\r\n } catch (Exception e) {\r\n System.out.println(\"Could not get orders \" + e.toString());\r\n System.out.println(myStmt);\r\n }\r\n return 0;\r\n }", "String getCreatorId();", "public Object getLastPageIdentifier()\n {\n return firstWizardPage.getIdentifier();\n }", "public int getLastScrnSetId()\n\t{\n\t\treturn lastScrnSetId;\n\t}", "public Integer getIdPerson() {\r\n return idPerson;\r\n }", "Integer getID();", "Integer getID();", "@Override\r\n\tpublic int selectLastNo() {\n\t\treturn sqlSession.selectOne(namespace + \".selectLastNo\");\r\n\t}", "@Override\r\n\tpublic int selectLastNo() {\n\t\treturn sqlSession.selectOne(namespace + \".selectLastNo\");\r\n\t}", "public java.lang.String getLastChgBy () {\n\t\treturn lastChgBy;\n\t}", "public java.lang.String getLastChgBy () {\n\t\treturn lastChgBy;\n\t}", "java.lang.String getID();", "public java.lang.String getLastChgBy() {\n\t\treturn lastChgBy;\n\t}", "public int getUniqueID() { \n return -1;\n }", "@Override\r\n\tpublic Integer getCurrentInsertID() throws Exception {\n\t\treturn sqlSession.selectOne(namespaceOrder+\".getLastInsertID\");\r\n\t}", "public Employe findLastHired() {\n\t\treturn null;\n\t}", "private int generateNewId() {\n int size = userListCtrl.getUsers().size();\n \n if (size == 0) {\n return 1;\n } else {\n return userListCtrl.getUsers().get(size-1).getUserID()+1;\n }\n }", "@Override\n\tpublic String getMaxSetId() throws RemoteException {\n\t\treturn dao.getMaxSetId();\n\t}", "public Integer getLastDealPersonType() {\n return lastDealPersonType;\n }", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();" ]
[ "0.7495251", "0.6943902", "0.6911638", "0.68412757", "0.68127185", "0.6748643", "0.6698436", "0.660548", "0.65882033", "0.6512735", "0.6445519", "0.6399903", "0.6394987", "0.63556975", "0.6347056", "0.6311893", "0.6309847", "0.6262828", "0.62454313", "0.62344694", "0.6191578", "0.61799115", "0.6159127", "0.61521995", "0.6147398", "0.61396253", "0.61075884", "0.61026275", "0.60999614", "0.60818666", "0.60818666", "0.60818666", "0.6024975", "0.6018273", "0.6015097", "0.6006797", "0.5980645", "0.5975947", "0.5974934", "0.5949408", "0.5949408", "0.5949408", "0.5949408", "0.5949408", "0.5949408", "0.5949408", "0.5949408", "0.5949408", "0.5949408", "0.5949408", "0.5949408", "0.5949408", "0.5949408", "0.5949408", "0.5949408", "0.5949408", "0.5949408", "0.5949408", "0.5944507", "0.59397286", "0.5920269", "0.5910973", "0.59042394", "0.59042394", "0.59042394", "0.5904132", "0.58955747", "0.5892023", "0.589182", "0.58895934", "0.58853626", "0.58853626", "0.5882205", "0.5882205", "0.5880934", "0.5880934", "0.5872654", "0.5863356", "0.5861928", "0.58381957", "0.5834312", "0.58316875", "0.5828652", "0.5824263", "0.5817894", "0.5817894", "0.5817894", "0.5817894", "0.5817894", "0.5817894", "0.5817894", "0.5817894", "0.5817894", "0.5817894", "0.5817894", "0.5817894", "0.5817894", "0.5817894", "0.5817894", "0.5817894" ]
0.608617
29
Save the id of the most recent creator
public static void saveNewestUserId(int userId) { SP_UTILS.put(SPDataConstant.KEY_NEWEST_USER_ID, userId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Long getCreator() {\n return creator;\n }", "public void setCreator(Long creator) {\n this.creator = creator;\n }", "public long getCreatorUserId() {\n return creatorUserId;\n }", "public String getCreatorId() {\n return creatorId;\n }", "public String getCreatorId() {\n return creatorId;\n }", "public java.lang.Integer getCreatorId() {\n return creatorId;\n }", "String getCreatorId();", "public Integer getCreator() {\n return creator;\n }", "public void setCreator(User creator) {\n this.creator = creator;\n }", "public String getCreatorId() {\n return this.CreatorId;\n }", "public void setCreator(Integer creator) {\n this.creator = creator;\n }", "public WhoAmI getCreatorID() {\r\n\t\treturn myCreatorId;\r\n\t}", "public void setCreatorId(java.lang.Integer creatorId) {\n this.creatorId = creatorId;\n }", "public void setCreatorId(String creatorId) {\n this.creatorId = creatorId;\n }", "public void setCreatorUserId(long creatorUserId) {\n this.creatorUserId = creatorUserId;\n }", "@VTID(13)\r\n int getCreator();", "@Override\n\tpublic long getCreateBy() {\n\t\treturn _candidate.getCreateBy();\n\t}", "int getCreatedBy();", "public int getLastUserId();", "public User getCreator() {\n return this.creator;\n }", "public int getCreatedBy();", "public int getCreatedBy();", "public int getCreatedBy();", "public int getCreatedBy();", "public int getCreatedBy();", "public int getCreatedBy();", "public int getCreatedBy();", "public int getCreatedBy();", "public int getCreatedBy();", "public int getCreatedBy();", "public int getCreatedBy();", "public int getCreatedBy();", "public int getCreatedBy();", "public String getCreator() {\n return this.creator;\n }", "public Long getCreatedBy() {\n return createdBy;\n }", "public Long getCreatedBy() {\n return createdBy;\n }", "public Long getCreatedBy() {\n return createdBy;\n }", "public Long getCreatedBy() {\n return createdBy;\n }", "public long getCreatedByUser();", "public String getCreator() {\r\n return creator;\r\n }", "public String getCreator() {\r\n return creator;\r\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public void setCreator(String creator) {\n this.creator = creator;\n }", "public void setCreator(String creator) {\n this.creator = creator;\n }", "public void setCreator(String creator) {\n this.creator = creator;\n }", "public void setCreator(String creator) {\n this.creator = creator;\n }", "public void setCreator(String creator) {\n this.creator = creator;\n }", "public Long getCreatedBy() {\n\t\treturn createdBy;\n\t}", "public void setCreatorId(String creatorId) {\n this.creatorId = creatorId == null ? null : creatorId.trim();\n }", "public User getCreator() {\n\t\treturn creatorId != null ? (User) User.findById(creatorId) : null;\n\t}", "public void setCreatedByUser(long createdByUser);", "public String getCreator() {\n\t\treturn creator;\n\t}", "public String getCreatorGuid() {\n return creatorGuid;\n }", "public Integer getCreateby() {\n return createby;\n }", "public void setCreator(String creator) {\n\t\tthis.creator = creator;\n\t}", "public Long getCreateBy() {\n return createBy;\n }", "public Long getCreateBy() {\n return createBy;\n }", "public Long getCreateBy() {\n return createBy;\n }", "public Long getCreateBy() {\n return createBy;\n }", "public SystemUserBO getCreator()\n {\n if (_creator == null)\n {\n _creator = new SystemUserBO(_model.getCreator());\n }\n return _creator;\n }", "public int getDoc_User_ID() {\n return getCreatedBy();\n }", "public ParseUser getCreator() {\n try {\n return fetchIfNeeded().getParseUser(\"creator\");\n }\n catch(ParseException e) {\n Log.d(TAG, \"Error in retrieving the creator: \" + e);\n return null;\n }\n }", "public String getCreatedBy(){\r\n\t\treturn createdBy;\r\n\t}", "@Override\n public void save() {\n String query = null;\n super.save();\n ((DataUser) user).save();\n\n if (getId() == 0) {\n String[] values = {super.getId() + \"\", \"\" + getUser().getId()};\n\n query = Database.compose(\n \"INSERT INTO case_workers (person_id, user_id)\",\n \"VALUES('\" + String.join(\"','\", values) + \"')\",\n \"RETURNING id\"\n );\n } else {\n query = Database.compose(\n \"UPDATE case_workers SET\",\n \"person_id = \" + super.getId() + \",\",\n \"user_id = \" + getUser().getId() + \"\",\n \"WHERE id = \" + getId()\n );\n\n }\n\n Database.getInstance().query(query, rs -> {\n if (id == 0) {\n id = rs.getInt(1);\n }\n });\n }", "int getOwnerID();", "public void setCreatorId(String CreatorId) {\n this.CreatorId = CreatorId;\n }", "public String getCreatedBy() {\r\n return createdBy;\r\n }", "public String getCreatedBy() {\r\n return createdBy;\r\n }", "public String getCreatedBy() {\r\n return createdBy;\r\n }", "public void setCreator(SystemUserBO creator)\n {\n _creator = creator;\n _model.setCreator(creator.getModel());\n }", "public Number getCreatedBy()\n {\n return (Number)getAttributeInternal(CREATEDBY);\n }", "public User getCreatedBy()\n\t{\n\t\treturn (User) this.getKeyValue(\"Created_By\");\n\n\t}", "@Override\r\n\tpublic int getLastId() {\n\t\treturn adminDAO.getLastId();\r\n\t}", "public String getCreatedBy() {\n return createdBy;\n }", "public java.lang.Integer getCreatedby() {\n\treturn createdby;\n}", "public Integer getCreatedUserId() {\n return (Integer) get(4);\n }", "public Number getCreatedBy() {\n return (Number)getAttributeInternal(CREATEDBY);\n }", "public Number getCreatedBy() {\n return (Number)getAttributeInternal(CREATEDBY);\n }", "public Number getCreatedBy() {\n return (Number)getAttributeInternal(CREATEDBY);\n }", "public Number getCreatedBy() {\n return (Number)getAttributeInternal(CREATEDBY);\n }", "public Number getCreatedBy() {\n return (Number)getAttributeInternal(CREATEDBY);\n }", "public Number getCreatedBy() {\n return (Number)getAttributeInternal(CREATEDBY);\n }", "void setCreateby(final U createdBy);", "@ApiModelProperty(value = \"Id of the user who created the record.\")\n public Long getCreatedBy() {\n return createdBy;\n }", "public String getCreatedBy() {\r\n\t\treturn createdBy;\r\n\t}", "public Number getCreatedBy() {\n return (Number) getAttributeInternal(CREATEDBY);\n }", "public Number getCreatedBy() {\n return (Number) getAttributeInternal(CREATEDBY);\n }", "long getOwnerIdLong();", "public java.lang.String getCreatedBy() {\r\n return createdBy;\r\n }", "public void setCreatedBy(Number value)\n {\n setAttributeInternal(CREATEDBY, value);\n }", "public Integer getCreatedUserId() {\n return this.createdUserId;\n }", "public Integer getCreatedUserId() {\n return this.createdUserId;\n }", "public String getCreatedBy() {\n return this.createdBy;\n }" ]
[ "0.7132835", "0.70040065", "0.69544756", "0.69104666", "0.69104666", "0.6890338", "0.6845165", "0.6725958", "0.6680691", "0.66112083", "0.65978384", "0.6555376", "0.6550123", "0.65200496", "0.6484367", "0.6462117", "0.6412706", "0.6376716", "0.6332117", "0.62475324", "0.62211055", "0.62211055", "0.62211055", "0.62211055", "0.62211055", "0.62211055", "0.62211055", "0.62211055", "0.62211055", "0.62211055", "0.62211055", "0.62211055", "0.62211055", "0.6202924", "0.6195766", "0.6195766", "0.6195766", "0.6195766", "0.61683875", "0.6166172", "0.6166172", "0.6149931", "0.6149931", "0.6149931", "0.6149931", "0.6149931", "0.6149931", "0.6149931", "0.6149931", "0.6149931", "0.6149557", "0.6144157", "0.6144157", "0.6144157", "0.6144157", "0.61197007", "0.6098381", "0.6095681", "0.6078816", "0.6073752", "0.6054721", "0.6044578", "0.6041988", "0.603787", "0.603787", "0.603787", "0.603787", "0.60352105", "0.6009344", "0.5980488", "0.59072447", "0.58919305", "0.58908236", "0.58756864", "0.58730835", "0.58730835", "0.58730835", "0.5862232", "0.5832345", "0.5829522", "0.5825125", "0.58210015", "0.58027166", "0.58013517", "0.57985795", "0.57985795", "0.57985795", "0.57985795", "0.57985795", "0.57985795", "0.5790605", "0.5777554", "0.57575715", "0.57535857", "0.57535857", "0.57529", "0.57481", "0.5738545", "0.5734471", "0.5734471", "0.5729449" ]
0.0
-1
Get the id of the most recent creator
public static int getNewestUserId() { return SP_UTILS.getInt(SPDataConstant.KEY_NEWEST_USER_ID, SPDataConstant.VALUE_LAST_MEETING_HOST_ID_DEFAULT); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Long getCreator() {\n return creator;\n }", "String getCreatorId();", "public long getCreatorUserId() {\n return creatorUserId;\n }", "public java.lang.Integer getCreatorId() {\n return creatorId;\n }", "public String getCreatorId() {\n return creatorId;\n }", "public String getCreatorId() {\n return creatorId;\n }", "public Integer getCreator() {\n return creator;\n }", "public WhoAmI getCreatorID() {\r\n\t\treturn myCreatorId;\r\n\t}", "public ParseUser getCreator() {\n try {\n return fetchIfNeeded().getParseUser(\"creator\");\n }\n catch(ParseException e) {\n Log.d(TAG, \"Error in retrieving the creator: \" + e);\n return null;\n }\n }", "@VTID(13)\r\n int getCreator();", "public String getCreatorId() {\n return this.CreatorId;\n }", "public User getCreator() {\n\t\treturn creatorId != null ? (User) User.findById(creatorId) : null;\n\t}", "int getCreatedBy();", "public long getCreatedByUser();", "public int getLastUserId();", "public int getCreatedBy();", "public int getCreatedBy();", "public int getCreatedBy();", "public int getCreatedBy();", "public int getCreatedBy();", "public int getCreatedBy();", "public int getCreatedBy();", "public int getCreatedBy();", "public int getCreatedBy();", "public int getCreatedBy();", "public int getCreatedBy();", "public int getCreatedBy();", "public int getCreatedBy();", "public User getCreator() {\n return this.creator;\n }", "public String getCreatorGuid() {\n return creatorGuid;\n }", "public String getCreator() {\r\n return creator;\r\n }", "public String getCreator() {\r\n return creator;\r\n }", "public String getCreator() {\n\t\treturn creator;\n\t}", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return this.creator;\n }", "public Integer getCreatedUserId() {\n return (Integer) get(4);\n }", "public void setCreator(Long creator) {\n this.creator = creator;\n }", "@Override\n\tpublic long getCreateBy() {\n\t\treturn _candidate.getCreateBy();\n\t}", "public Long getCreatedBy() {\n return createdBy;\n }", "public Long getCreatedBy() {\n return createdBy;\n }", "public Long getCreatedBy() {\n return createdBy;\n }", "public Long getCreatedBy() {\n return createdBy;\n }", "public Long getCreatedBy() {\n\t\treturn createdBy;\n\t}", "int getOwnerID();", "public User getCreatedBy()\n\t{\n\t\treturn (User) this.getKeyValue(\"Created_By\");\n\n\t}", "public java.lang.Integer getCreatedby() {\n\treturn createdby;\n}", "public SystemUserBO getCreator()\n {\n if (_creator == null)\n {\n _creator = new SystemUserBO(_model.getCreator());\n }\n return _creator;\n }", "public int getDoc_User_ID() {\n return getCreatedBy();\n }", "public void setCreatorId(java.lang.Integer creatorId) {\n this.creatorId = creatorId;\n }", "public Number getCreatedBy()\n {\n return (Number)getAttributeInternal(CREATEDBY);\n }", "public String getCreator()\n\t{\n\t\treturn null;\n\t}", "public void setCreatorId(String creatorId) {\n this.creatorId = creatorId;\n }", "public void setCreatorUserId(long creatorUserId) {\n this.creatorUserId = creatorUserId;\n }", "public Number getCreatedBy() {\n return (Number)getAttributeInternal(CREATEDBY);\n }", "public Number getCreatedBy() {\n return (Number)getAttributeInternal(CREATEDBY);\n }", "public Number getCreatedBy() {\n return (Number)getAttributeInternal(CREATEDBY);\n }", "public Number getCreatedBy() {\n return (Number)getAttributeInternal(CREATEDBY);\n }", "public Number getCreatedBy() {\n return (Number)getAttributeInternal(CREATEDBY);\n }", "public Number getCreatedBy() {\n return (Number)getAttributeInternal(CREATEDBY);\n }", "long getOwnerIdLong();", "public String getCreatedBy(){\r\n\t\treturn createdBy;\r\n\t}", "public Number getCreatedBy() {\n return (Number) getAttributeInternal(CREATEDBY);\n }", "public Number getCreatedBy() {\n return (Number) getAttributeInternal(CREATEDBY);\n }", "public String getCreatedBy() {\r\n return createdBy;\r\n }", "public String getCreatedBy() {\r\n return createdBy;\r\n }", "public String getCreatedBy() {\r\n return createdBy;\r\n }", "public String getCreatorName() {\n return creatorName;\n }", "public String getCreatorName() {\n return creatorName;\n }", "public String getCreatorName() {\n return creatorName;\n }", "public void setCreator(Integer creator) {\n this.creator = creator;\n }", "public Integer getCreatedUserId() {\n return this.createdUserId;\n }", "public Integer getCreatedUserId() {\n return this.createdUserId;\n }", "default String getOwnerId()\n {\n return Long.toUnsignedString(getOwnerIdLong());\n }", "Long getUserCreated();", "public String getCreatedBy() {\n return createdBy;\n }", "public String getCreatedby() {\n return createdby;\n }", "public String getCreatedBy() {\r\n\t\treturn createdBy;\r\n\t}", "public java.lang.String getCreatedBy() {\r\n return createdBy;\r\n }", "public String getCreatedBy() {\n\t\treturn createdBy;\n\t}", "public Integer getLastUpdatorId() {\n return lastUpdatorId;\n }", "public java.lang.String getCreatorName() {\n return creatorName;\n }", "@Override\r\n\tpublic int getLastId() {\n\t\treturn adminDAO.getLastId();\r\n\t}", "public static int getIdByCreatorId(int creatorId) throws SQLException {\n\t\tString request = \"SELECT id FROM Announce WHERE creatorId = \"+creatorId+\" AND isOpen = 1\";\n\t\tSystem.out.println(request);\n\t\tPreparedStatement ps = Connect.getConnection().prepareStatement(request);\n\t\tResultSet result = ps.executeQuery();\n\t\tConnect.getConnection().close();\n\t\treturn (result != null && result.next()) ? result.getInt(\"id\") : 0;\n\t}", "public void setCreator(User creator) {\n this.creator = creator;\n }", "public String getCreatedBy() {\n\t\treturn this.createdBy;\n\t}", "public String getCreatedBy() {\n return this.createdBy;\n }", "public Timestamp getCreatedByTimestamp() {\n\t\treturn new Timestamp(this.createdByTimestamp.getTime());\n\t}", "public Integer getCreateby() {\n return createby;\n }", "public Long getCreateduser() {\n return createduser;\n }", "public java.lang.Integer getCreatedby() throws java.rmi.RemoteException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException {\n return (((java.lang.Integer) __getCache(\"createdby\")));\n }", "public String getCREATED_BY() {\r\n return CREATED_BY;\r\n }", "public String getCREATED_BY() {\r\n return CREATED_BY;\r\n }" ]
[ "0.7579353", "0.7427174", "0.7347096", "0.733788", "0.7270898", "0.7270898", "0.7145083", "0.70314574", "0.70104414", "0.7002499", "0.69835085", "0.6929485", "0.6897178", "0.68515974", "0.67788434", "0.66853404", "0.66853404", "0.66853404", "0.66853404", "0.66853404", "0.66853404", "0.66853404", "0.66853404", "0.66853404", "0.66853404", "0.66853404", "0.66853404", "0.66853404", "0.6600782", "0.6587313", "0.65721095", "0.65721095", "0.6561119", "0.65565115", "0.65565115", "0.65565115", "0.65565115", "0.65565115", "0.65565115", "0.65565115", "0.65565115", "0.65565115", "0.65487725", "0.6542567", "0.6527494", "0.6434171", "0.642079", "0.642079", "0.642079", "0.642079", "0.64121526", "0.63233846", "0.6318515", "0.6312688", "0.62860703", "0.62819374", "0.6265143", "0.62532014", "0.62335724", "0.61921376", "0.61869335", "0.61841756", "0.61841756", "0.61841756", "0.61841756", "0.61841756", "0.61841756", "0.6178819", "0.6162928", "0.6118428", "0.6118428", "0.61127156", "0.61127156", "0.61127156", "0.6097511", "0.6097511", "0.6097511", "0.60964286", "0.6079944", "0.6079944", "0.60744035", "0.6068089", "0.6061938", "0.60614806", "0.6056083", "0.60521036", "0.60285425", "0.600263", "0.5995863", "0.5995618", "0.5993719", "0.5979465", "0.5970325", "0.5967061", "0.59586614", "0.595514", "0.59520555", "0.59175503", "0.5905508", "0.5905508" ]
0.62830424
55
Save the date of the most recent meeting creation
public static void saveNewestMeetingDate(long timestamp) { SP_UTILS.put(SPDataConstant.KEY_LAST_MEETING_PUBLISH_DATE, timestamp); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Meeting save(Meeting meeting) {\n\t\tmeeting.setCreationTs(System.currentTimeMillis());\n\t\tmeeting = repo.save(meeting);\n\n\t\t// send e-mail notification\n\t\tsendEmail(meeting);\n\t\treturn meeting;\n\t}", "@Override\n\tpublic java.util.Date getLastSavePoint() {\n\t\treturn _keHoachKiemDemNuoc.getLastSavePoint();\n\t}", "private void saveNote() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"E,MMM d, hh:mm a\");\n String lastSavedDate = sdf.format(new Date());\n String id;\n boolean isNew = true;\n if (oldNote != null && oldNote.getId() != null && !oldNote.getId().isEmpty()) {\n id = oldNote.getId();\n isNew = false;\n } else\n id = UUID.randomUUID().toString();\n Note note = new Note(id, etTitle.getText().toString().trim(), lastSavedDate, etNote.getText().toString().trim());\n note.setNew(isNew);\n Intent returnIntent = new Intent();\n returnIntent.putExtra(\"NEW_NOTE\", note);\n setResult(Activity.RESULT_OK, returnIntent);\n finish();\n }", "public static long getNewestMeetingDate() {\n return SP_UTILS.getLong(SPDataConstant.KEY_LAST_MEETING_PUBLISH_DATE, SPDataConstant.VALUE_LAST_MEETING_HOST_ID_DEFAULT);\n }", "public Date getLastSaved()\r\n {\r\n return (m_lastSaved);\r\n }", "void saveLastServerUpdate(Date date);", "public void saveCalenderDate() {\r\n\t\tdate = getDateToDisplay(null);\r\n\t}", "public Date getLastActivityDate() {\n return lastActivityDate;\n }", "long getLastBonusTicketDate();", "public void setLast_seen(Date last_seen) {\n this.last_seen = last_seen;\n }", "public Date getCreatTime() {\n return creatTime;\n }", "public Date getCreatTime() {\n return creatTime;\n }", "private Date computeLastDate() {\n\t\tSyncHistory history = historyDao.loadLastOk();\n\t\tif (history != null) {\n\t\t\treturn history.getTime();\n\t\t}\n\t\treturn new Date(-1);\n\t}", "public String getDateSaved()\n {\n return dateSaved;\n }", "@Override\n\tpublic void setLastSavePoint(java.util.Date lastSavePoint) {\n\t\t_keHoachKiemDemNuoc.setLastSavePoint(lastSavePoint);\n\t}", "public void setLastClearMessagesDate(Person person)\n{\nif(person==null || person.getNumber()==null)\n{\n return;\n}\n //HibernateUtil.trBegin();\nperson=getById(person.getNumber());\n\nsave(person);\n //HibernateUtil.trEnd();\n}", "private void fechaActual() {\r\n\t\tDate date = new Date();\r\n\t\tSimpleDateFormat sm = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\r\n\t\t// Formateo de Fecha para mostrar en la vista - (String)\r\n\t\tsetFechaCreacion(sm.format(date.getTime()));\r\n\t\t// Formateo de Fecha campo db - (Date)\r\n\t\ttry {\r\n\t\t\tnewEntidad.setFechaCreacion(sm.parse(getFechaCreacion()));\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\t;\r\n\t}", "public Date getCreation() {\n return creation;\n }", "Date getLastTime();", "public Date getCreatetime() {\r\n return createtime;\r\n }", "public Date getCreatetime() {\r\n return createtime;\r\n }", "public Date getCreatetime() {\r\n return createtime;\r\n }", "public void setCreatTime(Date creatTime) {\n this.creatTime = creatTime;\n }", "public void setCreatTime(Date creatTime) {\n this.creatTime = creatTime;\n }", "Date getForLastUpdate();", "public Date getCreatetime() {\n return createtime;\n }", "public Date getCreatetime() {\n return createtime;\n }", "public Date getCreatetime() {\n return createtime;\n }", "public Date getCreatetime() {\n return createtime;\n }", "public Date getCreatetime() {\n return createtime;\n }", "public Date getCreatetime() {\n return createtime;\n }", "public Date getCreatetime() {\n return createtime;\n }", "public Date getCreatetime() {\n return createtime;\n }", "@Override\n\tpublic java.util.Date getCreateDate() {\n\t\treturn _esfTournament.getCreateDate();\n\t}", "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 void savePatientDetails(View view){\r\n\t\tsaveToSQLite();\r\n createCalendarEntry();\r\n\t\tToast.makeText(this, \"Saved. Reminder created.\", Toast.LENGTH_SHORT).show();\r\n\t}", "void setCreateDate(Date date);", "Date getCreationDate();", "@Override\n\tpublic java.util.Date getCreateDate() {\n\t\treturn _candidate.getCreateDate();\n\t}", "@Override\n\tpublic Date getCreateDate() {\n\t\treturn _paper.getCreateDate();\n\t}", "public void saveAction (){\n\t \tif(dayNum ==7){\n\t \t\tintPhaseCompletes = intPhaseCompletes +1;\n\t \t\tdb.execSQL(\"UPDATE Phases SET Completions= \"+ intPhaseCompletes + \" WHERE PhaseID = \" + \"'\" + phaseID + \"'\");\n\t \t}\n \tcontent = timerTextView.getText().toString();\n \tstrDate = functions.getDate();\n \tintCompletes = intCompletes +1;\n \tdb.execSQL(\"INSERT INTO results (ExerciseName,time,date) VALUES(\"+ \"'\" + dayName +\"'\" + \",\" \n \t\t\t+ \"'\" + content + \"'\" + \",\"+ \"'\" + strDate +\"'\"+ \")\");\n \tdb.execSQL(\"UPDATE Days SET LastDate= \"+ \"'\" + strDate + \"'\" + \" WHERE _id = \" + \"'\" + dayID + \"'\");\n \tdb.execSQL(\"UPDATE Days SET Completions= \"+ intCompletes + \" WHERE _id = \" + \"'\" + dayID + \"'\");\n \tdb.close();\n \tdialogShare();\n }", "public void insertMeetingRecord(Meeting meeting) {\n SQLiteDatabase db = dbHelper.getDatabase();\n ContentValues cv = new ContentValues();\n\n // Note: derived from RaceDay.xml.\n cv.put(SchemaConstants.MEETING_DATE, meeting.getMeetingDate());\n cv.put(SchemaConstants.MEETING_ABANDONED, meeting.getAbandoned());\n cv.put(SchemaConstants.MEETING_VENUE, meeting.getVenueName());\n cv.put(SchemaConstants.MEETING_HI_RACE, meeting.getHiRaceNo());\n cv.put(SchemaConstants.MEETING_CODE, meeting.getMeetingCode());\n cv.put(SchemaConstants.MEETING_ID, meeting.getMeetingId());\n cv.put(SchemaConstants.MEETING_TRACK_DESC, meeting.getTrackDescription());\n cv.put(SchemaConstants.MEETING_TRACK_RATING, meeting.getTrackRating());\n cv.put(SchemaConstants.MEETING_WEATHER_DESC, meeting.getTrackWeather());\n\n try {\n db.beginTransaction();\n db.insertOrThrow(SchemaConstants.MEETINGS_TABLE, null, cv);\n db.setTransactionSuccessful();\n } catch (SQLException ex) {\n Log.d(context.getClass().getCanonicalName(), ex.getMessage());\n } finally {\n db.endTransaction();\n }\n }", "public void setCreationDate(Date creationDate);", "@Override\n\tpublic Date getCreateDate() {\n\t\treturn model.getCreateDate();\n\t}", "@Override\n\tpublic Date getCreateDate() {\n\t\treturn model.getCreateDate();\n\t}", "@Override\n\tpublic Date getCreateDate() {\n\t\treturn model.getCreateDate();\n\t}", "public Date getCreatorDate() {\n return creatorDate;\n }", "public Date getCreateAt() {\n return createAt;\n }", "public Date getCreateAt() {\n return createAt;\n }", "public Date getCreate_time() {\n return create_time;\n }", "public Date getCreate_time() {\n return create_time;\n }", "LocalDateTime getCreationDate();", "@Override\n\tpublic java.util.Date getCreateDate() {\n\t\treturn _scienceApp.getCreateDate();\n\t}", "private void save(){\n\n this.title = mAssessmentTitle.getText().toString();\n String assessmentDueDate = dueDate != null ? dueDate.toString():\"\";\n Intent intent = new Intent();\n if (update){\n assessment.setTitle(this.title);\n assessment.setDueDate(assessmentDueDate);\n assessment.setType(mAssessmentType);\n intent.putExtra(MOD_ASSESSMENT,assessment);\n } else {\n intent.putExtra(NEW_ASSESSMENT, new Assessment(course.getId(),this.title,mAssessmentType,assessmentDueDate));\n }\n setResult(RESULT_OK,intent);\n finish();\n }", "public Date getFcreatetime() {\n return fcreatetime;\n }", "private void saveTask(){\n \tZadatakApp app = (ZadatakApp)getApplicationContext();\n \t\n \tTask task = new Task();\n \ttask.set(Task.Attributes.Name, nameText);\n \ttask.set(Task.Attributes.Duedate, datePicker);\n \ttask.set(Task.Attributes.Hours, lengthText);\n \ttask.set(Task.Attributes.Progress, progressBar);\n \ttask.set(Task.Attributes.Priority, priorityBox);\n \t\n \t// Save it to the database either as a new task or over an old task\n \tif (editmode) { app.dbman.editTask(id, task); }\n \telse { app.dbman.insertTask(task); }\n \t\n \t// A task has been added or changed, rescedule\n \tapp.schedule();\n \t\n \tapp.toaster(\"NEW / EDITED TASK\");\n \t\n \t// Quit the activity\n \tfinish();\n }", "public Date getCreateBy() {\n return createBy;\n }", "public Date getTimeCreate() {\n return timeCreate;\n }", "@Override\n public java.util.Date getCreateDate() {\n return _partido.getCreateDate();\n }", "public void setLastSaved(Date lastSaved)\r\n {\r\n m_lastSaved = lastSaved;\r\n }", "private void onSaveNote() {\n String text= inputNote.getText().toString();\n if(!text.isEmpty()){\n long date=new Date().getTime(); // get current time\n // Note note= new Note(text,date); because temp now has Note object\n\n // if note exits update else create new\n temp.setNoteText(text);\n temp.setNoteDate(date);\n\n if(temp.getId()==-1)\n dao.insertNote(temp); // insert and save note to database\n else{\n dao.updateNote(temp);\n }\n finish(); // return to the MainActivity\n }\n\n }", "public void setDateSaved(String dateSaved)\n {\n this.dateSaved = dateSaved; \n }", "public Date getCreationDate();", "public long getCreationDate() {\n return creationDate_;\n }", "public Date getLast_seen() {\n return last_seen;\n }", "@Transactional\n\tpublic void saveNewPatient(FlowObjCreator foc){\n\t\tlog.debug(\"-----------\");\n\t\tlog.debug(\"-----------\"+foc.getIdf());\n\t\tlog.debug(\"-----------\"+foc.getBdate());\n\t\tTimestamp bd = new Timestamp(foc.getBdate().getTime());\n\t\tTree folderT = readDocT(foc.getIdf());\n\t\tPatient newPatientO = foc.getNewPatient();\n\t\tnewPatientO.setBirthdate(bd);\n\t\t\n\t\tsaveNewPatient(folderT, newPatientO);\n\t}", "public DateAdp Modified_latest() {return modified_latest;}", "public Date getModifiyTime() {\n return modifiyTime;\n }", "public void setDateCreated(Date dateCreated);", "Date getWorkfileLastChangedDate();", "public Date getCreationDate() {\n\n \n return creationDate;\n\n }", "public String getEntrySave() {\r\n return \"-\"+getId() + \"|\" + getFavorite() + \"|\" + getSubject() + \"|\" + date(4) + \"|\" + price.getFull() + \"|\" + getNotes();\r\n }", "@Override\n\tpublic Date getCreateDate() {\n\t\treturn _second.getCreateDate();\n\t}", "public Date getCreationTime()\n {\n return created;\n }", "public Date getCreated() {\r\n return created;\r\n }", "public Date getCreated() {\r\n return created;\r\n }", "static void saveUserDeadline(Context context, Date deadline) {\n\n context.getSharedPreferences(FILE_NAME, 0)\n .edit()\n .putLong(USER_DEADLINE_KEY, deadline.getTime())\n .apply();\n }", "@java.lang.Override\n public long getCreationDate() {\n return creationDate_;\n }", "public Date getCreatedate() {\r\n return createdate;\r\n }", "public Date getCreatedate() {\r\n return createdate;\r\n }", "public void setCreationDate(Date creationDate) {\n }", "public Date getCreacion() {\r\n return creacion;\r\n }", "public long getCreationDate() {\n return creationDate_;\n }", "public Date getCreationdate() {\n return creationdate;\n }", "public Long getCreateAt() {\n return createAt;\n }", "@Override\n\tpublic Date getCreateDate() {\n\t\treturn _changesetEntry.getCreateDate();\n\t}", "public void setCreationTime(DateTime creationTime) {\n this.created = creationTime;\n }", "public void setCreateDate(Date createDate) { this.createDate = createDate; }", "public DateTime getCreationTime() {\n return created;\n }", "public Date getCreateDate() {\r\n return createDate;\r\n }", "public Date getCreateDate() {\r\n return createDate;\r\n }", "public int addMeeting(Meeting meeting)\n throws Exception\n {\n Connection connection = null;\n int meetingId = -1;\n \n if(meeting == null)\n return -1;\n \n try\n {\n connection = ConnectionManager.getConnection();\n PreparedStatement pstmt = connection.prepareStatement(\"insert into meetings (project_id,title,start_time,end_time,meeting_notes,created_by,created_on) values (?,?,?,?,?,?,?)\", ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);\n pstmt.setInt(1, meeting.getProjectId());\n pstmt.setString(2, meeting.getTitle());\n \n // start time\n if(meeting.getStartTime() != null)\n { \n pstmt.setTimestamp(3, new Timestamp(meeting.getStartTime().getTimeInMillis()));\n }\n else\n { \n pstmt.setDate(3, null);\n }\n \n // end time\n if(meeting.getEndTime() != null)\n { \n pstmt.setTimestamp(4, new Timestamp(meeting.getEndTime().getTimeInMillis()));\n }\n else\n { \n pstmt.setDate(4, null);\n }\n \n // TODO: Add meeting notes.\n pstmt.setString(5, null);//meeting.getMeetingNotes());\n pstmt.setInt(6, meeting.getCreatedBy());\n pstmt.setTimestamp(7, new Timestamp(Calendar.getInstance().getTimeInMillis()));\n \n pstmt.executeUpdate();\n \n pstmt = connection.prepareStatement(\"select IDENTITY_VAL_LOCAL() from meetings\", ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);\n ResultSet rs = pstmt.executeQuery();\n meetingId = -1;\n if(rs.first())\n {\n meetingId = rs.getInt(1);\n \n //\n // Meeting Attendees...\n //\n if(meeting.getAttendees() != null && meeting.getAttendees().length > 0)\n {\n \tint attendees[] = meeting.getAttendees();\n \tpstmt = connection.prepareStatement(\"insert into meeting_attendees (meeting_id, account_id) values (?,?)\");\n \tfor(int i = 0; i < attendees.length; i++)\n \t{\n pstmt.setInt(1, meetingId);\n \t\tpstmt.setInt(2, attendees[i]);\n \t\tpstmt.addBatch();\n \t}\n \tpstmt.executeBatch();\n }\n \n //\n // Agenda Items\n //\n if(meeting.getAgendaItems() != null && meeting.getAgendaItems().length > 0)\n {\n MeetingAgendaItem agendaItems[] = meeting.getAgendaItems();\n pstmt = connection.prepareStatement(\"insert into meeting_agenda_items (meeting_id, title, notes, ordinal) values (?,?,?,?)\");\n // just leave notes null until we figure out how to present it.\n for(int i = 0; i < agendaItems.length; i++)\n {\n pstmt.setInt(1, meetingId);\n pstmt.setString(2, agendaItems[i].getTitle());\n pstmt.setString(3, null);\n pstmt.setInt(4, i);\n \n pstmt.addBatch();\n }\n pstmt.executeBatch();\n }\n \n //\n // Followup Items\n //\n if(meeting.getFollowupItems() != null && meeting.getFollowupItems().length > 0)\n {\n MeetingFollowupItem followupItems[] = meeting.getFollowupItems();\n pstmt = connection.prepareStatement(\"insert into meeting_followup_items (meeting_id, title, text, ordinal) values (?, ?, ?, ?)\");\n \n for(int i = 0; i < followupItems.length; i++)\n {\n pstmt.setInt(1, meetingId);\n //pstmt.setString(2, followupItems[i]);\n pstmt.setString(3, null);\n pstmt.setInt(4, i);\n \n pstmt.addBatch();\n }\n pstmt.executeBatch();\n }\n }\n \n rs.close();\n pstmt.close();\n }\n catch(SQLException se)\n {\n se.printStackTrace();\n }\n catch(Exception e)\n {\n \te.printStackTrace();\n }\n finally\n {\n try\n {\n if(connection != null)\n {\n connection.close();\n }\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n }\n \n return meetingId;\n }", "public Date getCreated() {\n return created;\n }", "public Date getCreated() {\n return created;\n }", "public Date getCreated() {\n return created;\n }", "public Date getCreated() {\n return created;\n }", "void setCreateDate(final Date creationDate);", "public Date getCreationDate()\r\n {\r\n return (m_creationDate);\r\n }", "public Date getCreationDate()\n {\n return creationDate;\n }", "Date getCreateDate();" ]
[ "0.6506305", "0.623979", "0.62047523", "0.60634655", "0.60343146", "0.5927995", "0.59268725", "0.5828083", "0.58116746", "0.57894623", "0.57794005", "0.57794005", "0.57495487", "0.5749025", "0.5727815", "0.5727282", "0.5721546", "0.57015145", "0.56991684", "0.5696355", "0.5696355", "0.5696355", "0.56826264", "0.56826264", "0.5678626", "0.56613714", "0.56613714", "0.56613714", "0.56613714", "0.56613714", "0.56613714", "0.56613714", "0.56613714", "0.5656222", "0.56556976", "0.5653559", "0.56450397", "0.5641954", "0.5636552", "0.56226707", "0.56196034", "0.5592779", "0.5592148", "0.5584744", "0.5584744", "0.5584744", "0.5579545", "0.5572636", "0.5572636", "0.5570015", "0.5570015", "0.5567796", "0.55575305", "0.5557085", "0.5556661", "0.5547579", "0.55462164", "0.5542786", "0.5539322", "0.55377614", "0.55368245", "0.55364597", "0.55349946", "0.553343", "0.55316275", "0.5525315", "0.55220073", "0.5521129", "0.5516924", "0.5508017", "0.550605", "0.54913104", "0.54899263", "0.5472466", "0.54718417", "0.54718417", "0.54690933", "0.5465361", "0.5456862", "0.5456862", "0.5447023", "0.54460114", "0.54429877", "0.5438404", "0.5436216", "0.5416898", "0.540943", "0.5405962", "0.5402467", "0.5400733", "0.5400733", "0.5394348", "0.53924215", "0.53924215", "0.53924215", "0.53924215", "0.5391684", "0.5390419", "0.53900224", "0.5388821" ]
0.6736486
0
Get the date of the most recent meeting creation
public static long getNewestMeetingDate() { return SP_UTILS.getLong(SPDataConstant.KEY_LAST_MEETING_PUBLISH_DATE, SPDataConstant.VALUE_LAST_MEETING_HOST_ID_DEFAULT); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Date computeLastDate() {\n\t\tSyncHistory history = historyDao.loadLastOk();\n\t\tif (history != null) {\n\t\t\treturn history.getTime();\n\t\t}\n\t\treturn new Date(-1);\n\t}", "Date getCreationDate();", "public Date getLatestDate() {\r\n\t\tCriteriaBuilder cb = em.getCriteriaBuilder();\r\n\t\tCriteriaQuery<TestLinkMetricMeasurement> query = cb.createQuery(TestLinkMetricMeasurement.class);\r\n\t\tRoot<TestLinkMetricMeasurement> root = query.from(TestLinkMetricMeasurement.class);\r\n\t\tquery.select(root);\r\n\t\tquery.orderBy(cb.desc(root.get(TestLinkMetricMeasurement_.timeStamp)));\r\n\t\tDate latest;\r\n\t\ttry {\r\n\t\t\tTestLinkMetricMeasurement m = em.createQuery(query).setMaxResults(1).getSingleResult();\r\n\t\t\tlatest = m.getTimeStamp();\t\t\t\r\n\t\t} catch (NoResultException nre) {\r\n\t\t\tlatest = null;\r\n\t\t}\r\n\t\treturn latest;\r\n\t}", "Date getCreatedDate();", "long getLastBonusTicketDate();", "public Date getLastActivityDate() {\n return lastActivityDate;\n }", "long getCreationTime();", "long getCreationTime();", "long getCreationTime();", "public static Date getMaxDate() {\n Calendar cal = Calendar.getInstance();\n cal.set(2036, 12, 28, 23, 59, 59);\n return cal.getTime();\n }", "String getCreated_at();", "public Date getDate() {\n/* 150 */ Date[] dates = getDates();\n/* 151 */ if (dates != null) {\n/* 152 */ Date latest = null;\n/* 153 */ for (int i = 0, c = dates.length; i < c; i++) {\n/* 154 */ if (latest == null || dates[i].getTime() > latest.getTime()) {\n/* 155 */ latest = dates[i];\n/* */ }\n/* */ } \n/* 158 */ return latest;\n/* */ } \n/* 160 */ return null;\n/* */ }", "@Override\n\tpublic java.util.Date getCreateDate() {\n\t\treturn _candidate.getCreateDate();\n\t}", "Date getDateCreated();", "Date getCreateDate();", "Date getCreateDate();", "public Date getCreation() {\n return creation;\n }", "public long getCreationTime();", "@Override\n\tpublic Date getCreateDate() {\n\t\treturn _paper.getCreateDate();\n\t}", "public Date getCreationDate();", "long getCreatedTime();", "@Override\n\tpublic Date getCreateDate() {\n\t\treturn _second.getCreateDate();\n\t}", "public long getCreationDate() {\n return creationDate_;\n }", "public Date getCreationTime() {\n return creationTime;\n }", "public Date getCreationTime()\n {\n return created;\n }", "@Override\n\tpublic java.util.Date getCreateDate() {\n\t\treturn _esfTournament.getCreateDate();\n\t}", "public Date getCreatedDate();", "public Instant getCreationTime() {\n return creation;\n }", "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 }", "public Date getCreationTime()\n\t{\n\t\treturn creationTime;\n\t}", "public Date getEarliestFinishingDate();", "public Long getCreationDate()\r\n\t{\r\n\t\treturn creationDate;\r\n\t}", "@Override\n\tpublic java.util.Date getCreateDate() {\n\t\treturn _scienceApp.getCreateDate();\n\t}", "@java.lang.Override\n public long getCreationDate() {\n return creationDate_;\n }", "public Date getCreatorDate() {\n return creatorDate;\n }", "public long getCreationDate() {\n return creationDate_;\n }", "public Date getCreationTime() {\n return creationTime;\n }", "public Date getCreationTime() {\n return creationTime;\n }", "public Calendar getDate()\n {\n return this.dateOfCreation;\n }", "Date getLastTime();", "@Override\r\n\tpublic Date getApp_latest_logon_dt() {\n\t\treturn super.getApp_latest_logon_dt();\r\n\t}", "public java.util.Date getLatestActivityTaskTimestamp() {\n return latestActivityTaskTimestamp;\n }", "public DateTime getCreationTime() {\n return created;\n }", "LocalDateTime getCreationDate();", "public Date getCreationTime() {\n\t\treturn creationTime;\n\t}", "public Date getCreateDate();", "public Date getCreateDate();", "public Date getCreateDate();", "public Date getCreationDate() {\n\n \n return creationDate;\n\n }", "@java.lang.Override\n public long getCreationDate() {\n return creationDate_;\n }", "public DateAdp Modified_latest() {return modified_latest;}", "public Date getCreationTime() {\n\n\t\treturn createdAtTime;\n\t}", "public java.util.Date getCreationTime() {\n return this.creationTime;\n }", "public java.util.Date getCreationTime() {\n return this.creationTime;\n }", "public java.util.Date getCreationTime() {\n return this.creationTime;\n }", "@DISPID(110)\r\n\t// = 0x6e. The runtime will prefer the VTID if present\r\n\t@VTID(105)\r\n\tjava.util.Date creationDateTime();", "public Date getLastPublished() {\n return lastPublished;\n }", "public DateTime getCreationTime() { return creationTime; }", "public Date getCreationDate()\r\n {\r\n return (m_creationDate);\r\n }", "Instant getCreated();", "public Date getCreateAt() {\n return createAt;\n }", "public Date getCreateAt() {\n return createAt;\n }", "public Date getDateCreated();", "public long getCreationTime() {\n return creationTime_;\n }", "Date getForLastUpdate();", "public Date getCreated() {\r\n return created;\r\n }", "public Date getCreated() {\r\n return created;\r\n }", "private Date getLastReviewForApp(String appName) {\n\t\tQuery<Review> query = this.datastore.createQuery(Review.class);\n\t\tquery.criteria(\"appName\").equal(appName);\n\t\tquery.order(\"-reviewDate\").get();\n\t\tList<Review> reviews = query.asList();\n\t\tif (reviews.isEmpty() || reviews == null)\n\t\t\treturn null;\n\t\tReview lastReview = reviews.get(0);\n\t\treturn lastReview.getReviewDate();\n\t}", "public long getCreationTime() {\n return creationTime;\n }", "public Date getCreatTime() {\n return creatTime;\n }", "public Date getCreatTime() {\n return creatTime;\n }", "public long getCreationTime() {\n return this.creationTime;\n }", "public long getCreationTime()\n {\n return m_metaInf.getCreationTime();\n }", "@Nullable\n public Date getCreatedTime() {\n return mCreatedTime == null ? null : new Date(mCreatedTime.getTime());\n }", "public Date getCreationDate()\n {\n return creationDate;\n }", "public Calendar getCreationDate() throws IOException {\n/* 238 */ return getCOSObject().getDate(COSName.CREATION_DATE);\n/* */ }", "@Override\n\tpublic Date getCreateDate() {\n\t\treturn model.getCreateDate();\n\t}", "@Override\n\tpublic Date getCreateDate() {\n\t\treturn model.getCreateDate();\n\t}", "@Override\n\tpublic Date getCreateDate() {\n\t\treturn model.getCreateDate();\n\t}", "public Date getCreatedOn()\n {\n return _model.getCreatedOn();\n }", "public Date getGmtCreate() {\r\n return gmtCreate;\r\n }", "@Override\n public String getCreationDate() {\n return creationDate;\n }", "@Override\n\tpublic Date getCreateDate() {\n\t\treturn _changesetEntry.getCreateDate();\n\t}", "public Date getCreated() {\r\n\t\treturn created;\r\n\t}", "public Date getCreated() {\r\n\t\treturn created;\r\n\t}", "long getFetchedDate();", "public Date getGmtCreate() {\n return gmtCreate;\n }", "public Date getGmtCreate() {\n return gmtCreate;\n }", "public Date getGmtCreate() {\n return gmtCreate;\n }", "public Date getGmtCreate() {\n return gmtCreate;\n }", "public Date getGmtCreate() {\n return gmtCreate;\n }", "public Date getGmtCreate() {\n return gmtCreate;\n }", "public Date getGmtCreate() {\n return gmtCreate;\n }", "public Date getGmtCreate() {\n return gmtCreate;\n }", "public Date getGmtCreate() {\n return gmtCreate;\n }", "public Date getGmtCreate() {\n return gmtCreate;\n }", "public Date getGmtCreate() {\n return gmtCreate;\n }", "public Date getGmtCreate() {\n return gmtCreate;\n }", "public Date getGmtCreate() {\n return gmtCreate;\n }", "public Date getGmtCreate() {\n return gmtCreate;\n }" ]
[ "0.6370825", "0.6226388", "0.62028086", "0.6154244", "0.6153016", "0.61492395", "0.6098182", "0.6098182", "0.6098182", "0.6082597", "0.6079461", "0.6069324", "0.6054461", "0.60302854", "0.60235983", "0.60235983", "0.6009157", "0.5994468", "0.5988629", "0.5972711", "0.5947657", "0.59099257", "0.59078157", "0.59016633", "0.5892081", "0.5886288", "0.5868497", "0.5857285", "0.585329", "0.58505887", "0.58459496", "0.5842556", "0.58401275", "0.58391243", "0.58358437", "0.5826367", "0.5823134", "0.5823134", "0.5820757", "0.581916", "0.5817194", "0.58168066", "0.5810467", "0.57971966", "0.5796873", "0.57862264", "0.57862264", "0.57862264", "0.57839924", "0.5783216", "0.57676494", "0.57647234", "0.5759065", "0.5759065", "0.5759065", "0.5757997", "0.5755972", "0.574899", "0.57465816", "0.5744594", "0.57433045", "0.57433045", "0.57392764", "0.5723395", "0.5716029", "0.57155955", "0.57155955", "0.5714892", "0.5713449", "0.57133454", "0.57133454", "0.5698924", "0.5696373", "0.5684215", "0.5683912", "0.567288", "0.56678545", "0.56678545", "0.56678545", "0.56675375", "0.5666783", "0.5666226", "0.56599677", "0.5655557", "0.5655557", "0.56547177", "0.5651403", "0.5651403", "0.5651403", "0.5651403", "0.5651403", "0.5651403", "0.5651403", "0.5651403", "0.5651403", "0.5651403", "0.5651403", "0.5651403", "0.5651403", "0.5651403" ]
0.70215464
0
first resolve the lazy value at this node, then do anything.
private static int queryLazy(int[] segtree, int[] lazyValue, int l, int r, int ns, int ne, int index) { if(lazyValue[index]!=0){ segtree[index]+=lazyValue[index]; if(ns!=ne){ lazyValue[2*index]+=lazyValue[index]; lazyValue[2*index+1]+=lazyValue[index]; } lazyValue[index]=0; } if(r<ns || l>ne){ //no overlap return Integer.MAX_VALUE; } if(ns>=l && ne<=r){ //complete overlap return segtree[index]; }else{ //partial overlap int mid=(ns+ne)/2; int leftAns=queryLazy(segtree, lazyValue, l, r, ns, mid, 2*index); int rightAns=queryLazy(segtree, lazyValue, l, r, mid+1, ne, 2*index+1); return Math.min(leftAns,rightAns); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public final SoyValue resolve() {\n SoyValue localResolvedValue = resolvedValue;\n if (localResolvedValue == null) {\n localResolvedValue = compute();\n for (ValueAssertion curr = valueAssertion; curr != null; curr = curr.next) {\n curr.check(localResolvedValue);\n }\n resolvedValue = localResolvedValue;\n valueAssertion = null;\n }\n return localResolvedValue;\n }", "public abstract void resolve();", "public void doLazyMatch() {}", "T resolve();", "void resolve();", "@Test\n public void get() {\n ResolveAndGet();\n }", "@Override\r\n\tprotected void doResolve() {\n\r\n\t}", "@Override\r\n\tpublic Object first(){\r\n\t\tcheck();\r\n\t\treturn head.value;\r\n\t}", "public void resolve (INPUT input)\n {\n this.resultProduced = false;\n execute(input);\n }", "@Override\n public Value<Void> evaluate(ValueReferenceResolver valueRefResolver) {\n return null;\n }", "public void findNext() {\n\t if (value != null) {\n\t findValue();\n\t } else {\n\t find();\n\t }\n\t}", "@Override\n\tpublic void visit(NextValExpression arg0) {\n\t\t\n\t}", "protected IDecisionVariable dereferenceIfNeeded(IDecisionVariable variable, Value value) {\n IDecisionVariable v = variable;\n if (TypeQueries.isReference(variable.getDeclaration().getType()) \n && !TypeQueries.isReference(value.getType())) {\n v = Configuration.dereference(v);\n if (null == v) { // just a fallback, shall not happen\n v = variable;\n }\n }\n return v;\n }", "public Object getValue(ELContext context, Object base, Object property) {\n/* 143 */ context.setPropertyResolved(false);\n/* */ \n/* 145 */ Object value = null;\n/* 146 */ for (int i = 0; i < this.size; i++) {\n/* 147 */ value = this.elResolvers[i].getValue(context, base, property);\n/* 148 */ if (context.isPropertyResolved()) {\n/* 149 */ return value;\n/* */ }\n/* */ } \n/* 152 */ return null;\n/* */ }", "native public static <T> Promise<T> resolve(T value);", "void softPut(String key, Do.Make<Object> lazyValue);", "protected Sequence actuallyEvaluate(XPathContext context, Component<GlobalVariable> target) throws XPathException {\n final Controller controller = context.getController();\n assert controller != null;\n final Bindery b = controller.getBindery(getPackageData());\n //System.err.println(\"EVAL GV \" + this + \" \" + getVariableQName().getDisplayName() + \" in slot \" + getBinderySlotNumber());\n\n try {\n // This is the first reference to a global variable; try to evaluate it now.\n // But first check for circular dependencies.\n setDependencies(this, context);\n\n // Set a flag to indicate that the variable is being evaluated. This is designed to prevent\n // (where possible) the same global variable being evaluated several times in different threads\n boolean go = b.setExecuting(this);\n if (!go) {\n // some other thread has evaluated the variable while we were waiting\n return b.getGlobalVariable(getBinderySlotNumber());\n }\n\n Sequence value = getSelectValue(context, target);\n if (indexed) {\n value = controller.getConfiguration().obtainOptimizer().makeIndexedValue(value.iterate());\n }\n return b.saveGlobalVariableValue(this, value);\n\n } catch (XPathException err) {\n b.setNotExecuting(this);\n if (err instanceof XPathException.Circularity) {\n String errorCode;\n if (getPackageData().getHostLanguage() == Configuration.XSLT) {\n errorCode = \"XTDE0640\";\n } else if (getPackageData().getXPathVersion() >= 30) {\n errorCode = \"XQDY0054\";\n } else {\n errorCode = \"XQST0054\";\n }\n err.setErrorCode(errorCode);\n err.setXPathContext(context);\n // Detect it more quickly the next time (in a pattern, the error is recoverable)\n SingletonClosure closure = new SingletonClosure(new ErrorExpression(err), context);\n b.setGlobalVariable(this, closure);\n err.setLocation(getLocation());\n throw err;\n } else {\n throw err;\n }\n }\n }", "@Override\n\tpublic synchronized Value get(ILexNameToken field, boolean explicit)\n\t{\n\t\ttry\n\t\t{\n\t\t\tValue val = this.delayedCtxt.lookup(field,getOriginalSelf().objectReference);\n\t\t\tif (val != null)\n\t\t\t{\n\t\t\t\treturn val;\n\t\t\t}\n\t\t} catch (ContextException e)\n\t\t{\n\t\t\t// ignore if it wasnt there\n\t\t}\n\t\tValue v = super.get(field, explicit);\n\t\treturn delayedCtxt.wrapField(v, field,getOriginalSelf().objectReference);\n\t}", "private Object readResolve() {\r\n return this;\r\n }", "T get(int index) {\n if (index >= resolvedPojos.size() && lazyEntityIterator.hasNext()) {\n // Stop resolving if the iterator doesn't have any more data.\n // This means we may stop before we get to the requested index, but that's ok.\n for (int i = resolvedPojos.size(); i <= index && lazyEntityIterator.hasNext(); i++) {\n resolveNext();\n }\n }\n // If the index is out of range we'll get an exception, and that's fine. Consistent with the List interface.\n return resolvedPojos.get(index);\n }", "protected Object doGetValue() {\n\t\treturn value;\n\t}", "@Override\r\n public void resolve() {\r\n ste1.pointsTo.forEach(\r\n pO -> {\r\n pO.updateHeap(id2, ste3.pointsTo);\r\n }\r\n );\r\n this.resolveThis(id1, ste1);\r\n // System.out.print(\"After store: \");\r\n // ste1.print();\r\n // System.out.print(\"Nfter store: \");\r\n // ste3.print();\r\n }", "protected abstract SoyValue compute();", "public interface Lazy<T> {\n\n /**\n * Computes (first time call) or returns cached value.\n *\n * @return value\n */\n T get();\n}", "@Override\r\n\r\n\tpublic E pollFirst() {\n\t\treturn poll();\r\n\t}", "public IIteration resolveIteration(IIterationHandle handle)\r\n\t{\r\n\t\tIIteration iteration = null;\r\n\t\tif (handle instanceof IIteration) \r\n\t\t{\r\n\t\t\treturn (IIteration) handle;\r\n\t\t}\r\n\t\ttry \r\n\t\t{\r\n\t\t\titeration = (IIteration) repository.itemManager().fetchCompleteItem\r\n\t\t\t\t\t(\r\n\t\t\t\t\t\t\t(IIterationHandle) handle,\r\n\t\t\t\t\t\t\tIItemManager.DEFAULT, \r\n\t\t\t\t\t\t\tmonitor\r\n\t\t\t\t\t);\r\n\t\t} catch (Exception e)\r\n\t\t{\r\n\t\t\t// TODO: handle exception\r\n\t\t}\t\t\r\n\t\treturn iteration;\r\n\t}", "public abstract String resolve();", "public Value getValue() {\n if (!dirty && !expressionUsesTime) {\n return cachedValue;\n }\n try {\n // System.out.print(\"/// {\" + number + \"} calculate \" + element.getTagName() + \"#\" + element.getAttributeNS(null, \"id\")\n // + \".\" + attributeLocalName + \" = \" + expression + \": \");\n // System.out.println(\"Executing XPath: \" + expression);\n // dumpDocument(element.getOwnerDocument(), 0);\n\n // System.out.println(\"[\" + st + \"] \" + expression);\n // long t1 = java.util.Calendar.getInstance().getTime().getTime();\n // for (int i = 0; i < 100; i++) {\n // xpath.execute(constraintEngine.xpathContext, element, prefixResolver);\n // }\n // long t2 = System.currentTimeMillis();\n st++;\n //constraintEngine.xpathContext = new XPathContext(constraintEngine);\n \n \n //xpath = new XPath(expression, prefixResolver);\n //System.out.println(\"Constraint.getValue() width context: \" + constraintEngine.xpathContext);\n //constraintEngine.xpathContext.reset(); // xgx\n XObject xo = xpath.execute(constraintEngine.xpathContext, element, prefixResolver);\n st--;\n // long t3 = System.currentTimeMillis();\n // if (st == 0) {\n // System.out.println(\"evaluation: \" + (t2 - t1) / 100.0);\n // }\n Value v = Value.createValue(/*constraintEngine,*/ xo);\n Value newValue;\n if (type == Value.TYPE_UNKNOWN) {\n newValue = v;\n } else {\n newValue = v.convertTo(type, element);\n }\n if (!newValue.equals(cachedValue)) {\n // System.out.println(newValue);\n cachedValue = newValue;\n // propagate changes\n // System.out.println(\"== propagating:\");\n // System.out.println(\"== getting constraints that depend on \" + element.getNodeName() + \"/@\" + attributeNamespaceURI + \":\" + attributeLocalName);\n propagateChanges(\n constraintEngine.getReverseDependencies(element,\n attributeNamespaceURI, \n attributeLocalName));\n propagateChanges(\n constraintEngine.getReverseDependencies(element,\n null, \n null));\n propagateChanges(\n constraintEngine.getReverseBboxDependencies(element));\n } else {\n // System.out.println(\"unnecessary\");\n }\n // System.out.println(\"Result: \" + cachedValue);\n dirty = false;\n return cachedValue;\n } catch (javax.xml.transform.TransformerException te) {\n constraintEngine.stopTimer();\n throw new ConstraintException(\"Error evaluating XPath expression: \"\n + te.getMessageAndLocation(), te);\n }\n }", "@NotNull\n public final Promise<XExpression> calculateEvaluationExpression() {\n return myValueContainer.calculateEvaluationExpression();\n }", "private void doLookup(int key)\n {\n String value = getLocalValue(key);\n if (value != null)\n {\n display(key, value);\n }\n else\n {\n getValueFromDB(key);\n } \n }", "private Object readResolve() {\n\t\tSystem.out.println(\"------\");\n\t\treturn this;\n\t}", "protected Object subEval(EvalContext ctx, boolean forValue) {\n T.fail(\"A DelayedExpr isn't eval-able\");\n return null; //make compiler happy\n }", "public void setValue(ELContext context, Object base, Object property, Object val) {\n/* 349 */ context.setPropertyResolved(false);\n/* */ \n/* 351 */ for (int i = 0; i < this.size; i++) {\n/* 352 */ this.elResolvers[i].setValue(context, base, property, val);\n/* 353 */ if (context.isPropertyResolved()) {\n/* */ return;\n/* */ }\n/* */ } \n/* */ }", "protected Object readResolve() {\n return valueOf(v);\n }", "private boolean resolvable(Identifier id, String field) throws UnrecoverableException, RetryableException {\n try {\n resolve(id,field);\n return true;\n } catch (NotFound e) {\n return false;\n }\n }", "public Object readResolve() {\n return m23477b(this.f19237b, this.f19238c, this.f19239d, this.f19240e, this.f19241f) ? f19236a : this;\n }", "private @CheckForNull CpsFlowExecution getExecutionLazy() {\n FlowExecutionOwner owner = ((FlowExecutionOwner.Executable) run).asFlowExecutionOwner();\n if (owner == null) {\n return null;\n }\n FlowExecution exec = owner.getOrNull();\n return exec instanceof CpsFlowExecution ? (CpsFlowExecution) exec : null;\n }", "@Override\r\n\tpublic E pollFirst() {\n\t\treturn null;\r\n\t}", "private static String resolveVariables(String nodeValue, Collection<String> variableChain) {\n\n String resolved = nodeValue;\n Matcher varNameMatcher = varNamePattern.matcher(nodeValue);\n\n Collection<String> variablesToResolve = new HashSet<String> ();\n\n while (varNameMatcher.find()) {\n String varName = varNameMatcher.group(1);\n if (variableChain != null && variableChain.contains(varName)) {\n // Found recursive reference when resolving variables. Log message and return null.\n log.debug(\"Found a recursive variable reference when resolving ${\" + varName + \"}\");\n return null;\n } else {\n variablesToResolve.add(varName);\n }\n }\n\n for (String nextVariable : variablesToResolve) {\n String value = getPropertyValue(nextVariable);\n\n if (value != null && !value.isEmpty()) {\n Collection<String> thisVariableChain = new HashSet<String> ();\n thisVariableChain.add(nextVariable);\n\n if (variableChain != null && !variableChain.isEmpty()) {\n thisVariableChain.addAll(variableChain);\n }\n\n String resolvedValue = resolveVariables(value, thisVariableChain);\n\n if (resolvedValue != null) {\n resolved = resolved.replaceAll(\"\\\\$\\\\{\" + nextVariable + \"\\\\}\", resolvedValue);\n } else {\n // Variable value could not be resolved. Log message and return null.\n log.debug(\"Could not resolve the value \" + value + \" for variable ${\" + nextVariable + \"}\");\n return null;\n }\n } else {\n // Variable could not be resolved. Log message and return null.\n log.debug(\"Variable \" + nextVariable + \" cannot be resolved.\");\n return null;\n }\n }\n\n return resolved;\n }", "public ListNode processGet(int key) {\n if (isAlreadyPresent(key)) {\n ListNode node = removeCurrentListNode(cacheMap.get(key), cacheMap.get(key).freq);\n node.freq += 1;\n insertCurrentListNode(node, node.freq);\n updateFList(frequencyMap.get(node.freq - 1));\n return node;\n } else {\n return null;\n }\n }", "public LazyVisitor(Context context, ValueProcessor valueProcessor, ChainResolver resolver) {\n super(context, valueProcessor, resolver);\n }", "public T getValue() {\n if (mDependency == null)\n mDependency = new ReactorDependency();\n\n mDependency.depend();\n return mValue;\n }", "public Object lookup(String key){\n ListNode<String,Object> temp = getNode(key);\n if(temp != null)\n return temp.value;\n else\n return null;\n }", "public void _next() {\n Object o;\n try {\n o = iter.next();\n } catch (NoSuchElementException e) {\n has_next = 0;\n return;\n }\n // resolve object\n if (o == null) {\n has_next = 1;\n next = null;\n } else if (o instanceof IdentityIF) {\n try {\n o = txn.getObject((IdentityIF)o, true);\n if (o == null) {\n _next();\n } else {\n has_next = 1;\n next = (F) o;\n }\n } catch (Throwable t) {\n has_next = -1;\n next = null;\n }\n } else {\n has_next = 1;\n next = (F) o;\n }\n }", "public interface LazyResolver {\n\n LazyResolveContext getLazyResolveContext();\n\n void setLazyResolveContext(LazyResolveContext context);\n\n /**\n * Base class of {@link ObjectResolver} instances that are owned by a parent {@link LazyResolver}.\n */\n abstract class ObjectResolverImpl<T extends UniqueIdentifiable> implements ObjectResolver<T>, DeepResolver {\n\n private final LazyResolver _parent;\n private final ObjectResolver<T> _underlying;\n\n public ObjectResolverImpl(final LazyResolver parent, final ObjectResolver<T> underlying) {\n _parent = parent;\n _underlying = underlying;\n }\n\n protected ObjectResolver<T> getUnderlying() {\n return _underlying;\n }\n\n protected abstract T lazy(T object, LazyResolveContext.AtVersionCorrection context);\n\n @Override\n public T resolveObject(final UniqueId uniqueId, final VersionCorrection versionCorrection) {\n final T underlying = _underlying.resolveObject(uniqueId, versionCorrection);\n if (underlying == null) {\n return null;\n }\n return lazy(underlying, _parent.getLazyResolveContext().atVersionCorrection(versionCorrection));\n }\n\n @Override\n public ChangeManager changeManager() {\n return getUnderlying().changeManager();\n }\n\n @Override\n public DeepResolver deepResolver() {\n return this;\n }\n\n }\n\n /**\n * Base class of {@link Resolver} instances that are owned by a parent {@link LazyResolver}.\n */\n abstract class ResolverImpl<T extends UniqueIdentifiable> extends ObjectResolverImpl<T> implements Resolver<T> {\n\n public ResolverImpl(final LazyResolver parent, final Resolver<T> underlying) {\n super(parent, underlying);\n }\n\n @Override\n protected Resolver<T> getUnderlying() {\n return (Resolver<T>) super.getUnderlying();\n }\n\n @Override\n public UniqueId resolveExternalId(final ExternalIdBundle identifiers, final VersionCorrection versionCorrection) {\n return getUnderlying().resolveExternalId(identifiers, versionCorrection);\n }\n\n @Override\n public Map<ExternalIdBundle, UniqueId> resolveExternalIds(final Collection<ExternalIdBundle> identifiers, final VersionCorrection versionCorrection) {\n return getUnderlying().resolveExternalIds(identifiers, versionCorrection);\n }\n\n @Override\n public UniqueId resolveObjectId(final ObjectId identifier, final VersionCorrection versionCorrection) {\n return getUnderlying().resolveObjectId(identifier, versionCorrection);\n }\n\n @Override\n public Map<ObjectId, UniqueId> resolveObjectIds(final Collection<ObjectId> identifiers, final VersionCorrection versionCorrection) {\n return getUnderlying().resolveObjectIds(identifiers, versionCorrection);\n }\n\n }\n\n /**\n * Lazy resolution of portfolios.\n */\n class LazyPortfolioResolver extends ResolverImpl<Portfolio> {\n\n public LazyPortfolioResolver(final LazyResolver parent, final Resolver<Portfolio> underlying) {\n super(parent, underlying);\n }\n\n // ObjectResolverImpl\n\n @Override\n public Portfolio lazy(final Portfolio object, final LazyResolveContext.AtVersionCorrection context) {\n return new LazyResolvedPortfolio(context, object);\n }\n\n // DeepResolver\n\n @Override\n public UniqueIdentifiable withLogger(final UniqueIdentifiable underlying, final ResolutionLogger logger) {\n if (underlying instanceof Portfolio) {\n return new LoggedResolutionPortfolio((Portfolio) underlying, logger);\n }\n return null;\n }\n\n }\n\n /**\n * Lazy resolution of portfolio nodes.\n */\n class LazyPortfolioNodeResolver extends ResolverImpl<PortfolioNode> {\n\n public LazyPortfolioNodeResolver(final LazyResolver parent, final Resolver<PortfolioNode> underlying) {\n super(parent, underlying);\n }\n\n // ObjectResolverImpl\n\n @Override\n public PortfolioNode lazy(final PortfolioNode object, final LazyResolveContext.AtVersionCorrection context) {\n return new LazyResolvedPortfolioNode(context, object);\n }\n\n // DeepResolver\n\n @Override\n public UniqueIdentifiable withLogger(final UniqueIdentifiable underlying, final ResolutionLogger logger) {\n if (underlying instanceof PortfolioNode) {\n return new LoggedResolutionPortfolioNode((PortfolioNode) underlying, logger);\n }\n return null;\n }\n\n }\n\n /**\n * Lazy resolution of positions.\n */\n class LazyPositionResolver extends ResolverImpl<Position> {\n\n public LazyPositionResolver(final LazyResolver parent, final Resolver<Position> underlying) {\n super(parent, underlying);\n }\n\n // ResolverImpl\n\n @Override\n public Position lazy(final Position object, final LazyResolveContext.AtVersionCorrection context) {\n return new LazyResolvedPosition(context, object);\n }\n\n // DeepResolver\n\n @Override\n public UniqueIdentifiable withLogger(final UniqueIdentifiable underlying, final ResolutionLogger logger) {\n if (underlying instanceof Position) {\n return new LoggedResolutionPosition((Position) underlying, logger);\n }\n return null;\n }\n\n }\n\n /**\n * Lazy resolution of trades.\n */\n class LazyTradeResolver extends ResolverImpl<Trade> {\n\n public LazyTradeResolver(final LazyResolver parent, final Resolver<Trade> underlying) {\n super(parent, underlying);\n }\n\n // ObjectResolverImpl\n\n @Override\n public Trade lazy(final Trade object, final LazyResolveContext.AtVersionCorrection context) {\n return new LazyResolvedTrade(context, object);\n }\n\n // DeepResolver\n\n @Override\n public UniqueIdentifiable withLogger(final UniqueIdentifiable underlying, final ResolutionLogger logger) {\n if (underlying instanceof Trade) {\n return new LoggedResolutionTrade((Trade) underlying, logger);\n }\n return null;\n }\n\n }\n\n}", "protected abstract Value evaluate();", "native public static <T> Promise<T> resolve(Thenable<T> value);", "@Override\n\tpublic double evaluate() {\n\t\tString var = myChildren.get(0).myChildren.get(0).toString(); //goes two levels down to get variable\n\t\tint start = (int) myChildren.get(0).myChildren.get(1).evaluate(); \n\t\tint end = (int) myChildren.get(0).myChildren.get(2).evaluate(); \n\t\tint increment = (int) myChildren.get(0).myChildren.get(3).evaluate(); \n\t\tdouble returnVal = 0;\n\t\tfor(int i = start; i < end; i += increment) {\n\t\t\tUserVariables.add(var, i);\n\t\t\tfor(Node child : myChildren) {\n\t\t\t\treturnVal = child.evaluate(); //repeatNode will contain a GroupNode, but GroupNodes know how to evaluate themselves\n\t\t\t}\n\t\t}\n\t\treturn returnVal;\n\t}", "@Override\n protected DagNode evaluate(DagNode parent, Bindings bindings) {\n // type acts as storage for the status\n DagEdge bound = bindings.getBinding(_varName, getType());\n if (bound == null) {\n if (getType() == Bindings.LOCAL) {\n // first occurence of this var, bind the variable name\n // to the given node. This is on the application side, where new bindings\n // are only relevant in expandVars, which is why the DagEdge is not\n // important, but the node, to establish coreferences.\n bound = new DagEdge((short) -1, parent);\n bindings.bind(_varName, bound, getType());\n } else {\n logger.warn(\"Unknown binding during application of rule: \" + this);\n return parent;\n }\n }\n // Avoid unwanted coreferences for atomic nodes\n if (bound.getValue().newEdgesAreEmpty()) {\n return bound.getValue().cloneFS();\n }\n return bound.getValue();\n }", "@Override\n public void compose() {\n final Continuation currCon = (Continuation)closure.getArgument(0);\n\n ResultValueWrapper best = null;\n double shortest = Double.MAX_VALUE;\n\n int i=1;\n while(true) {\n try {\n final ResultValueWrapper rvw = ((ResultValueWrapper) closure.getArgument(i++));\n if((Double)rvw.getN() < shortest) {\n best = rvw;\n shortest = (Double)rvw.getN();\n }\n } catch (IndexOutOfBoundsException e) { break;}\n }\n\n currCon.setReturnVal(best);\n sendArgument(currCon);\n }", "public int getValue() { return 42; }", "private final int loadResourceValue(int ident, TypedValue outValue,\n boolean resolve) {\n if (am == null)\n return 0;\n ResTable res = am.getResources(false);\n Res_value value = new Res_value();\n ResTable_config config = new ResTable_config();\n ArrayList<Integer> typeSpecFlags = new ArrayList<Integer>();\n typeSpecFlags.add(new Integer(0));\n int block = res.getResource(ident, value, false, typeSpecFlags, config);\n if (block == Errors.BAD_INDEX) {\n return block;\n }\n ArrayList<Integer> ref = new ArrayList<Integer>();\n ref.add(new Integer(ident));\n if (resolve) {\n block = res.resolveReference(value, block, ref, null, null);\n if (block == Errors.BAD_INDEX)\n return 0;\n }\n\n if (block >= 0) {\n outValue.type = value.dataType;\n outValue.data = value.data;\n outValue.string = null;\n outValue.resourceId = ref.get(0);\n outValue.changingConfigurations = typeSpecFlags.get(0);\n outValue.assetCookie = res.getTableCookie(block);\n if (config != null) {\n outValue.density = config.density;\n }\n }\n\n return block;\n }", "private java.lang.Object readResolve() {\n return valueOf(this.stringValue);\n }", "private synchronized T val() {\n\t\t\treturn val;\n\t\t}", "private void propagatedSafetyResolve(Cell cell) {\n\t\timmediateSafetyResolve(cell, true);\n\t}", "@Override\n public double execute() throws IllegalStateException {\n checkError();\n return getValue(X);\n }", "private Node handleValueDefinition(XPath xPath) throws XPathExpressionException {\n Node valueDef = (Node)xPath.evaluate(\"./*/cda:repeatNumber\", this.entry, XPathConstants.NODE);\n if (valueDef == null) {\n // TODO: HQMF needs better differentiation between SUM & COUNT...\n // currently using presence of repeatNumber...\n if (this.type.equals(\"COUNT\")) {\n this.type = \"SUM\";\n }\n valueDef = (Node)xPath.evaluate(\"./*/cda:value\", this.entry, XPathConstants.NODE);\n }\n\n // TODO: Resolve extracting values embedded in criteria within outboundRel's\n if (this.type.equals(\"SUM\")) {\n valueDef = (Node)xPath.evaluate(\"./*/*/*/cda:value\", this.entry, XPathConstants.NODE);\n }\n\n if (valueDef != null) {\n String valueType = XmlHelpers.getAttributeValue(valueDef, xPath, \"./@type\", \"\");\n if (valueType.equals(\"ANY\")) {\n this.value = new AnyValue();\n }\n }\n\n return valueDef;\n }", "@Override\r\n public double eval() {\r\n return (this.child == null) ? 0.0 : this.child.eval();\r\n }", "final public Lazy<Val> apply(final Lazy<Val> v) {\r\n final MethodHandle r = j.bindTo(v);\r\n if (r.type().parameterCount() == 0)\r\n return Result.mk(r);\r\n return new MH(r);\r\n }", "public void doResolve(String str, Promise<InetAddress> promise) throws Exception {\n try {\n promise.setSuccess(SocketUtils.addressByName(str));\n } catch (UnknownHostException e) {\n promise.setFailure(e);\n }\n }", "public void setFirstResult(int val) throws HibException;", "public BaseTuple resolveAndStore(Object[] facts, ValueResolver reteEvaluator, BaseTuple tuple, FactHandleLookup fhLookup) {\n for (int i = 0; i < offsetFromPrior; i++) {\n tuple = tuple.getParent();\n }\n resolveAndStore(facts, reteEvaluator, tuple.getFactHandle(), fhLookup);\n return tuple;\n }", "public TreeNode resolve(TreeNode root, TreeNode node){\n if (root == null) {\n return node;\n }\n else if(root.val > node.val){ // no replace, keep going down\n root.right = resolve(root.right, node);\n return root;\n }\n else { // new biggest, old root becomes left child\n node.left = root;\n root = null;\n return node;\n }\n }", "public int run() { return this.value.run(); }", "public Provider<T> getNextValue()\n {\n return this.next;\n }", "protected Object readResolve() {\n\t\ttry {\n\t\t\treturn fromLotus(resurrectAgent(), Agent.SCHEMA, getAncestorDatabase());\n\t\t} catch (NotesException e) {\n\t\t\tDominoUtils.handleException(e);\n\t\t\treturn this;\n\t\t}\n\t}", "@Override\n public V getValue() {\n Object object = this.h;\n synchronized (object) {\n return this.a().getValue();\n }\n }", "public void computeNext() {\n while (this.source.hasNext()) {\n Object next = this.source.next();\n if (this.observed.add(this.keySelector.invoke(next))) {\n setNext(next);\n return;\n }\n }\n done();\n }", "public abstract void resolve(Event e);", "@Override\n\tpublic V getValue(K key) {\n\t\tNode currentNode = firstNode;\n\t\t\n\t\tif(!isEmpty()){\n\t\t\twhile(currentNode.key != key){\n\t\t\t\tif(currentNode.getNextNode() == null){\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\treturn (V)currentNode.value;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t\t\n\t}", "void visit(final NextVal nextVal);", "public Object getFetchedValue() {\n return fetchedValue;\n }", "@Override\n\tpublic Object resolveContextualObject(String key) {\n\t\treturn null;\n\t}", "@Override\r\n\t\tpublic final INamedElement resolveTypeForValueContext() {\n\t\t\treturn null;\r\n\t\t}", "public static EObject resolve(TransactionalEditingDomain domain,\n\t\t\tEObject eObject, boolean resolve) {\n\n\t\tif (eObject == null)\n\t\t\treturn null;\n\n\t\tif (!eObject.eIsProxy())\n\t\t\treturn eObject;\n\n\t\tif (resolve) {\n\n\t\t\tEObject resolved = EcoreUtil.resolve(eObject, domain\n\t\t\t\t.getResourceSet());\n\n\t\t\treturn (resolved.eIsProxy() ? null\n\t\t\t\t: resolved);\n\t\t}\n\n\t\treturn null;\n\t}", "@Override\n public boolean visit(JsPropertyInitializer x,\n JsContext<JsPropertyInitializer> ctx) {\n x.setValueExpr(accept(x.getValueExpr()));\n return false;\n }", "private Identifier resolve(Identifier id, String field) throws NotFound, UnrecoverableException, RetryableException {\n \n logger.debug(task.taskLabel() + \" entering resolve...\");\n try {\n ObjectLocationList oll = ((CNRead)nodeCommunications.getCnRead()).resolve(session, id);\n if (logger.isDebugEnabled()) \n logger.debug(task.taskLabel() + String.format(\" %s %s exists on the CN.\", field, id.getValue()));\n return oll.getIdentifier();\n\n } catch (NotFound ex) {\n // assume if identifierReservationService has thrown NotFound exception SystemMetadata does not exist\n if (logger.isDebugEnabled()) \n logger.debug(task.taskLabel() + String.format(\" %s %s does not exist on the CN.\", field, id.getValue()));\n throw ex;\n \n } catch (ServiceFailure e) {\n V2TransferObjectTask.extractRetryableException(e);\n throw new UnrecoverableException(\"Unexpected Exception from CN /resolve !\" + e.getDescription(), e);\n\n } catch ( NotImplemented | InvalidToken | NotAuthorized e) {\n throw new UnrecoverableException(\"Unexpected Exception from CN /resolve ! \" + e.getDescription(), e);\n }\n }", "public Expression preEvaluate(StaticContext env) throws XPathException {\n if (argument.length == 0) {\n return this;\n } else {\n return (Value)evaluateItem(env.makeEarlyEvaluationContext());\n }\n }", "private static int computeAndSet(int n) {\n int val = fibRaw(n);\n Jedis jedis = null;\n try {\n jedis = pool.getResource();\n jedis.set(\"\" + n, Integer.toString(val));\n } catch (JedisConnectionException e) {\n \tSystem.err.println(\n \t \"Couldn't get a Jedis instance from the pool\\nException \" + e.getMessage());\n \t// returnBrokenResource when the state of the object is unrecoverable\n if (null != jedis) {\n pool.returnBrokenResource(jedis);\n jedis = null;\n }\n } finally {\n /// ... it's important to return the Jedis instance to the pool once you've finished using it\n if (null != jedis) {\n pool.returnResource(jedis);\n }\n } \n return val;\n }", "private List<Node> compute() {\n\t\t\tgetGraphFromResolvedTree(root);\n\t\t\tdepthFirst(root);\n\t\t\treturn result;\n\t\t}", "public void resolve()\n{\n getFragment().resolveFragment();\n}", "@Override\n public T get() {\n if (!initialized) {\n synchronized (this) {\n if (!initialized) {\n T t = delegate.get();\n value = t;\n initialized = true;\n return t;\n }\n }\n }\n return value;\n }", "@Override synchronized public void resolve()\n{\n if (isResolved()) return;\n\n RebaseMain.logD(\"START RESOLVE\");\n for (RebaseJavaFile jf : file_nodes) {\n RebaseMain.logD(\"FILE: \" + jf.getFile().getFileName());\n }\n\n clearResolve();\n\n RebaseJavaTyper jt = new RebaseJavaTyper(base_context);\n RebaseJavaResolver jr = new RebaseJavaResolver(jt);\n jt.assignTypes(this);\n jr.resolveNames(this);\n\n all_types = new HashSet<RebaseJavaType>(jt.getAllTypes());\n\n setResolved(true);\n}", "@Override\n\tpublic CompletableFuture<Integer> fetchRemoteValue(String s, int i) {\n\t\treturn CompletableFuture.completedFuture(33);\n\t}", "public int next() {\n TreeNode iter = dq.pop();\n int val = iter.val;\n if(iter.right!=null)\n process(iter.right);\n return val;\n }", "protected T getValue0() {\n\t\treturn value;\n\t}", "public void acquireResolver() {\n lock.lock();\n try {\n while (busy) {\n Log.d(TAG, \"Found NsdManager Resolver busy, waiting\");\n condition.await();\n }\n Log.d(TAG, \"Found NsdManager Resolver free, using it and marking it as busy\");\n busy = true;\n } catch (InterruptedException e) {\n Log.e(TAG, \"Failure while waiting for condition: \" + e);\n } finally {\n lock.unlock();\n }\n }", "public void preResolve(Contribution contribution, ModelResolver resolver, ProcessorContext context)\n throws ContributionResolveException {\n // Resolve the contribution model itself\n ModelResolver contributionResolver = contribution.getModelResolver();\n contribution.setUnresolved(false);\n contributionResolver.addModel(contribution, context);\n\n // Resolve Exports\n resolveExports(contribution, contributionResolver, context);\n // Resolve Imports\n resolveImports(contribution, contributionResolver, context);\n\n preResolved = true;\n }", "private String resolve(String value) {\n\t\tif (this.beanFactory != null && this.beanFactory instanceof ConfigurableBeanFactory) {\n\t\t\treturn ((ConfigurableBeanFactory) this.beanFactory).resolveEmbeddedValue(value);\n\t\t}\n\t\treturn value;\n\t}", "protected final Object readResolve() throws ObjectStreamException {\r\n return Index.valueOf(_value);\r\n }", "private <T> T lazy(Supplier<T> loader) {\n return null;\n }", "public Object resolve(String var) throws ErrorException { \n\t\treturn null;\n\t}", "default Object resolve(String name) {\n return resolve(name, Object.class);\n }", "public Double resolver(Double x) {\n\n\t\tthrow new RuntimeException(\"No implementado\");\n\n\t}", "public Value read(KaitaiStream stream, ReadResult read, ContainerValue parent, boolean forceEvaluation) throws IOException {\n long start = stream.pos();\n KaitaiStream originalStream = stream;\n\n // expression instance - evaluate on request\n if (this.valueExpression != null) {\n return new LazyValue(parent, this, this.valueExpression);\n }\n\n // read instance - evaluate on request\n if (this.isInstance && !forceEvaluation) {\n return new LazyValue(parent, this, read);\n }\n\n // instance with io - update before seeking\n if (this.isInstance && this.io != null) {\n stream = Evaluator.evaluate(this.io, stream, parent).streamValue();\n }\n\n // instance with position - seek now\n if (this.isInstance && this.pos != null) {\n long p = Evaluator.evaluate(this.pos, stream, parent).longValue();\n stream.seek(p);\n }\n\n long seek = stream.pos();\n\n // if there's an if test, check if it passes\n if (!ifTest.test(stream, parent)) {\n Value rv = new NullValue(parent);\n rv.setProperty(this);\n rv.setStartIndex(seek);\n rv.setEndIndex(seek);\n return rv;\n }\n\n // if we have a repeating block, then we need an array\n ArrayValue av = null;\n if (repeat.isArray()) {\n av = new ArrayValue(parent, this);\n }\n\n Value lastValue = null;\n\n // create a substream if required\n KaitaiStream io = type.createStream(stream, parent);\n\n // loop until done, reading values\n int i;\n for (i = 0; !repeat.shouldStop(i, io, lastValue, parent); i++) {\n\n long loopStart = stream.pos();\n\n // read the value, set some data\n lastValue = type.read(this.parent, io, read, parent);\n lastValue.setProperty(this);\n lastValue.setStartIndex(loopStart);\n lastValue.setEndIndex(stream.pos());\n\n // add this result to the array if repeating\n if (av != null) {\n av.add(lastValue);\n read.add(lastValue);\n }\n\n // re-create the substream for the next loop\n // seeking the child also seeks the parent, so we're okay to do this\n io = type.createStream(stream, parent);\n }\n\n // set the array properties if repeating\n if (av != null) {\n av.setStartIndex(seek);\n av.setEndIndex(stream.pos());\n lastValue = av;\n }\n\n // if an instance with an io, restore the original stream before seeking\n if (this.isInstance && this.io != null) {\n stream = originalStream;\n }\n\n // if an instance with a position, return to the original position\n if (this.isInstance && this.pos != null) {\n stream.seek(start);\n }\n\n // return null if no value was read\n if (lastValue == null) {\n Value rv = new NullValue(parent);\n rv.setProperty(this);\n rv.setStartIndex(seek);\n rv.setEndIndex(seek);\n return rv;\n }\n\n return lastValue;\n }", "public Object getObject()\n {\n initialize();\n\n if (_invariant)\n return _cachedValue;\n\n return resolveProperty();\n }", "native public static <T> Promise<T> resolve();", "public void testGetLazySet() {\n AtomicLong ai = new AtomicLong(1);\n assertEquals(1, ai.get());\n ai.lazySet(2);\n assertEquals(2, ai.get());\n ai.lazySet(-3);\n assertEquals(-3, ai.get());\n }", "public Task<DataSnapshot> getValue(Query query) {\n TaskCompletionSource<DataSnapshot> source = new TaskCompletionSource<>();\n final Repo repo = this;\n this.scheduleNow(\n new Runnable() {\n @Override\n public void run() {\n // Always check active-listener in-memory caches first. These are always at least as\n // up to date as the persistence cache\n Node serverValue = serverSyncTree.getServerValue(query.getSpec());\n if (serverValue != null) {\n source.setResult(\n InternalHelpers.createDataSnapshot(\n query.getRef(), IndexedNode.from(serverValue)));\n return;\n }\n serverSyncTree.setQueryActive(query.getSpec());\n final DataSnapshot persisted = serverSyncTree.persistenceServerCache(query);\n if (persisted.exists()) {\n // Prefer the locally persisted value if the server is not responsive.\n scheduleDelayed(() -> source.trySetResult(persisted), GET_TIMEOUT_MS);\n }\n connection\n .get(query.getPath().asList(), query.getSpec().getParams().getWireProtocolParams())\n .addOnCompleteListener(\n ((DefaultRunLoop) ctx.getRunLoop()).getExecutorService(),\n (@NonNull Task<Object> task) -> {\n if (source.getTask().isComplete()) {\n return;\n }\n if (!task.isSuccessful()) {\n if (persisted.exists()) {\n source.setResult(persisted);\n } else {\n source.setException(Objects.requireNonNull(task.getException()));\n }\n } else {\n /*\n * We need to replicate the behavior that occurs when running `once()`. In other words,\n * we need to create a new eventRegistration, register it with a view and then\n * overwrite the data at that location, and then remove the view.\n */\n Node serverNode = NodeUtilities.NodeFromJSON(task.getResult());\n QuerySpec spec = query.getSpec();\n // EventRegistrations require a listener to be attached, so a dummy\n // ValueEventListener was created.\n keepSynced(spec, /*keep=*/ true, /*skipDedup=*/ true);\n List<? extends Event> events;\n if (spec.loadsAllData()) {\n events = serverSyncTree.applyServerOverwrite(spec.getPath(), serverNode);\n } else {\n events =\n serverSyncTree.applyTaggedQueryOverwrite(\n spec.getPath(),\n serverNode,\n getServerSyncTree().tagForQuery(spec));\n }\n repo.postEvents(\n events); // to ensure that other listeners end up getting their cached\n // events.\n source.setResult(\n InternalHelpers.createDataSnapshot(\n query.getRef(),\n IndexedNode.from(serverNode, query.getSpec().getIndex())));\n keepSynced(spec, /*keep=*/ false, /*skipDedup=*/ true);\n }\n });\n }\n });\n return source.getTask();\n }", "public A getValue() { return value; }", "@Override\r\n\tpublic InputSource resolveEntity(String arg0, String arg1, String arg2,\r\n\t\t\tString arg3) throws SAXException, IOException {\n\t\tInputSource is = null;\r\n\t\tString path = map.get(arg3);\r\n\t\t// System.out.println(\"\\tresolve \" + arg3 + \" as \" + path);\r\n\t\tif (path != null) {\r\n\t\t\tis = new InputSource(baseDirectory + path + arg3);\r\n\t\t}\r\n\t\treturn is;\r\n\t}" ]
[ "0.73700964", "0.5844043", "0.56650513", "0.56572", "0.5593602", "0.54397357", "0.5398398", "0.5318428", "0.5311434", "0.5293448", "0.5276135", "0.51855487", "0.5132204", "0.51113033", "0.5099329", "0.50795186", "0.50716263", "0.505654", "0.5032593", "0.5025317", "0.50143266", "0.500568", "0.50045866", "0.49920246", "0.49766475", "0.49389917", "0.4923639", "0.4916855", "0.49134403", "0.49035457", "0.49023643", "0.48993334", "0.48649362", "0.48553056", "0.48484218", "0.48399854", "0.48374814", "0.4837437", "0.48161918", "0.481042", "0.4808127", "0.48029417", "0.4796933", "0.47914195", "0.47862977", "0.47794378", "0.47761402", "0.47711012", "0.47644153", "0.47508466", "0.47474647", "0.47395813", "0.4738097", "0.4728806", "0.47239766", "0.4717243", "0.47148398", "0.47071975", "0.4699406", "0.46942186", "0.46860892", "0.46745142", "0.46489775", "0.4645509", "0.46444756", "0.46339312", "0.46315366", "0.46279514", "0.46276703", "0.46271026", "0.46178797", "0.4616038", "0.46147835", "0.46126327", "0.46120164", "0.46010956", "0.45963177", "0.45950925", "0.4593464", "0.45674542", "0.4559172", "0.4555532", "0.45478988", "0.4546262", "0.45442992", "0.45421416", "0.45420453", "0.45397025", "0.4539236", "0.45384395", "0.45368552", "0.45327365", "0.45307758", "0.4530701", "0.4528189", "0.45232922", "0.45221052", "0.45214045", "0.45115513", "0.45112854", "0.4507759" ]
0.0
-1
before going down,resolve the lazy value here & propogate it to left&right if it's not a leaf node
private static void updateRangeLazy(int[] segtree, int[] lazyValue, int l, int r, int inc, int ns, int ne, int index) { if (lazyValue[index] != 0) { segtree[index] += lazyValue[index]; if (ns != ne) { lazyValue[2 * index] += lazyValue[index]; lazyValue[2 * index + 1] += lazyValue[index]; } lazyValue[index] = 0; } if (r < ns || l > ne) { return; } if (ns == ne) { segtree[index] += inc; return; } if (ns >= l && ne <= r) { // complete overlap - update this node, pass the lazy value(if not leaf) & // return segtree[index] += inc; if (ns != ne) { lazyValue[2 * index] += inc; lazyValue[2 * index + 1] += inc; } // return from here only. return; } else { //partial overlap-call on left& right int mid = (ns + ne) / 2; updateRangeLazy(segtree, lazyValue, l, r, inc, ns, mid, 2 * index); updateRangeLazy(segtree, lazyValue, l, r, inc, mid + 1, ne, 2 * index + 1); segtree[index]=Math.min(segtree[2*index],segtree[2*index+1]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TreeNode getLeft(){ return leftChild;}", "private void rebalanceLeft(TreeNodeDataType n) {\n left(n);\r\n \r\n \r\n }", "public TreeNode resolve(TreeNode root, TreeNode node){\n if (root == null) {\n return node;\n }\n else if(root.val > node.val){ // no replace, keep going down\n root.right = resolve(root.right, node);\n return root;\n }\n else { // new biggest, old root becomes left child\n node.left = root;\n root = null;\n return node;\n }\n }", "private int percolateUpLeaf(){\n\t\treturn percolateUp(heap.size()-1);// TODO: A one-line function that calls percolateUp()\n\t}", "private RegressionTreeNode traverseNominalNode(Serializable value) {\n\t\tif(value.equals(this.value)){\n\t\t\treturn this.leftChild;\n\t\t}else{\n\t\t\treturn this.rightChild;\n\t\t}\n\t}", "private Node dfsPreAdd(Node cur, int val) {\n if ( cur == null) {\n cur = new Node(val);\n return cur;\n }\n //cur is not null: decide left or right\n if (val <= cur.data) {\n cur.left = dfsPreAdd(cur.left, val); \n } else {\n cur.right = dfsPreAdd(cur.right, val);\n }\n return cur;\n }", "TreeNode<T> getLeft();", "private TraverseData traverseOneLevel(TraverseData data) {\n Node<T> currentNode = data.currentNode;\n Node<T> currentNewNode = data.currentNewNode;\n int nextBranch = data.index / data.base;\n\n currentNewNode.set(nextBranch, new Node<>(branchingFactor));\n for (int anotherBranch = 0; anotherBranch < branchingFactor; anotherBranch++) {\n if (anotherBranch == nextBranch) {\n continue;\n }\n currentNewNode.set(anotherBranch, currentNode.get(anotherBranch));\n }\n\n //down\n currentNode = currentNode.get(nextBranch);\n currentNewNode = currentNewNode.get(nextBranch);\n return new TraverseData(currentNode, currentNewNode, data.newRoot, data.index % data.base,\n data.base);\n }", "@Test\n public void testManipulateObjectByReference() {\n TreeNode root = new TreeNode(0);\n root.left = new TreeNode(1);\n root.right = new TreeNode(2);\n setLeftChildToNull(root);\n System.out.println(root.left);\n }", "private BinaryTreeNode getSuccessorFromLeft(BinaryTreeNode node) {\n\n\t\tBinaryTreeNode nodeLeft = node.left;\n\n\t\twhile(nodeLeft.right != null) {\n\t\t\tnodeLeft = nodeLeft.right;\n\t\t}\n\n\t\treturn nodeLeft;\n\n\t}", "Node minValueNode(Node node) \n { \n Node current = node; \n \n /* loop down to find the leftmost leaf */\n while (current.left != null) \n current = current.left; \n \n return current; \n }", "private int leftChild(int i){return 2*i+1;}", "private static int queryLazy(int[] segtree, int[] lazyValue, int l, int r, int ns, int ne, int index) {\n if(lazyValue[index]!=0){\n segtree[index]+=lazyValue[index];\n if(ns!=ne){\n lazyValue[2*index]+=lazyValue[index];\n lazyValue[2*index+1]+=lazyValue[index];\n }\n lazyValue[index]=0;\n }\n if(r<ns || l>ne){\n //no overlap\n return Integer.MAX_VALUE;\n }\n if(ns>=l && ne<=r){\n //complete overlap\n return segtree[index];\n }else{\n //partial overlap\n int mid=(ns+ne)/2;\n int leftAns=queryLazy(segtree, lazyValue, l, r, ns, mid, 2*index);\n int rightAns=queryLazy(segtree, lazyValue, l, r, mid+1, ne, 2*index+1);\n return Math.min(leftAns,rightAns);\n }\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "private int get_left_child(int index){\r\n return 2 * index + 1;\r\n }", "private void handleUnderflow(Node node) {\n\t\t\r\n\t\tNode parent = node.getParent();\r\n\t\t\r\n\t\t//underflow in parent\r\n\t\tif (parent == null) {\r\n\t\t\t//System.out.println(\"Underflow in root!\");\r\n\t\t\tNode newRoot = new Node();\r\n\t\t\t//copy all data of root children into new root\r\n\t\t\tfor (int i = 0; i < root.getChildren().size(); i++) {\r\n\t\t\t\tfor (int j = 0; j < root.getChild(i).getData().size(); j++) {\r\n\t\t\t\t\tnewRoot.addData(root.getChild(i).getData(j));\r\n\t\t\t\t\tif (!root.getChild(i).isLeaf()) {\r\n\t\t\t\t\t\tnewRoot.addChild(root.getChild(i).getChild(j));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!root.getChild(i).isLeaf())\r\n\t\t\t\t\tnewRoot.addChild(root.getChild(i).getChild(root.getChild(i).getChildren().size()));\r\n\t\t\t}\r\n\t\t\tsize--;\r\n\t\t\troot = newRoot;\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\tint nodePosInParent = parent.getEmptyChild();\r\n\t\t\t//if right most child of parent, must borrow from left\r\n\t\t\tif (nodePosInParent == parent.getChildren().size() - 1 ) {\r\n\t\t\t\t//take right most data value from parent\r\n\t\t\t\tnode.addData(parent.removeData(parent.getData().size() - 1));\r\n\t\t\t\t\r\n\t\t\t\tif (node.getSibling(\"left\").getData().size() > 1) {\r\n\t\t\t\t\tparent.addData(node.getSibling(\"left\").removeData(node.getSibling(\"left\").getData().size() - 1));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmerge(node.getSibling(\"left\"), node);\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\t//take immediate greater value from parent\r\n\t\t\t\t//node.addData(parent.removeData(nodePosInParent));\r\n\r\n\t\t\t\t//if we can steal from right sibling\r\n\t\t\t\tif (node.getSibling(\"right\").getData().size() > 1) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t//take immediate greater value from parent\r\n\t\t\t\t\tnode.addData(parent.removeData(nodePosInParent));\r\n\t\t\t\t\t\r\n\t\t\t\t\tparent.addData(node.getSibling(\"right\").removeData(0));\r\n\t\t\t\t\t\r\n\t\t\t\t//otherwise steal from left\r\n\t\t\t\t} else if (nodePosInParent != 0 && node.getSibling(\"left\").getData().size() > 1) {\r\n\r\n\t\t\t\t\t//take immediate lesser value from parent\r\n\t\t\t\t\tnode.addData(parent.removeData(nodePosInParent - 1));\r\n\t\t\t\t\t\r\n\t\t\t\t\tparent.addData(node.getSibling(\"left\").removeData(node.getSibling(\"left\").getData().size() - 1));\r\n\t\t\t\t\t\r\n\t\t\t\t//else, merge\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\t//take immediate greater value from parent\r\n\t\t\t\t\tnode.addData(parent.removeData(nodePosInParent));\r\n\t\t\t\t\t\r\n\t\t\t\t\tmerge(node, node.getSibling(\"right\"));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void postOrderTraverse2(TreeNode head){\n if(head == null) return;\n Stack<TreeNode> stack = new Stack<>();\n stack.push(head);\n TreeNode node;\n while (!stack.isEmpty()){\n while (( node = stack.peek()) != null){\n if(node.lChild != null && node.lChild.visited == true){\n stack.push(null);\n break;\n }\n stack.push(node.lChild);\n }\n stack.pop(); //空指针出栈\n if(!stack.isEmpty()){\n node = stack.peek();\n if(node.rChild == null || node.rChild.visited == true){\n System.out.print(node.val + \" \");\n node.visited = true;\n stack.pop();\n }else {\n stack.push(node.rChild);\n }\n }\n }\n }", "private void leftLeftCase(NodeRB<K, V> x) {\n\t\t// Swap colors of g and p\n\t\tboolean aux = x.parent.color;\n\t\tx.parent.color = x.getGrandParent().color;\n\t\tx.getGrandParent().color = aux;\n\n\t\t// Right Rotate g\n\t\tNodeRB<K, V> g = x.getGrandParent();\n\t\tif (g.parent == null) {\n\t\t\troot = rotateRight(g);\n\t\t} else {\n\t\t\trotateRight(g);\n\t\t}\n\t}", "public int depth() { return Math.max(left.depth(), right.depth()) + 1; }", "public static Node inorderSuccessor(Node x) {\n Node cursor = null;\n if (x == null) {\n return cursor;\n }\n\n if (x.right != null) {\n cursor = x.right;\n while (cursor != null) {\n cursor = cursor.left;\n }\n return cursor;\n } else {\n cursor = x.parent;\n while (cursor != null && cursor.val < x.val) {\n cursor = cursor.parent;\n }\n return cursor;\n }\n }", "private IAVLNode findSuccessor(IAVLNode node) \r\n\t {\r\n\t\t if(node.getRight().getHeight() != -1) \r\n\t\t\t return minPointer(node.getRight());\r\n\t\t IAVLNode parent = node.getParent();\r\n\t\t while(parent.getHeight() != -1 && node == parent.getRight())\r\n\t\t {\r\n\t\t\t node = parent;\r\n\t\t\t parent = node.getParent();\r\n\t\t }\r\n\t\t return parent;\t \r\n\t\t}", "private void resolveRed(Position<Entry<K, V>> p) {\n Position<Entry<K, V>> parent = parent(p);\n if (isRed(parent)) {\n Position<Entry<K, V>> uncle = sibling(parent);\n if (isBlack(uncle)) { // Case 1: mis-shaped 4-node\n Position<Entry<K, V>> middle = restructure(p); // trinode restructuring\n makeBlack(middle);\n makeRed(left(middle));\n makeRed(right(middle));\n } else { // Case 2: overfill 5-node\n makeBlack(parent);\n makeBlack(uncle);\n Position<Entry<K, V>> grand = parent(parent);\n if (!isRoot(grand)) {\n makeRed(grand);\n resolveRed(grand);\n }\n }\n }\n }", "public TreeNode getRight(){ return rightChild;}", "public Node getLeft(){\r\n return this.left;\r\n }", "private void down(Node node, Page page){\n \n if(node instanceof Leaf){\n insertFromLeaf(node, page);\n }else{\n int i = node.find(page.getKey());\n if(i >= node.size){\n if(node.getEntry(i-1).right != null)\n down((Node)node.getEntry(i-1).right, page);\n }else{ \n down((Node)node.getEntry(i).left, page);\n }\n }\n \n }" ]
[ "0.62306756", "0.61208016", "0.60608995", "0.5952089", "0.59367937", "0.5899423", "0.58570874", "0.58125854", "0.5759323", "0.5737795", "0.5733302", "0.57107174", "0.5699874", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5689634", "0.5684843", "0.5679737", "0.5676883", "0.5674823", "0.5667309", "0.5639578", "0.5636432", "0.5632958", "0.5625184", "0.5624599", "0.561925" ]
0.59187895
5
increments the numbers in range from l to r by inc.
private static void updateRange(int[] segtree, int l, int r, int inc, int ns, int ne, int index) { if (r < ns || l > ne) { // no overlap-do nothing return; } if (ns == ne) { segtree[index] += inc; return; } else { // partial or complete overlap - call on left & right int mid = (ns + ne) / 2; updateRange(segtree, l, r, inc, ns, mid, 2 * index); updateRange(segtree, l, r, inc, mid + 1, ne, 2 * index + 1); segtree[index] = Math.min(segtree[2 * index], segtree[2 * index + 1]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void inc(){\n this.current += 1;\n }", "public void inc() {\n inc(1);\n }", "public static IntList dincrList(IntList L, int x) { //iteratively\n /* Your code here. */\n IntList p = L;\n while (p != null) {\n p.first = p.first + x; //this mutate the L.first since p.first and l.first are the same\n p = p.rest; //until p = null then it point to another list\n }\n return L; //not p because P is null at this point and it point to the rest not the original list\n }", "public static IntList incrList(IntList L, int x) {\n /* Your code here. */\n IntList newList = null;\n for (int i = L.size() - 1; i > -1; i--) { //construct the newList backwardly, iteratively\n newList = new IntList(L.get(i) + x, newList);\n }\n return newList;\n }", "public void increment() {\n increment(1);\n }", "public static IntList incrListR(IntList L, int x) {\n if (L == null) {\n return null;\n }\n //each recursive run will create a new IntList until L.rest.rest.rest... = null meaning reaching the last item in\n //the original list\n return new IntList(L.first + x, incrListR(L.rest, x));\n }", "static List<Integer> oddNumbers(int l, int r) {\n List<Integer> output = new ArrayList<Integer>();\n if (l % 2 == 0) {\n l = l + 1;\n }\n while (l <= r) {\n output.add(l);\n l = l + 2;\n }\n return output;\n }", "public abstract void increment(int delta);", "void increase();", "void increase();", "private static List<Integer> addOnePlus(List<Integer> input) {\n\n\t\tint size = input.size();\n\t\tinput.set(size-1, input.get(size-1)+1);//last element of input is updated/replaced by (original value + 1)\n\n\t\tfor(int i=size-1; i>0 && input.get(i)==10; i--) {\n\t\t\tinput.set(i, 0);\n\t\t\tinput.set(i-1, input.get(i-1)+1);\n\t\t}\n\n\t\tif(input.get(0) == 10) {\n\t\t\tinput.set(0, 0);\n\t\t\tinput.add(0, 1);//add 1 at index0 ,shift all elements after to right\n\t\t}\n\n\t\treturn input;//this modifies the original input\n\t}", "@CallSuper\n public long addAndGet(final long l) {\n long currentValue;\n\n for (; ; ) {\n currentValue = get();\n if (compareAndSet(currentValue, currentValue + l)) {\n return currentValue;\n }\n ii(this, mOrigin, \"Collision in concurrent add, will try again: \" + currentValue);\n }\n }", "private void inc_x()\n {\n synchronized(mLock_IndexX) { set_x(get_x() + 1); }\n }", "private int[] inc(int[] a)\n {\n int tI = a.length - 1;\n long m = 0;\n\n m = (((long)a[tI]) & IMASK) + 1L;\n a[tI--] = (int)m;\n m >>>= 32;\n\n while (tI >= 0 && m != 0)\n {\n m += (((long)a[tI]) & IMASK);\n a[tI--] = (int)m;\n m >>>= 32;\n }\n\n return a;\n }", "private int[] inc(int[] a)\n {\n int tI = a.length - 1;\n long m = 0;\n\n m = (((long)a[tI]) & IMASK) + 1L;\n a[tI--] = (int)m;\n m >>>= 32;\n\n while (tI >= 0 && m != 0)\n {\n m += (((long)a[tI]) & IMASK);\n a[tI--] = (int)m;\n m >>>= 32;\n }\n\n return a;\n }", "public int sumRange(int l, int r) {\n l += n;\n // get leaf with value 'r'\n r += n;\n int sum = 0;\n while (l <= r) {\n if ((l % 2) == 1) {\n sum += tree[l];\n l++;\n }\n if ((r % 2) == 0) {\n sum += tree[r];\n r--;\n }\n l /= 2;\n r /= 2;\n }\n return sum;\n }", "public void sort(int l,int r){\n if(l<r){\n int m = (int)(l+r)/2; // find the middle element\n sort(l,m);\n sort(m+1,r);\n\n merge(l,m,r);\n }\n \n }", "public void incValue(){\n\t\tif(this.value < 9){\n\t\t\tthis.value++;\n\t\t}\n\t\telse{\n\t\t\tthis.value = 0;\n\t\t}\n\t}", "public void merge(List<Integer> a, List<Integer> l, List<Integer> r, int left, int right) \n {\n \n int i = 0, j = 0, k = 0;\n while (i < left && j < right) \n {\n if (l.get(i) < r.get(j)) \n {\n a.add(k++, l.get(i++));\n a.remove(k);\n }\n else \n {\n a.add(k++, r.get(j++));\n a.remove(k);\n }\n }\n \n while (i < left) \n {\n a.add(k++, l.get(i++));\n a.remove(k);\n }\n while (j < right) \n {\n a.add(k++, r.get(j++));\n a.remove(k);\n }\n }", "public void incOffset( Integer increment ) {\n offset += increment;\n }", "public static int forward(int c, int r) {\n return r + c - 2;\n }", "static void mergeSort(int[] arr, int l, int r) {\n\t\tif (l<r) {\n\t\t\tint m = (l+r)/2;\n\n\t\t\tmergeSort(arr, l, m);\n\t\t\tmergeSort(arr, m+1, r);\n\t\t\tmerge(arr, l, r, m);\n\t\t}\n\t}", "default void inc(long value) {\n\t\tcount(Math.abs(value));\n\t}", "public void increment() {\n\t\tif (m_bYear) {\n\t\t\tm_value++;\n\t\t\tif (m_value > 9999)\n\t\t\t\tm_value = 0;\n\t\t} else {\n\t\t\tm_value++;\n\t\t\tif (m_value > 11)\n\t\t\t\tm_value = 0;\n\n\t\t}\n\t\trepaint();\n\t}", "long sum(long[] a, int l, int r) {\n return l <= 0 ? a[r] : (a[r] + mod - a[l - 1]) % mod;\n }", "void mergeSort(int[] arr, int l, int r) {\r\n if (l<r)\r\n {\r\n int m = (l+r)/2;\r\n\r\n mergeSort(arr,l,m);\r\n mergeSort(arr, m+1, r);\r\n merge(arr, l, m, r);\r\n }\r\n }", "public void increment(){\n value+=1;\n }", "public static int fastCyclicIncrement(int a, int inc, int base) {\n\ta = a + inc;\n\tif (a >= base) {\n\t a -= base;\n\t}\n\treturn a;\n }", "private void rmerge(int[] arr, int a, int l, int r) {\n\t\tfor (int i = 0; i < l; i += r) {\n\t\t\t// select smallest arr[p0+n*r]\n\t\t\tint q = i;\n\t\t\tfor (int j = i + r; j < l; j += r) {\n\t\t\t\tif (this.reads.compare(arr[a + q], arr[a + j]) > 0) {\n\t\t\t\t\tq = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (q != i) {\n\t\t\t\taswap(arr, a + i, a + q, r); // swap it with current position\n\t\t\t}\n\t\t\tif (i != 0) {\n\t\t\t\taswap(arr, a + l, a + i, r); // swap current position with buffer\n\t\t\t\tbackmerge(arr, a + (l + r - 1), r, a + (i - 1), r); // buffer :merge: arr[i-r..i) -> arr[i-r..i+r)\n\t\t\t}\n\t\t}\n\t}", "void setUnitIncrement(Adjustable adj, int u);", "public void increment() {\n sync.increment();\n }", "private void incrementLevels(int levels){\n this.level += levels;\n if (this.level > 10){\n this.level = 10;\n }\n }", "public void increase() {\r\n\r\n\t\tincrease(1);\r\n\r\n\t}", "private void modify(int index, int value, int root, int range_l, int range_r) {\n if(range_l==range_r && range_l == index){\n intervals[root] = value;\n return;\n }\n\n int mid = (range_l + range_r) / 2;\n if(index <= mid)\n modify(index,value, root*2, range_l, mid);\n else\n modify(index,value, root*2+1, mid+1, range_r);\n\n intervals[root] = intervals[root*2] + intervals[root*2 + 1];\n\n }", "public void incrementScore(int inc){\n\t\tscoreboard.incrementScore(inc);\n\t}", "public static void increase(){\n c++;\n }", "public void increment(double n) {\r\n\t\tthis.value += n;\r\n\t}", "public void incrank() {\n\t\trank++;\n\t}", "public void increment(Object incValue) {\r\n\t\t\r\n\t\tNumberOperation operator = new NumberOperation(this.value, incValue) {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic Number doAnOperation() {\r\n\t\t\t\tTypeEnum typeOfResult = getFinalType();\r\n\t\t\t\tif(typeOfResult == TypeEnum.TYPE_INTEGER) {\r\n\t\t\t\t\treturn getO1().intValue() + getO2().intValue();\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn getO1().doubleValue() + getO2().doubleValue();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis.value = operator.doAnOperation();\r\n\t}", "public void Next(View view)\n {\n increaseNum();\n }", "private void increment() {\n for (int i=0; i < 10000; i++) {\n count++;\n }\n }", "public void printSequence(int l, int r) {\n\t\tfor (int i = 1; i <= 10; i++) {\n\t\t\tSystem.out.print(sequence[i + 1]);\n\t\t}\n\t}", "protected void computeIncrement()\r\n\t{\r\n\t\tsuper.increment = this.userDefinedIncrement;\r\n\r\n\t\tdouble powerOfTen = Math.pow( 10, Math.abs( this.getRoundingPowerOfTen() ) );\r\n\r\n\t\t//---round the increment according to user defined power\r\n\t\tsuper.increment = super.round( super.increment, powerOfTen );\r\n\r\n\t\t//---if we round this down to zero, force it to the power of ten.\r\n\t\t//---for example, round to nearest 100, value = 35...would push down to 0 which is illegal.\r\n\t\tif( super.increment == 0 )\r\n\t\t{\r\n\t\t\tsuper.increment = powerOfTen;\r\n\t\t}\r\n\r\n\t\tsuper.setMinValue( super.round( this.userDefinedMinimum, powerOfTen ) );\r\n\t\tsuper.setMaxValue( super.getMinValue() + ( super.increment * super.getNumberOfScaleItems() ) );\r\n\r\n\t}", "void add(int idx, float incr);", "public static void main(String[] args) {\n\t\t\n\t\tint l = 10;\n\t\tint c = 1;\n\t\tint a = 0;\n\t\tint b = 1;\n\t\n\t\t\n\t\t System.out.println(a + b);\n\t\t \n\t\twhile ( c <= l ) {\n\t\t\tc = a + b;\n\t\t\t\n\t\t\t System.out.println(c);\n\t\t\ta = b;\n\t\t\tb = c;\n\t\t\t\n\t\t\tc += 1;\n\t\t}\n\n\t}", "static void increment() {\r\n\t\tfor (double i =2.4; i<=8.8; i=i+0.2) { \r\n\t\t\tSystem.out.format(\"%.1f %n \",i); //%.1f: to 1 decimal place. %n: print on a new line\r\n\t\t}\r\n\t}", "private void increment() {\r\n salary = (int) (salary + salary * 0.2);\r\n }", "public void inc(String name) {\n inc(name, 1);\n }", "private int getIncrement(int from, int to) {\n if (from < to) {\n return 1;\n } else if (from > to) {\n return -1;\n } else {\n return 0;\n }\n }", "public void merge(int[] num, int l, int m, int r) {\n\t\tint n1 = m - l + 1;\n\t\tint n2 = r - m;\n\t\t\n\t\tint L[] = new int[n1];\n\t\tint R[] = new int[n2];\n\t\t\n\t\tfor (int i = 0; i < n1; i++) {\n\t\t\tL[i] = num[l + i];\n\t\t}\n\t\tfor (int i = 0; i < n2; i++) {\n\t\t\tR[i] = num[m + 1 + i];\n\t\t}\n\t\t\n\t\tint k = l;\n\t\tint i = 0, j = 0;\n\t\twhile (i < n1 && j < n2) {\n\t\t\tif (L[i] < R[j]) {\n\t\t\t\tnum[k] = L[i];\n\t\t\t\ti++;\n\t\t\t} else {\n\t\t\t\tnum[k] = R[j];\n\t\t\t\tj++;\n\t\t\t}\n\t\t\tk++;\n\t\t}\n\t\t\n\t\twhile (i < n1) {\n\t\t\tnum[k] = L[i];\n\t\t\tk++;\n\t\t\ti++;\n\t\t}\n\t\t\n\t\twhile (j < n2) {\n\t\t\tnum[k] = R[j];\n\t\t\tk++;\n\t\t\tj++;\n\t\t}\n\t}", "public void increaseStartPos(int num) {\r\n this.startPos += num;\r\n }", "public int incrementar(int contador){\nSystem.out.println(\"Escoge la cantidad a incrementar\");\nnum=teclado.nextInt();\nfor(int i=0 ; i<num ; i++){\ncontador=contador+1;}\nreturn contador;}", "private static void increaseReference(Counter counter) {\n counter.advance(1);\n }", "int query(int l, int r) {\n l += n;\n r += n;\n int resl = identity;\n int resr = identity;\n while (l < r) {\n if ((l & 1) > 0) resl = combine(resl, st[l++]);\n if ((r & 1) > 0) resr = combine(st[--r], resr);\n l /= 2;\n r /= 2;\n }\n return combine(resl, resr);\n }", "public void increment() {\n items++;\n }", "void increase()\n {\n a++;\n b++ ;\n }", "public void addRange(int range) {\n this.range += range;\n if(this.range <= 0)\n this.range = 1;\n }", "long getAndIncrement();", "public void change(double increment)\n\t{\n\t\tthis.accumulation += increment;\n\t}", "public static void ordenarArray(int arr[], int l, int r)\r\n {\r\n // merge()\r\n \tif (l < r) \r\n {\r\n // Partir por la mitad\r\n int m =l+ (r-l)/2;\r\n \r\n // Izquierda - Derecha\r\n ordenarArray(arr, l, m);\r\n ordenarArray(arr, m + 1, r);\r\n \r\n merge(arr, l, m, r);\r\n }\r\n }", "public void inc(String key) {\n map.put(key, map.getOrDefault(key, 0) + 1);\n int val = map.get(key);\n vals.putIfAbsent(val, new HashSet<>());\n vals.get(val).add(key);\n if (vals.containsKey(val - 1)) {\n vals.get(val - 1).remove(key);\n if (vals.get(val - 1).size() == 0)\n vals.remove(val - 1);\n }\n if (map.get(key) > max) {\n max = map.get(key);\n maxKey = key;\n }\n if (map.get(key) - 1 == min) {\n if (vals.get(min) == null || vals.get(min).size() == 0) {\n min++;\n minKey = key;\n } else {\n minKey = vals.get(min).iterator().next();\n }\n }\n if (map.get(key) == 1) {\n min = 1;\n minKey = key;\n }\n }", "public void increment(View view) {\n if (quantity == 100){\n return;\n }\n quantity = quantity + 1;\n displayQuantity(quantity);\n }", "public int inc(Object key)\r\n {\r\n return add(key, 1);\r\n }", "public void increment(int i, ArrayList<Split> s)\n\t{\n\t\tthis.iValue += i;\n\t\t\n\t\tfor(int counter = 0; counter < s.size(); counter ++)\n\t\t{\n\t\t\tthis.incrementSplit(s.get(counter));\n\t\t}\n\t}", "public void agrandir(int nr)\n\t{\n\t\tif(getRayon() + nr < 0)\n\t\t\tsetRayon(0);\n\t\telse if(getRayon() + nr > TailleEcran)\n\t\t\tsetRayon(TailleEcran);\n\t\telse\n\t\t\tsetRayon(getRayon() + nr);\n\t}", "public void setIncrement( final int value ) {\n checkWidget();\n if( value >= 1 && value <= maximum - minimum ) {\n increment = value;\n }\n }", "public void iterateRange(double xl, double yl,\n double xu, double yu, LinkedList<Point> l) {\n if (_subdivided) {\n if (isWithin(_nodeOrigin[0], _nodeOrigin[1], xl, yl, xu, yu)) {\n _northEast.iterateRange(xl, yl, xu, yu, l);\n _northWest.iterateRange(xl, yl, xu, yu, l);\n _southWest.iterateRange(xl, yl, xu, yu, l);\n _southEast.iterateRange(xl, yl, xu, yu, l);\n } else if (inOneQuadrant(\n _nodeOrigin[0], _nodeOrigin[1], xl, yl, xu, yu)) {\n QuadTree<Point> qt = quadrant(xl, yl);\n qt.iterateRange(xl, yl, xu, yu, l);\n } else {\n if (xl >= _nodeOrigin[0]) {\n _northEast.iterateRange(xl, yl, xu, yu, l);\n _southEast.iterateRange(xl, yl, xu, yu, l);\n } else if (yl > _nodeOrigin[1]) {\n _northEast.iterateRange(xl, yl, xu, yu, l);\n _northWest.iterateRange(xl, yl, xu, yu, l);\n } else if (xu > _nodeOrigin[0]) {\n _southWest.iterateRange(xl, yl, xu, yu, l);\n _southEast.iterateRange(xl, yl, xu, yu, l);\n } else {\n _southWest.iterateRange(xl, yl, xu, yu, l);\n _northWest.iterateRange(xl, yl, xu, yu, l);\n }\n }\n } else {\n Iterator<Point> it = _elements.iterator();\n while (it.hasNext()) {\n Point p = it.next();\n if (isWithin(x(p), y(p), xl, yl, xu, yu)) {\n l.add(p);\n }\n }\n }\n }", "public static synchronized void increment() {\n counter++;\n }", "public static boolean increment(int[] para, int len, IntUnaryOperator radix) {\n\t\tint i;\n\t\tfor (i=0; i<len && para[i]>=radix.applyAsInt(i)-1; i++) {\n\t\t\tpara[i]= 0;\n\t\t}\n\t\tif (i<len)\n\t\t\tpara[i]++;\n\t\treturn i<len;\n\t}", "public void incrementRefusals() {\n\t}", "private void permutation(int[] ans, int l, int r) {\n if (l == r)\n perm.add(ans.clone());\n else {\n for (int i = l; i <= r; i++) {\n ans = swap(ans, l, i);\n permutation(ans, l + 1, r);\n ans = swap(ans, l, i);\n }\n }\n }", "void incrementCount();", "public void inc(String key) {\n int val = 0;\n\n if (!m.containsKey(key)) {\n m.put(key, val + 1);\n } else {\n val = m.get(key);\n m.put(key, val + 1);\n delete(key, val);\n }\n\n insert(key, val + 1);\n }", "public static void increment() {\n\t\tcount.incrementAndGet();\n//\t\tcount++;\n\t}", "public int partition(ArrayList<Integer> arr, int l, int r) {\n int pivot = arr.get(r);\n int pivotIndex = l;\n for (int i = l; i < r; i++) {\n if (arr.get(i) <= pivot) {\n swap(arr, i, pivotIndex);\n pivotIndex++;\n }\n }\n \n swap(arr, pivotIndex, r);\n return pivotIndex;\n }", "private synchronized void increment() {\n ++count;\n }", "public void IncrementCounter()\r\n {\r\n \tsetCurrentValue( currentValue.add(BigInteger.ONE)); \r\n \r\n log.debug(\"counter now: \" + currentValue.intValue() );\r\n \r\n }", "public void inc(String key) { \n \t//a 1 b 1 a 2\n // get key and update\n int val=\tmap.getOrDefault(key, 0)+1;\n if(val>max) {\n \t max=val;\n \t maxkey=key;\n }\n if(val==1||val<min) {\n \t min=val;\n \t minkey=key;\n }\n \t map.put(key,val); \t\n }", "private static void updateRangeLazy(int[] segtree, int[] lazyValue, int l, int r, int inc, int ns, int ne,\n int index) {\n if (lazyValue[index] != 0) {\n segtree[index] += lazyValue[index];\n if (ns != ne) {\n lazyValue[2 * index] += lazyValue[index];\n lazyValue[2 * index + 1] += lazyValue[index];\n }\n lazyValue[index] = 0;\n }\n\n if (r < ns || l > ne) {\n return;\n }\n if (ns == ne) {\n segtree[index] += inc;\n return;\n }\n if (ns >= l && ne <= r) {\n // complete overlap - update this node, pass the lazy value(if not leaf) &\n // return\n segtree[index] += inc;\n if (ns != ne) {\n lazyValue[2 * index] += inc;\n lazyValue[2 * index + 1] += inc;\n }\n // return from here only.\n return;\n } else {\n //partial overlap-call on left& right\n int mid = (ns + ne) / 2;\n updateRangeLazy(segtree, lazyValue, l, r, inc, ns, mid, 2 * index);\n updateRangeLazy(segtree, lazyValue, l, r, inc, mid + 1, ne, 2 * index + 1);\n segtree[index]=Math.min(segtree[2*index],segtree[2*index+1]);\n }\n\n }", "void roll(int pins);", "void merge(int arr[], int l, int m, int r) {\r\n\t\tint[] temp = new int[r - l + 1];\r\n\t\tint i = l;\r\n\t\tint j = m + 1;\r\n\t\tint k = 0;\r\n\t\twhile (i <= m && j <= r) {\r\n\t\t\tif (arr[i] < arr[j])\r\n\t\t\t\ttemp[k++] = arr[i++]; // same as b[k]=a[i]; k++; i++;\r\n\t\t\telse\r\n\t\t\t\ttemp[k++] = arr[j++];\r\n\t\t}\r\n\r\n\t\twhile (j <= r) {\r\n\t\t\ttemp[k++] = arr[j++];\r\n\t\t}\r\n\t\twhile (i <= m) {\r\n\t\t\ttemp[k++] = arr[i++];\r\n\t\t}\r\n\r\n\t\tfor (i = r; i >= l; i--) {\r\n\t\t\tarr[i] = temp[--k];\r\n\t\t}\r\n\t}", "public int increase() {\r\n return ++value;\r\n }", "private synchronized void increment() {\n count++;\n atomicInteger.incrementAndGet();\n }", "private int plusOne(int i) {\n return (i + 1) % capacity;\n }", "PlusExpr (Expr l, Expr r) {\n leftOperand = l;\n rightOperand = r;\n }", "public void build(int root, int range_l, int range_r) {\n if (range_r == range_l) {\n intervals[root] = nums[range_l];\n return;\n\n }\n\n int mid = (range_l + range_r) / 2;\n build(root*2, range_l, mid);\n build(root*2 + 1, mid+1, range_r);\n intervals[root] = intervals[root * 2] + intervals[root * 2 + 1];\n // s[id] = s[id * 2] + s[id * 2 + 1];\n }", "private static void increasePrimitive(int value) {\n value++;\n }", "public /*synchronized*/ void increment() {\n counter++;\n }", "public void increment(View view) {\n if(quantity < 100)\n quantity++;\n displayQuantity(quantity);\n }", "@Override\n public synchronized void increment() {\n count++;\n }", "public int rangeSum(int L, int R)\r\n {\r\n int sum;\r\n return sum = rangeSum(root, L, R);\r\n\r\n }", "public void incrementLevel()\r\n {\r\n counts.addFirst( counts.removeFirst() + 1 );\r\n }", "public void Increase()\n {\n Increase(1);\n }", "@Override public int getBlockIncrement(int dir)\n{\n BicexEvaluationContext ctx = for_bubble.getExecution().getCurrentContext();\n if (ctx != null) {\n BicexValue bv = ctx.getValues().get(\"*LINE*\");\n List<Integer> times = bv.getTimeChanges();\n long now = for_bubble.getExecution().getCurrentTime();\n long prev = -1;\n long next = -1;\n long cur = -1;\n for (Integer t : times) {\n\t if (t <= now) {\n\t prev = cur;\n\t cur = t;\n\t }\n\t else if (next < 0) {\n\t next = t;\n\t break;\n\t }\n }\n\n if (dir < 0 && prev > 0) {\n\t return (int) (now-prev);\n }\n else if (dir > 0 && next > 0) {\n\t return (int) (next-now);\n }\n }\n\n return super.getBlockIncrement(dir);\n}", "public void incrementRow() {\n setRowAndColumn(row + 1, column);\n }", "public static synchronized void increment() {\r\n\t\tcount++;\r\n\t}", "public DocumentMutation increment(FieldPath path, byte inc);", "@Override\r\n\tpublic void increaseViewcnt(int r_idx) {\n\r\n\t}", "public void inc()\n {\n _level++;\n calculateIndentationString();\n }", "public void incang(double i){\n\t\tang += i;\r\n\t\tang = Trig.norm(ang);\r\n\t}" ]
[ "0.6247177", "0.60663915", "0.5893935", "0.58893776", "0.57779896", "0.5777865", "0.57491785", "0.5714795", "0.57062465", "0.57062465", "0.5681986", "0.56390107", "0.5625468", "0.5601003", "0.5601003", "0.5572945", "0.5541791", "0.5535036", "0.5524953", "0.55047065", "0.5501829", "0.54919016", "0.54711425", "0.54317975", "0.5414259", "0.5411485", "0.5362075", "0.53303796", "0.53060406", "0.52921885", "0.526256", "0.52496916", "0.5241136", "0.5227427", "0.52110827", "0.52107763", "0.51956093", "0.5193665", "0.5192805", "0.51910555", "0.51823735", "0.5166632", "0.51601696", "0.5156715", "0.5153072", "0.5147095", "0.5143901", "0.5142523", "0.5141202", "0.5135987", "0.5118292", "0.51173943", "0.51165456", "0.51037854", "0.5100974", "0.50951415", "0.5078145", "0.5057927", "0.5056164", "0.5055633", "0.5049119", "0.50353616", "0.50345147", "0.5034339", "0.50274134", "0.50248563", "0.5019474", "0.5014938", "0.50131077", "0.5007852", "0.49852517", "0.49813136", "0.49779898", "0.49728113", "0.4969577", "0.4969308", "0.49674788", "0.4967061", "0.49655676", "0.49651456", "0.49536788", "0.49498612", "0.49444714", "0.4941262", "0.49303028", "0.49250776", "0.49247816", "0.49244446", "0.49232116", "0.49185476", "0.49068227", "0.49055737", "0.49032184", "0.48922896", "0.48899335", "0.4885723", "0.48787862", "0.4875865", "0.4870923", "0.48654014" ]
0.51235366
50
this function tries to answer the query for starting=l and end=r using a segment tree whose root is at index and root represents answer for a range between ns to ne
private static int query(int[] segtree, int l, int r, int ns, int ne, int index) { if (ns >= l && ne <= r) { // complete overlap return segtree[index]; } else if (ns > r || ne < l) { // no overlap return Integer.MAX_VALUE; } else { int mid = (ns + ne) / 2; int leftAns = query(segtree, l, r, ns, mid, 2 * index); int rightAns = query(segtree, l, r, mid + 1, ne, 2 * index + 1); return Math.min(leftAns, rightAns); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void updateRange(int[] segtree, int l, int r, int inc, int ns, int ne, int index) {\n\n if (r < ns || l > ne) {\n // no overlap-do nothing\n return;\n }\n if (ns == ne) {\n segtree[index] += inc;\n return;\n } else {\n // partial or complete overlap - call on left & right\n int mid = (ns + ne) / 2;\n updateRange(segtree, l, r, inc, ns, mid, 2 * index);\n updateRange(segtree, l, r, inc, mid + 1, ne, 2 * index + 1);\n segtree[index] = Math.min(segtree[2 * index], segtree[2 * index + 1]);\n }\n }", "private void intervals1D(int dim, int lv, int s, int e, int path, int qmin, int qmax, Intervals result) {\n\t\tfinal WaveletMatrix wm = zoWM[dim];\n\t\tfinal SuccinctBitVector sbv = wm.mWM[lv];\n\t\tfinal int s1 = sbv.rank1(s);\n\t\tfinal int e1 = sbv.rank1(e);\n\t\tfinal int s0 = s - s1;\n\t\tfinal int e0 = e - e1;\n\t\tfinal int levelBit = 1 << lv;\n\n\t\t// search zero-bits child\n\t\tCHILD_0: if (s0 < e0) {\n\t\t\t// [pmin, pmax] : possible range of child\n\t\t\tfinal int pmin = path;\n\t\t\tfinal int pmax = pmin | (levelBit - 1);\n\t\t\tif (pmin > qmax || pmax < qmin) {\n\t\t\t\t// out of query range\n\t\t\t\tbreak CHILD_0;\n\t\t\t}\n\t\t\telse if (pmin >= qmin && pmax <= qmax) {\n\t\t\t\t// in range\n\t\t\t\tresult.add(s0, e0, dim, lv - 1);\n\t\t\t\tbreak CHILD_0;\n\t\t\t}\n\t\t\tintervals1D(dim, lv - 1, s0, e0, pmin, qmin, qmax, result);\n\t\t}\n\t\t// search one-bits child\n\t\tCHILD_1: if (s1 < e1) {\n\t\t\t// [pmin, pmax] : possible range of child\n\t\t\tfinal int pmin = path | levelBit;\n\t\t\tfinal int pmax = pmin | (levelBit - 1);\n\t\t\tif (pmin > qmax || pmax < qmin) {\n\t\t\t\t// out of query range\n\t\t\t\tbreak CHILD_1;\n\t\t\t}\n\t\t\telse if (pmin >= qmin && pmax <= qmax) {\n\t\t\t\t// in range\n\t\t\t\tresult.add(s1 + wm.mZ[lv], e1 + wm.mZ[lv], dim, lv - 1);\n\t\t\t\tbreak CHILD_1;\n\t\t\t}\n\t\t\tintervals1D(dim, lv - 1, s1 + wm.mZ[lv], e1 + wm.mZ[lv], pmin, qmin, qmax, result);\n\t\t}\n\t}", "private static int queryLazy(int[] segtree, int[] lazyValue, int l, int r, int ns, int ne, int index) {\n if(lazyValue[index]!=0){\n segtree[index]+=lazyValue[index];\n if(ns!=ne){\n lazyValue[2*index]+=lazyValue[index];\n lazyValue[2*index+1]+=lazyValue[index];\n }\n lazyValue[index]=0;\n }\n if(r<ns || l>ne){\n //no overlap\n return Integer.MAX_VALUE;\n }\n if(ns>=l && ne<=r){\n //complete overlap\n return segtree[index];\n }else{\n //partial overlap\n int mid=(ns+ne)/2;\n int leftAns=queryLazy(segtree, lazyValue, l, r, ns, mid, 2*index);\n int rightAns=queryLazy(segtree, lazyValue, l, r, mid+1, ne, 2*index+1);\n return Math.min(leftAns,rightAns);\n }\n }", "int query_tree(int v, int l, int r, int tl, int tr) {\n int ans = query(1, l, r, r, tl, tr);\n return r - l + 1 - ans;\n }", "public void build(int root, int range_l, int range_r) {\n if (range_r == range_l) {\n intervals[root] = nums[range_l];\n return;\n\n }\n\n int mid = (range_l + range_r) / 2;\n build(root*2, range_l, mid);\n build(root*2 + 1, mid+1, range_r);\n intervals[root] = intervals[root * 2] + intervals[root * 2 + 1];\n // s[id] = s[id * 2] + s[id * 2 + 1];\n }", "private void intervalsRootScan(SearchContext ctx, Intervals result) {\n\t\tfinal int dimension = numDim;\n\t\tfinal int[] mins = ctx.qmins;\n\t\tfinal int[] maxs = ctx.qmaxs;\n\t\tfinal SearchNode curNode = ctx.current();\n\t\tfinal int contained = curNode.contained;\n\t\tfinal int rootStart = curNode.rootStart;\n\t\tfinal int rootEnd = rootStart + curNode.width;\n\t\tfinal int notContained = dimension - Integer.bitCount(contained);;\n\t\tint intervalStart = -1;\n\t\tif (notContained == 1) {\n\t\t\t// sequential-scan on final dimension\n\t\t\tfinal int last1d = Integer.numberOfLeadingZeros(~contained);\n\t\t\tfinal int[] basearray = zoPoints[last1d];\n\t\t\tfinal int min = mins[last1d];\n\t\t\tfinal int max = maxs[last1d];\n\t\t\tfor (int j = rootStart; j < rootEnd; j++) {\n\t\t\t\tint val = basearray[j];\n\t\t\t\tif (val >= min && val <= max) {\n\t\t\t\t\tif (intervalStart < 0) {\n\t\t\t\t\t\tintervalStart = j;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (intervalStart >= 0) {\n\t\t\t\t\t\tresult.addRoot(intervalStart, j);\n\t\t\t\t\t\tintervalStart = -1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// sequential-scan on not contained dimensions\n\t\t\tfinal int[] dims = ctx.work1;\n\t\t\tfor (int ptr = 0, d = 0; d < dimension; d++) {\n\t\t\t\tif (contained << d < 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tdims[ptr++] = d;\n\t\t\t}\n\t\t\tJLOOP: for (int j = rootStart; j < rootEnd; j++) {\n\t\t\t\tfor (int ptr = 0; ptr < notContained; ptr++) {\n\t\t\t\t\tfinal int d = dims[ptr];\n\t\t\t\t\tfinal int val = zoPoints[d][j];\n\t\t\t\t\tif (val < mins[d] || val > maxs[d]) {\n\t\t\t\t\t\tif (intervalStart >= 0) {\n\t\t\t\t\t\t\tresult.addRoot(intervalStart, j);\n\t\t\t\t\t\t\tintervalStart = -1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontinue JLOOP;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (intervalStart < 0) {\n\t\t\t\t\tintervalStart = j;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (intervalStart >= 0) {\n\t\t\tresult.addRoot(intervalStart, rootEnd);\n\t\t}\n\t}", "int query(int l, int r) {\n l += n;\n r += n;\n int resl = identity;\n int resr = identity;\n while (l < r) {\n if ((l & 1) > 0) resl = combine(resl, st[l++]);\n if ((r & 1) > 0) resr = combine(st[--r], resr);\n l /= 2;\n r /= 2;\n }\n return combine(resl, resr);\n }", "private void buildSegmentTree(int treeIndex, int l, int r) {\r\n\r\n // recursion stop rule: only one element in the interval\r\n if (l == r) {\r\n tree[treeIndex] = data[l];\r\n return;\r\n }\r\n\r\n int leftTreeIndex = leftChild(treeIndex);\r\n int rightTreeIndex = rightChild(treeIndex);\r\n\r\n // int mid = (l + r) / 2;\r\n int mid = l + (r - l) / 2; // to prevent overflow\r\n buildSegmentTree(leftTreeIndex, l, mid);\r\n buildSegmentTree(rightTreeIndex, mid + 1, r);\r\n\r\n tree[treeIndex] = merger.merge(tree[leftTreeIndex], tree[rightTreeIndex]);\r\n }", "public int query(int start, int end) {\n if (root == null) {\n return 0;\n }\n\n\n return queryHelper(root, start, end);\n }", "private int search(String query, int from, int to)\n {\n\n if(list.isEmpty() || from >= to){\n return -1;\n }\n\n TreeMap<String, Integer> mapList = new TreeMap<>();\n\n for (int i = 0; i < list.size(); i++) {\n mapList.put(list.get(i), i);\n }\n Collections.sort(list);\n\n\n\n int middle = (from + to) / 2;\n int comparison = query.compareTo(list.get(middle));\n if (comparison == 0){\n return mapList.get(list.get(middle));\n }\n if(comparison > 0){\n\n return search(query, middle, to);\n }\n\n if(comparison < 0){\n return search(query, from, middle);\n }\n\n return -1;\n }", "private static void updateRangeLazy(int[] segtree, int[] lazyValue, int l, int r, int inc, int ns, int ne,\n int index) {\n if (lazyValue[index] != 0) {\n segtree[index] += lazyValue[index];\n if (ns != ne) {\n lazyValue[2 * index] += lazyValue[index];\n lazyValue[2 * index + 1] += lazyValue[index];\n }\n lazyValue[index] = 0;\n }\n\n if (r < ns || l > ne) {\n return;\n }\n if (ns == ne) {\n segtree[index] += inc;\n return;\n }\n if (ns >= l && ne <= r) {\n // complete overlap - update this node, pass the lazy value(if not leaf) &\n // return\n segtree[index] += inc;\n if (ns != ne) {\n lazyValue[2 * index] += inc;\n lazyValue[2 * index + 1] += inc;\n }\n // return from here only.\n return;\n } else {\n //partial overlap-call on left& right\n int mid = (ns + ne) / 2;\n updateRangeLazy(segtree, lazyValue, l, r, inc, ns, mid, 2 * index);\n updateRangeLazy(segtree, lazyValue, l, r, inc, mid + 1, ne, 2 * index + 1);\n segtree[index]=Math.min(segtree[2*index],segtree[2*index+1]);\n }\n\n }", "private static int buildSegmentTree(int[] arr, int[] segtree, int beg, int end, int treeIndex) {\n if (beg == end) {\n segtree[treeIndex] = arr[beg];\n } else {\n // recursive case\n int mid = (beg + end) / 2;\n int leftPart = buildSegmentTree(arr, segtree, beg, mid, 2 * treeIndex);\n int rightPart = buildSegmentTree(arr, segtree, mid + 1, end, 2 * treeIndex + 1);\n segtree[treeIndex] = Math.min(leftPart, rightPart);\n }\n return segtree[treeIndex];\n }", "private void modify(int index, int value, int root, int range_l, int range_r) {\n if(range_l==range_r && range_l == index){\n intervals[root] = value;\n return;\n }\n\n int mid = (range_l + range_r) / 2;\n if(index <= mid)\n modify(index,value, root*2, range_l, mid);\n else\n modify(index,value, root*2+1, mid+1, range_r);\n\n intervals[root] = intervals[root*2] + intervals[root*2 + 1];\n\n }", "private int searchR(Searching[] array, int start, int half, int end, int value) {\n if (value > array[end].getValue() || value < array[start].getValue()) {\n return -1;\n }\n int a = end - start;\n int b = array[end].getValue() - array[start].getValue();\n int c = value - array[start].getValue();\n int d = (c * a) / b;\n int slide = d + start;\n if (slide > end || slide < start) {\n return -1;\n }\n if (array[slide].getValue() == value) {\n return slide;\n }\n if (value < array[slide].getValue()) {\n end = slide;\n return searchR(array, start, half, end, value);\n } else {\n start = slide;\n return searchR(array, start, half, end, value);\n }\n }", "int query_up(int u, int v) {\n int uchain, vchain = chainInInd[v], ans = 0;\n // uchain and vchain are chain numbers of u and v\n int last = -1;\n while (true) {\n uchain = chainInInd[u];\n if (uchain == vchain) {\n // Both u and v are in the same chain, so we need to query from u to v, update answer and break.\n // We break because we came from u up till v, we are done\n if (u == v) break;\n out.println(\"query = \" + (posInBase[v]) + \" \" + (posInBase[u]));\n out.println(query_tree(1, posInBase[v], posInBase[u], 1, pointer));\n ans += query_tree(1, posInBase[v], posInBase[u], 1, pointer);\n // Above is call to segment tree query function\n break;\n }\n out.println(\"query = \" + posInBase[chainInHead[uchain]] + \" \" + (posInBase[u]));\n out.println(query_tree(1, posInBase[chainInHead[uchain]], posInBase[u], 1, pointer));\n ans += query_tree(1, posInBase[chainInHead[uchain]], posInBase[u], 1, pointer);\n // Above is call to segment tree query function. We do from chainHead of u till u. That is the whole chain from\n // start till head. We then update the answer\n u = chainInHead[uchain]; // move u to u's chainHead\n u = par[u]; //Then move to its parent, that means we changed chains\n }\n out.println(ans+\" =ans\");\n return ans;\n }", "List<V> rangeSearch(K key, String comparator) {\r\n\r\n // linked list for return\r\n List<V> val = new LinkedList<>();\r\n LeafNode node_next = this;\r\n LeafNode node_prev = this.previous;\r\n\r\n // to check the current node's next nodes first\r\n while (node_next != null) {\r\n if (comparator.equals(\"<=\")) {\r\n if (node_next.getFirstLeafKey().compareTo(key) > 0) {\r\n node_next = node_next.next;\r\n continue;\r\n }else{\r\n compare((K) key, comparator, (List<V>) val, node_next);\r\n node_next = node_next.next;\r\n }\r\n } else if (comparator.equals(\">=\")){\r\n if (node_next.getFirstLeafKey().compareTo(key) < 0) {\r\n node_next = node_next.next;\r\n continue;\r\n }\r\n else{\r\n compare((K) key, comparator, (List<V>) val, node_next);\r\n node_next = node_next.next;\r\n }\r\n } else if ( comparator.equals(\"==\")){\r\n if (node_next.getFirstLeafKey().compareTo(key) > 0){\r\n node_next = node_next.next;\r\n continue;\r\n } else {\r\n compare((K) key, comparator, (List<V>) val, node_next);\r\n node_next = node_next.next;\r\n }\r\n }\r\n }\r\n\r\n // to check the previous nodes\r\n while (node_prev != null) {\r\n if (comparator.equals(\"<=\")) {\r\n if (node_prev.getFirstLeafKey().compareTo(key) > 0) {\r\n node_prev = node_prev.previous;\r\n continue;\r\n }else{\r\n compare((K) key, comparator, (List<V>) val, node_prev);\r\n node_prev = node_prev.previous;\r\n }\r\n } else if (comparator.equals(\">=\")){\r\n if (node_prev.getFirstLeafKey().compareTo(key) < 0) {\r\n node_prev = node_prev.previous;\r\n continue;\r\n }\r\n else{\r\n compare((K) key, comparator, (List<V>) val, node_prev);\r\n node_prev = node_prev.previous;\r\n }\r\n } else if ( comparator.equals(\"==\")){\r\n if (node_prev.getFirstLeafKey().compareTo(key) > 0){\r\n node_prev = node_prev.previous;\r\n continue;\r\n } else {\r\n compare((K) key, comparator, (List<V>) val, node_prev);\r\n node_prev = node_prev.previous;\r\n }\r\n }\r\n\r\n\r\n }\r\n\r\n return val;\r\n }", "public int getInRange(Node root, int id1, int id2){\n\t\t\n\t\tif(root==nil){\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\t/*if(root.id >= id1 && root.id <= id2){\n\t\t\t//if(root.id==350) System.out.println(\" in range \" + root.id + \" with count \" + root.count);\n\t\t\tcount.count = count.count+root.count;\n\t\t}*/\n\t\tif(root.id==id1&&root.id==id2)\n return root.count;\n\n if(id1<=root.id&&id2>=root.id){\n \n return root.count+getInRange(root.left,id1,id2)+getInRange(root.right,id1,id2);\n }\n\n\t\t\n else if(id1<root.id){\n return getInRange(root.left,id1,id2);\n\n }\n else {\n return getInRange(root.right, id1, id2);\n }\n\n\t}", "public List rangeSearch(int x, int y){\n List list = new List(y-x);\n Node current = findClosest(x);\n Node end = findClosest(y);\n\n // list.append(current);\n // System.out.print(\"end 1 = \" + end.key+\" \");\n while(current.key<=end.key)\n {\n\n // System.out.print(\"current 2= \" + current.key+\" \");\n if(current.key<=y){ // ใส่ node ที่มีค่าไม่เกิน rangeSearch\n list.append(current);\n }\n\n if(current.key>=end.key){break;}\n\n current = findNext(current);\n\n\n\n // System.out.print(\"current 3= \" + current.key);\n\n }\n\n\n return list;\n }", "public void visiualizeLastSearch(){\r\n\t\tint number=0;\r\n\t\tNode dummy;\r\n\t\tNode next;\r\n\t\tfor(int i=sl.height(); i>=0; i--){\r\n\t\t\tdummy = sl.getFrom(0,0);\r\n\t\t\tnext = sl.getFrom(i,0);\r\n\t\t\tString seperator=\"-\";\r\n\t\t\tfor(int j=0; j<(sl.size()+2); j++){\r\n\r\n\t\t\t\tnumber = next.getKey();\r\n\t\t\t\t\r\n\t\t\t\tif(i<sl.height() && sl.getVisited()[i+1].getKey()!=sl.getVisited()[i].getKey() && number>sl.getVisited()[i+1].getKey() && number<=sl.getVisited()[i].getKey())\r\n\t\t\t\t\tseperator = \"*\";\r\n\t\t\t\telse\r\n\t\t\t\t\tseperator = \"-\";\r\n\r\n\t\t\t\tif(number==dummy.getKey()){\r\n\r\n\t\t\t\t\tif(number==minf)\r\n\t\t\t\t\t\tSystem.out.print(\"-inf\");\r\n\t\t\t\t\telse if(number==inf)\r\n\t\t\t\t\t\tSystem.out.print(repeatStr(seperator,3)+\"inf\");\r\n\t\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(repeatStr(seperator,2)+number);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(repeatStr(seperator,4));\r\n\t\t\t\t\r\n\t\t\t\tif(dummy.getKey()==number)\r\n\t\t\t\t\tnext = next.getRight();\r\n\t\t\t\t\r\n\t\t\t\tdummy = dummy.getRight();\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}", "@Test\n \tpublic void whereClauseForNodeRangedDominance() {\n \t\tnode23.addJoin(new Dominance(node42, 10, 20));\n \t\tcheckWhereCondition(\n //\t\t\t\tjoin(\"=\", \"_rank23.component_ref\", \"_rank42.component_ref\"),\n \t\t\t\tjoin(\"=\", \"_component23.type\", \"'d'\"),\n \t\t\t\t\"_component23.name IS NULL\",\n \t\t\t\tjoin(\"<\", \"_rank23.pre\", \"_rank42.pre\"),\n \t\t\t\tjoin(\"<\", \"_rank42.pre\", \"_rank23.post\"),\n \t\t\t\t\"_rank23.level BETWEEN SYMMETRIC _rank42.level - 10 AND _rank42.level - 20\"\n \n \t\t);\n \t}", "private int count1D(SearchContext ctx) {\n\t\tfinal SearchNode curNode = ctx.current();\n\n\t\tfinal int last1d = Integer.numberOfLeadingZeros(~curNode.contained);\n\t\tWaveletMatrix wm = zoWM[last1d];\n\t\tfinal WMNode wmNode = curNode.wmNodes[last1d];\n\t\tfinal int lv = wmNode.level;\n\t\tfinal int start = wmNode.start;\n\t\tfinal int end = start + curNode.width;\n\n\t\t// query range\n\t\tfinal int qmin = ctx.qmins[last1d];\n\t\tfinal int qmax = ctx.qmaxs[last1d];\n\n\t\t// path range (possible range of WaveletMatrix node)\n\t\tfinal int pmin = wmNode.path;\n\t\tfinal int pmax = pmin | ((1 << (lv+1)) - 1);\n\n\t\t// relation of query range and path range intersection\n\t\t// [qmin , qmax] query range\n\t\t// [pmin,pmax] path range contain minimum of query range\n\t\t// [pmin,pmax] path range contain maximum of query range\n\t\t// [pmin , pmax] path range fully contain query range\n\n\t\tif (pmax <= qmax) {\n\t\t\treturn end - start - little1D(lv, start, end, qmin, wm);\n\t\t}\n\t\telse if (qmin <= pmin) {\n\t\t\treturn little1D(lv, start, end, qmax + 1, wm);\n\t\t}\n\t\telse {\n\t\t\treturn little1D(lv, start, end, qmax + 1, wm) - little1D(lv, start, end, qmin, wm);\n\t\t}\n\t}", "public abstract void selectIndexRange(int min, int max);", "public XnRegion keysOf(int start, int stop) {\n\t\tint offset = start;\n\t\tint left = -1;\n\t\tStepper stepper = myRegion.simpleRegions(myOrdering);\n\t\ttry {\n\t\t\tXnRegion region;\n\t\t\twhile ((region = (XnRegion) stepper.fetch()) != null) {\n\t\t\t\tif (region.count().isLE(IntegerValue.make(offset))) {\n\t\t\t\t\toffset = offset - region.count().asInt32();\n\t\t\t\t} else {\n\t\t\t\t\tif (left == -1) {\n\t\t\t\t\t\tleft = ((IntegerPos) (region.chooseOne(myOrdering))).asIntegerVar().asInt32() + offset;\n\t\t\t\t\t\toffset = stop - (start - offset);\n\t\t\t\t\t\tif (offset <= region.count().asInt32()) {\n\t\t\t\t\t\t\treturn IntegerRegion.make(\n\t\t\t\t\t\t\t\tIntegerValue.make(left),\n\t\t\t\t\t\t\t\t(((IntegerPos) (region.chooseOne(myOrdering))).asIntegerVar().plus(IntegerValue.make(offset))));\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tint right = ((IntegerPos) (region.chooseOne(myOrdering))).asIntegerVar().asInt32() + offset;\n\t\t\t\t\t\treturn IntegerRegion.make(IntegerValue.make(left), IntegerValue.make(right));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tstepper.step();\n\t\t\t}\n\t\t} finally {\n\t\t\tstepper.destroy();\n\t\t}\n\t\tthrow new AboraRuntimeException(AboraRuntimeException.NOT_IN_TABLE);\n\t\t/*\n\t\tudanax-top.st:12729:IntegerArrangement methodsFor: 'accessing'!\n\t\t{XnRegion} keysOf: start {Int32} with: stop {Int32}\n\t\t\t\"Return the region that corresponds to a range of indices.\"\n\t\t\t| offset {Int32} left {Int32} right {Int32} | \n\t\t\toffset _ start.\n\t\t\tleft _ -1.\n\t\t\t(myRegion simpleRegions: myOrdering) forEach: \n\t\t\t\t[:region {XnRegion} |\n\t\t\t\tregion count <= offset \n\t\t\t\t\tifTrue: [offset _ offset - region count DOTasLong]\n\t\t\t\t\tifFalse:\n\t\t\t\t\t\t[left == -1 \n\t\t\t\t\t\t\tifTrue: \n\t\t\t\t\t\t\t\t[left _ ((region chooseOne: myOrdering) cast: IntegerPos) asIntegerVar DOTasLong + offset.\n\t\t\t\t\t\t\t\toffset _ stop - (start - offset).\n\t\t\t\t\t\t\t\toffset <= region count DOTasLong ifTrue: \n\t\t\t\t\t\t\t\t\t[^IntegerRegion make: left \n\t\t\t\t\t\t\t\t\t\t\twith: (((region chooseOne: myOrdering) cast: IntegerPos) asIntegerVar + offset)]]\n\t\t\t\t\t\t\tifFalse:\n\t\t\t\t\t\t\t\t[right _ ((region chooseOne: myOrdering) cast: IntegerPos) asIntegerVar DOTasLong + offset.\n\t\t\t\t\t\t\t\t^IntegerRegion make: left with: right]]].\n\t\t\tHeaper BLAST: #NotInTable.\n\t\t\t^ NULL \"compiler fodder\"!\n\t\t*/\n\t}", "@Override\r\n @TypeInfo(\"ceylon.language.Empty|ceylon.language.Sequence<Element>\")\r\n public ceylon.language.List<? extends Element> segment(\r\n \t\t@Name(\"from\") final Integer from, \r\n \t\t@Name(\"length\") final long length) {\n if (length<=0) return $empty.getEmpty();\r\n if (!defines(from)) return $empty.getEmpty();\r\n Element x = this.first;\r\n for (int i=0; i < from.longValue(); i++) { x = this.next(x); }\r\n Element y = x;\r\n for (int i=1; i < length; i++) { y = this.next(y); }\r\n if (!includes(y)) { y = this.last; }\r\n return new Range<Element>(x, y);\r\n }", "public void getRange()\n\t{\n\t\tint start = randInt(0, 9);\n\t\tint end = randInt(0, 9);\t\t\n\t\tint startNode = start<=end?start:end;\n\t\tint endNode = start>end?start:end;\n\t\tSystem.out.println(\"Start : \"+startNode+\" End : \"+endNode);\n\t}", "public void searchByRange(Integer currentLine, int k1, int k2) {\r\n\t\t//Check if user typed values k1>k2 and swap if needed\r\n\t\tif(k1>k2) {\r\n\t\t\t//Temporary variable for storing k1 value\r\n\t\t\tint temp=k1;\r\n\t\t\t//Swap values of k1 & k2\r\n\t\t\tk1=k2;\r\n\t\t\tk2=temp;\r\n\t\t}\r\n\t\t//Base case\r\n\t\tif(increaseCompares() && currentLine==-1) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t//Recurse for left subtree first\r\n\t\tif(increaseCompares() && k1<getKey(currentLine)) {\r\n\t\t\tsearchByRange(getLeft(currentLine),k1,k2);\r\n\t\t}\r\n\t\t//If node's data lies in range, then print data\r\n\t\tif(increaseCompares() && (k1<=getKey(currentLine) && k2>=getKey(currentLine))) {\r\n\t\t\tSystem.out.print(getKey(currentLine)+ \",\");\r\n\t\t}\r\n\t\t//Recurse for right subtree\r\n\t\tif(increaseCompares() && k2>getKey(currentLine)) {\r\n\t\t\tsearchByRange(getRight(currentLine),k1,k2);\r\n\t\t}\r\n\t}", "public int getIndex(int start) {\n int left = 0;\r\n int right = bookings.size()-1;\r\n while (left <= right) {\r\n int mid = left + (right-left)/2;\r\n if (bookings.get(mid).start == start) {\r\n return mid;\r\n }\r\n else if (bookings.get(mid).start < start) {\r\n left = mid+1;\r\n }\r\n else {\r\n right = mid-1;\r\n }\r\n }\r\n return right;\r\n }", "public int sumRange(int l, int r) {\n l += n;\n // get leaf with value 'r'\n r += n;\n int sum = 0;\n while (l <= r) {\n if ((l % 2) == 1) {\n sum += tree[l];\n l++;\n }\n if ((r % 2) == 0) {\n sum += tree[r];\n r--;\n }\n l /= 2;\n r /= 2;\n }\n return sum;\n }", "private void keepRangeRecur(BinaryNode node, E a, E b) {\n\n if (node == null) return;\n\n //node is within a-b bounds so keep it\n if (a.compareTo((E)node.element) <= 0 && b.compareTo((E)node.element) >= 0) {\n keepRangeRecur(node.left, a, b);\n keepRangeRecur(node.right, a, b);\n\n //node is to the left of boundaries\n } else if (a.compareTo((E)node.element) > 0) {\n if (node == root) {\n root = node.right;\n node.right.parent = null;\n } else if (node.parent.right == node) { //node and its parent are out\n root = node;\n node.parent = null;\n keepRangeRecur(node.left, a, b);\n } else { //node is out but its parent is in\n node.parent.left = node.right;\n if (node.right != null) node.right.parent = node.parent; // checking if child exists\n }\n keepRangeRecur(node.right, a, b);\n\n // node is to the right of boundaries\n } else if (b.compareTo((E)node.element) < 0) {\n if (node == root) {\n root = node.left;\n node.left.parent = null;\n } else if (node.parent.left == node) { //node and its parent are out\n root = node;\n node.parent = null;\n keepRangeRecur(node.right, a, b);\n } else { //node is out but its parent is in\n node.parent.right = node.left;\n if (node.left != null) node.left.parent = node.parent; // checking if child exists\n }\n keepRangeRecur(node.left, a, b);\n }\n }", "public int searchPrefix(StringBuilder s, int start, int end){ \n\t if (root != null){\n\t\t char key = s.charAt(start);\n\t\t Node x = root; \n\t\t\n\t\t while(true){\n\t\t\t if (key == x.letter) {\n\t\t\t\t if (start < end) {\n\t\t\t\t\t start++; \n\t\t\t\t\t x = x.child; \n\t\t\t\t\t key = s.charAt(start);\n\t \t\t\t\n\t\t\t\t }else if (x.child.letter == TERMINATOR){\n\t\t\t\t\t if (x.child.sibling != null){ \n\t\t\t\t\t\t return 3;\n\t\t\t\t\t }\n\t\t\t\t\t return 2;\n\t\t\t\t\t\n\t\t\t\t }else { \t\n\t\t\t\t\t return 1; \n\t\t\t\t }\n\t\t\t }else if (key > x.letter){\n\t\t\t\t if(x.sibling != null) {\n\t\t\t\t\t x = x.sibling;\n\t\t\t\t }else {\n\t\t\t\t\t return 0; //not found\n\t\t\t\t }\n\t\t\t }else {\n\t\t\t\t return 0; \n\t\t\t }\n\t\t}\n\t}\t\n\t \treturn 0; \t\n }", "private void _update(int nodeNum, int s, int e, final long l, final long r, final int kind){\n if(r<s || e<l)\n return;\n\n // case 2: in range\n if(l<=s && e<=r){\n tree[nodeNum] = kind;\n return;\n }\n\n // case 3-1: overlap range, same value\n if(tree[nodeNum] == kind)\n return;\n\n // case 3-2: overlap range, different value\n if(tree[nodeNum] != -1) {\n tree[nodeNum*2] = tree[nodeNum];\n tree[nodeNum*2+1] = tree[nodeNum];\n tree[nodeNum] = -1;\n }\n\n int mid = (s + e) / 2;\n _update(nodeNum*2, s, mid, l, r, kind);\n _update(nodeNum*2+1, mid+1, e, l, r, kind);\n }", "@Test\n public void testCase1 () throws IOException {\n sq = new SpanSegmentQuery(new SpanTermQuery(new Term(\"base\", \"s:b\")),\n new SpanTermQuery(new Term(\"base\", \"s:c\")));\n\n kr = ki.search(sq, (short) 10);\n ki.close();\n\n assertEquals(\"totalResults\", kr.getTotalResults(), 3);\n assertEquals(\"StartPos (0)\", 1, kr.getMatch(0).startPos);\n assertEquals(\"EndPos (0)\", 2, kr.getMatch(0).endPos);\n assertEquals(\"StartPos (1)\", 4, kr.getMatch(1).startPos);\n assertEquals(\"EndPos (1)\", 5, kr.getMatch(1).endPos);\n }", "private int binarySearchByIndex(List<Span> spans, int index){\n int left = 0,right = spans.size() - 1,mid,row;\n int max = right;\n while(left <= right){\n mid = (left + right) / 2;\n if(mid < 0) return 0;\n if(mid > max) return max;\n row = spans.get(mid).startIndex;\n if(row == index) {\n return mid;\n }else if(row < index){\n left = mid + 1;\n }else{\n right = mid - 1;\n }\n }\n int result = Math.max(0,Math.min(left,max));\n while(result > 0) {\n if(spans.get(result).startIndex > index) {\n result--;\n }else{\n break;\n }\n }\n while(result < right) {\n if(getSpanEnd(result,spans) < index) {\n result++;\n }else{\n break;\n }\n }\n return result;\n }", "private static <K extends Comparable<? super K>, V> @Nullable Node<K, V> findBestRoot(\n @Nullable Node<K, V> pRoot,\n @Nullable K pFromKey,\n boolean pFromInclusive,\n @Nullable K pToKey,\n boolean pToInclusive) {\n\n @Var Node<K, V> current = pRoot;\n while (current != null) {\n\n if (pFromKey != null && exceedsLowerBound(current.getKey(), pFromKey, pFromInclusive)) {\n // current and left subtree can be ignored\n current = current.right;\n } else if (pToKey != null && exceedsUpperBound(current.getKey(), pToKey, pToInclusive)) {\n // current and right subtree can be ignored\n current = current.left;\n } else {\n // current is in range\n return current;\n }\n }\n\n return null; // no mapping in range\n }", "void solve() throws IOException {\n int[] nk = ril(2);\n int n = nk[0];\n int k = nk[1];\n int[] p = ril(n);\n int[] b = ril(k);\n for (int i = 0; i < n; i++) p[i]--;\n for (int i = 0; i < k; i++) b[i]--;\n\n int[] numToIdx = new int[n];\n for (int i = 0; i < n; i++) numToIdx[p[i]] = i;\n\n boolean[] remove = new boolean[n];\n Arrays.fill(remove, true);\n for (int bi : b) remove[bi] = false;\n List<Integer> toRemove = new ArrayList<>(n - k);\n for (int i = 0; i < n; i++) if (remove[i]) toRemove.add(i);\n Collections.sort(toRemove);\n\n int[] prevSmaller = new int[n];\n prevSmaller[0] = -1;\n int prevIdx = remove[p[0]] ? -1 : 0;\n for (int i = 1; i < n; i++) {\n int j = prevIdx;\n while (j != -1 && p[i] < p[j]) j = prevSmaller[j];\n prevSmaller[i] = j;\n if (!remove[p[i]]) prevIdx = i;\n }\n int[] nextSmaller = new int[n];\n nextSmaller[n-1] = n;\n prevIdx = remove[p[n-1]] ? n : n-1;\n for (int i = n-2; i >= 0; i--) {\n int j = prevIdx;\n while (j != n && p[i] < p[j]) j = nextSmaller[j];\n nextSmaller[i] = j;\n if (!remove[p[i]]) prevIdx = i;\n }\n\n int[] init = new int[n];\n Arrays.fill(init, 1);\n SegmentTree st = new SegmentTree(init);\n long ans = 0;\n for (int x : toRemove) {\n int idx = numToIdx[x];\n int l = prevSmaller[idx] + 1;\n int r = nextSmaller[idx] - 1;\n ans += st.query(l, r+1);\n st.modify(idx, 0);\n }\n pw.println(ans);\n }", "public Iterable<Point2D> range(RectHV rect) {\n\t\tif (rect == null) {\n\t\t\tthrow new NullPointerException();\n\t\t}\n\t\tQueue<Point2D> queue = new Queue<Point2D>();\n\t\tStack<Node> stack = new Stack<>();\n\t\tstack.push(root);\n\t\twhile (!stack.isEmpty()) {\n\t\t\tNode nCur = stack.pop();\n\t\t\tPoint2D pCur = nCur.point;\n\t\t\tif (rect.contains(pCur)) {\n\t\t\t\tqueue.enqueue(pCur);\n\t\t\t\tif (nCur.right != null) {\n\t\t\t\t\tstack.push(nCur.right);\n\t\t\t\t}\n\t\t\t\tif (nCur.left != null) {\n\t\t\t\t\tstack.push(nCur.left);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (nCur.bDirection == USING_X) {\n\t\t\t\t\tif (nCur.x < rect.xmin() && nCur.right != null) {\n\t\t\t\t\t\tstack.push(nCur.right);\n\t\t\t\t\t} else if (nCur.x > rect.xmax() && nCur.left != null) {\n\t\t\t\t\t\tstack.push(nCur.left);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (nCur.right != null) {\n\t\t\t\t\t\t\tstack.push(nCur.right);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (nCur.left != null) {\n\t\t\t\t\t\t\tstack.push(nCur.left);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (nCur.y < rect.ymin() && nCur.right != null) {\n\t\t\t\t\t\tstack.push(nCur.right);\n\t\t\t\t\t} else if (nCur.y > rect.ymax() && nCur.left != null) {\n\t\t\t\t\t\tstack.push(nCur.left);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (nCur.right != null) {\n\t\t\t\t\t\t\tstack.push(nCur.right);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (nCur.left != null) {\n\t\t\t\t\t\t\tstack.push(nCur.left);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn queue;\n\t}", "private void range(Node h, RectHV nrect, RectHV rect, TreeSet<Point2D> rangeSet) {\n \tif (h == null) {\r\n \t\treturn;\r\n \t}\r\n\r\n \tif (rect.intersects(nrect)) {\r\n \t\tif(rect.contains(h.p)) {\r\n \t\t\trangeSet.add(h.p);\r\n }\r\n \t\trange(h.lb, leftRect(nrect, h), rect, rangeSet);\r\n \t\trange(h.rt, rightRect(nrect, h), rect, rangeSet);\r\n \t}\r\n }", "int query(int L, int R, int l, int r, int dep, int k) {\n if (l == r)\n return tree[dep][l];\n //System.out.println(l + \" \" + r);\n int mid = (L + R) >> 1;\n int[] row = toLeft[dep];\n int count = row[r] - row[l - 1];\n if (count >= k) {\n // left\n int newl = L - row[L - 1] + row[l - 1];\n int newr = newl + count - 1;\n return query(L, mid, newl, newr, dep + 1, k);\n } else {\n // right\n int newr = r + row[R] - row[r];\n int newl = newr - (r - l - count);\n return query(mid + 1, R, newl, newr, dep + 1, k - count);\n }\n }", "public static ArrayList<String> getPaths(int rstart, int cstart, int rend, int cend){\n if(rstart==rend && cstart==cend){\n ArrayList<String> base = new ArrayList<>();\n base.add(\"\");\n return base;\n };\n\n ArrayList<String> allPaths = new ArrayList<>();\n\n if(rstart!=rend){\n for(int i=1 ;i<=rend-rstart; i++ ) {\n ArrayList<String> pathsVt = getPaths(rstart + i, cstart, rend, cend);\n for(String path:pathsVt){\n allPaths.add(i+\"v\"+path);\n }\n }\n\n }\n if(cstart!=cend){\n for(int i=1 ;i<=cend-cstart; i++ ) {\n ArrayList<String> pathsHz = getPaths(rstart , cstart+i, rend, cend);\n for(String path:pathsHz){\n allPaths.add(i+\"h\"+path);\n }\n }\n }\n if(rstart!=rend && cstart!=cend){\n int jump = (rend<cend)? rend-rstart : cend-cstart ;\n for(int i=1 ;i<=jump; i++ ) {\n ArrayList<String> pathsDg = getPaths(rstart + i, cstart+i, rend, cend);\n for(String path:pathsDg){\n allPaths.add(i+\"d\"+path);\n }\n }\n }\n\n return allPaths;\n }", "public void iterateRange(double xl, double yl,\n double xu, double yu, LinkedList<Point> l) {\n if (_subdivided) {\n if (isWithin(_nodeOrigin[0], _nodeOrigin[1], xl, yl, xu, yu)) {\n _northEast.iterateRange(xl, yl, xu, yu, l);\n _northWest.iterateRange(xl, yl, xu, yu, l);\n _southWest.iterateRange(xl, yl, xu, yu, l);\n _southEast.iterateRange(xl, yl, xu, yu, l);\n } else if (inOneQuadrant(\n _nodeOrigin[0], _nodeOrigin[1], xl, yl, xu, yu)) {\n QuadTree<Point> qt = quadrant(xl, yl);\n qt.iterateRange(xl, yl, xu, yu, l);\n } else {\n if (xl >= _nodeOrigin[0]) {\n _northEast.iterateRange(xl, yl, xu, yu, l);\n _southEast.iterateRange(xl, yl, xu, yu, l);\n } else if (yl > _nodeOrigin[1]) {\n _northEast.iterateRange(xl, yl, xu, yu, l);\n _northWest.iterateRange(xl, yl, xu, yu, l);\n } else if (xu > _nodeOrigin[0]) {\n _southWest.iterateRange(xl, yl, xu, yu, l);\n _southEast.iterateRange(xl, yl, xu, yu, l);\n } else {\n _southWest.iterateRange(xl, yl, xu, yu, l);\n _northWest.iterateRange(xl, yl, xu, yu, l);\n }\n }\n } else {\n Iterator<Point> it = _elements.iterator();\n while (it.hasNext()) {\n Point p = it.next();\n if (isWithin(x(p), y(p), xl, yl, xu, yu)) {\n l.add(p);\n }\n }\n }\n }", "public static void main(String[] args) {\n TreeNode n20 = new TreeNode(20);\n TreeNode n8 = new TreeNode(8);\n TreeNode n4 = new TreeNode(4);\n TreeNode n7 = new TreeNode(7);\n TreeNode n12 = new TreeNode(12);\n TreeNode n14 = new TreeNode(14);\n TreeNode n21 = new TreeNode(21);\n TreeNode n22 = new TreeNode(22);\n TreeNode n25 = new TreeNode(25);\n TreeNode n24 = new TreeNode(24);\n n20.left = n8;\n n20.right = n22;\n n8.left = n4;\n n8.right = n12;\n n4.right = n7;\n n12.right = n14;\n n22.left = n21;\n n22.right = n25;\n n25.left = n24;\n\n for (Integer i : printBoundary(n20)) {\n System.out.println(i);\n }\n }", "private int searchUtil(int key, int strt, int end) {\n\t\tint mid;\n\t\twhile(strt <= end) {\n\t\t\tmid = strt + (end-strt)/2;\n\t\t\tif(arr[mid] == key) \n\t\t\t\treturn mid;\n\t\t\telse if(arr[strt] < arr[mid]){ //left half is sorted\n\t\t\t\tif(arr[strt]<= key && key < arr[mid])\n\t\t\t\t\tend = mid-1;\n\t\t\t\telse\n\t\t\t\t\tstrt = mid+1;\n\t\t\t\n\t\t\t} else { //right half is sorted\n\t\t\t\tif(arr[mid]<=key && key < arr[end])\n\t\t\t\t\tstrt = mid+1;\n\t\t\t\telse\n\t\t\t\t\tend = mid -1;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "protected abstract R getRange(E entry);", "private int getEndNodeIndex(int validStartIndexOfStr, int len) {\n\t\treturn (validStartIndexOfStr + len - 2) / 2;\n\t}", "public void testRange() throws IOException, InvalidGeoException\r\n {\n LgteIndexSearcherWrapper searcher = new LgteIndexSearcherWrapper(path);\r\n\r\n //try find Jorge and Bruno documents last year\r\n // In this case the closest one will be in 2007\r\n String query = \"contents:(Jorge Bruno)\";\r\n\r\n LgteQuery lgteQueryResult1;\r\n LgteQuery lgteQueryResult1and2;\r\n try\r\n {\r\n lgteQueryResult1 = LgteQueryParser.parseQuery(query);\r\n lgteQueryResult1and2 = LgteQueryParser.parseQuery(query);\r\n\r\n MyCalendar c1Aux = new MyCalendar(2005,11,20,9,0,10);\r\n MyCalendar c2Aux = new MyCalendar(2007,1,12,20,45,15);\r\n long dif = c2Aux.getTimeInMillis() - c1Aux.getTimeInMillis();\r\n\r\n lgteQueryResult1.getQueryParams().setTimeMiliseconds(c1Aux.getTimeInMillis());\r\n lgteQueryResult1.getQueryParams().setRadiumMiliseconds(dif -1);\r\n lgteQueryResult1and2.getQueryParams().setTimeMiliseconds(c1Aux.getTimeInMillis());\r\n lgteQueryResult1and2.getQueryParams().setRadiumMiliseconds(dif+1);\r\n }\r\n catch (ParseException e)\r\n {\r\n fail(e.toString());\r\n return;\r\n }\r\n\r\n //Lets use aos Time Sorter to dont worry about distances and stuff like that, he will do the job\r\n TimeDistanceSortSource dsort1 = new TimeDistanceSortSource();\r\n LgteSort sort1 = new LgteSort(new SortField(\"foo\", dsort1));\r\n\r\n //LgteHits give you Documents and time with unecessary lines of boring code\r\n LgteHits lgteHits1;\r\n LgteHits lgteHits1and2;\r\n lgteHits1 = searcher.search(lgteQueryResult1, sort1);\r\n assertTrue(lgteHits1.length() == 1);\r\n\r\n lgteHits1and2 = searcher.search(lgteQueryResult1and2, sort1);\r\n assertTrue(lgteHits1and2.length() == 2);\r\n\r\n\r\n long time1_0 = lgteHits1.doc(0).getTime().getTime();\r\n long time1and2_0 = lgteHits1and2.doc(0).getTime().getTime();\r\n long time1and2_1 = lgteHits1and2.doc(1).getTime().getTime();\r\n assertTrue(time1_0 == new MyCalendar(2005,11,20,9,0,10).getTimeInMillis());\r\n assertTrue(time1and2_0 == new MyCalendar(2005,11,20,9,0,10).getTimeInMillis());\r\n assertTrue(time1and2_1 == new MyCalendar(2007,1,12,20,45,15).getTimeInMillis());\r\n\r\n\r\n searcher.close();\r\n }", "public int[] mRtreeFromSource(int s,int k){\n double INFINITY = Double.MAX_VALUE;\n boolean[] SPT = new boolean[intersection];\n double[] d = new double[intersection];\n int[] parent = new int[intersection];\n\n for (int i = 0; i <intersection ; i++) {\n d[i] = INFINITY;\n parent[i] = -1;\n }\n\n d[s] = 0;\n parent[s]=s;\n\n MinHeap minHeap = new MinHeap(k);\n for (int i = 0; i <intersection ; i++) {\n minHeap.add(i,d[i]);\n }\n while(!minHeap.isEmpty()){\n\n int extractedVertex = minHeap.extractMin();\n\n if(d[extractedVertex]==INFINITY)\n break;\n\n SPT[extractedVertex] = true;\n\n LinkedList<Edge> list = g.adjacencylist[extractedVertex];\n for (int i = 0; i <list.size() ; i++) {\n Edge edge = list.get(i);\n int destination = edge.destination;\n if(SPT[destination]==false ) {\n\n double newKey = edge.weight ; //the different part with previous method\n double currentKey = d[destination];\n if(currentKey>=newKey){\n if(currentKey==newKey){\n if(extractedVertex<parent[destination]){\n minHeap.updateKey(newKey, destination, d[destination]);\n parent[destination] = extractedVertex;\n d[destination] = newKey;\n }\n }\n else {\n minHeap.updateKey(newKey, destination, d[destination]);\n parent[destination] = extractedVertex;\n d[destination] = newKey;\n }\n }\n }\n }\n }\n return parent;\n }", "private int binarySearch(List<Span> spans, int line) {\n int left = 0,right = spans.size() - 1,mid,row;\n int max = right;\n while(left <= right){\n mid = (left + right) / 2;\n if(mid < 0) return 0;\n if(mid > max) return max;\n row = spans.get(mid).getLine();\n if(row == line) {\n return mid;\n }else if(row < line){\n left = mid + 1;\n }else{\n right = mid - 1;\n }\n }\n return Math.max(0,Math.min(left,max));\n }", "@Test\n \tpublic void whereClauseForNodeRangedPrecedence() {\n \t\tnode23.addJoin(new Precedence(node42, 10, 20));\n \t\tcheckWhereCondition(\n \t\t\t\tjoin(\"=\", \"_node23.text_ref\", \"_node42.text_ref\"),\n \t\t\t\t\"_node23.right_token BETWEEN SYMMETRIC _node42.left_token - 10 AND _node42.left_token - 20\"\n \t\t);\n \t}", "public static void main(String[] args)\r\n {\n BST<Integer> tree = new BST<Integer>();\r\n\r\n int L = Integer.parseInt(args[0]);\r\n int R = Integer.parseInt(args[1]);\r\n for(int i=2; i < args.length; i++)\r\n {\r\n tree.insert(Integer.parseInt(args[i]));\r\n\r\n }\r\n\r\n //tree.delete(Integer.parseInt(args[3]));\r\n System.out.println(tree.find(Integer.parseInt(args[4])));\r\n tree.print();\r\n \r\n System.out.println(\"Sum of Range: \" + tree.rangeSum(L, R));\r\n }", "private int recFind(int searchKey, int lowerbound, int upperbound) {\n\t\tint curIn = (lowerbound + upperbound) / 2;\n\t\tif (arr[curIn] == searchKey)\n\t\t\treturn curIn;\n\t\telse if (lowerbound > upperbound)\n\t\t\treturn n;\n\t\telse {\n\t\t\tif (arr[curIn] < searchKey)\n\t\t\t\treturn recFind(searchKey, curIn + 1, upperbound);\n\t\t\telse\n\t\t\t\treturn recFind(searchKey, lowerbound, curIn - 1);\n\t\t}\n\t}", "public int query(int start, int end) {\n return prefixSum[end][1] - prefixSum[start][0];\n }", "public static int[][] optimalBST2(double[] p,double[] q, int num){\n double[][] e = new double[num+2][num+2];//子树期望代价\n double[][] w = new double[num+2][num+2];//子树总概率\n //why e and w is two bigger than num?\n //because when i==j, e[i][i-1] + e[i+1][j] + w[i][j];\n\n int[][] root = new int[num+1][num+1];//记录根节点\n //root[i][j] -- 用来存放i-j组成的最优二叉查找树的根节点\n\n //init--初始化\n for(int i=1; i<num+2; i++){\n e[i][i-1] = q[i-1];\n w[i][i-1] = q[i-1];\n }\n\n for(int d = 0; d<num; d++){\n //插入个数 : 0 - num-1, 从0开始\n for(int i=1; i<=num-d; i++){\n //起始下标 : 1 - num, 从1开始\n int j = i + d;\n e[i][j] = 9999;\n w[i][j] = w[i][j-1] + p[j] + q[j];//\n\n //because of root[i][j-1] <= root[i][j] <= root[i+1][j]\n //so why?\n //\n //进行优化!!!\n if(i == j){\n root[i][j] = i;\n e[i][j] = e[i][i-1] + e[i+1][i] + w[i][i];\n }else{\n for(int k=root[i][j-1]; k<=root[i+1][j]; k++){\n //中间下标\n double temp = e[i][k-1] + e[k+1][j] + w[i][j];\n if(temp < e[i][j]){\n e[i][j] = temp;\n //找到小的,记录下来\n root[i][j] = k;\n }\n\n }\n }\n }\n }\n return root;\n }", "public int[] searchRange(int[] A, int target) {\n int left = 0 ;\n int right = A.length - 1;\n int mid;\n int[] lr = new int[2];\n while(left <= right){\n \tmid = (left + right) /2 ;\n \tif(A[mid] == target){\n \t\tlr[0] = searchLeft(A,left,mid,target);\n \t\tlr[1] = searchRight(A,mid,right,target);\n \t\treturn lr;\n \t}\n \telse if (A[mid] < target){\n \t\tleft = mid + 1;\n \t}\n \telse{\n \t\tright = mid - 1;\n \t}\n }\n lr[0] = -1;\n lr[1] = -1;\n return lr;\n }", "private int binarySearchQ7(int first, int last, K key)\n {\n int index;\n \n if (first > last)\n index = first; \n else \n {\n int mid = first + (last - first) / 2;\n K midKey = dictionary[mid].getKey(); \n if (key.equals(midKey))\n index = mid; \n else if (key.compareTo(midKey) < 0)\n index = binarySearchQ7(first, mid - 1, key);\n else\n index = binarySearchQ7(mid + 1, last, key);\n } \n return index;\n }", "@Test\n public void testSegmentSelection() {\n assertMetrics(\"segments:2 absoluteProximity:0.1 proximity:1 segmentStarts:19,41\",\n \"a b c d e\",\"x a b x c x x x x x x x x x x x x x x a b c x x x x x x x x x e x d x c d x x x c d e\");\n // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2\n // 0 1 2 3 4\n // Should choose - - - - -\n\n // Same as above but best matching segment have too low exactness\n assertMetrics(\"segments:2 absoluteProximity:0.0903 proximity:0.9033 segmentStarts:1,41\",\n \"a b c d e\",\"x a b x c x x x x x x x x x x x x x x a:0.2 b:0.3 c:0.4 x x x x x x x x x e x d x c d x x x c d e\");\n // 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2\n // 0 1 2 3 4\n // Should choose - - - - -\n\n assertMetrics(\"segments:1 absoluteProximity:0.0778 proximity:0.778\",\"a b c d e f\",\"x x a b b b c f e d a b c d x e x x x x x f d e f a b c a a b b c c d d e e f f\");\n\n // Prefer one segment with ok proximity over two segments with great proximity\n assertMetrics(\"segments:1 segmentStarts:0\",\"a b c d\",\"a b x c d x x x x x x x x x x x a b x x x x x x x x x x x c d\");\n assertMetrics(\"segments:1 segmentStarts:0\",\"a b c d\",\"a b x x x x x x x x c d x x x x x x x x x x x a b x x x x x x x x x x x c d\");\n }", "public String findFromToEnd(int end) {\n StringBuilder sb = new StringBuilder() ;\n ArrayList paths = new ArrayList() ;\n while (end != start) {\n\n paths.add(\"From \" + pred[end] + \" go to \" + end + \"\\n\") ;\n end = pred[end] ;\n\n }\n int count = paths.size() ;\n while (count > 0) {\n sb.append(paths.get(count-1)) ;\n count-- ;\n }\n return sb.toString() ;\n\n }", "public HashSet<Edge> rangeQuery(IGeoPoint p, double radius) {\r\n\t\tHashSet<Edge> result = new HashSet<Edge>();\r\n\t\tList<Integer> cands = null;\r\n\t\t// get mbr\r\n\t\tdouble d_radius = radius * Constants.D_PER_M; // radius in degree\r\n\t\tdouble minLat, minLng, maxLat, maxLng;\r\n\t\tminLng = p.getLng() - d_radius;\r\n\t\tmaxLng = p.getLng() + d_radius;\r\n\t\tminLat = p.getLat() - d_radius;\r\n\t\tmaxLat = p.getLat() + d_radius;\r\n\t\tMBR rect = new MBR(minLng, minLat, maxLng, maxLat);\r\n\t\tcands = getCells(rect);\r\n\t\tint cands_count = cands.size();\r\n\t\tfor (int i = 0; i < cands_count; i++) {\r\n\t\t\tList<Edge> edges = dict.get(cands.get(i));\r\n\t\t\tif (edges != null) {\r\n\t\t\t\tint count = edges.size();\r\n\t\t\t\tfor (int j = 0; j < count; j++) {\r\n\t\t\t\t\tif (edges.get(j).distFrom(p) <= radius) {\r\n\t\t\t\t\t\tresult.add(edges.get(j));\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public void solve(int startX, int startY, int endX, int endY) {\r\n // re-inicializar células para encontrar o caminho\r\n for (Cell[] cellrow : this.cells) {\r\n for (Cell cell : cellrow) {\r\n cell.parent = null;\r\n cell.visited = false;\r\n cell.inPath = false;\r\n cell.travelled = 0;\r\n cell.projectedDist = -1;\r\n }\r\n }\r\n // células ainda estão sendo consideradas\r\n ArrayList<Cell> openCells = new ArrayList<>();\r\n // célula sendo considerada\r\n Cell endCell = getCell(endX, endY);\r\n if (endCell == null) return; // saia se terminar fora dos limites\r\n { // bloco anônimo para excluir o início, porque não usado posteriormente\r\n Cell start = getCell(startX, startY);\r\n if (start == null) return; // saia se começar fora dos limites\r\n start.projectedDist = getProjectedDistance(start, 0, endCell);\r\n start.visited = true;\r\n openCells.add(start);\r\n }\r\n boolean solving = true;\r\n while (solving) {\r\n if (openCells.isEmpty()) return; // sair, nenhum caminho\r\n // classifique openCells de acordo com a menor distância projetada\r\n Collections.sort(openCells, new Comparator<Cell>() {\r\n @Override\r\n public int compare(Cell cell1, Cell cell2) {\r\n double diff = cell1.projectedDist - cell2.projectedDist;\r\n if (diff > 0) return 1;\r\n else if (diff < 0) return -1;\r\n else return 0;\r\n }\r\n });\r\n Cell current = openCells.remove(0); // célula pop menos projetada\r\n if (current == endCell) break; // no final\r\n for (Cell neighbor : current.neighbors) {\r\n double projDist = getProjectedDistance(neighbor,\r\n current.travelled + 1, endCell);\r\n if (!neighbor.visited || // ainda não visitado\r\n projDist < neighbor.projectedDist) { // melhor caminho\r\n neighbor.parent = current;\r\n neighbor.visited = true;\r\n neighbor.projectedDist = projDist;\r\n neighbor.travelled = current.travelled + 1;\r\n if (!openCells.contains(neighbor))\r\n openCells.add(neighbor);\r\n }\r\n }\r\n }\r\n // criar caminho do fim ao começo\r\n Cell backtracking = endCell;\r\n backtracking.inPath = true;\r\n while (backtracking.parent != null) {\r\n backtracking = backtracking.parent;\r\n backtracking.inPath = true;\r\n }\r\n }", "private void buildTree(int nodeNum, AABB nodeBounds,\n ArrayList<AABB> allPrimBounds,\n IntArray primNums, int nPrims, int depth,\n int badRefines) {\n if (nPrims <= maxPrims || depth == 0) {\n if ((nPrims > 16) && (depth == 0)) {\n System.out.println(\"reached max. KdTree depth with \" + nPrims + \n \" primitives\");\n }\n \n nodesW.add(makeLeaf(primNums, nPrims, primitives));\n totalPrims += nPrims;\n totalDepth += (maxDepth - depth);\n totalLeafs += 1;\n return;\n }\n \n /* Split - Position bestimmen */\n \n int bestAxis = -1, bestOffset = -1;\n float bestCost = Float.POSITIVE_INFINITY;\n float oldCost = isectCost * (float)nPrims;\n Vector d = nodeBounds.max.sub(nodeBounds.min);\n float totalSA = (2.f * (d.x*d.y + d.x*d.z + d.y*d.z));\n float invTotalSA = 1.f / totalSA;\n \n /* Achse wählen */\n int axis = d.dominantAxis();\n int retries = 0;\n boolean retry = false;\n ArrayList<BoundEdge> edges = null;\n \n// final int splitCount = edges[axis].length;\n \n do {\n edges = mkEdges(allPrimBounds, primNums, axis);\n Collections.sort(edges);\n final int splitCount = edges.size();\n \n// java.util.Arrays.sort(edges[axis], 0, splitCount);\n \n /* beste Split - Position für diese Achse finden */\n int nBelow = 0, nAbove = nPrims;\n \n for (int i = 0; i < splitCount; ++i) {\n if (edges.get(i).type == EdgeType.END) --nAbove;\n float edget = edges.get(i).t;\n \n if (edget > nodeBounds.min.get(axis) &&\n edget < nodeBounds.max.get(axis)) {\n // Compute cost for split at _i_th edge\n int otherAxis[][] = { {1,2}, {0,2}, {0,1} };\n int otherAxis0 = otherAxis[axis][0];\n int otherAxis1 = otherAxis[axis][1];\n \n float belowSA = 2 * (d.get(otherAxis0) * d.get(otherAxis1) +\n (edget - nodeBounds.min.get(axis)) *\n (d.get(otherAxis0) + d.get(otherAxis1)));\n \n float aboveSA = 2 * (d.get(otherAxis0) * d.get(otherAxis1) +\n (nodeBounds.max.get(axis) - edget) *\n (d.get(otherAxis0) + d.get(otherAxis1)));\n \n float pBelow = belowSA * invTotalSA;\n float pAbove = aboveSA * invTotalSA;\n \n float eb = (nAbove == 0 || nBelow == 0) ? emptyBonus : 0.f;\n float cost = traversalCost + isectCost * (1.f - eb) *\n (pBelow * nBelow + pAbove * nAbove);\n \n if (cost < bestCost) {\n /* neuer bester gefunden */\n bestCost = cost;\n bestAxis = axis;\n bestOffset = i;\n }\n }\n \n if (edges.get(i).type == EdgeType.START) ++nBelow;\n }\n \n if (!(nBelow == nPrims && nAbove == 0))\n throw new IllegalStateException(\"hmm\");\n \n retry = ((bestAxis == -1) && (retries < 2));\n \n if (retry) {\n ++retries;\n axis = (axis+1) % 3;\n }\n \n } while (retry);\n \n if (bestCost > oldCost) ++badRefines;\n if ((bestCost > 4.f * oldCost && nPrims < 16) ||\n bestAxis == -1 || badRefines == 3) {\n nodesW.add(makeLeaf(primNums, nPrims, primitives));\n if (nPrims > 16)\n System.out.println(\"aborting KdTree build recursion (bc=\" +\n bestCost + \", oc=\" + oldCost + \", #prims=\" + \n nPrims + \", br=\" + badRefines + \")\");\n totalPrims += nPrims;\n totalDepth += (maxDepth - depth);\n totalLeafs += 1;\n return;\n }\n \n /* Primitive nach oben / unten sortieren */\n int n0 = 0, n1 = 0;\n \n final ArrayList<Integer> prims0Tmp = new ArrayList<Integer>();\n final ArrayList<Integer> prims1Tmp = new ArrayList<Integer>();\n \n for (int i = 0; i < bestOffset; ++i) {\n if (edges.get(i).type == EdgeType.START) {\n prims0Tmp.add(edges.get(n0++).primNum);\n// prims0.set(n0++, edges[bestAxis][i].primNum);\n }\n }\n \n for (int i = bestOffset + 1; i < edges.size(); ++i) {\n if (edges.get(i).type == EdgeType.END) {\n prims1Tmp.add(edges.get(n1++).primNum);\n// prims1.set(n1++, edges[bestAxis][i].primNum);\n }\n }\n \n /* rekursiver Abstieg */\n float tsplit = edges.get(bestOffset).t;\n \n nodesW.add(makeInterior(bestAxis, tsplit));\n \n AABB bounds[] = nodeBounds.split(tsplit, bestAxis);\n \n final IntArray prims0 = new IntArray(prims0Tmp.size());\n for (int i=0; i < prims0Tmp.size(); i++) {\n prims0.set(i, prims0Tmp.get(i));\n }\n \n final IntArray prims1 = new IntArray(prims1Tmp.size());\n for (int i=0; i < prims1Tmp.size(); i++) {\n prims1.set(i, prims1Tmp.get(i));\n }\n \n buildTree(nodeNum+1, bounds[0], allPrimBounds,\n prims0, n0, depth-1, badRefines);\n \n nodesW.get(nodeNum).setAboveChild(nodesW.size());\n \n buildTree(nodesW.size(), bounds[1], allPrimBounds,\n prims1, n1, depth-1, badRefines);\n }", "public static List<int[]> childrenOperatorIndex(SqlNode sn){\r\n\t\tint size = sn.getChildren().size();\r\n\t\tList<int[]> idxRange = new ArrayList<>();\r\n\t\tfor(int i = 0; i < size; i++){\r\n\t\t\tint start = i;\r\n\t\t\twhile(start < size && sn.getChildren().get(start) instanceof Operator){\r\n\t\t\t\t++start;\r\n\t\t\t}\r\n\t\t\tif(start > i){\r\n\t\t\t\tidxRange.add(new int[]{i, start - 1});\r\n\t\t\t\ti = start;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn idxRange;\r\n\t}", "int getEndSearch();", "AssignmentPathSegment beforeLast(int n);", "public Region findRegion(String name, int start, int end) { //recursion\n int middle = (start + end) / 2; \n if (end - start > 1) {\n if (findRegion(name, start, middle) != null) {\n return findRegion(name, start, middle);\n } else {\n return findRegion(name, middle, end);\n }\n } else {\n if (regionList[start].getRegionName().equals(name)) {\n return regionList[start];\n } else if (regionList[end].getRegionName().equals(name)) {\n return regionList[end];\n } else {\n return null; \n }\n }\n }", "public abstract HalfOpenIntRange approximateSpan();", "public List<IdRange> calculateRangesForType(MigrationType migrationType, long minimumId, long maximumId, long optimalNumberOfRows);", "public static void main(String[] args) {\n FenwickTree ft = new FenwickTree(10); // ft = {-,0,0,0,0,0,0,0, 0,0,0}\n ft.update(2, 1); // ft = {-,0,1,0,1,0,0,0, 1,0,0}, idx 2,4,8 => +1\n ft.update(4, 1); // ft = {-,0,1,0,2,0,0,0, 2,0,0}, idx 4,8 => +1\n ft.update(5, 2); // ft = {-,0,1,0,2,2,2,0, 4,0,0}, idx 5,6,8 => +2\n ft.update(6, 3); // ft = {-,0,1,0,2,2,5,0, 7,0,0}, idx 6,8 => +3\n ft.update(7, 2); // ft = {-,0,1,0,2,2,5,2, 9,0,0}, idx 7,8 => +2\n ft.update(8, 1); // ft = {-,0,1,0,2,2,5,2,10,0,0}, idx 8 => +1\n ft.update(9, 1); // ft = {-,0,1,0,2,2,5,2,10,1,1}, idx 9,10 => +1\n System.out.printf(\"%d\\n\", ft.rangeSumQuery(1, 1)); // 0 => ft[1] = 0\n System.out.printf(\"%d\\n\", ft.rangeSumQuery(1, 2)); // 1 => ft[2] = 1\n System.out.printf(\"%d\\n\", ft.rangeSumQuery(1, 6)); // 7 => ft[6] + ft[4] = 5 + 2 = 7\n System.out.printf(\"%d\\n\", ft.rangeSumQuery(1, 10)); // 11 => ft[10] + ft[8] = 1 + 10 = 11\n System.out.printf(\"%d\\n\", ft.rangeSumQuery(3, 6)); // 6 => rsq(1, 6) - rsq(1, 2) = 7 - 1\n\n ft.update(5, 2); // update demo\n System.out.printf(\"%d\\n\", ft.rangeSumQuery(1, 10)); // now 13\n }", "public static Boolean binarySearch(int[] arr, int n){\r\n if(arr.length == 0) return false;\r\n if(arr.length == 1 && arr[0] != n) return false; \r\n if(arr.length == 1 && arr[0] == n) return true; \r\n int start = 0;\r\n int mid = arr.length/2;\r\n int end = arr.length;\r\n int pos = mid;\r\n while(arr[pos] != n){\r\n if(n > arr[pos]){\r\n start = mid;\r\n mid = (end-start)/2+start;\r\n } else if(n < arr[pos]){\r\n end = mid;\r\n mid = (end-start)/2+start;\r\n System.out.println(\"here \" + start+ \" \" + mid + \" \" + end + \" pos= \" + pos);\r\n }\r\n pos = mid;\r\n if(arr[pos] == n) return true;\r\n if(start+1 == end){\r\n System.out.println(start+ \" \" + mid + \" \" + end + \" pos= \" + pos);\r\n return false;\r\n }\r\n }\r\n return true;\r\n}", "public int[] searchRange(int[] A, int target) {\n // write your code here\n if (A == null || A.length == 0) return new int[] {-1, -1};\n int left = 0, right = A.length - 1;\n while (left + 1 < right) {\n int mid = left + (right - left) / 2;\n if (A[mid] >= target) {\n right = mid;\n }\n else{\n left = mid;\n }\n }\n int leftBound = -1, rightBound = -1;\n if (A[left] == target)\n leftBound = left;\n else if (A[right] == target)\n leftBound = right;\n\n left = 0;\n right = A.length - 1;\n while (left + 1 < right) {\n int mid = left + (right - left) / 2;\n if (A[mid] <= target) {\n left = mid;\n }\n else {\n right = mid;\n }\n }\n if (A[right] == target) rightBound = right;\n else if (A[left] == target) rightBound = left;\n return new int[] {leftBound, rightBound};\n }", "private HashSet<Position> getInRange(int p_r, Distance p_d)\n {\n HashSet<Position> s = new HashSet<Position>();\n\n for (int x = 0; x <= p_r; x++)\n {\n int y = 0;\n Position p = new Position(this.x + x, this.y + y);\n\n while (p_d.inside(this, p, p_r))\n {\n s.add(p);\n s.add(new Position(this.x - x, this.y + y));\n s.add(new Position(this.x + x, this.y - y));\n s.add(new Position(this.x - x, this.y - y));\n p = new Position(this.x + x, this.y + ++y);\n }\n }\n return s;\n }", "public int[] searchRange(int[] nums, int target, int i, int j) {\n int[] res = new int[]{-1, -1};\n while (i <= j) {\n int mid = (i + j) / 2;\n if (nums[mid] == target) {\n int[] left = searchRange(nums, target, i, mid-1), right = searchRange(nums, target, mid+1, j);\n if (left[0] == -1)\n res[0] = mid;\n else\n res[0] = left[0];\n\n if (right[0] == -1)\n res[1] = mid;\n else\n res[1] = right[1];\n return res;\n } else if (nums[mid] < target) {\n i = mid + 1;\n } else {\n j = mid - 1;\n }\n }\n// System.out.println(Arrays.toString(res));\n return res;\n }", "private static TreeNode helper2(TreeNode node, int[] nums, int start, int end) {\n if (start > end) {\n return null;\n }\n int max = Integer.MIN_VALUE;\n int middle = 0;\n for(int i = start; i <= end; i++) {\n if (nums[i] >= max) {\n max = nums[i];\n middle = i;\n }\n }\n node = new TreeNode(max);\n node.left = helper2(node.left, nums, start, middle - 1);\n node.right = helper2(node.right, nums, middle + 1, end);\n return node;\n }", "private static int rightOfSegment(int[] a, int lb) {\n int rb = lb + 1;\n while (rb < a.length && a[rb] < a[rb - 1]) {\n rb++;\n }\n return rb - 1; // TODO: Validate\n }", "private static boolean testSegment(int[] a, int lb, int rb) {\n if ((rb >= a.length - 1 || a[lb] < a[rb + 1])\n && (lb == 0 || a[rb] > a[lb - 1])) {\n return true;\n }\n return false;\n }", "public int state_regions_stranded(int rcount,HashMap<Integer,Integer> rmap,int chokepoint_path,int max_stranded) {\r\n\t\t\r\n\t\tHashMap<Integer,LinkedList<Integer>> regions=new HashMap<Integer,LinkedList<Integer>> ();\r\n\t\tfor(Integer nodeIndex:rmap.keySet()) {\r\n\t\t\tint region=rmap.get(nodeIndex);\r\n\t\t\tif(region!=-1) {\r\n\t\t\tif(regions.containsKey(region)) {\r\n\t\t\t\tLinkedList<Integer> l=regions.get(region);\r\n\t\t\t\tl.add(nodeIndex);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tLinkedList<Integer> l=new LinkedList<Integer>();\r\n\t\t\t\tl.add(nodeIndex);\r\n\t\t\t\tregions.put(region, l);\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tHashMap<Integer,LinkedList<Integer>> regionsNeighbor=new HashMap<Integer,LinkedList<Integer>> ();\r\n\t\t\r\n\t\tfor(Integer regionIndex:regions.keySet()) {\r\n\t\t\tLinkedList<Integer> regionNode=regions.get(regionIndex);\r\n\t\t\t\r\n\t\t\tLinkedList<Integer> regionNeighbor=new LinkedList<Integer>();\r\n\t\t\tfor(Integer nodeIndex:regionNode) {\r\n\t\t\t\tfor(Integer itsNeighbor:nowMap.get(nodeIndex)) {\r\n\t\t\t\t\tif(!regionNode.contains(itsNeighbor))\r\n\t\t\t\t\tif(!regionNeighbor.contains(itsNeighbor))\r\n\t\t\t\t\t\tregionNeighbor.add(itsNeighbor);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tregionsNeighbor.put(regionIndex, regionNeighbor);\r\n\t\t}\r\n\t\t\r\n\t\tboolean ok=false;;\r\n\r\n\t\tfor (Integer p : paths.keySet()) {\r\n\t\t\tif(!paths.get(p).peek().equals(EndPoint.get(p))) {\r\n\t\t\tok=false;\r\n\t\t\tint topIndex = paths.get(p).peek().index;\r\n\t\t\tfor (Integer regionIndex : regionsNeighbor.keySet()) {\r\n\t\t\t\tLinkedList<Integer> itsNeighbors = regionsNeighbor.get(regionIndex);\r\n\r\n\t\t\t\tif (itsNeighbors.contains(topIndex)&&itsNeighbors.contains(EndPoint.get(p).index)) {\r\n\t\t\t\t\tok=true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tif(!ok) {\r\n\t\t\t\t\r\n\t\t\t\tif(!nowMap.get(paths.get(p).peek().index).contains(EndPoint.get(p).index))\r\n\t\t\t\treturn p;\r\n\t\t\t}\r\n\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn 0;\r\n\t}", "static void buildtree(int arr[], int tree[], int start, int end, int index) {\r\n\t\tif (start == end) {\r\n\t\t\ttree[index] = arr[start];\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tint mid = (start + end) / 2;\r\n\t\tbuildtree(arr, tree, start, mid, 2 * index);\r\n\t\tbuildtree(arr, tree, mid + 1, end, (2 * index) + 1);\r\n\r\n\t\ttree[index] = tree[2 * index] + tree[(2 * index) + 1];\r\n\r\n\t}", "int getMinUtil(int ss, int se, int qs, int qe, int si)\n {\n if (qs <= ss && qe >= se)\n return st[si];\n\n // If segment of this node is outside the given range\n if (se < qs || ss > qe)\n return Integer.MAX_VALUE;\n\n // If a part of this segment overlaps with the given range\n int mid = getMid(ss, se);\n return Math.min(getMinUtil(ss, mid, qs, qe, 2 * si + 1) ,\n \t\t getMinUtil(mid + 1, se, qs, qe, 2 * si + 2));\n }", "public void search(IndexShort < O > index, short range, short k)\n throws Exception {\n // assertEquals(index.aDB.count(), index.bDB.count());\n // assertEquals(index.aDB.count(), index.bDB.count());\n // index.stats();\n index.resetStats();\n // it is time to Search\n int querySize = 1000; // amount of elements to read from the query\n String re = null;\n logger.info(\"Matching begins...\");\n File query = new File(testProperties.getProperty(\"test.query.input\"));\n File dbFolder = new File(testProperties.getProperty(\"test.db.path\"));\n BufferedReader r = new BufferedReader(new FileReader(query));\n List < OBPriorityQueueShort < O >> result = new LinkedList < OBPriorityQueueShort < O >>();\n re = r.readLine();\n int i = 0;\n long realIndex = index.databaseSize();\n\n while (re != null) {\n String line = parseLine(re);\n if (line != null) {\n OBPriorityQueueShort < O > x = new OBPriorityQueueShort < O >(\n k);\n if (i % 100 == 0) {\n logger.info(\"Matching \" + i);\n }\n\n O s = factory.create(line);\n if (factory.shouldProcess(s)) {\n if(i == 279){\n System.out.println(\"hey\");\n }\n index.searchOB(s, range, x);\n result.add(x);\n i++;\n }\n }\n if (i == querySize) {\n logger.warn(\"Finishing test at i : \" + i);\n break;\n }\n re = r.readLine();\n }\n \n logger.info(index.getStats().toString());\n \n int maxQuery = i;\n // logger.info(\"Matching ends... Stats follow:\");\n // index.stats();\n\n // now we compare the results we got with the sequential search\n Iterator < OBPriorityQueueShort < O >> it = result.iterator();\n r.close();\n r = new BufferedReader(new FileReader(query));\n re = r.readLine();\n i = 0;\n while (re != null) {\n String line = parseLine(re);\n if (line != null) {\n if (i % 300 == 0) {\n logger.info(\"Matching \" + i + \" of \" + maxQuery);\n }\n O s = factory.create(line);\n if (factory.shouldProcess(s)) {\n OBPriorityQueueShort < O > x2 = new OBPriorityQueueShort < O >(\n k);\n searchSequential(realIndex, s, x2, index, range);\n OBPriorityQueueShort < O > x1 = it.next();\n //assertEquals(\"Error in query line: \" + i + \" slice: \"\n // + line, x2, x1); \n \n assertEquals(\"Error in query line: \" + i + \" \" + index.debug(s) + \"\\n slice: \"\n + line + \" \" + debug(x2,index ) + \"\\n\" + debug(x1,index), x2, x1);\n\n i++;\n }\n \n }\n if (i == querySize) {\n logger.warn(\"Finishing test at i : \" + i);\n break;\n }\n re = r.readLine();\n }\n r.close();\n logger.info(\"Finished matching validation.\");\n assertFalse(it.hasNext());\n }", "public List<Node> findPath(Node start);", "public Integer selection(Integer startIndex, String selection) {\n int selectionIndex = 0;\n for (int i = 0; i < playList.length; i++) {\n\n if (playList[i].equals(selection) && (playList.length-i < startIndex+ i)) {\n selectionIndex += i;\n }\n }\n //if the startIndex comes BEFORE the selection index\n //ed- [startIndex....,... selectionIndex..]\n if (selectionIndex > startIndex) {\n //(left side count VS right side count)\n if (selectionIndex - startIndex < (startIndex + playList.length - selectionIndex)) {\n return selectionIndex - startIndex;\n }\n return startIndex + playList.length - selectionIndex;\n }\n //if the startIndex comes AFTER the selection index\n //ed- [selectionIndex....,... startIndex..]\n if (selectionIndex < startIndex) {\n //(left side count VS right side count)\n if (startIndex - selectionIndex < (selectionIndex + playList.length - startIndex)) {\n return selectionIndex + playList.length - startIndex;\n }\n return startIndex- selectionIndex;\n\n }\n return null;\n }", "public static int[] binaryearch(int[] nums, int left, int right, int target) {\n int[] indexs = {-1, -1};\n if (left > right) {\n return indexs;\n }\n int middle = (right - left) / 2 + left;\n if (nums[middle] == target) {\n int[] results = new int[]{middle, middle};\n if (middle > left && nums[middle - 1] == nums[middle]) {\n //左侧还有\n int[] indexs2 = binaryearch(nums, left, middle - 1, target);\n if (indexs2[0] != -1) {\n results[0] = indexs2[0];\n }\n }\n if (middle < right && nums[middle + 1] == nums[middle]) {\n // //右侧还有\n int[] indexs2 = binaryearch(nums, middle + 1, right, target);\n if (indexs2[1] != -1) {\n results[1] = indexs2[1];\n }\n }\n return results;\n } else if (nums[middle] < target) {\n indexs = binaryearch(nums, middle + 1, right, target);\n\n } else {\n indexs = binaryearch(nums, left, middle - 1, target);\n }\n return indexs;\n\n }", "@Test\n public void testCase3 () throws IOException {\n //\t\tlog.trace(\"Testcase3\");\n sq = new SpanSegmentQuery(new SpanTermQuery(new Term(\"base\", \"s:d\")),\n new SpanTermQuery(new Term(\"base\", \"s:b\")));\n\n kr = ki.search(sq, (short) 10);\n ki.close();\n\n assertEquals(\"totalResults\", kr.getTotalResults(), 1);\n assertEquals(\"doc-number\", 2, kr.getMatch(0).getLocalDocID());\n assertEquals(\"StartPos (0)\", 1, kr.getMatch(0).startPos);\n assertEquals(\"EndPos (0)\", 2, kr.getMatch(0).endPos);\n }", "int getEndSegment();", "java.util.List<AuditoriaUsuario> findRange(int startPosition, int maxResults, String sortFields, String sortDirections);", "private Range<Token> intersect(Range<Token> serverRange, AbstractBounds<Token> requestedRange)\n {\n if (serverRange.contains(requestedRange.left) && serverRange.contains(requestedRange.right)) {\n //case 1: serverRange fully encompasses requestedRange\n return new Range<Token>(requestedRange.left, requestedRange.right, partitioner);\n } else if (requestedRange.contains(serverRange.left) && requestedRange.contains(serverRange.right)) {\n //case 2: serverRange is fully encompasses by requestedRange\n //serverRange is already the intersection\n return new Range<Token>(serverRange.left, serverRange.right);\n } else if (serverRange.contains(requestedRange.left) && requestedRange.contains(serverRange.right)) {\n //case 3: serverRange overlaps on the left: sR.left < rR.left < sR.right < rR.right\n return new Range<Token>(requestedRange.left, serverRange.right, partitioner);\n } else if (requestedRange.contains(serverRange.left) && serverRange.contains(requestedRange.right)) {\n //case 4: serverRange overlaps on the right rR.left < sR.left < rR.right < sR.right\n return new Range<Token>(serverRange.left, requestedRange.right, partitioner);\n } else if (!serverRange.contains(requestedRange.left) && !serverRange.contains(requestedRange.right) &&\n !requestedRange.contains(serverRange.left) && !requestedRange.contains(serverRange.right)) {\n //case 5: totally disjoint\n return null;\n } else {\n assert false : \"Failed intersecting serverRange = (\" + serverRange.left + \", \" + serverRange.right + \") and requestedRange = (\" + requestedRange.left + \", \" + requestedRange.right + \")\";\n return null;\n }\n }", "int getRange();", "private static boolean isOnSegment(Coord p, Coord q, Coord r) \n {\n if(r.x <= Math.max(p.x, q.x) && r.x >= Math.min(p.x, q.x) && \n r.y <= Math.max(p.y, q.y) && r.y >= Math.min(p.y, q.y)) \n return true; \n return false; \n }", "private void search(int offset, MetricSpaceObject query, ResultCollector collector, double parentToQueryDistance) {\n buffer.position(offset);\n\n //the node should consist of a pointer to each child node then the point data, then the value data\n double nodeRadius = buffer.getDouble();\n double parentToThisDistance = buffer.getDouble();\n int left = buffer.getInt();\n int right = buffer.getInt();\n \n double searchRadius = collector.getRadius();\n\n //check if we can skip a distance calculation using the triangle inequality\n if (!optimise || Double.isNaN(parentToQueryDistance)\n || Math.abs(parentToThisDistance - parentToQueryDistance) <= nodeRadius + searchRadius)\n {\n int vantagePointId = buffer.getInt();\n double distance = query.getDistance(vantagePointId);\n\n if (distance <= searchRadius) {\n //this point is within the distance threshold to the query object, so add it to the results\n collector.add(new SearchResult(query.getObjectID(), vantagePointId, distance));\n \n //update the search radius in case the add changed it\n searchRadius = collector.getRadius();\n }\n\n if (left != 0 && distance <= nodeRadius + searchRadius) {\n //points within a distance threshold to the query object could be inside the radius,\n //so search the left subtree\n search(left, query, collector, distance);\n }\n\n if (right != 0 && distance >= nodeRadius - searchRadius) {\n //points within a distance threshold to the query object could be outside the radius,\n //so search the right subtree\n search(right, query, collector, distance);\n }\n }\n else if (right != 0) {\n search(right, query, collector, Double.NaN);\n }\n }", "private static int helper(TreeNode root, TreeNode p, TreeNode q, List<TreeNode> ans) {\n if (root == null)\n return 0;\n int sum = 0;\n if (root.val == p.val || root.val == q.val)\n ++sum;\n int leftSum = helper(root.left, p, q, ans);\n int rightSum = helper(root.right, p, q, ans);\n sum += leftSum + rightSum;\n if (sum == 2 && leftSum < 2 && rightSum < 2)\n ans.add(root);\n return sum;\n }", "public abstract int getEndIndex();", "Long[] searchSolution(int timeLimit, Graph g);", "public static int[][] optimalBST(double[] p,double[] q, int num){\n double[][] e = new double[num+2][num+2];//子树期望代价\n double[][] w = new double[num+2][num+2];//子树总概率\n //why e and w is two bigger than num?\n //because when i==j, e[i][i-1] + e[i+1][j] + w[i][j];\n //when i = 1 or j = num, so e[1][0]、e[num+1][num]\n //here w can use the size of num+1, but in order not to so much complexity in init to judge i\n //so add a bigger w is look good!\n\n int[][] root = new int[num+1][num+1];//记录根节点\n //root[i][j] -- 用来存放i-j组成的最优二叉查找树的根节点\n\n //init--初始化\n for(int i=1; i<num+2; i++){\n e[i][i-1] = q[i-1];\n w[i][i-1] = q[i-1];\n }\n\n for(int d = 0; d<num; d++){\n //插入个数 : 0 - num-1, 从0开始\n for(int i=1; i<=num-d; i++){\n //起始下标 : 1 - num, 从1开始\n int j = i + d;\n e[i][j] = 9999;\n w[i][j] = w[i][j-1] + p[j] + q[j];//\n for(int k=i; k<=j; k++){\n //中间下标\n double temp = e[i][k-1] + e[k+1][j] + w[i][j];\n if(temp < e[i][j]){\n e[i][j] = temp;\n //找到小的,记录下来\n System.out.println(\"i--> \"+i+\", j--> \"+j);\n root[i][j] = k;\n }\n }\n }\n }\n return root;\n }", "private static int search(long[] numbers, int start, int end, long value) {\n if (start > end){\n return -1;\n }\n\n int middle = (start + end) / 2;\n\n if (numbers[middle] == value) {\n return middle;\n }\n\n if (numbers[middle] > value) {\n return search(numbers, start, middle - 1, value);\n }\n\n return search(numbers, middle + 1, end, value);\n }", "static int binarySearch(int arr[], int start, int end, int target ){\n if(start>end){\n return -1;\n }\n int mid = start+(end-start)/2;\n \n if(arr[mid] == target && (mid==0 || arr[mid-1]!=target)){\n return mid;\n }\n if(arr[mid] == target){\n return mid;\n }\n if(arr[mid]>=target && arr[mid]>arr[start]){\n return binarySearch(arr,start,mid-1,target);\n }\n // else if(arr[mid]<arr[start] && arr[mid]<target){\n // return binarySearch(arr,mid+1,end,target);\n // }\n return binarySearch(arr,mid+1,end,target);\n }", "public int binarySearch(int[] nums, int target, int left, int right) {\n int res = left - 1;\n while (left <= right) {\n int mid = left + (right - left) / 2;\n if (nums[mid] <= target) {\n right = mid - 1;\n } else {\n res = mid;\n left = mid + 1;\n }\n }\n return res;\n }", "public void InRange(int id1, int id2){\n\t\tif(id1<findMin()){\n\t\t\tid1 = findMin();\n\t\t}\n\t\t\t\t\n\t\tif(id2>findMax()){\n\t\t\tid2 = findMax();\n\t\t}\n\t\tCount c1 = new Count();\n\t\tint res = getInRange(root,id1,id2);\n\t\tSystem.out.println(res);\n\t}", "public A_star_search(Node start, Node end) {\r\n initial_node = start;\r\n end_node = end;\r\n cost = 0;\r\n }", "public static void main(String[] args) {\n BinaryTree bt = new BinaryTree(10);\r\n\t bt.root.left = new TreeNode(5); \r\n\t bt.root.right = new TreeNode(15);\r\n\t bt.root.left.left = new TreeNode(3); \r\n \t bt.root.left.right = new TreeNode(7); \r\n\t bt.root.right.right = new TreeNode(18);\r\n \r\n\t System.out.println(rangeSumBST(bt.root,7,15));\r\n\t\t\r\n\t //Display inOrder Traversal\r\n\t inOrder(bt.root);\r\n\t\t\r\n\t}", "private void searchForNearest(KdNode kdNode, Point2D p, RectHV rectangle) {\n int comparison;\n // 2 rectangles that will store the coordinates of the rectangles that are delimited by kdNode's children,\n // used in order to calculate the distance to them and see if it's worth looking down the path inside them as well\n // (i.e. if the distance from point p to the rectangle is less than the distance to an already established nearest)\n RectHV rectLeftBelow, rectRightAbove;\n\n if (kdNode.point.equals(p)) {\n // if the point we're looking at actually equals the query point, we return here,\n // as we can no longer find a distance lower than 0\n nearest = kdNode.point;\n return;\n }\n\n // if the point in the current node is closer to the searched node, we update nearest\n if (p.distanceSquaredTo(kdNode.point) < p.distanceSquaredTo(nearest))\n nearest = kdNode.point;\n\n if (kdNode.dimension) { // if this KdNode is vertical (root.dimension == true), then we have left/right rectangles\n rectLeftBelow = new RectHV(rectangle.xmin(), rectangle.ymin(),\n kdNode.point.x(), rectangle.ymax());\n rectRightAbove = new RectHV(kdNode.point.x(), rectangle.ymin(),\n rectangle.xmax(), rectangle.ymax());\n }\n else { // if this KdNode is horizontal (root.dimension == false), then we have below/above rectangles\n rectLeftBelow = new RectHV(rectangle.xmin(), rectangle.ymin(),\n rectangle.xmax(), kdNode.point.y());\n rectRightAbove = new RectHV(rectangle.xmin(), kdNode.point.y(),\n rectangle.xmax(), rectangle.ymax());\n }\n // we look at which rectangle is nearest to the query point, in order to go down that path first\n comparison = Double.compare(rectLeftBelow.distanceSquaredTo(p),\n rectRightAbove.distanceSquaredTo(p));\n\n if (comparison < 0) { // if distance to left/lower rectangle is lower than to right/upper\n if (kdNode.left != null) {\n if (rectLeftBelow.distanceSquaredTo(p) < p.distanceSquaredTo(nearest)) {\n searchForNearest(kdNode.left, p, rectLeftBelow);\n }\n // if it's larger than to nearest, the distance to the other\n // rectangle will certainly be even larger, so we return here\n else return;\n }\n if (kdNode.right != null) {\n if (rectRightAbove.distanceSquaredTo(p) < p.distanceSquaredTo(nearest)) {\n searchForNearest(kdNode.right, p, rectRightAbove);\n }\n // else return; // return statement not needed, if (comparison < 0) statement terminates here anyway\n }\n }\n else { // comparison < 0, the opposite situation holds: distance to right/upper rectangle is lower than to left/lower\n if (kdNode.right != null) {\n if (rectRightAbove.distanceSquaredTo(p) < p.distanceSquaredTo(nearest)) {\n searchForNearest(kdNode.right, p, rectRightAbove);\n }\n else return;\n }\n if (kdNode.left != null) {\n if (rectLeftBelow.distanceSquaredTo(p) < p.distanceSquaredTo(nearest)) {\n searchForNearest(kdNode.left, p, rectLeftBelow);\n }\n }\n\n }\n }", "static public int getAtLeastKVisitors(int[][] rectangles, int k) {\n\n if(rectangles.length==0)\n return 0;\n if(k > rectangles.length)\n return 0;\n\n TreeSet<Rectangle> avlTree = new TreeSet<>();//To store the rectangles ordered\n TreeSet<Integer> Ys = new TreeSet<>();\n\n for(int[] coordinates: rectangles) {\n //x2 = x2 + 1 , y2 = y2 +1 for the inclusive constraints\n Rectangle r = new Rectangle(coordinates[0], coordinates[1], coordinates[2]+1, coordinates[3]+1);\n avlTree.add(r);\n if(!Ys.contains(r.getY1()))\n Ys.add(r.getY1());\n if(!Ys.contains(r.getY2()))\n Ys.add(r.getY2());\n }\n\n int ans = 0;\n Iterator<Integer> yIterator = Ys.iterator();\n int previousY = yIterator.next();\n\n //Traverse by slices of Y's\n while(yIterator.hasNext()) {\n\n int currentY = yIterator.next();\n List<int[]> segments = new ArrayList<>();\n Iterator<Rectangle> treeIterator = avlTree.iterator();\n\n //Look for the rectangles that fall in the slice and create a segment's list\n while(treeIterator.hasNext()) {\n Rectangle r = treeIterator.next();\n //We stop traversing the tree once the rectangles are completely above the slice\n if(r.getY1()>currentY)\n break;\n if(r.getY1()<= previousY && r.getY2()>=currentY) {\n int[] segmentL = new int[2]; int[] segmentR = new int[2];\n segmentL[0] = r.getX1(); segmentL[1] = Type.OPEN.getValue();\n segmentR[0] = r.getX2(); segmentR[1] = Type.CLOSED.getValue();\n segments.add(segmentL); segments.add(segmentR);\n }\n //We remove the rectangles that are left behind by the slice\n if(r.getY2() < previousY)\n treeIterator.remove();\n }\n\n //Sort the segments to analyze them\n Collections.sort(segments, (a, b) -> Integer.compare(a[0], b[0]));\n Iterator<int[]> it = segments.iterator();\n int[] segmentEnd, segmentStart = it.next();\n int nRectangles = Type.OPEN.getValue(); //The first interval will always be opening\n\n while(it.hasNext()) {\n segmentEnd = it.next();\n if(nRectangles >=k) {\n ans+= (currentY - previousY) * (segmentEnd[0] - segmentStart[0]);\n }\n segmentStart = segmentEnd;\n nRectangles += segmentEnd[1];\n }\n\n previousY = currentY;\n }\n\n return ans;\n }", "public interface Search {\n public List<Node> find(Node start, Node finish);\n public Node selectNode(List<Node> nodes);\n public List<Node> getPath(Node node);\n public List<Node> getAdjacent(Node node);\n}" ]
[ "0.6600007", "0.6368122", "0.6284005", "0.6024209", "0.5803106", "0.57748085", "0.57475173", "0.5694079", "0.5662775", "0.5635748", "0.5621126", "0.5613433", "0.5561295", "0.5537361", "0.54232085", "0.54198736", "0.5394416", "0.5385601", "0.5374657", "0.52902603", "0.5254681", "0.5234587", "0.52338034", "0.52053636", "0.5197557", "0.5185229", "0.51818055", "0.5143666", "0.5138928", "0.51297784", "0.51289636", "0.50696045", "0.5066294", "0.5062392", "0.5061893", "0.5057762", "0.50392985", "0.50308436", "0.5028284", "0.5022726", "0.50089264", "0.49996817", "0.49893954", "0.4976014", "0.49607703", "0.4951553", "0.49506193", "0.49361327", "0.4922979", "0.49201468", "0.49075183", "0.49043933", "0.49024367", "0.48968783", "0.48933366", "0.48872796", "0.4886343", "0.48826736", "0.4879444", "0.4866209", "0.4861566", "0.48592633", "0.4859089", "0.48415583", "0.48401463", "0.4832616", "0.48250133", "0.4824007", "0.48199227", "0.48187616", "0.4807068", "0.48008057", "0.47982457", "0.47969872", "0.47908944", "0.478845", "0.4785902", "0.47769782", "0.47485685", "0.47299737", "0.47257647", "0.47242862", "0.4721576", "0.4720317", "0.47140646", "0.47132465", "0.47105274", "0.47066295", "0.4703466", "0.46978736", "0.46951973", "0.46947196", "0.46905547", "0.46827903", "0.468267", "0.4678454", "0.46697348", "0.46684358", "0.4662265", "0.46583518" ]
0.7350663
0
given an array, this function tries to fill the elements in range between beg & end of arr in the segment tree's subtree whose root is at treeIndex and returns the value that is placed at root
private static int buildSegmentTree(int[] arr, int[] segtree, int beg, int end, int treeIndex) { if (beg == end) { segtree[treeIndex] = arr[beg]; } else { // recursive case int mid = (beg + end) / 2; int leftPart = buildSegmentTree(arr, segtree, beg, mid, 2 * treeIndex); int rightPart = buildSegmentTree(arr, segtree, mid + 1, end, 2 * treeIndex + 1); segtree[treeIndex] = Math.min(leftPart, rightPart); } return segtree[treeIndex]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void buildtree(int arr[], int tree[], int start, int end, int index) {\r\n\t\tif (start == end) {\r\n\t\t\ttree[index] = arr[start];\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tint mid = (start + end) / 2;\r\n\t\tbuildtree(arr, tree, start, mid, 2 * index);\r\n\t\tbuildtree(arr, tree, mid + 1, end, (2 * index) + 1);\r\n\r\n\t\ttree[index] = tree[2 * index] + tree[(2 * index) + 1];\r\n\r\n\t}", "public BSTNode buildBST(int arr[], int start, int end) {\n BSTNode newNode;\n if(start > end)\n return null;\n newNode = new BSTNode();\n\n if(start == end){\n newNode.setData(arr[start]);\n newNode.setLeft(null);\n newNode.setRight(null);\n } else {\n int mid = (start + end)/2;\n newNode.setData(arr[mid]);\n newNode.setLeft(buildBST(arr,start, mid-1));\n newNode.setRight(buildBST(arr,mid+1, end));\n }\n return newNode;\n }", "static TreeNode createTree(TreeNode root, int[] arr, int index) {\r\n\t\t\r\n\t\tif (index < arr.length) {\r\n\t\t\tTreeNode tmp = null;\r\n\t\t\tif (arr[index]>=0) {\r\n\t\t\t\ttmp = new TreeNode(arr[index]);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\ttmp = null;\r\n\t\t\t}\r\n\t\t\troot= tmp;\r\n\t\t\t\r\n\t\t\tif (root != null) {\r\n\t\t\t\troot.left = createTree(tmp.left,arr,index*2+1);\r\n\t\t\t\troot.right = createTree(tmp.right,arr,index*2+2);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn root;\r\n\t}", "static TreeNode createTree(TreeNode root, int[] arr, int index) {\r\n\t\t\r\n\t\tif (index < arr.length) {\r\n\t\t\tTreeNode tmp = null;\r\n\t\t\tif (arr[index]>=0) {\r\n\t\t\t\ttmp = new TreeNode(arr[index]);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\ttmp = null;\r\n\t\t\t}\r\n\t\t\troot= tmp;\r\n\t\t\t\r\n\t\t\tif (root != null) {\r\n\t\t\t\troot.left = createTree(tmp.left,arr,index*2+1);\r\n\t\t\t\troot.right = createTree(tmp.right,arr,index*2+2);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn root;\r\n\t}", "private void modify(int index, int value, int root, int range_l, int range_r) {\n if(range_l==range_r && range_l == index){\n intervals[root] = value;\n return;\n }\n\n int mid = (range_l + range_r) / 2;\n if(index <= mid)\n modify(index,value, root*2, range_l, mid);\n else\n modify(index,value, root*2+1, mid+1, range_r);\n\n intervals[root] = intervals[root*2] + intervals[root*2 + 1];\n\n }", "public TreeNode sortedArrayToBST2(int[] nums) {\n \n int len = nums.length;\n if ( len == 0 ) { return null; }\n \n TreeNode head = new TreeNode(0); \t// 0 as a placeholder\n \n Deque<TreeNode> nodeStack = new LinkedList<TreeNode>() {{ push(head); }};\n Deque<Integer> leftIndexStack = new LinkedList<Integer>() {{ push(0); }};\n Deque<Integer> rightIndexStack = new LinkedList<Integer>() {{ push(len-1); }};\n \n\t\twhile (!nodeStack.isEmpty()) {\n\t\t\tTreeNode currNode = nodeStack.pop();\n\t\t\t\n\t\t\tint l = leftIndexStack.pop();\n\t\t\tint r = rightIndexStack.pop();\t\t// right index\n\t\t\tint mid = l + (r - l) / 2; \t\t\t// avoid overflow\n\t\t\tcurrNode.val = nums[mid];\t\t\t// build root node\n\t\t\t\n\t\t\tif (l <= mid - 1) {\t\t// 左子树还有节点需要添加\n\t\t\t\tcurrNode.left = new TreeNode(0);\t\t// 新建一个节点并进入node stack,值后面添加\n\t\t\t\tnodeStack.push(currNode.left);\n\t\t\t\t\n\t\t\t\tleftIndexStack.push(l);\t\t\t\t// 添加一对索引(索引都是成双成对添加),缩小范围到左边\n\t\t\t\trightIndexStack.push(mid - 1);\n\t\t\t}\n\t\t\tif (mid + 1 <= r) {\t\t// right index is valid\n\t\t\t\tcurrNode.right = new TreeNode(0);\n\t\t\t\tnodeStack.push(currNode.right);\n\t\t\t\t\n\t\t\t\tleftIndexStack.push(mid + 1);\n\t\t\t\trightIndexStack.push(r);\n\t\t\t}\n\t\t}\n return head;\n }", "public SegmentTree(E[] arr, Merger<E> merger) {\r\n this.merger = merger;\r\n\r\n data = (E[]) new Object[arr.length];\r\n for (int i = 0; i < arr.length; i++)\r\n data[i] = arr[i];\r\n\r\n tree = (E[]) new Object[4 * arr.length];\r\n buildSegmentTree(0, 0, data.length - 1);\r\n }", "private void updateBIT(int []arr, int n, int index, int val) {\n while(index <= n) {\n // Add 'val' to current node of BIT Tree\n arr[index] += val;\n\n // Update index to that of parent in update View\n index += index & (-index);\n }\n }", "private static void insert(int[] array, int rightIndex, int value) {\n int index = 0;\n for (index = rightIndex; index >= 0 && value < array[index]; index--) {\n array[index + 1] = array[index];\n }\n array[index + 1] = value;\n }", "private static long fillRBTree(RBTree<Integer> aTree, int[] anIntArray) {\n long start = System.currentTimeMillis();\n for (int integer : anIntArray) {\n aTree.insert(integer);\n }\n long finish = System.currentTimeMillis();\n\n return (finish - start);\n }", "public TreeNode sortedArrayToBST(int[] A) {\n return build(A, 0, A.length - 1);\n }", "private static long fillBinaryTree(BinarySearchTree<Integer> aTree, int[] anIntArray) {\n long start = System.currentTimeMillis();\n for (int integer : anIntArray) {\n aTree.insert(integer);\n }\n long finish = System.currentTimeMillis();\n\n return (finish - start);\n }", "private static void updateRange(int[] segtree, int l, int r, int inc, int ns, int ne, int index) {\n\n if (r < ns || l > ne) {\n // no overlap-do nothing\n return;\n }\n if (ns == ne) {\n segtree[index] += inc;\n return;\n } else {\n // partial or complete overlap - call on left & right\n int mid = (ns + ne) / 2;\n updateRange(segtree, l, r, inc, ns, mid, 2 * index);\n updateRange(segtree, l, r, inc, mid + 1, ne, 2 * index + 1);\n segtree[index] = Math.min(segtree[2 * index], segtree[2 * index + 1]);\n }\n }", "public TreeNode sortedArrayToBST(int[] nums) {\n int len = nums.length;\n if (len == 0) {\n return null;\n }\n return rescurse(nums, 0, len- 1);\n\n }", "public static void insert(int[] arr,int childIndex)\n\t{\n\t\tint parentIndex=(childIndex-1)/2;\n\t\twhile(parentIndex>=0)\n\t\t{\n\t\t\tif(arr[parentIndex]>arr[childIndex])\n\t\t\t{\n\t\t\t\tint temp=arr[parentIndex];\n\t\t\t\tarr[parentIndex]=arr[childIndex];\n\t\t\t\tarr[childIndex]=temp;\n\t\t\t\tchildIndex=parentIndex;\n\t\t\t\tparentIndex=(childIndex-1)/2;\n\t\t\t}\n\t\t\telse\n\t\t\t\treturn;\n\t\t}\n\t}", "private static Object[] set(\n Object[] root,\n int depth,\n Object value,\n int index) {\n\n Object[] newRoot = root.clone();\n\n if (depth == 0) {\n // Base case; directly insert the value.\n newRoot[index & 0x1F] = value;\n } else {\n // Recurse, then swap the result in for the appropriate place in\n // this node.\n int nodeIndex = getNodeIndex(index, depth);\n Object[] child = (Object[]) root[nodeIndex];\n newRoot[nodeIndex] = set(child, depth - 5, value, index);\n }\n\n return newRoot;\n }", "private void buildSegmentTree(int treeIndex, int l, int r) {\r\n\r\n // recursion stop rule: only one element in the interval\r\n if (l == r) {\r\n tree[treeIndex] = data[l];\r\n return;\r\n }\r\n\r\n int leftTreeIndex = leftChild(treeIndex);\r\n int rightTreeIndex = rightChild(treeIndex);\r\n\r\n // int mid = (l + r) / 2;\r\n int mid = l + (r - l) / 2; // to prevent overflow\r\n buildSegmentTree(leftTreeIndex, l, mid);\r\n buildSegmentTree(rightTreeIndex, mid + 1, r);\r\n\r\n tree[treeIndex] = merger.merge(tree[leftTreeIndex], tree[rightTreeIndex]);\r\n }", "private void merge(T[] array, int beginIndex, int middleIndex, int endIndex) {\n int fst = beginIndex, snd = middleIndex;\n copy(array, beginIndex, endIndex);\n for (int k = beginIndex; k < endIndex; k++) {\n if (fst >= middleIndex)\n assign(array, k, temp[snd++]);\n else if (snd >= endIndex)\n assign(array, k, temp[fst++]);\n else if (compareTo(temp, fst, snd) < 0)\n assign(array, k, temp[fst++]);\n else\n assign(array, k, temp[snd++]);\n }\n }", "void constructSTUtil(int arr[], int ss, int se, int si)\n {\n if (ss == se) {\n st[si] = arr[ss];\n //return arr[ss];\n } else {\n\n // If there are more than one elements, then recur for left and\n // right subtrees and store the sum of values in this node\n int mid = getMid(ss, se);\n constructSTUtil(arr, ss, mid, si * 2 + 1);\n constructSTUtil(arr, mid + 1, se, si * 2 + 2);\n st[si] = Math.min(st[si*2+1] , st[si*2+ 2]);\n }\n }", "private void merge(int[] array, int start, int mid, int end) {\n\t\t\n\t\t// Instantiate and populate subarrays.\n\t\tint leftSize = mid - start + 1;\n\t\tint rightSize = end - mid;\n\t\tint[] leftSubarray = new int[leftSize + 1];\n\t\tint[] rightSubarray = new int[rightSize + 1];\n\t\t\n\t\tfor (int i = 0; i < leftSize; i++) {\n\t\t\tleftSubarray[i] = array[start + i];\n\t\t}\n\t\tfor (int i = 0; i < rightSize; i++) {\n\t\t\trightSubarray[i] = array[mid + i + 1];\n\t\t}\n\t\t\n\t\t// \"Sentinel\" values = approximate infinity.\n\t\tleftSubarray[leftSize] = Integer.MAX_VALUE;\n\t\trightSubarray[rightSize] = Integer.MAX_VALUE;\n\n\t\t// Merge subarrays.\n\t\tint i = 0;\n\t\tint j = 0;\n\t\tfor (int k = start; k <= end; k++) {\n\t\t\tif (leftSubarray[i] < rightSubarray[j]) {\n\t\t\t\tarray[k] = leftSubarray[i];\n\t\t\t\ti++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tarray[k] = rightSubarray[j];\n\t\t\t\tj++;\n\t\t\t}\n\t\t}\n\t}", "protected ArrayNode<T> getNode( int idx, int lower, int upper){\r\n\t\tif ((idx < lower)||(idx>upper))\r\n\t\t\tthrow new IndexOutOfBoundsException();\r\n\t\treturn getNode(idx);\r\n\t}", "public TreeNode sortedArrayToBST(int[] num) {\n return constructBST(num, 0, num.length - 1);\n }", "private Node sortedArrayToBST(List<EventPair> allEvents, int start, int end, Node root1) {\n\t\tif (start > end) {\n return createNullLeaf(root1);\n }\n\t\tint mid = (start + end) / 2;\n\t\tNode node = createNode(allEvents.get(mid), Color.BLACK, root1);\n\t\tnode.left = sortedArrayToBST(allEvents, start, mid-1, node);\n\t\tnode.right = sortedArrayToBST(allEvents, mid+1, end, node);\n\t return node;\n\t}", "public static TreeNode sortedArrayToBST_041(int[] num) {\n if (num == null || num.length == 0) {\n return null;\n }\n return constructTreeNode(num, 0, num.length - 1);\n }", "static void rvereseArray(int arr[], int start, int end)\r\n {\r\n int temp;\r\n while(start < end){\r\n \r\n temp = arr[start];\r\n arr[start] = arr[end];\r\n arr[end] = temp;\r\n //rvereseArray(arr, start+1, end-1);\r\n // move the left and right index pointers in toward the center\r\n start++;\r\n end--;\r\n }\r\n }", "public TreeNode<Integer> creationBSTFromPreOrder(List<Integer> arr,int start,int end,TreeNode<Integer> node)\n\t{\n\t\tif(arr != null &&!arr.isEmpty() && start<=end)\n\t\t{\n\t\t\tnode = new TreeNode<Integer>(arr.get(start));\n\t\t\troot = node;\n\t\t\tint pivot =getIndex(arr,arr.get(start),start,end);\n\t\t\tif(pivot >=0)\n\t\t\t{\n\t\t\t\troot.left = creationBSTFromPreOrder(arr,start+1,pivot-1,node.left);\n\t\t\t\troot.right = creationBSTFromPreOrder(arr,pivot,end,node.right);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn node;\n\t\t\t}\n\t\t}\n\t\treturn root;\n\t}", "public Node buildTree(int arr[][], int start, int end, int level, int height){\n\t\tif(start>end) return nil;\n\t\tint mid = start+(end-start)/2;\n\t\tNode root; \n\t\tif(level==height-1){\n\t\t\troot = new Node(arr[mid][0],arr[mid][1],\"Red\");\n\t\t}else{\n\t\t\troot = new Node(arr[mid][0],arr[mid][1],\"Black\");\t\t\n\t\t}\n\t\troot.left = buildTree(arr,start,mid-1,level+1,height);\n\t\troot.left.parent=root;\n\t\troot.right = buildTree(arr,mid+1,end,level+1,height);\n\t\troot.right.parent=root;\n\t\treturn root;\n\t}", "private int nodesToArrayRec(IAVLNode node, IAVLNode[] arr, int index) {\r\n\t\t\tif (node.isRealNode() == false)\r\n\t\t\t\treturn index;\r\n\t\t\tindex = nodesToArrayRec(node.getLeft(), arr, index);\r\n\t\t\tarr[index++] = node;\r\n\t\t\tindex = nodesToArrayRec(node.getRight(), arr, index);\r\n\t\t\treturn index;\r\n\t\t}", "public TreeNode sortedArrayToBST(int[] nums){\r\n int length = nums.length;\r\n if( length == 0 ){\r\n return null;\r\n }else if( length == 1){\r\n return new TreeNode(nums[0]);\r\n }\r\n return sortedArrayToBST(nums, 0, length-1);\r\n }", "private static void updateRangeLazy(int[] segtree, int[] lazyValue, int l, int r, int inc, int ns, int ne,\n int index) {\n if (lazyValue[index] != 0) {\n segtree[index] += lazyValue[index];\n if (ns != ne) {\n lazyValue[2 * index] += lazyValue[index];\n lazyValue[2 * index + 1] += lazyValue[index];\n }\n lazyValue[index] = 0;\n }\n\n if (r < ns || l > ne) {\n return;\n }\n if (ns == ne) {\n segtree[index] += inc;\n return;\n }\n if (ns >= l && ne <= r) {\n // complete overlap - update this node, pass the lazy value(if not leaf) &\n // return\n segtree[index] += inc;\n if (ns != ne) {\n lazyValue[2 * index] += inc;\n lazyValue[2 * index + 1] += inc;\n }\n // return from here only.\n return;\n } else {\n //partial overlap-call on left& right\n int mid = (ns + ne) / 2;\n updateRangeLazy(segtree, lazyValue, l, r, inc, ns, mid, 2 * index);\n updateRangeLazy(segtree, lazyValue, l, r, inc, mid + 1, ne, 2 * index + 1);\n segtree[index]=Math.min(segtree[2*index],segtree[2*index+1]);\n }\n\n }", "private static long fillAVLTree(AVLTree<Integer> aTree, int[] anIntArray) {\n long start = System.currentTimeMillis();\n for (int integer : anIntArray) {\n aTree.insert(integer);\n }\n long finish = System.currentTimeMillis();\n return (finish - start);\n }", "private void divideArray(int LowInd, int HighInd) {\n\t\tif(LowInd<HighInd){\r\n\t\t\tint mid = LowInd+(HighInd-LowInd)/2;\r\n\t\t\t\r\n\t\t\t//Left\r\n\t\t\tdivideArray(LowInd,mid);\r\n\t\t\t\r\n\t\t\t//Right\r\n\t\t\tdivideArray(mid+1, HighInd);\r\n\t\t\t\r\n\t\t\tMergeArray(LowInd, mid, HighInd);\r\n\t\t\t\r\n\t\t}\r\n\t}", "public TreeNode sortedArrayToBST(int[] nums) {\n\t\treturn helper(nums, 0, nums.length - 1);\n\t}", "public TreeNode sortedArrayToBST(int[] nums) {\n if (nums.length == 0) {\n return null;\n }\n return constructBST(nums, 0, nums.length - 1);\n }", "public static void merge(Value[] arr, int low, int high) {\r\n int mid = low + (high - low) / 2; // the mid-point\r\n // Merge the two \"halves\" into a new array merged\r\n Value[] merged = new Value[high - low];\r\n int low_i = low;\r\n int upp_i = mid;\r\n for (int mer_i = 0; mer_i < merged.length; mer_i++) {\r\n if (low_i == mid) {\r\n // We already put all elements from the lower half in their\r\n // right place, so just put all the elements from the upper half\r\n // in their place, and be done.\r\n while (upp_i < high) {\r\n merged[mer_i] = arr[upp_i];\r\n upp_i++;\r\n mer_i++;\r\n }\r\n break;\r\n } else if (upp_i == high) {\r\n // We already put all elements from the upper half in their\r\n // right place, so just put all the elements from the lower half\r\n // in their place, and be done.\r\n while (low_i < mid) {\r\n merged[mer_i] = arr[low_i];\r\n low_i++;\r\n mer_i++;\r\n }\r\n double x = 0.5;\r\n for (int i = 0; i < merged.length; i++) {\r\n merged[i].draw(x, 0);\r\n }\r\n break;\r\n } else if (arr[low_i].getValue() < arr[upp_i].getValue()) { // when comparing objects, use arr[low_i].compareTo(arr[upp_i) < 0\r\n merged[mer_i] = arr[low_i];\r\n low_i++;\r\n } else {\r\n merged[mer_i] = arr[upp_i];\r\n upp_i++;\r\n }\r\n }\r\n // Copy the elements of merged back into arr in the right place.\r\n for (int i = 0; i < merged.length; i++)\r\n arr[low + i] = merged[i];\r\n }", "public TreeNode sortedArrayToBST(int[] nums) {\n if(nums == null || nums.length == 0){\n \t return null;\n }\n return buildTree(nums, 0, nums.length - 1);\n }", "public static TreeNode<Integer> createBST(int[] array) {\n return createBST(array, 0, array.length - 1);\n }", "private static void fillWithFlagAboveSubLitPart(\n GRect cbbox,\n MyFlagManager flagManager,\n int[] xMinArr,\n int[] xMaxArr,\n int j,\n int segmentXMin,\n int segmentXMax,\n byte segmentFlag) {\n \n final int subJ = j + 1;\n final int subXMinLit = xMinArr[subJ];\n final int subXMaxLit = xMaxArr[subJ];\n if (DEBUG) {\n Dbg.log(\"subXMinLit = \" + subXMinLit);\n Dbg.log(\"subXMaxLit = \" + subXMaxLit);\n }\n if (subXMinLit <= subXMaxLit) {\n final int cmnXMin = Math.max(segmentXMin, subXMinLit + 1);\n final int cmnXMax = Math.min(segmentXMax, subXMaxLit - 1);\n if (DEBUG) {\n Dbg.log(\"cmnXMin = \" + cmnXMin);\n Dbg.log(\"cmnXMax = \" + cmnXMax);\n }\n if (cmnXMin <= cmnXMax) {\n final int tmpI = cmnXMin - cbbox.x();\n final int indexFrom = tmpI + j * cbbox.xSpan();\n final int indexTo = indexFrom + (cmnXMax - cmnXMin);\n if (DEBUG) {\n Dbg.log(\"indexFrom = \" + indexFrom);\n Dbg.log(\"indexTo = \" + indexTo);\n }\n fillWithFlag(\n flagManager,\n indexFrom,\n indexTo,\n segmentFlag);\n }\n }\n }", "public TreeNode sortedArrayToBST(int[] nums) {\n if(nums == null || nums.length == 0) return null;\n return makeTree(nums, 0, nums.length-1);\n }", "public void createArray(Node node, int index, int[] array) {\n if (node == null || index >= 32) {\n if (menuOption == 'r') {\n for (int i = index; i < myArray.length; i++) {\n array[index] = 0;\n }\n }\n return;\n }\n array[index] = node.getValue();\n createArray(node.getLeftChild(), index * 2, array);\n createArray(node.getRightChild(), index * 2 + 1, array);\n }", "private int infoToArray2(WAVLNode x,String []arr ,int index) {\n \t if (x==EXT_NODE) {\r\n \t\t return index;\r\n \t }\r\n \t index=infoToArray2(x.left, arr, index);// left son recursion\r\n \t arr[index] = x.info;// the current value\r\n \t index++;\r\n \t index = infoToArray2(x.right, arr, index); // right son recursion\r\n \t return index;\r\n }", "private void heapInsert(int[] arr, int index) {\n while (arr[index] > arr[(index - 1) / 2]) {\n swap(arr, index, (index - 1) / 2);\n index = (index - 1) / 2;\n }\n }", "private static TreeNode helper2(TreeNode node, int[] nums, int start, int end) {\n if (start > end) {\n return null;\n }\n int max = Integer.MIN_VALUE;\n int middle = 0;\n for(int i = start; i <= end; i++) {\n if (nums[i] >= max) {\n max = nums[i];\n middle = i;\n }\n }\n node = new TreeNode(max);\n node.left = helper2(node.left, nums, start, middle - 1);\n node.right = helper2(node.right, nums, middle + 1, end);\n return node;\n }", "private static void merge(int[] arr, int start, int mid, int end) {\n\t\tint length1 = mid - start + 1;\n\t\tint length2 = end - mid;\n\t\tint left[] = new int[length1];\n\t\tint right[] = new int[length2];\n\t\tfor (int index =0; index < length1; index++) {\n\t\t\tleft[index] = arr[start+index];\n\t\t}\n\t\tfor (int index =0; index < length2; index++) {\n\t\t\tright[index] = arr[mid+index+1];\n\t\t}\n\t\tint leftIndex = 0;\n\t\tint rightIndex = 0;\n\t\tint index = start;\n\t\twhile (leftIndex < length1 && rightIndex < length2) {\n\t\t\tif (left [leftIndex] < right[rightIndex]) {\n\t\t\t\tarr[index] = left[leftIndex];\n\t\t\t\tleftIndex ++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tarr[index] = right[rightIndex];\n\t\t\t\trightIndex++;\n\t\t\t\tnumberOfInversions += (mid - leftIndex)+1;\n\t\t\t}\n\t\t\tindex++;\n\t\t}\n\t\twhile (leftIndex < length1) {\n\t\t\tarr[index] = left[leftIndex];\n\t\t\tleftIndex++;\n\t\t\tindex++;\n\t\t}\n\t\twhile (rightIndex < length2) {\n\t\t\tarr[index] = right[rightIndex];\n\t\t\trightIndex++;\n\t\t\tindex++;\n\t\t}\n\t\t\t\n\t\t\n\t}", "public TreeNode buildBTree (Integer[] inArray, int root) {\n\tTreeNode rv = null;\n\tint leftIndex = root * 2;\n\tint rightIndex = root * 2 +1;\n\t\n\tif (inArray.length >= root && inArray[root-1] != null) { // if root points to a valid value\n\t\trv = new TreeNode(inArray[root-1]);\n\t\tif (inArray.length >= leftIndex && inArray[leftIndex-1] != null)\n\t\t\trv.left = buildBTree(inArray,leftIndex);\n\t\tif (inArray.length >= rightIndex && inArray[rightIndex-1] != null)\n\t\t\trv.right = buildBTree(inArray,rightIndex);\n\t}\n\t\n\treturn rv;\n}", "public static Node[] initTree(int[] arr){\n int i;\n Node[] tree = new Node[n];\n Node node;\n for(i = 0; i < n; i++){\n node = new Node();\n node.data = arr[i];\n tree[i] = node;\n }\n tree[0].data = arr[0];\n tree[1].data = arr[1];\n tree[2].data = arr[2];\n tree[3].data = arr[3];\n tree[4].data = arr[4];\n tree[5].data = arr[5];\n tree[6].data = arr[6];\n\n tree[0].parent = null;\n tree[0].left = tree[1];\n tree[0].right = tree[2];\n\n tree[1].parent = tree[0];\n tree[1].left = null;\n tree[1].right = tree[3];\n\n tree[2].parent = tree[0];\n tree[2].left = tree[4];\n tree[2].right = null;\n \n tree[3].parent = tree[1];\n tree[3].left = null;\n tree[3].right = null;\n\n tree[4].parent = tree[2];\n tree[4].left = tree[5];\n tree[4].right = tree[6];\n\n tree[5].parent = tree[4];\n tree[5].left = null;\n tree[5].right = null;\n\n tree[6].parent = tree[4];\n tree[6].left = null;\n tree[6].right = null;\n\n root = tree[0];\n return tree; \n }", "private static void merge(int[] array, int lowIndex, int middleIndex, int highIndex) {\n int n1 = middleIndex - lowIndex + 1;\n int n2 = highIndex - middleIndex;\n\n /*Create temp arrays*/\n int L[] = new int[n1];\n int R[] = new int[n2];\n\n /*Copy data to temp arrays*/\n for (int i = 0; i < L.length; i++) {\n L[i] = array[lowIndex + i];\n }\n for (int i = 0; i < R.length; i++) {\n R[i] = array[middleIndex + 1 + i];\n }\n\n /* Merge the temp arrays */\n\n // Initial indexes of first and second subarrays\n int i = 0, j = 0;\n\n // Initial index of merged subarray\n int k = lowIndex;\n\n while (i < n1 && j < n2) {\n if (L[i] <= R[j]) {\n array[k] = L[i];\n i++;\n } else {\n array[k] = R[j];\n j++;\n }\n k++;\n }\n\n /*Copy remaining elements of L[] if any */\n while (i < n1) {\n array[k] = L[i];\n i++;\n k++;\n }\n\n /*Copy remaining elements of R[] if any */\n while (j < n2) {\n array[k] = R[j];\n j++;\n k++;\n }\n }", "abstract int binSearch(int[] array, int num, int left, int right);", "public static int interpolationSearch(int[] nums, int val){\n\n int lo = 0, mid = 0, hi = nums.length - 1;\n int range = nums[hi] - nums[lo];\n int normmailized = (hi - lo);\n while(nums[lo] <= val && nums[hi] >= val){\n mid = lo + ((val - nums[lo]) * normmailized)/ range; // normalization\n if(nums[mid] < val){\n lo = mid + 1;\n } else if(nums[mid] > val){\n hi = mid - 1;\n } else return mid;\n }\n if(nums[lo] == val) return lo;\n return -1;\n }", "private void heapify(int[] arr, int i, int end){\n \n int largest = i;\n int left = 2 * i + 1;\n int right = 2 * i + 2;\n \n if(left < end && arr[left] > arr[largest]){ // check bounds and compare values\n largest = left;\n }\n \n if(right < end && arr[right] > arr[largest]){\n largest = right;\n }\n \n if(largest != i){\n // perform swap arr[i] and arr[largest]\n swap(arr,largest,i);\n //recursively fix the tree using heapify()\n heapify(arr,largest,end);\n }\n \n }", "public static void main(String[] args) {\n// TreeNode node1 = new TreeNode(0);\n// TreeNode node2l = new TreeNode(3);\n// TreeNode node2r = new TreeNode(5);\n//// TreeNode node3l = new TreeNode(2);\n// TreeNode node3r = new TreeNode(2);\n//// TreeNode node4l = new TreeNode(4);\n// TreeNode node4r = new TreeNode(1);\n//\n// node1.left = node2l;\n// node1.right = node2r;\n//// node2l.left = node3l;\n// node2l.right = node3r;\n// node3r.right = node4r;\n//\n\n int[] nums = {3, 2, 1, 6, 0, 5};\n\n }", "public int[] searchRange(int[] A, int target) {\n // write your code here\n if (A == null || A.length == 0) return new int[] {-1, -1};\n int left = 0, right = A.length - 1;\n while (left + 1 < right) {\n int mid = left + (right - left) / 2;\n if (A[mid] >= target) {\n right = mid;\n }\n else{\n left = mid;\n }\n }\n int leftBound = -1, rightBound = -1;\n if (A[left] == target)\n leftBound = left;\n else if (A[right] == target)\n leftBound = right;\n\n left = 0;\n right = A.length - 1;\n while (left + 1 < right) {\n int mid = left + (right - left) / 2;\n if (A[mid] <= target) {\n left = mid;\n }\n else {\n right = mid;\n }\n }\n if (A[right] == target) rightBound = right;\n else if (A[left] == target) rightBound = left;\n return new int[] {leftBound, rightBound};\n }", "public static void merge(int inputArray[], int start, int mid, int end) {\n // must account for first marker being pos 0\n int tempArray[] = new int[end - start + 1];\n\n // index counter for l array\n int leftMarker = start;\n // index counter for r array\n int rightMarker = mid + 1;\n // index counter for temporary array\n int k = 0;\n\n // while L isn't past midpoint and R isn't past end\n // fill out tempArray based on which value is higher\n while (leftMarker <= mid && rightMarker <= end) {\n if (inputArray[leftMarker] < inputArray[rightMarker]) {\n tempArray[k] = inputArray[leftMarker];\n leftMarker = leftMarker + 1;\n } else {\n tempArray[k] = inputArray[rightMarker];\n rightMarker = rightMarker + 1;\n }\n k = k + 1;\n }\n\n // Only one condition must be true to break out of above loop\n // we could theoretically make it to the end of left array\n // without making it to the end of right array\n if (leftMarker <= mid) {\n while (leftMarker <= mid) {\n tempArray[k] = inputArray[leftMarker];\n leftMarker = leftMarker + 1;\n k = k + 1;\n\n }\n } else if (rightMarker <= end) {\n while (rightMarker <= end) {\n tempArray[k] = inputArray[rightMarker];\n rightMarker = rightMarker + 1;\n k = k + 1;\n }\n }\n\n // copy over the temp array into inputArray\n for (int i = 0; i < tempArray.length; i++) {\n // we add \"start\" to i so that\n // we only write to the \"window\"'s location\n // and the window frame will move from left to right and expand\n // as the recursion proceeds\n inputArray[i + start] = tempArray[i];\n }\n }", "public static void merge(int[] array, int start, int mid, int end) {\n if (array[mid - 1] <= array[mid]) {\n return;\n }\n\n // Index variables\n int i = start;\n int j = mid;\n int tempIndex = 0;\n\n // Create a temp array large enough to hold all elements in the left and right partitions\n int[] temp = new int[end - start];\n\n // While there are elements left in any of the left and right partitions...\n while (i < mid && j < end) {\n /* \n temp[tempIndex++] = array[i] <= array[j] ? array[i++] : array[j++];\n */\n // If the left element is smaller than or equal to the right...\n if (array[i] <= array[j]) {\n // Assign the left element to the temp array, and increment tempIndex and i\n temp[tempIndex++] = array[i++];\n } else {\n // Else assign the right element to the temp array, and increment tempIndex and j\n temp[tempIndex++] = array[j++];\n }\n }\n\n // At this point, either left or right partition will now be empty. \n // Then we simply merge the rest from another partition into temp array \n // as elements left are all larger than the largest elements in the temp array.\n /*\n System.arraycopy(src, srcPos, dest, destPos, length)\n src => source array\n srcPos => source index\n dest => destination array\n destPos => destination index\n */\n\n // Start at unhandled index of the left partition and copy over the rest of the elements\n // to the end of the array from index we've copied over to temp array so far.\n // If there are left over elements in the right partitions, they're already in the end of the array.\n // In the next step, we will be copying over the sorted and merged array from temp array \n // back to the original array, so the the beginning of the array is now sorted in the original array.\n System.arraycopy(array, i, array, start + tempIndex, mid - i);\n\n // Copy the elements in the temp array back into the original array\n System.arraycopy(temp, 0, array, start, tempIndex);\n }", "private static void merge(int[] inputArray, int start, int mid, int end) {\n int tempArray [] = new int[end - start + 1]; //length of array\n\n // index counter for left side of Array\n int leftSlot = start;\n\n // index counter for right side of Array\n int rightSlot = mid + 1;\n\n // index for temp array\n int k = 0;\n\n while(leftSlot <= mid && rightSlot <= end){ //loop will run till left slot is less than mid value, and right slot is less than end index\n if(inputArray[leftSlot] < inputArray[rightSlot]){\n tempArray[k] = inputArray[leftSlot];\n leftSlot = leftSlot + 1; // incrementing the left slot\n }else {\n tempArray[k] = inputArray[rightSlot];\n rightSlot = rightSlot + 1; // incrementing the right slot\n }\n\n k = k+1; //need to increment the index of temp array so that value gets copied to correct place\n }\n\n /**\n * when it gets to here that means the above loop is completed and\n * both the left and right side of array are sorted\n */\n\n //there can be scenario that right array is sorted and left index is always less than right\n\n if(leftSlot <= mid){\n while(leftSlot <= mid){\n tempArray[k] = inputArray[leftSlot];\n leftSlot = leftSlot + 1;\n k = k + 1;\n }\n }else if(rightSlot <= end){\n while(rightSlot <= end){\n tempArray[k] = inputArray[rightSlot];\n rightSlot = rightSlot + 1;\n k = k + 1;\n }\n }\n for(int i=0;i< tempArray.length;i++){\n inputArray[start + i] = tempArray[i]; // copying back to original array\n }\n }", "private int partition(int[] arr, int start, int end) {\n\t\tint bounary = arr[start];\r\n\t\twhile(start<end) {\r\n\t\t\twhile(start<end&&arr[end]>=bounary) {\r\n\t\t\t\tend--;\r\n\t\t\t}\r\n\t\t\tarr[start] = arr[end];\r\n\t\t\twhile(start<end&&arr[start]<=bounary) {\r\n\t\t\t\tstart++;\r\n\t\t\t}\r\n\t\t\tarr[end] = arr[start];\r\n\t\t}\r\n\t\tarr[start] = bounary;\r\n\t\treturn start;\r\n\t}", "private void intervalsRootScan(SearchContext ctx, Intervals result) {\n\t\tfinal int dimension = numDim;\n\t\tfinal int[] mins = ctx.qmins;\n\t\tfinal int[] maxs = ctx.qmaxs;\n\t\tfinal SearchNode curNode = ctx.current();\n\t\tfinal int contained = curNode.contained;\n\t\tfinal int rootStart = curNode.rootStart;\n\t\tfinal int rootEnd = rootStart + curNode.width;\n\t\tfinal int notContained = dimension - Integer.bitCount(contained);;\n\t\tint intervalStart = -1;\n\t\tif (notContained == 1) {\n\t\t\t// sequential-scan on final dimension\n\t\t\tfinal int last1d = Integer.numberOfLeadingZeros(~contained);\n\t\t\tfinal int[] basearray = zoPoints[last1d];\n\t\t\tfinal int min = mins[last1d];\n\t\t\tfinal int max = maxs[last1d];\n\t\t\tfor (int j = rootStart; j < rootEnd; j++) {\n\t\t\t\tint val = basearray[j];\n\t\t\t\tif (val >= min && val <= max) {\n\t\t\t\t\tif (intervalStart < 0) {\n\t\t\t\t\t\tintervalStart = j;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (intervalStart >= 0) {\n\t\t\t\t\t\tresult.addRoot(intervalStart, j);\n\t\t\t\t\t\tintervalStart = -1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// sequential-scan on not contained dimensions\n\t\t\tfinal int[] dims = ctx.work1;\n\t\t\tfor (int ptr = 0, d = 0; d < dimension; d++) {\n\t\t\t\tif (contained << d < 0) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tdims[ptr++] = d;\n\t\t\t}\n\t\t\tJLOOP: for (int j = rootStart; j < rootEnd; j++) {\n\t\t\t\tfor (int ptr = 0; ptr < notContained; ptr++) {\n\t\t\t\t\tfinal int d = dims[ptr];\n\t\t\t\t\tfinal int val = zoPoints[d][j];\n\t\t\t\t\tif (val < mins[d] || val > maxs[d]) {\n\t\t\t\t\t\tif (intervalStart >= 0) {\n\t\t\t\t\t\t\tresult.addRoot(intervalStart, j);\n\t\t\t\t\t\t\tintervalStart = -1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontinue JLOOP;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (intervalStart < 0) {\n\t\t\t\t\tintervalStart = j;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (intervalStart >= 0) {\n\t\t\tresult.addRoot(intervalStart, rootEnd);\n\t\t}\n\t}", "TreeNode generateBinaryTree(int[] arr) {\n\n if (arr.length == 0) {\n\n return null;\n }\n return buildNode(arr, 0, 1, 2);\n }", "public RecursiveArray(int[] arr){\r\n //creates initial array and use it to substantiate array size\r\n this.arr = arr;\r\n this.arraySize = arr.length;\r\n }", "void segregate0and1(int arr[], int size)\n {\n int left = 0;\n int right = size - 1;\n while(left < right){\n while(arr[left] !=1 && left< right){\n left ++;\n }\n while(arr[right] !=0 && left < right){\n right --;\n }\n if(left != right){\n int tmp = arr[left];\n arr[left] = arr[right];\n arr[right] = tmp;\n left ++;\n right -- ;\n }\n }\n }", "private TreeNode createBBST(KeyValuePair[] sortedKVPArr) {\n\n if (sortedKVPArr == null || sortedKVPArr.length == 0) {\n return null;\n }\n\n int begin = 0;\n int end = sortedKVPArr.length;\n int mid = begin + (end - begin) / 2;\n\n KeyValuePair[] left = Arrays.copyOfRange(sortedKVPArr, begin, mid);\n KeyValuePair[] right = Arrays.copyOfRange(sortedKVPArr, mid + 1, end);\n\n TreeNode node = new TreeNode(sortedKVPArr[mid].getId(), sortedKVPArr[mid].getValue());\n\n if (left.length > 0)\n node.left = createBBST(left);\n if (right.length > 0)\n node.right = createBBST(right);\n\n this.root = node;\n\n return this.root;\n }", "public static int findPivot(int[] arr) {\n // write your code here\n /*\n - if arr[rhs]<arr[mid] then min-val will lie in rhs\n else if arr[rhs]>arr[mid] then min-val will lie in lhs\n else if(i==j) means we have found the min-val, so return its value.\n */\n int i=0, j = arr.length-1, mid = (i+j)/2;\n while(i<=j) {\n mid = (i+j)/2;\n if(arr[j]<arr[mid])\n i = mid+1;\n else if(arr[j]>arr[mid])\n j = mid;\n else if(i==j)\n return arr[mid];\n }\n return -1;\n }", "public static void main(String[] args) {\n\t\tint array[]={2,3,4,6};\n\t\tint n=array.length;\n\t\tint maximum=Integer.MIN_VALUE;\n\t\tint minimum=Integer.MAX_VALUE;\n\t\tfor(int i:array)\n\t\t{\n\t\t\tif(i>maximum)\n\t\t\t\tmaximum=i;\n\t\t\tif(i<minimum)\n\t\t\t\tminimum=i;\n\t\t}\n\t\t\n\t\tint mark[]=new int[maximum+2];\n\t\tint value[]=new int[maximum+2];\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tmark[array[i]]=1; // marking ki exist karta hai no need to search in the array.\n\t\t\tvalue[array[i]]=1; //har value se ek fbt to banega hi (1 node ka)\n\t\t}\n\t\tint ans=0;\n\t\tfor(int i=minimum;i<=maximum;i++){\n\t\t\tif(mark[i]==1) // element is present in the array.// we have found the first factor now find 2nd factor.\n\t\t\t{\n\t\t// find the multiples of arr[i] which are less than max value and also less than its square\n\t\t\tfor(int j=i+i ;j<=maximum && j/i<=i;j=j+i)\n\t\t\t{\n\t\t\t\tif(mark[j]==1 && mark[j/i]==1) // i is the first factor and j/i is the 2nd factor.j is the product that serves as root.\n\t\t\t\t{\n\t\t\t\t\t// value =all combination of left child with right child.\n\t\t\t\t\tvalue[j]=value[j] + (value[i] * value[j/i]);\n\t\t\t\t\t\n\t\t\t\t\t// if the 2 child are not same then one more orientation.\n\t\t\t\t\tif(i!=(j/i))\n\t\t\t\t\t\tvalue[j]=value[j] + (value[i] * value[j/i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t}\n\t\t\tans=ans+value[i];\n\t\t}\n\t\tSystem.out.println(ans);\n\t}", "public static int[] mergeSort(int[] arr, int lo, int hi) {\n //write your code here\n if(lo < hi) {\n int mid = (lo+hi)/2;\n int[] lft = mergeSort(arr, lo, mid);\n int[] rgt = mergeSort(arr, mid+1, hi);\n int[] res = mergeTwoSortedArrays(lft, rgt);\n return res;\n }\n return new int[]{arr[lo]}; // if(lo==hi)\n}", "public void buildHeap(int[] arr) {\n int size = arr.length;\n\n for (int i = getParentIndex(size); i >= 0; i--) {\n minHeapify(i);\n }\n }", "public static void sort(int[] arr) {\n // Base Case\n if (arr.length == 1) return;\n\n // Splitting the array\n int midpoint = arr.length / 2;\n int[] left_arr = Arrays.copyOfRange(arr, 0, midpoint);\n int[] right_arr = Arrays.copyOfRange(arr, midpoint, arr.length);\n\n // Sorting the subarrays \n sort(left_arr);\n sort(right_arr);\n\n // Combining the subarrays\n int left_pointer = 0;\n int right_pointer = 0;\n /** \n * Check which array has smaller value then \n * assign it to sorted array\n */ \n while (left_pointer + right_pointer < arr.length) {\n // Left array has been traversed\n if (left_pointer >= left_arr.length) {\n arr[left_pointer + right_pointer] \n = right_arr[right_pointer];\n right_pointer++;\n }\n // Right array has been traversed\n else if (right_pointer >= right_arr.length) {\n arr[left_pointer + right_pointer]\n = left_arr[left_pointer];\n left_pointer++;\n }\n // Both arrays still have values.\n else {\n // Left array has smaller or equal value\n if (left_arr[left_pointer] <= right_arr[right_pointer]) { \n arr[left_pointer + right_pointer]\n = left_arr[left_pointer];\n left_pointer++;\n }\n // Right array has smaller value\n else {\n arr[left_pointer + right_pointer]\n = right_arr[right_pointer];\n right_pointer++;\n }\n }\n }\n // Array is sorted. Replace given array.\n }", "private int searchR(Searching[] array, int start, int half, int end, int value) {\n if (value > array[end].getValue() || value < array[start].getValue()) {\n return -1;\n }\n int a = end - start;\n int b = array[end].getValue() - array[start].getValue();\n int c = value - array[start].getValue();\n int d = (c * a) / b;\n int slide = d + start;\n if (slide > end || slide < start) {\n return -1;\n }\n if (array[slide].getValue() == value) {\n return slide;\n }\n if (value < array[slide].getValue()) {\n end = slide;\n return searchR(array, start, half, end, value);\n } else {\n start = slide;\n return searchR(array, start, half, end, value);\n }\n }", "public int mctFromLeafValues(int[] arr) {\n int ans = 0;\n Stack<Integer> stack = new Stack<>();\n stack.push(Integer.MAX_VALUE);\n for (int i : arr) {\n while (i >= stack.peek()) {\n int mid = stack.pop();\n ans += mid * Math.min(i, stack.peek());\n }\n stack.push(i);\n }\n while (stack.size() > 2) {\n ans += stack.pop() * stack.peek();\n }\n return ans;\n }", "private int insertIndex(int[] arr, int target) {\n int low = 0, high = arr.length - 1;\n if (target < arr[0]) {\n return -1;\n }\n if (target >= arr[arr.length - 1]) {\n return arr.length - 1;\n }\n while (low <= high) {\n int mid = low + (high - low) / 2;\n if (arr[mid] <= target && arr[mid + 1] > target) {\n // index found\n return mid;\n }\n if (arr[mid] <= target) {\n low = mid + 1;\n } else {\n high = mid - 1;\n }\n }\n return -1;\n }", "private int keysToArray2(WAVLNode x,int []arr ,int index) {\n \t if (x==EXT_NODE) {\r\n \t\t return index;\r\n \t }\r\n \t index=keysToArray2(x.left, arr, index); // left son recursion\r\n \t arr[index] = x.key; // insert the current key\r\n \t index++;\r\n \t index = keysToArray2(x.right, arr, index);// right son recursion\r\n \t return index;\r\n }", "public static int[] quickselect(int[] arr, int start, int end) {\n if(start < end) return new int[] {};\n int pivot = partition(arr, start ,end );\n //int mid = (0 + arr.length)/2;\n quickselect(arr, start, pivot);\n quickselect(arr, pivot + 1, end);\n return arr;\n }", "public static void adjustHeap(int []arr,int i,int length){\n int temp=arr[i];//first get current value/item\n for(int k=i*2+1;k<length;k=k*2+1){//from the left child of current item,in other word,the 2i+1 item\n if(k+1<length&&arr[k]<arr[k+1]){//if the left child is less than the right child ,let k point to right child\n k++;\n }\n if(arr[k]>temp){//if k item-the max of left-right child is more than i item ,swap it ,and maybe k item and his child need to change\n arr[i]=arr[k];\n i=k;\n }else{\n break;\n }\n }\n arr[i]=temp;//place the temp=arr[i] at right position\n }", "private void setMinHeap() {\n // parentIndex is the last leaf node parentIndex\n int parentIndex = (array.length - 2) / 2;\n // from last parentIndex down on the depth path to the root\n // convert to minHeap\n while (parentIndex >= 0) { // when parentIndex = 0, the root\n minHeapify(parentIndex, array.length);\n // go to next index(parentIndex) on that level\n parentIndex--;\n }\n }", "static int Floor(int[] arr, int target){\r\n int start = 0;\r\n int end = arr.length - 1;\r\n\r\n while(start <= end){\r\n //Find the middle element\r\n int mid = start + (end - start) / 2;\r\n if (target < arr[mid]){\r\n end = mid - 1;\r\n }else if (target > arr[mid]){\r\n start = mid + 1;\r\n }else {\r\n return mid;\r\n }\r\n }\r\n return start;\r\n }", "private void merge(Comparable[] a, int min, int mid, int max){\n for(int t = min; t <= max;t++){\n aux[t] = a[t];\n }\n \n int i = min; // start index for left side\n int j = mid + 1; // start index for right side\n \n for(int k = min; k <= max; k++){\n if(i > mid){\n a[k] = aux[j++];\n }\n else if(j > max){\n a[k] = aux[i++];\n }\n else if(aux[i].compareTo(aux[j]) < 0 ){\n a[k] = aux[i++];\n }\n else {\n a[k] = aux[j++];\n }\n }\n }", "public static void insertIntoSorted(int[] ar) {\n int index = ar.length-1;\n int val = ar[index];\n while(index > 0){\n for(int i = ar.length-2; i >=0; i--) {\n if(ar[i] >= val) {\n ar[i+1] = ar[i];\n printArray(ar);\n\n }else if(ar[i] < val && ar[i+1] > val){\n ar[i+1] = val;\n printArray(ar);\n }\n }\n if(ar[0] >= val){\n ar[0] = val;\n printArray(ar);\n }\n index--;\n val = ar[ar.length-1];\n }\n }", "private static BTNode<Tweet> loadSubTree(Tweet[] ts, int low, int high) {\n \tif (low == high) return new BTNode<Tweet>(ts[low]);\n \tint mid = low + 1;\n \ttry { while (ts[mid].compareTo(ts[low]) < 0) mid++; }\n \tcatch (ArrayIndexOutOfBoundsException e) {\n \t\t//what, I'm lazy\n \t\t//the index going out of bounds is part of the functionality\n \t}\n \t// first node (of some block) is always the root (of that same subtree); this handles different cases\n \t// 1. nothing below the root\n \tif (mid == low + 1) return new BTNode<Tweet>(ts[low], null, loadSubTree(ts, mid, high));\n \t// 2. nothing above the root\n \tif (mid > high) return new BTNode<Tweet>(ts[low], loadSubTree(ts, low + 1, high), null);\n \t// 3. things above and below\n \treturn new BTNode<Tweet>(ts[low], loadSubTree(ts, low + 1, mid - 1), loadSubTree(ts, mid, high));\n \t\n }", "private static Node insertNode(Node root, String[] arr) {\n\t\tFamilyTree f = new FamilyTree();\n\t\tif (root == null)\n\t\t\treturn root;\n\t\tif (root.data.trim().equalsIgnoreCase(arr[0].trim())) {\n\t\t\tif (root.left == null) {\n\t\t\t\troot.left = f.new Node(arr[1]);\n\t\t\t} else\n\t\t\t\troot.right = f.new Node(arr[1]);\n\t\t}\n\t\tinsertNode(root.left, arr);\n\t\tinsertNode(root.right, arr);\n\t\treturn root;\n\t}", "public static void mergesort_helper(Value[] arr, int low, int high) {\r\n // Base case: the sub-array has length 0 or 1.\r\n // (void methods can return, they just don't return anything)\r\n if (high - low <= 1) {\r\n StdDraw.clear();\r\n arr[0].draw(0.5, 0);\r\n StdAudio.play(arr[0].getSound());\r\n } else {\r\n // Prepare for the recursive calls\r\n // Find the mid-point to \"split\" the sub-array in two \"halves\"\r\n int mid = low + (high - low) / 2;\r\n // Recursive calls / \"Divide\" phase\r\n // Sort the two \"halves\" recursively\r\n mergesort_helper(arr, low, mid);\r\n mergesort_helper(arr, mid, high);\r\n // \"Conquer\" phase: merge the sorted sub-arrays.\r\n merge(arr, low, high);\r\n }\r\n double x = 0.5;\r\n StdDraw.clear();\r\n StdDraw.setPenColor(StdDraw.BLUE);\r\n StdDraw.filledSquare(arr.length / 2, arr.length / 2, arr.length / 2);\r\n for (int i = 0; i < arr.length; i++) {\r\n if (i < high && i > low) {\r\n StdDraw.setPenColor(StdDraw.YELLOW);\r\n } else {\r\n StdDraw.setPenColor(StdDraw.GREEN);\r\n }\r\n arr[i].draw(x, 0);\r\n StdAudio.play(arr[i].getSound());\r\n x += 1;\r\n }\r\n }", "public int[] searchRange(int[] A, int target) {\n int ans[] = new int[2], len = A.length, low = 0, high = len - 1, mid;\n ans[0] = -1;\n ans[1] = -1;\n while (low <= high) {\n mid = low + (high - low) / 2;\n if (A[mid] == target) {\n int left[] = searchRange(Arrays.copyOfRange(A, low, mid), target);\n int right[] = searchRange(Arrays.copyOfRange(A, mid + 1, high + 1), target);\n ans[0] = left[0] == -1 ? mid : low + left[0];\n ans[1] = right[1] == -1 ? mid : mid + 1 + right[1];\n break;\n } else if (A[mid] > target) {\n high = mid - 1;\n } else {\n low = mid + 1;\n }\n }\n return ans;\n }", "public int[] searchRange(int[] nums, int target, int i, int j) {\n int[] res = new int[]{-1, -1};\n while (i <= j) {\n int mid = (i + j) / 2;\n if (nums[mid] == target) {\n int[] left = searchRange(nums, target, i, mid-1), right = searchRange(nums, target, mid+1, j);\n if (left[0] == -1)\n res[0] = mid;\n else\n res[0] = left[0];\n\n if (right[0] == -1)\n res[1] = mid;\n else\n res[1] = right[1];\n return res;\n } else if (nums[mid] < target) {\n i = mid + 1;\n } else {\n j = mid - 1;\n }\n }\n// System.out.println(Arrays.toString(res));\n return res;\n }", "void Divide(int[] a,int lef,int righ) // this function will\n // divide the array into halves and calls recursively\n {\n int left = lef;\n int right = righ;\n int[] b =a; // here modifying b or a will be the same as it is passed as reference\n if(left < right) {\n Divide(b, left, left + (right - left) / 2);\n Divide(b, 1 + left + (right - left) / 2, right);\n int middle = left + (right - left )/2;\n System.out.println(\"calling merge on left is \" + left +\" middle is\" +middle+ \" right is \"+ right);\n Merge(b, left,middle, right);\n }\n //System.out.println(\" left is \" + left + \" right is \"+ right);\n }", "public static TreeNode buildTreeFromArray(Integer[] values) {\n if(values == null || values.length == 0) {\n return null;\n }\n\n TreeNode root = new TreeNode(values[0]);\n Queue<TreeNode> tree = new LinkedList<>();\n tree.add(root);\n\n for (int i = 0; i < (values.length) / 2; i++) {\n if(values[i] != null) {\n TreeNode currentParent = tree.poll();\n if (values[(i * 2) + 1] != null) {\n TreeNode left = new TreeNode(values[(i * 2) + 1]);\n currentParent.setLeft(left);\n tree.add(left);\n }\n if (values[(i * 2) + 2] != null) {\n TreeNode right = new TreeNode(values[(i * 2) + 2]);\n currentParent.setRight(right);\n tree.add(right);\n }\n }\n }\n return root;\n }", "private void createIndexBinaryTree(Index[] indexes, IndexBTree tree, int start, int finish){\n\t\tint mid = ((finish-start)/2) + start;\n\t\tint size = finish - start;\n\n\t\tif(mid > indexes.length-1){\n\t\t\treturn;\n\t\t} else if (size == 0){\n\t\t\ttree.insertIndex(new IndexTNode(indexes[mid]));\n\t\t} else {\n\t\t\ttree.insertIndex(new IndexTNode(indexes[mid]));\n\t\t\tcreateIndexBinaryTree(indexes, tree, start, mid);\n\t\t\tcreateIndexBinaryTree(indexes, tree, mid+1, finish);\n\n\t\t}\n\t}", "public int binarySearchIterative(int[] array,int target) {\n var left = 0;\n var right = array.length -1;\n while (left <= right) {\n int middle = (left + right) / 2;\n if (array[middle] == target)\n return middle;\n if (array[middle] < target)\n left = middle + 1;\n else\n right = middle - 1;\n }\n return -1;\n }", "public void insert(int index, int value) {\n\t\tSystem.out.println(\"Top here is : \" + top);\n\t\tif (index < top && index > -1) {\n\t\t\tint tmp = top;\n\t\t\twhile (tmp != index - 1) {\n\t\t\t\tarr[tmp + 1] = arr[tmp];\n\t\t\t\ttmp--;\n\n\t\t\t}\n\t\t\ttop++;\n\t\t\tarr[index] = value;\n\t\t}else{\n\t\t\tinsert(value);\n\t\t}\n\n\t}", "public static void convert(int[] A)\n {\n // Build-Heap: Call heapify starting from last internal\n // node all the way upto the root node\n int i = (A.length - 2) / 2;\n while (i >= 0) {\n Heapify(A, i--, A.length);\n }\n }", "public static Node construct(Integer[] arr){\r\n Node root = null;\r\n Stack<Node> st = new Stack<>();\r\n \r\n for(int i=0; i<arr.length; i++){\r\n Integer data = arr[i];\r\n if(data != null){\r\n Node nn = new Node(data);\r\n if(st.size()==0){\r\n root = nn;\r\n st.push(nn);\r\n }\r\n else{\r\n st.peek().children.add(nn);\r\n st.push(nn);\r\n }\r\n }\r\n else{ //if data is equal to NULL\r\n st.pop();\r\n }\r\n }\r\n return root;\r\n }", "public Node getMinHeightBST(int[] arr, int lo, int hi){\n if(lo > hi){ \n return null; //impllies Node has no children\n }\n int mid = (hi+lo)/2;\n Node midNode = new Node(arr[mid]);\n midNode.left = getMinHeightBST(arr, lo, mid-1);\n midNode.right = getMinHeightBST(arr, mid+1, hi);\n return midNode;\n }", "public TreeNode sortedArrayToBST2(int[] nums) {\n if (nums.length == 0) {\n return null;\n }\n return doConvertToBST(nums, 0, nums.length - 1);\n }", "void linearPass(int[] arr) {\n\t\tfloat diffSum = 0;\n\t\tint avgDiffCount = 0;\n\n\t\t// used to calculate the average array value\n\t\tint sum = 0;\n\n\t\t// used to find naturally sorted sub-arrays\n\t\tthis.nmiSize = 0;\n\t\tthis.naturalMergeIndices = new int[arr.length];\n\n\t\tStdDevResult stdDevResult = calcStandardDeviation(arr);\n\n\t\tdouble min = stdDevResult.mean - stdDevResult.standardDeviation;\n\t\tdouble max = stdDevResult.mean + stdDevResult.standardDeviation;\n\n\t\tfor (int i = 0; i < arr.length - 1; i++) {\n\t\t\tif (arr[i] > this.maxArrayValue) {\n\t\t\t\tthis.maxArrayValue = arr[i];\n\t\t\t}\n\n\t\t\tif (arr[i] < this.minArrayValue) {\n\t\t\t\tthis.minArrayValue = arr[i];\n\t\t\t}\n\n\t\t\tsum += arr[i];\n\n\t\t\t// record the ending index of the naturally sorted sub-array\n\t\t\tif (arr[i] > arr[i + 1]) {\n\t\t\t\tnaturalMergeIndices[nmiSize] = i;\n\t\t\t\tnmiSize++;\n\t\t\t}\n\n\t\t\t// skip over outliers in the data set when doing the \"average difference\" computation\n\t\t\tif (arr[i] < min || arr[i] > max || arr[i + 1] < min || arr[i + 1] > max) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tdiffSum += arr[i + 1] - arr[i];\n\t\t\tavgDiffCount++;\n\t\t}\n\n\t\tnaturalMergeIndices[nmiSize] = arr.length - 1;\n\t\tnmiSize++;\n\n\t\t// calculate metrics\n\t\tthis.avgDiff = diffSum / avgDiffCount;\n\t\tthis.avgArrayValue = (float)sum / arr.length;\n\n\t\t/* if (avgDiff < 0) {\n\t\t\tarr = reverseArray(arr);\n\t\t} */\n\n\t\t// System.out.println(\"Min: \" + min + \", Max: \" + max);\n\t\t// System.out.println(\"Average difference between array values: \" + avgDiff);\n\t}", "private void BinarySearch(Node node, int index) {\n Node left, right;\n left = node.left;\n right = node.right;\n\n int leftIndex = (2 * index) + 1;\n int rightIndex = (2 * index) + 2;\n if (left != null) {\n ArrayTree[leftIndex] = left.key;\n BinarySearch(left, leftIndex);\n lastIndex = Math.max(leftIndex, lastIndex);\n } else {\n if (leftIndex < ArrayTree.length - 1) {\n ArrayTree[leftIndex] = 0;\n }\n }\n\n if (right != null) {\n ArrayTree[rightIndex] = right.key;\n BinarySearch(right, rightIndex);\n lastIndex = Math.max(rightIndex, lastIndex);\n } else {\n if (rightIndex < ArrayTree.length - 1) {\n ArrayTree[rightIndex] = 0;\n }\n }\n }", "private static void mergeAsc(int arr[], int start, int mid, int end) {\n\r\n\t\tint subArrLen1 = mid - start + 1;\r\n\t\tint subArrLen2 = end - mid;\r\n\r\n\t\t// create the sub Arrays as temporary storage\r\n\t\tint subArray1[] = new int[subArrLen1];\r\n\t\tint subArray2[] = new int[subArrLen2];\r\n\r\n\t\t// copy data in temporary arrays\r\n\r\n\t\tfor (int i = 0; i < subArrLen1; i++) {\r\n\t\t\tsubArray1[i] = arr[start + i];\r\n\t\t}\r\n\r\n\t\tfor (int i = 0; i < subArrLen2; i++) {\r\n\t\t\tsubArray2[i] = arr[mid + i + 1];\r\n\t\t}\r\n\r\n\t\t// merging the temporary arrays\r\n\r\n\t\tint i = 0, j = 0;\r\n\t\tint k = start;\r\n\r\n\t\twhile (i < subArrLen1 && j < subArrLen2) {\r\n\t\t\tif (subArray1[i] <= subArray2[j]) {\r\n\t\t\t\tarr[k] = subArray1[i];\r\n\t\t\t\ti++;\r\n\t\t\t} else {\r\n\t\t\t\tarr[k] = subArray2[j];\r\n\t\t\t\tj++;\r\n\t\t\t}\r\n\t\t\tk++;\r\n\r\n\t\t}\r\n\r\n\t\t// copy left over elements of subArray2[]\r\n\t\twhile (i < subArrLen1) {\r\n\t\t\tarr[k] = subArray1[i];\r\n\t\t\ti++;\r\n\t\t\tk++;\r\n\t\t}\r\n\r\n\t\t// copy left over elements of subArray2[]\r\n\t\twhile (j < subArrLen2) {\r\n\t\t\tarr[k] = subArray2[j];\r\n\t\t\tj++;\r\n\t\t\tk++;\r\n\t\t}\r\n\r\n\t}", "static int findPivot(int[] arr){\n int start = 0;\n int end = arr.length-1;\n\n while(start<=end){\n int mid = start + (end - start) / 2;\n\n if(mid < end && arr[mid] > arr[mid+1]){\n return mid;\n }\n else if(mid > start && arr[mid] < arr[mid-1]){\n return mid - 1;\n }\n// Pivot lies on the left-hand side and mid is currently in section 2\n else if(arr[start] >= arr[mid]){\n end = mid - 1;\n }\n// Pivot lies on the right-hand side and mid is currently in section1\n// arr[start] < arr[mid]\n else {\n start = mid + 1;\n }\n }\n return -1;\n }", "private void putInBinaryTree(int val) {\n BinaryTree.Node node = this.binaryTree.getRoot();\n BinaryTree.Node parent = node;\n while (node != null) {\n parent = node;\n if (val < node.data) node = node.left;\n else node = node.right;\n }\n if (val < parent.data) this.binaryTree.addAsLeftChild(parent, val);\n else this.binaryTree.addAsRightChild(parent, val);\n }", "private static int first(int arr[], int low, int high, int x, int n)\n {\n if(high >= low){\n \n /*mid = low+high/2*/\n int mid = low + (high-low) / 2;\n\n //Wen we found the X at the MID\n if( (mid==0 || x > arr[mid-1]) && arr[mid] == x)\n return mid;\n\n //WEn the x is greater than mid go to right ie mid+1\n if( x > arr[mid])\n return first(arr, (mid+1), high, x, n);\n\n //Else case wen x is small go left ie mid-1\n return first(arr, low, (mid-1), x, n);\n\n }\n\n //Wen not found ie high <= low\n return -1;\n }", "public void insert(T x)\n\t{\n\t\t//if the input is null, returns null\n\t\tif(x == null)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t//if size == 0, inputs in the first index of the tree\n\t\tif(size == 0)\n\t\t{\n\t\t\tarray[0] = x;\n\t\t\tsize++;\n\t\t\treturn;\n\t\t}\n\n\t\t//declares variable and adds the input to the last index\n\t\tint index = size;\n\t\tarray[index] = x;\n\t\tint parent = (index-1)/2;\n\t\tint gParent = (index-3)/4;\n\t\t//gets the present level after input\n\t\tint level = getLevel(index+1);\n\t\t//if size < 3; does special input\n\t\tif(size <= 3)\n\t\t{\n\t\t\t//checks if the element at 0 is greater than the new one, if yes, swaps\n\t\t\tif(object.compare(array[0], array[index]) > 0)\n\t\t\t{\n\t\t\t\tT temp = array[0];\n\t\t\t\tarray[0] = array[index];\n\t\t\t\tarray[index] = temp;\n\t\t\t\tsize++;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//else does nothing. \n\t\t\t\tsize++;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t//checks if level is even\n\t\tif(level % 2 == 0)\n\t\t{\n\t\t\t//compares it to its parent and carries out the right action. \n\t\t\tif(object.compare(array[index], array[parent]) == 0)\n\t\t\t{\n\t\t\t\tsize++;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if(object.compare(array[index], array[parent]) > 0)\n\t\t\t{\n\n\t\t\t\tT temp = array[parent];\n\t\t\t\tarray[parent] = array[index];\n\t\t\t\tarray[index] = temp;\n\n\n\t\t\t\tint y = parent;\n\t\t\t\twhile(object.compare(array[y], array[(y-3)/4]) > 0 && y > 2)\n\t\t\t\t{\n\n\t\t\t\t\tT memp = array[(y -3)/4];\n\t\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\t\tarray[y] = memp;\n\n\t\t\t\t\ty = (y -3)/4;\n\t\t\t\t}\n\n\t\t\t\tsize++;\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\telse if(object.compare(array[index], array[parent]) < 0)\n\t\t\t{\n\t\t\t\tif(object.compare(array[index], array[gParent]) >= 0)\n\t\t\t\t{\n\t\t\t\t\tsize++;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\t//switch till x > grandparent\n\t\t\t\t\tint y = index;\n\t\t\t\t\twhile(object.compare(array[y], array[(y-3)/4]) < 0 && y >2)\n\t\t\t\t\t{\n\n\t\t\t\t\t\tT memp = array[(y -3)/4];\n\t\t\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\t\t\tarray[y] = memp;\n\n\t\t\t\t\t\ty = (y -3)/4;\n\t\t\t\t\t}\n\n\t\t\t\t\tsize++;\n\t\t\t\t\treturn;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(object.compare(array[index], array[parent]) == 0)\n\t\t\t{\n\t\t\t\tsize++;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if(object.compare(array[index], array[parent]) > 0)\n\t\t\t{\n\t\t\t\tif(object.compare(array[index], array[gParent]) <= 0)\n\t\t\t\t{\n\t\t\t\t\tsize++;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//switch till x < grandparent\n\t\t\t\t\tint y = index;\n\t\t\t\t\twhile(object.compare(array[y], array[(y-3)/4]) > 0 && y >2)\n\t\t\t\t\t{\n\n\t\t\t\t\t\tT memp = array[(y -3)/4];\n\t\t\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\t\t\tarray[y] = memp;\n\n\t\t\t\t\t\ty = (y -3)/4;\n\t\t\t\t\t}\n\n\t\t\t\t\tsize++;\n\t\t\t\t\treturn;\n\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(object.compare(array[index], array[parent]) < 0)\n\t\t\t{\n\t\t\t\tT temp = array[parent];\n\t\t\t\tarray[parent] = array[index];\n\t\t\t\tarray[index] = temp;\n\n\t\t\t\tint y = parent;\n\t\t\t\twhile(object.compare(array[y], array[(y-3)/4]) < 0 && y >2)\n\t\t\t\t{\n\n\t\t\t\t\tT memp = array[(y -3)/4];\n\t\t\t\t\tarray[(y-3)/4] = array[y];\n\t\t\t\t\tarray[y] = memp;\n\n\t\t\t\t\ty = (y -3)/4;\n\t\t\t\t}\n\n\t\t\t\tsize++;\n\t\t\t\treturn;\n\n\t\t\t}\n\t\t}\n\n\t}", "public void merge( int value )\n {\n BiNode loc = _root.findLeaf( value );\n\n //////////////////////////////////////////////////////////\n // Add code here to complete the merge\n //\n // The findLeaf( value ) method of BiNode will return the\n // leaf of the tree that has the range that includes value.\n // Invoke that method using the _root instance variable of\n //\n // Need to get to parent of that node, and get the sibling\n // of the one returned from findLeaf.\n //\n // Then use the 'getValues()' method to get the data points\n // for the found node and for its sibling. All of the data\n // points for both nodes must be added to the parent, AFTER\n // setting the parent's left and right links to null!\n //\n // Note that the sibling of a leaf node might not itself be\n // a leaf, so you'll be deleting a subtree. However, it's\n // straightforwad since the \"getValues()\" method when called\n // on an internal node will return all the values in all its\n // descendents.\n //\n ////////////////////////////////////////////////////////////\n BiNode parent = loc.parent;\n BiNode sibling = null;\n if( loc == parent._left )\n {\n sibling = parent._right;\n }\n else\n {\n sibling = parent._left;\n }\n parent._left = null;\n parent._right = null;\n for( int i = 0; i < loc.getValues( ).size( ); i++ )\n {\n parent.add( loc.getValues( ).get( i ) );\n }\n for( int j = 0; j < sibling.getValues( ).size( ); j++ )\n {\n parent.add( sibling.getValues( ).get( j ) );\n }\n\n\n\n }", "public void build(int root, int range_l, int range_r) {\n if (range_r == range_l) {\n intervals[root] = nums[range_l];\n return;\n\n }\n\n int mid = (range_l + range_r) / 2;\n build(root*2, range_l, mid);\n build(root*2 + 1, mid+1, range_r);\n intervals[root] = intervals[root * 2] + intervals[root * 2 + 1];\n // s[id] = s[id * 2] + s[id * 2 + 1];\n }", "public void left(int[][] arr,int start,int end,int i){\n if(start==end){\n return;\n }\n else{\n System.out.println(arr[i][start]);\n start--;\n }\n left(arr,start,end,i);\n }" ]
[ "0.68612236", "0.56914455", "0.5688918", "0.5688918", "0.55920887", "0.5577735", "0.55065763", "0.54356843", "0.53911865", "0.53468144", "0.5334521", "0.5325732", "0.5323108", "0.53206176", "0.5303066", "0.5280014", "0.5274492", "0.5265751", "0.5264679", "0.5239762", "0.5230413", "0.5214814", "0.52031565", "0.52021956", "0.51856023", "0.5181737", "0.51755464", "0.51738936", "0.51632917", "0.5156445", "0.5107723", "0.50795674", "0.5079367", "0.506678", "0.50637406", "0.5049362", "0.5023424", "0.5023298", "0.500015", "0.49580482", "0.49573463", "0.49557742", "0.49555114", "0.4946499", "0.49464518", "0.49417278", "0.49412677", "0.49293962", "0.4921923", "0.49165207", "0.49153522", "0.48815417", "0.48762536", "0.4874232", "0.48576263", "0.48262206", "0.48209703", "0.48141795", "0.48069906", "0.48028898", "0.4801993", "0.4790708", "0.47893128", "0.47633326", "0.47558776", "0.47557306", "0.47502512", "0.47429696", "0.47328472", "0.47310224", "0.47242704", "0.47212154", "0.47210613", "0.46972114", "0.4690331", "0.4688551", "0.46856678", "0.46704438", "0.46656764", "0.466535", "0.46620008", "0.46587494", "0.46571094", "0.46503893", "0.46499223", "0.46473387", "0.46451092", "0.46402997", "0.4637848", "0.4637624", "0.46374503", "0.4625754", "0.46244124", "0.46226498", "0.4618381", "0.461741", "0.4613155", "0.46092132", "0.46051937", "0.46018633" ]
0.72448254
0
4320P(8K) 76804320 2160P(4K) 38402160 1440P(HD) 1080P(HD) 19201080 720P (HD) 1280720 480P 360P 240P 144P
private void onShow() { if (DEBUG) MLog.d(TAG, "onShow(): " + printThis()); startBackgroundThread(); // When the screen is turned off and turned back on, the SurfaceTexture is already // available, and "onSurfaceTextureAvailable" will not be called. In that case, we can open // a camera and start preview from here (otherwise, we wait until the surfaceJavaObject // is ready in // the SurfaceTextureListener). if (mTextureView.isAvailable()) { openCamera(mTextureView.getWidth(), mTextureView.getHeight()); } else { mTextureView.setSurfaceTextureListener(mSurfaceTextureListener); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int[] determineScreenSize()\n {\n int heightInPixels, widthInPixels;\n int horizontal, vertical;\n\n // Determine initial values from CRTC registers (ensure dimensions are positive by casting byte to int)\n horizontal = ((((int) videocard.crtControllerRegister.regArray[1]) & 0xFF) + 1) * 8;\n vertical = ((((int) videocard.crtControllerRegister.regArray[18]) & 0xFF) | \n (((((int) videocard.crtControllerRegister.regArray[7]) & 0xFF) & 0x02) << 7) | (((((int) videocard.crtControllerRegister.regArray[7]) & 0xFF) & 0x40) << 3)) + 1;\n\n if (videocard.graphicsController.shift256Reg == 0)\n {\n widthInPixels = 640;\n heightInPixels = 480;\n\n if (videocard.crtControllerRegister.regArray[0x06] == (byte) 0xBF)\n {\n if (videocard.crtControllerRegister.regArray[0x17] == (byte) 0xA3 && videocard.crtControllerRegister.regArray[0x14] == (byte) 0x40 && videocard.crtControllerRegister.regArray[0x09] == (byte) 0x41)\n {\n widthInPixels = 320;\n heightInPixels = 240;\n }\n else\n {\n if (videocard.sequencer.dotClockRate != 0)\n {\n horizontal <<= 1;\n }\n widthInPixels = horizontal;\n heightInPixels = vertical;\n }\n }\n else if ((horizontal >= 640) && (vertical >= 480))\n {\n widthInPixels = horizontal;\n heightInPixels = vertical;\n }\n }\n else if (videocard.graphicsController.shift256Reg == 2)\n {\n\n if (videocard.sequencer.chainFourEnable != 0)\n {\n widthInPixels = horizontal;\n heightInPixels = vertical;\n }\n else\n {\n widthInPixels = horizontal;\n heightInPixels = vertical;\n }\n }\n else\n {\n if (videocard.sequencer.dotClockRate != 0)\n horizontal <<= 1;\n widthInPixels = horizontal;\n heightInPixels = vertical;\n }\n return new int[] {heightInPixels, widthInPixels};\n }", "short getHResolution();", "private final void m126208g() {\n int i;\n int i2;\n int i3;\n int i4;\n int i5;\n if (!this.f102568b.mIsFromDraft || !this.f102568b.hasStickers()) {\n boolean a = C39804em.m127437a(this.f102568b.videoWidth(), this.f102568b.videoHeight());\n if (a) {\n i = this.f102568b.videoWidth();\n } else {\n int[] k = C36964i.m118935k();\n if (k != null) {\n i3 = k[0];\n } else {\n i3 = 720;\n }\n i = m125903a(C7551d.m23567d(this.f102568b.videoWidth(), i3));\n }\n this.f102569c = i;\n if (a) {\n i2 = this.f102568b.videoHeight();\n } else {\n double d = (double) this.f102569c;\n Double.isNaN(d);\n i2 = (int) (Math.ceil(d / 9.0d) * 16.0d);\n }\n this.f102570d = i2;\n return;\n }\n if (this.f102568b.mVideoCanvasWidth > 0) {\n i4 = this.f102568b.mVideoCanvasWidth;\n } else {\n i4 = this.f102568b.videoWidth();\n }\n this.f102569c = i4;\n if (this.f102568b.mVideoCanvasHeight > 0) {\n i5 = this.f102568b.mVideoCanvasHeight;\n } else {\n i5 = this.f102568b.videoHeight();\n }\n this.f102570d = i5;\n }", "short getVResolution();", "public static int getWidth() {\r\n\t\treturn 1280;\r\n\t}", "short getPaperSize();", "int getHorizontalResolution();", "public int getVideoDscp();", "public void init241()\n {\n\t \twidth= p2[21]<<24 | p2[20]<<16 | p2[19]<<8 | p2[18];\n\n\n\n\t\theight= p2[25]<<24 | p2[24]<<16 | p2[23]<<8 | p2[22];\n\n\n\t\tint extra=(width*3)%4;\n \tif(extra!=0)\n \tpadding=4-extra;\n int x,z=54;\n l=0;\n int j=0;\n i=0;\n for(int q=0;q<height;q++)\n {\n x=0;\n \t while(x<width)\n \t{\n \t b=p2[z]&0xff;\n binary[j++]=b&0x01;\n g=p2[z+1]&0xff;\n binary[j++]=g&0x01;\n \t r=p2[z+2]&0xff;\n binary[j++]=r&0x01;\n \t pix[l]= 255<<24 | r<<16 | g<<8 | b;\n z=z+3;\n x++;\n \t l++;\n }\n z=z+padding;\n }\n int k;\n x=0;\n stringcon();\n\n\n\tfor(i=l-width;i>=0;i=i-width)\n\t{\n\t\tfor(k=0;k<width;k++)\n\t\t{\n\t\tpixels[x]=pix[i+k];\n// pixels1[x]=pix[i+k];\n\t\tx++;\n\t\t}\n\t}\n}", "static int videoram_alloc(int size)\n\t{\n\t\t/* create video ram */\n\t\tif ( (omegaf_bg0_videoram = new UBytePtr(size)) == null )\n\t\t{\n\t\t\treturn 1;\n\t\t}\n\t\tmemset( omegaf_bg0_videoram, 0x00, size );\n\t\n\t\tif ( (omegaf_bg1_videoram = new UBytePtr(size)) == null )\n\t\t{\n\t\t\tomegaf_bg0_videoram = null;\n\t\t\treturn 1;\n\t\t}\n\t\tmemset( omegaf_bg1_videoram, 0x00, size );\n\t\n\t\tif ( (omegaf_bg2_videoram = new UBytePtr(size)) == null )\n\t\t{\n\t\t\tomegaf_bg0_videoram = null;\n\t\t\tomegaf_bg1_videoram = null;\n\t\t\treturn 1;\n\t\t}\n\t\tmemset( omegaf_bg2_videoram, 0x00, size );\n\t\n\t\tif ( (bitmap_sp =\n\t\t bitmap_alloc (Machine . drv . screen_width, Machine . drv . screen_height\n\t\t ) ) == null )\n\t\t{\n\t\t\tomegaf_bg0_videoram = null;\n\t\t\tomegaf_bg1_videoram = null;\n\t\t\tomegaf_bg2_videoram = null;\n\t\t\treturn 1;\n\t\t}\n\t\n\t\treturn 0;\n\t}", "private static void initUsableDisplaySizes() {\n\t\t// Optimized display dimensions for display resolutions\n\t\tdisplaySizes.add(new Dimension(640, 480)); // Smaller 4:3 (1024x768 and smaller)\n\t\tdisplaySizes.add(new Dimension(800, 600)); // Larger 4:3 (1280x1024)\n\t\tdisplaySizes.add(new Dimension(864, 486)); // Larger 16:9 (1366x768 and larger)\n\t}", "static Dimension frameSize(String env) {\n\t\tString s = System.getProperty(env, \"0\");\n\t\tint x = s.indexOf('x'), high = 600;\n\n\t\tif (x >= 0) {\n\t\t\thigh = Integer.parseInt(s.substring(x + 1));\n\t\t\ts = s.substring(0, x);\n\t\t}\n\t\treturn new Dimension(Integer.parseInt(s), high);\n\t}", "public static int[] setup()\r\n\t{\r\n\t\tint[] size = new int[2];\r\n\t\tGraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();\r\n\t\tint width = gd.getDisplayMode().getWidth();\r\n\t\tint length = gd.getDisplayMode().getHeight();\r\n\t\tsize[0] = width;\r\n\t\tsize[1] = length;\r\n\t\treturn size;\r\n\t}", "public static int size_quality() {\n return (16 / 8);\n }", "private int m23822a() {\n int min = Math.min(this.f25314a.getMemoryClass() * 1048576, Integer.MAX_VALUE);\n if (min < 33554432) {\n return 4194304;\n }\n if (min < 67108864) {\n return 6291456;\n }\n if (VERSION.SDK_INT < 11) {\n return 8388608;\n }\n return min / 4;\n }", "public int getVideoPort();", "void setHResolution(short resolution);", "private void calc_screen_size(){\r\n \tscn_grid.setFont(scn_font);\r\n \tscn_context = scn_grid.getFontRenderContext();\r\n \t scn_layout = new TextLayout(\"X\",scn_font,scn_context);\r\n scn_char_rect = scn_layout.getBlackBoxBounds(0,1).getBounds();\r\n scn_char_height = (int) (scn_char_rect.getHeight()); // RPI 630 was Width in err, 6 to *1.5\r\n \tscn_char_base = scn_char_height/2+1;\r\n \tscn_char_height = scn_char_height + scn_char_base+2;\r\n scn_char_width = (int) (scn_char_rect.getWidth()); // RPI 630 was Height in err\r\n \tscn_height = scn_rows * scn_char_height; // RPI 408 + 5 \r\n \tscn_width = scn_cols * scn_char_width + 3; // RPI 408 + 5 \r\n \tscn_size = new Dimension(scn_width,scn_height);\r\n \tscn_image = new BufferedImage(scn_width,scn_height,BufferedImage.TYPE_INT_ARGB);\r\n \tscn_grid = scn_image.createGraphics();\r\n \tscn_grid.setFont(scn_font); \r\n scn_grid.setColor(scn_text_color);\r\n \t scn_context = scn_grid.getFontRenderContext();\r\n scn_grid.setRenderingHint(RenderingHints.KEY_ANTIALIASING,\r\n RenderingHints.VALUE_ANTIALIAS_ON);\r\n }", "java.lang.String getField1280();", "public void init24()\n {\n\t \twidth= p[21]<<24 | p[20]<<16 | p[19]<<8 | p[18];\n\t\theight= p[25]<<24 | p[24]<<16 | p[23]<<8 | p[22];\n\t\tint extra=(width*3)%4;\n \tif(extra!=0)\n \tpadding=4-extra;\n int x,z=54;\n l=0;\n int j=0;\n for(int q=0;q<height;q++)\n {\n x=0;\n \t while(x<width)\n \t {\n \t b=p[z]&0xff;\n if(j<maxbinary)\n {\n if(binary[j]!=0)\n {\n p1[z]=p[z]&0xff|binary[j++];\n b1=p1[z]&0xff;\n }\n else\n {\n p1[z]=p[z]&0xff & (binary[j++]|0xfe);\n b1=p1[z]&0xff;\n }\n }\n else\n b1=p[z]&0xff;\n \tg=p[z+1]&0xff;\n if(j<maxbinary)\n {\n if(binary[j]!=0)\n {\n p1[z+1]=p[z+1]&0xff|binary[j++];\n g1=p[z+1]&0xff;\n }\n else\n {\n p1[z+1]=p[z+1]&0xff & (binary[j++]|0xfe);\n g1=p1[z+1]&0xff;\n }\n }\n else\n g1=p[z]&0xff;\n r=p[z+2]&0xff;\n if(j<maxbinary)\n {\n if(binary[j]!=0)\n {\n p1[z+2]=p[z+2]&0xfe|binary[j++];\n r1=p[z+2]&0xff;\n }\n else\n {\n p1[z+2]=p[z+2]&0xff & (binary[j++]|0xfe);\n r1=p1[z+2]&0xff;\n }\n }\n else\n r1=p[z]&0xff;\n\tz=z+3;\n\tpix[l]= 255<<24 | r<<16 | g<<8 | b;\n pix1[l]= 255<<24 | r1<<16 | g1<<8 | b1;\n\tl++;\n\tx++;\n\t}\nz=z+padding;\n}\nint k;\nx=0;\n\tfor(i=l-width;i>=0;i=i-width) //l=WIDTH * height\n\t{\n\t\tfor(k=0;k<width;k++)\n\t\t{\n\t\tpixels[x]=pix[i+k];\n pixels1[x]=pix[i+k];\n\t\tx++;\n\t\t}\n\t}\n }", "public static double[] getDisplayResolution() {\n\t\tjava.awt.Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\n\t\tdouble width = screenSize.getWidth();\n\t\tdouble height = screenSize.getHeight();\n\t\tdouble[] displayRes = {width, height};\n\t\treturn displayRes;\n\t}", "int getVerticalResolution();", "private int m128366a() {\n String c = C40173d.m128358c();\n if (!new File(c).exists()) {\n new File(c).mkdirs();\n }\n for (MediaModel mediaModel : this.f104446a) {\n String str = mediaModel.f88156b;\n C7573i.m23582a((Object) str, \"model.filePath\");\n if (C40173d.m128357b(str)) {\n Bitmap a = C40168a.f104413a.mo99928a(mediaModel.f88156b, 720, 1280);\n if (a != null) {\n StringBuilder sb = new StringBuilder();\n sb.append(c);\n sb.append(C40173d.m128354a(\".png\"));\n String sb2 = sb.toString();\n C42341f.m134636a(a, new File(sb2), 50, CompressFormat.PNG);\n C40168a.m128334a(a);\n mediaModel.f88156b = sb2;\n }\n }\n }\n return 0;\n }", "int ljpeg_start ( jhead jh, int info_only)\n{\n int i, tag, len;\n BytePtr data = new BytePtr();\n data.assign( CTOJ.malloc(0x10000));\n BytePtr dp = new BytePtr();\n\n init_decoder();\n for (i=0; i < 4; i++)\n jh.huff[i] = free_decode;\n jh.restart = Integer.MAX_VALUE;\n CTOJ.fread (data, 2, 1, ifp);\n if (data.uat(1) != 0xd8) return 0;\n do {\n CTOJ.fread (data, 2, 2, ifp);\n tag = data.uat(0) << 8 | data.uat(1);\n len = (data.uat(2) << 8 | data.uat(3)) - 2;\n if (tag <= 0xff00) return 0;\n CTOJ.fread (data, 1, len, ifp);\n switch (tag) {\n case 0xffc3:\n jh.sraw = (data.uat(7) == 0x21) ? 1 :0;\n case 0xffc0:\n\tjh.bits = data.uat(0);\n\tjh.high = data.uat(1) << 8 | data.uat(2);\n\tjh.wide = data.uat(3) << 8 | data.uat(4);\n\tjh.clrs = data.uat(5) + jh.sraw;\n if ( len == 9 && dng_version == 0) CTOJ.getc(ifp);\n\tbreak;\n case 0xffc4:\n\tif (info_only != 0) break;\n\tfor (dp.assign(data); dp.lessThan(data.plus(len)) && dp.uat(0) < 4; ) {\n\t jh.huff[dp.uat(0)] = free_decode;\n dp.plusPlus();\n\t dp.assign( make_decoder ( dp, 0));\n\t}\n\tbreak;\n case 0xffda:\n\tjh.psv = data.uat(1+data.uat(0)*2);\n\tbreak;\n case 0xffdd:\n\tjh.restart = data.uat(0) << 8 | data.uat(1);\n }\n } while (tag != 0xffda);\n if (info_only != 0) return 1;\n \n if (jh.sraw != 0) {\n jh.huff[3] = jh.huff[2] = jh.huff[1];\n jh.huff[1] = jh.huff[0];\n }\n jh.row.assign(CTOJ.calloc(jh.wide*jh.clrs, 4));\n //merror (jh.row, \" jpeg_start()\");\n return zero_after_ff = 1;\n}", "@Override\r\n\tpublic int getVDevInfo() {\r\n\t\treturn 0x08100302; // Diag-x24 Ry on VM/370R6 Sixpack 1.2 for a 3420 as 181 with or without a mounted tape\r\n\t}", "public final long mo20953WW() {\n AppMethodBeat.m2504i(60318);\n if (fXT <= 0) {\n fXT = ((ActivityManager) C4996ah.getContext().getSystemService(\"activity\")).getLargeMemoryClass();\n }\n if (fXT >= 512) {\n AppMethodBeat.m2505o(60318);\n return 41943040;\n }\n AppMethodBeat.m2505o(60318);\n return 20971520;\n }", "private Bitmap m14718q() {\n Bitmap a = this.f10962q.mo12204a(this.f10968w, this.f10967v, this.f10969x ? Config.ARGB_8888 : Config.RGB_565);\n m14714a(a);\n return a;\n }", "public int getR_Resolution_ID();", "public int getDisplayWidth() {\n return isHiRes() ? 640 : 320;\n }", "static int[] getResolution ()\n\t{\n\t\t//get the Toolkit of this instance\n\t\tToolkit tk = Toolkit.getDefaultToolkit ();\n\t\t\n\t\t//get the screen size as Dimension object\n\t\tDimension resolution = tk.getScreenSize ();\n\n\t\tint[] rez = new int[2];\n\n\t\t//extract integers from that Dimension object\n\t\trez[0] = new Double (resolution.getWidth ()).intValue ();\n\t\trez[1] = new Double (resolution.getHeight ()).intValue ();\n\n\t\treturn rez;\n\t}", "private void convertToNV21(int k)\n {\n byte[] buffer = new byte[3 * size / 2];\n\n int stride = width;\n int sliceHeight = height;\n int colorFormat = decoderColorFormat;\n boolean planar = false;\n\n if (decOutputFormat != null)\n {\n MediaFormat format = decOutputFormat;\n if (format != null)\n {\n if (format.containsKey(\"slice-height\"))\n {\n sliceHeight = format.getInteger(\"slice-height\");\n if (sliceHeight < height)\n {\n sliceHeight = height;\n }\n }\n\n if (format.containsKey(\"stride\"))\n {\n stride = format.getInteger(\"stride\");\n if (stride < width)\n {\n stride = width;\n }\n }\n\n if (format.containsKey(MediaFormat.KEY_COLOR_FORMAT) && format.getInteger(MediaFormat.KEY_COLOR_FORMAT) > 0)\n {\n colorFormat = format.getInteger(MediaFormat.KEY_COLOR_FORMAT);\n }\n }\n }\n\n switch (colorFormat)\n {\n case MediaCodecInfo.CodecCapabilities.COLOR_FormatYUV420SemiPlanar:\n case MediaCodecInfo.CodecCapabilities.COLOR_FormatYUV420PackedSemiPlanar:\n case MediaCodecInfo.CodecCapabilities.COLOR_TI_FormatYUV420PackedSemiPlanar:\n planar = false;\n break;\n case MediaCodecInfo.CodecCapabilities.COLOR_FormatYUV420Planar:\n case MediaCodecInfo.CodecCapabilities.COLOR_FormatYUV420PackedPlanar:\n planar = true;\n break;\n }\n\n for (int i = 0; i < size; i++)\n {\n if (i % width == 0)\n {\n i += stride - width;\n }\n\n buffer[i] = decodedVideo[k][i];\n }\n\n if (!planar)\n {\n for (int i = 0, j = 0; j < size / 4; i += 1, j += 1)\n {\n if (i % width / 2 == 0)\n {\n i += (stride - width) / 2;\n }\n\n buffer[size + 2 * j + 1] = decodedVideo[k][stride * sliceHeight + 2 * i];\n buffer[size + 2 * j] = decodedVideo[k][stride * sliceHeight + 2 * i + 1];\n }\n }\n else\n {\n for (int i = 0, j = 0; j < size / 4; i += 1, j += 1)\n {\n if (i % width / 2 == 0)\n {\n i += (stride - width) / 2;\n }\n\n buffer[size + 2 * j + 1] = decodedVideo[k][stride * sliceHeight + i];\n buffer[size + 2 * j] = decodedVideo[k][stride * sliceHeight * 5 / 4 + i];\n }\n }\n\n decodedVideo[k] = buffer;\n }", "public int[] getSuggestedScreenSize();", "int getOneof1080();", "private Parameters setSize(Parameters parameters) {\n\n\t\tLog.d(\"<<picture>>\", \"W:\"+parameters.getPictureSize().width+\"H:\"+parameters.getPictureSize().height);\n\t\tLog.d(\"<<preview>>\", \"W:\"+parameters.getPreviewSize().width+\"H:\"+parameters.getPreviewSize().height);\n\n\t\tint tempWidth = parameters.getPictureSize().width;\n\t\tint tempHeight = parameters.getPictureSize().height;\n\t\tint Result = 0;\n\t\tint Result2 = 0;\n\t\tint picSum = 0;\n\t\tint picSum2 = 0;\n\t\tint soin = 2;\n\n\t\twhile(tempWidth >= soin && tempHeight >= soin){\n\t\t\tResult = tempWidth%soin;\n\t\t\tResult2 = tempHeight%soin;\n\t\t\tif(Result == 0 && Result2 == 0){\n\t\t\t\tpicSum = tempWidth/soin;\n\t\t\t\tpicSum2 = tempHeight/soin;\n\t\t\t\tSystem.out.println(\"PictureWidth :\"+tempWidth+\"/\"+soin+\"���:\"+picSum+\"������:\"+Result);\n\t\t\t\tSystem.out.println(\"PictureHeight :\"+tempHeight+\"/\"+soin+\"���:\"+picSum2+\"������:\"+Result2);\n\t\t\t\ttempWidth = picSum;\n\t\t\t\ttempHeight = picSum2;\n\t\t\t}else {\n\t\t\t\tsoin++;\n\t\t\t}\n\n\t\t}\n\t\tSystem.out.println(\"������� \"+picSum+\":\"+picSum2);\n\n\t\tList<Camera.Size> previewSizeList = parameters.getSupportedPreviewSizes();\n\t\tfor (Size size : previewSizeList){\n\t\t\ttempWidth = size.width;\n\t\t\ttempHeight = size.height;\n\t\t\tResult = 0;\n\t\t\tResult2 = 0;\n\t\t\tint preSum = 0;\n\t\t\tint preSum2 = 0;\n\t\t\tsoin = 2;\n\n\t\t\twhile(tempWidth >= soin && tempHeight >= soin){\n\t\t\t\tResult = tempWidth%soin;\n\t\t\t\tResult2 = tempHeight%soin;\n\t\t\t\tif(Result == 0 && Result2 == 0){\n\t\t\t\t\tpreSum = tempWidth/soin;\n\t\t\t\t\tpreSum2 = tempHeight/soin;\n\t\t\t\t\tSystem.out.println(\"PreviewWidth :\"+tempWidth+\"/\"+soin+\"���:\"+preSum+\"������:\"+Result);\n\t\t\t\t\tSystem.out.println(\"PreviewHeight :\"+tempHeight+\"/\"+soin+\"���:\"+preSum2+\"������:\"+Result2);\n\t\t\t\t\ttempWidth = preSum;\n\t\t\t\t\ttempHeight = preSum2;\n\t\t\t\t}else {\n\t\t\t\t\tsoin++;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tSystem.out.println(\"������� \"+preSum+\":\"+preSum2);\n\t\t\tif(picSum == preSum && picSum2 == preSum2){\n\t\t\t\tparameters.setPreviewSize(size.width, size.height);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn parameters;\n\t}", "public YYFrame getNativeAdSize(Context context){\n int adWidth = getmDisplayWidth();\n// int adHeight = adWidth*9/16+ScreenUtils.dpToPx(10+12);\n int adHeight = (int) (adWidth/1.54);\n YYFrame frame = new YYFrame(0,0,adWidth,adHeight);\n return frame;\n }", "public static int totalSizeBits_data() {\n return 480;\n }", "@Override\n protected float calculateSpeedPerPixel\n (DisplayMetrics displayMetrics) {\n return MILLISECONDS_PER_INCH/displayMetrics.densityDpi;\n }", "public short getResolutionUnit()\r\n\t{\r\n\t\treturn super.getShort(0);\r\n\t}", "@DISPID(100) //= 0x64. The runtime will prefer the VTID if present\r\n @VTID(10)\r\n float width();", "public void onMeasure(int r12, int r13) {\n /*\n r11 = this;\n super.onMeasure(r12, r13);\n r12 = r11.videoAspectRatio;\n r13 = 0;\n r12 = (r12 > r13 ? 1 : (r12 == r13 ? 0 : -1));\n if (r12 > 0) goto L_0x000b;\n L_0x000a:\n return;\n L_0x000b:\n r12 = r11.getMeasuredWidth();\n r0 = r11.getMeasuredHeight();\n r1 = (float) r12;\n r2 = (float) r0;\n r3 = r1 / r2;\n r4 = r11.videoAspectRatio;\n r4 = r4 / r3;\n r5 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;\n r4 = r4 - r5;\n r6 = java.lang.Math.abs(r4);\n r7 = 1008981770; // 0x3c23d70a float:0.01 double:4.9850323E-315;\n r8 = 0;\n r6 = (r6 > r7 ? 1 : (r6 == r7 ? 0 : -1));\n if (r6 > 0) goto L_0x0031;\n L_0x0029:\n r12 = r11.aspectRatioUpdateDispatcher;\n r13 = r11.videoAspectRatio;\n r12.scheduleUpdate(r13, r3, r8);\n return;\n L_0x0031:\n r6 = r11.resizeMode;\n r7 = 2;\n r9 = 1;\n if (r6 == 0) goto L_0x0061;\n L_0x0037:\n if (r6 == r9) goto L_0x005c;\n L_0x0039:\n if (r6 == r7) goto L_0x0056;\n L_0x003b:\n r10 = 3;\n if (r6 == r10) goto L_0x004c;\n L_0x003e:\n r10 = 4;\n if (r6 == r10) goto L_0x0042;\n L_0x0041:\n goto L_0x006b;\n L_0x0042:\n r13 = (r4 > r13 ? 1 : (r4 == r13 ? 0 : -1));\n if (r13 <= 0) goto L_0x0049;\n L_0x0046:\n r12 = r11.videoAspectRatio;\n goto L_0x0058;\n L_0x0049:\n r13 = r11.videoAspectRatio;\n goto L_0x005e;\n L_0x004c:\n r13 = (r4 > r13 ? 1 : (r4 == r13 ? 0 : -1));\n if (r13 > 0) goto L_0x0053;\n L_0x0050:\n r13 = r11.videoAspectRatio;\n goto L_0x005e;\n L_0x0053:\n r12 = r11.videoAspectRatio;\n goto L_0x0058;\n L_0x0056:\n r12 = r11.videoAspectRatio;\n L_0x0058:\n r2 = r2 * r12;\n r12 = (int) r2;\n goto L_0x006b;\n L_0x005c:\n r13 = r11.videoAspectRatio;\n L_0x005e:\n r1 = r1 / r13;\n r0 = (int) r1;\n goto L_0x006b;\n L_0x0061:\n r13 = (r4 > r13 ? 1 : (r4 == r13 ? 0 : -1));\n if (r13 <= 0) goto L_0x0068;\n L_0x0065:\n r13 = r11.videoAspectRatio;\n goto L_0x005e;\n L_0x0068:\n r12 = r11.videoAspectRatio;\n goto L_0x0058;\n L_0x006b:\n r13 = r11.aspectRatioUpdateDispatcher;\n r1 = r11.videoAspectRatio;\n r13.scheduleUpdate(r1, r3, r9);\n r13 = 1073741824; // 0x40000000 float:2.0 double:5.304989477E-315;\n r12 = android.view.View.MeasureSpec.makeMeasureSpec(r12, r13);\n r13 = android.view.View.MeasureSpec.makeMeasureSpec(r0, r13);\n super.onMeasure(r12, r13);\n r12 = r11.getChildCount();\n L_0x0083:\n if (r8 >= r12) goto L_0x00cc;\n L_0x0085:\n r13 = r11.getChildAt(r8);\n r0 = r13 instanceof android.view.TextureView;\n if (r0 == 0) goto L_0x00c9;\n L_0x008d:\n r12 = r11.matrix;\n r12.reset();\n r12 = r11.getWidth();\n r12 = r12 / r7;\n r0 = r11.getHeight();\n r0 = r0 / r7;\n r1 = r11.matrix;\n r2 = r11.rotation;\n r2 = (float) r2;\n r12 = (float) r12;\n r0 = (float) r0;\n r1.postRotate(r2, r12, r0);\n r1 = r11.rotation;\n r2 = 90;\n if (r1 == r2) goto L_0x00b0;\n L_0x00ac:\n r2 = 270; // 0x10e float:3.78E-43 double:1.334E-321;\n if (r1 != r2) goto L_0x00c1;\n L_0x00b0:\n r1 = r11.getHeight();\n r1 = (float) r1;\n r2 = r11.getWidth();\n r2 = (float) r2;\n r1 = r1 / r2;\n r2 = r11.matrix;\n r5 = r5 / r1;\n r2.postScale(r5, r1, r12, r0);\n L_0x00c1:\n r13 = (android.view.TextureView) r13;\n r12 = r11.matrix;\n r13.setTransform(r12);\n goto L_0x00cc;\n L_0x00c9:\n r8 = r8 + 1;\n goto L_0x0083;\n L_0x00cc:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.exoplayer2.p003ui.AspectRatioFrameLayout.onMeasure(int, int):void\");\n }", "private String m568a(Context context, int i) {\r\n Camera open;\r\n Throwable th;\r\n String str = \"%2$d*%3$d\";\r\n String str2 = bi_常量类.f6358b_空串;\r\n float o = C0163a.m590o(context.getApplicationContext());\r\n Camera camera = null;\r\n try {\r\n open = Camera.open(i);\r\n try {\r\n List<Size> supportedPreviewSizes = open.getParameters().getSupportedPreviewSizes();\r\n Collections.sort(supportedPreviewSizes, new C0162a());\r\n int i2 = 0;\r\n for (Size size : supportedPreviewSizes) {\r\n if (size.width >= 600) {\r\n if ((((double) Math.abs((((float) size.width) / ((float) size.height)) - o)) <= 0.03d ? 1 : null) != null) {\r\n break;\r\n }\r\n }\r\n i2++;\r\n }\r\n String format = ((Size) supportedPreviewSizes.get(i2 == supportedPreviewSizes.size() ? supportedPreviewSizes.size() - 1 : i2)) != null ? String.format(Locale.ENGLISH, str, new Object[]{Integer.valueOf(i), Integer.valueOf(((Size) supportedPreviewSizes.get(i2 == supportedPreviewSizes.size() ? supportedPreviewSizes.size() - 1 : i2)).width), Integer.valueOf(((Size) supportedPreviewSizes.get(i2 == supportedPreviewSizes.size() ? supportedPreviewSizes.size() - 1 : i2)).height)}) : str2;\r\n if (open == null) {\r\n return format;\r\n }\r\n open.release();\r\n return format;\r\n } catch (RuntimeException e) {\r\n camera = open;\r\n if (camera != null) {\r\n camera.release();\r\n return str2;\r\n }\r\n return str2;\r\n } catch (Exception e2) {\r\n if (open != null) {\r\n open.release();\r\n return str2;\r\n }\r\n return str2;\r\n } catch (Throwable th2) {\r\n th = th2;\r\n if (open != null) {\r\n open.release();\r\n }\r\n throw th;\r\n }\r\n } catch (RuntimeException e3) {\r\n if (camera != null) {\r\n camera.release();\r\n return str2;\r\n }\r\n return str2;\r\n } catch (Exception e4) {\r\n open = null;\r\n if (open != null) {\r\n open.release();\r\n return str2;\r\n }\r\n return str2;\r\n } catch (Throwable th3) {\r\n open = null;\r\n th = th3;\r\n if (open != null) {\r\n open.release();\r\n }\r\n throw th;\r\n }\r\n }", "public String getVideoResolution() {\n //Camera.Size s = mCamera.getParameters().getPreviewSize();\n //return s.width + \"x\" + s.height;\n if (mProfile == null)\n return null;\n return mProfile.videoFrameWidth + \"x\" + mProfile.videoFrameHeight;\n }", "public static String m575e(Context context) {\r\n try {\r\n DisplayMetrics displayMetrics = context.getResources().getDisplayMetrics();\r\n return Integer.toString(displayMetrics.widthPixels) + \"*\" + Integer.toString(displayMetrics.heightPixels);\r\n } catch (Exception e) {\r\n return null;\r\n }\r\n }", "private Bitmap m6552d() {\n if (this.f5072i == null) {\n this.f5072i = m6555f();\n }\n return this.f5072i;\n }", "private byte[] getImageIDESizeParameter() {\n if (ideSize != 1) {\n final byte[] ideSizeData = new byte[] {\n (byte)0x96, // ID\n 0x01, // Length\n ideSize};\n return ideSizeData;\n } else {\n return new byte[0];\n }\n }", "@Test(timeout = 4000)\n public void test011() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.setVideoWidth((-2796));\n int int0 = homeEnvironment0.getVideoWidth();\n assertEquals((-2097), homeEnvironment0.getVideoHeight());\n assertEquals((-2796), int0);\n }", "private Bitmap m6554e() {\n if (this.f5071h == null) {\n this.f5071h = m6555f();\n }\n return this.f5071h;\n }", "void setHorizontalResolution(int horizontalResolution);", "private void m76768f() {\n m76770h();\n m76769g();\n }", "public static int totalSize_data() {\n return (480 / 8);\n }", "private static byte[] m17790a(Bitmap bitmap) {\n int i;\n int i2;\n int i3;\n int width = bitmap.getWidth();\n int height = bitmap.getHeight();\n OutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n for (i = 0; i < 32; i++) {\n byteArrayOutputStream.write(0);\n }\n int[] iArr = new int[(width - 2)];\n bitmap.getPixels(iArr, 0, width, 1, 0, width - 2, 1);\n Object obj = iArr[0] == -16777216 ? 1 : null;\n Object obj2 = iArr[iArr.length + -1] == -16777216 ? 1 : null;\n int length = iArr.length;\n width = 0;\n int i4 = 0;\n for (i2 = 0; i2 < length; i2++) {\n if (width != iArr[i2]) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, i2);\n width = iArr[i2];\n }\n }\n if (obj2 != null) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, length);\n }\n int i5 = i4;\n int i6 = i5 + 1;\n if (obj != null) {\n i = i6 - 1;\n } else {\n i = i6;\n }\n if (obj2 != null) {\n i3 = i - 1;\n } else {\n i3 = i;\n }\n iArr = new int[(height - 2)];\n bitmap.getPixels(iArr, 0, 1, 0, 1, 1, height - 2);\n obj = iArr[0] == -16777216 ? 1 : null;\n obj2 = iArr[iArr.length + -1] == -16777216 ? 1 : null;\n length = iArr.length;\n width = 0;\n i4 = 0;\n for (i2 = 0; i2 < length; i2++) {\n if (width != iArr[i2]) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, i2);\n width = iArr[i2];\n }\n }\n if (obj2 != null) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, length);\n }\n i6 = i4 + 1;\n if (obj != null) {\n i = i6 - 1;\n } else {\n i = i6;\n }\n if (obj2 != null) {\n i--;\n }\n for (i6 = 0; i6 < i3 * i; i6++) {\n C5225r.m17788a(byteArrayOutputStream, 1);\n }\n byte[] toByteArray = byteArrayOutputStream.toByteArray();\n toByteArray[0] = (byte) 1;\n toByteArray[1] = (byte) i5;\n toByteArray[2] = (byte) i4;\n toByteArray[3] = (byte) (i * i3);\n C5225r.m17787a(bitmap, toByteArray);\n return toByteArray;\n }", "public static VKApiPhotoSize m147522a(String str, int i, int i2) {\n char c;\n VKApiPhotoSize vKApiPhotoSize = new VKApiPhotoSize();\n vKApiPhotoSize.f121135a = str;\n vKApiPhotoSize.f121136b = i;\n vKApiPhotoSize.f121137c = i2;\n float f = ((float) i) / ((float) i2);\n if (i <= 75) {\n vKApiPhotoSize.f121138d = 's';\n } else if (i <= 130) {\n if (f <= 1.5f) {\n c = 'o';\n } else {\n c = 'm';\n }\n vKApiPhotoSize.f121138d = c;\n } else if (i <= 200 && f <= 1.5f) {\n vKApiPhotoSize.f121138d = 'p';\n } else if (i <= 320 && f <= 1.5f) {\n vKApiPhotoSize.f121138d = 'q';\n } else if (i <= 604) {\n vKApiPhotoSize.f121138d = 'x';\n } else if (i <= 807) {\n vKApiPhotoSize.f121138d = 'y';\n } else if (i <= 1280 && i2 <= 1024) {\n vKApiPhotoSize.f121138d = 'z';\n } else if (i <= 2560 && i2 <= 2048) {\n vKApiPhotoSize.f121138d = 'w';\n }\n return vKApiPhotoSize;\n }", "com.microsoft.schemas.office.x2006.digsig.STPositiveInteger xgetHorizontalResolution();", "public int getDisplayHeight()\n {\n if ( amiga.isPAL() ) {\n return isInterlaced() ? 512 : 256;\n }\n return isInterlaced() ? 400 : 200;\n }", "private native void convertToLum( short[] data, int w, int h );", "public int getVideoJittcomp();", "public String getVideoDevice();", "@DISPID(1611006040) //= 0x60060058. The runtime will prefer the VTID if present\n @VTID(115)\n short axisSystemSize();", "int getOneof1280();", "private static int m25216a(Activity activity) {\n return ((activity.getWindow().getAttributes().flags & 1024) == 1024 ? true : null) != null ? 16973841 : 16973840;\n }", "@Override\r\n\tpublic int getRDevInfo() {\r\n\t\treturn 0x08100802; // Diag-x24 Ry+1 on VM/370R6 Sixpack 1.2 for a 3420 as 181 with or without a mounted tape\r\n\t}", "private static final byte[] xfplot_d_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -60, 17, 0, 0, 0,\n\t\t\t\t0, 74, 74, 74, 92, 92, 92, 98, 98, 98, 105, 105, 105, 108, 108,\n\t\t\t\t108, 116, 116, 116, 119, 119, 119, 123, 123, 123, -126, -126,\n\t\t\t\t-126, -123, -123, -123, -112, -112, -112, -109, -109, -109,\n\t\t\t\t-103, -103, -103, -95, -95, -95, -92, -92, -92, -1, -1, -1, -1,\n\t\t\t\t-1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n\t\t\t\t0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n\t\t\t\t0, 0, 0, 33, -7, 4, 1, 0, 0, 17, 0, 44, 0, 0, 0, 0, 16, 0, 16,\n\t\t\t\t0, 0, 5, 85, 96, 36, -114, 81, 16, -112, 40, 105, -102, 105,\n\t\t\t\t-70, -98, 40, 64, 10, 116, 29, -109, 4, 65, -25, -73, 88, -4,\n\t\t\t\t-71, 95, -127, 36, 19, 17, -124, 66, 2, 81, 36, -56, 29, 11,\n\t\t\t\t78, -63, -88, 88, 115, -22, 104, -45, 72, 109, -53, 21, 1, 94,\n\t\t\t\t92, -63, 43, -126, 32, 64, -50, 47, -45, 25, 66, 64, 68, 0,\n\t\t\t\t-128, -11, 107, 13, 39, -58, 33, 106, 72, -67, 5, -49, -19, 91,\n\t\t\t\t35, 8, 110, 41, 33, 0, 59 };\n\t\treturn data;\n\t}", "int getImageQualityPref();", "public MyBmpInfo getThumbnail(Uri uri) {\n int w = 1280;\n int h = 960;\n double TARGETTED_WIDTH = 1920.0;\n\n try {\n InputStream input = this.getContentResolver().openInputStream(uri);\n\n BitmapFactory.Options onlyBoundsOptions = new BitmapFactory.Options();\n onlyBoundsOptions.inJustDecodeBounds = true;\n onlyBoundsOptions.inDither = true;//optional\n onlyBoundsOptions.inPreferredConfig = Bitmap.Config.ARGB_8888;//optional\n BitmapFactory.decodeStream(input, null, onlyBoundsOptions);\n input.close();\n\n if ((onlyBoundsOptions.outWidth == -1) || (onlyBoundsOptions.outHeight == -1)) {\n return null;\n }\n\n int originalWidth = onlyBoundsOptions.outWidth;\n\n double ratio = 1.0;\n if (originalWidth > TARGETTED_WIDTH){\n\n /*\n * Ratio Sample Size:\n * if 1 , means bitmap is exactly stay as orginal.\n * if 2 or above, means 1/2 or smaller from the ori image.*/\n ratio = originalWidth / TARGETTED_WIDTH;\n }\n\n BitmapFactory.Options bitmapOptions = new BitmapFactory.Options();\n bitmapOptions.inSampleSize = (int)Math.round(ratio);\n\n Log.d(\"bitmap scaled info\", \"ratio = \"+ratio+\" , poweredRatio = \"+bitmapOptions.inSampleSize+\", originalWidth = \"+originalWidth+\" , TARGETTED_WIDTH = \"+TARGETTED_WIDTH);\n\n bitmapOptions.inPreferredConfig = Bitmap.Config.ARGB_8888;//\n input = this.getContentResolver().openInputStream(uri);\n Bitmap bitmap = BitmapFactory.decodeStream(input, null, bitmapOptions);\n// bitmap.compress(Bitmap.CompressFormat.JPEG, 100, )\n input.close();\n Log.d(\"elliot\", \"bitmap before resize: SIZE = \" + bitmap.getWidth() + \" x \" + bitmap.getHeight());\n if (bitmap.getWidth() < w || bitmap.getHeight() < h) {\n return new MyBmpInfo(bitmap, \"Image is too small\", true);\n } else {\n return new MyBmpInfo(Bitmap.createScaledBitmap(bitmap, w, h, true), \"\", false);\n }\n\n } catch (Exception e) {\n return null;\n }\n }", "private static void getRealSize(Display Pdisplay,Point Ppoint) //~vam6I~//~1am3I~//~va54I~\r\n { //~vam6I~//~1am3I~//~va54I~\r\n\t\tif (Dump.Y) Dump.println(\"Utils.getRealSize apiLevel=\"+Build.VERSION.SDK_INT);//~vam6I~//~1am3I~//~va54I~//~va56R~\r\n\t\tif (Build.VERSION.SDK_INT>=31) //Navigationbar can be hidden//~vam6I~//~1am3I~//~va54I~\r\n\t\t getRealSize_from31(Pdisplay,Ppoint); //~vam6I~//~1am3I~//~va54I~\r\n else //~vam6I~//~1am3I~//~va54I~\r\n\t\t getRealSize_19To30(Pdisplay,Ppoint); //~vam6I~//~1am3I~//~va54I~\r\n\t\tif (Dump.Y) Dump.println(\"Utils.getRealSize exit point=\"+Ppoint);//~vam6I~//~1am3I~//~va54I~//~va56R~\r\n }", "public static void getScreenSize(Context context)\n\t{\n\t\tDisplayMetrics displayMetrics = context.getResources().getDisplayMetrics();\n\t\tfloat screenWidthDp = displayMetrics.widthPixels / displayMetrics.density; \n\t\tfloat screenHeightDp = displayMetrics.heightPixels / displayMetrics.density;\n\t\tLog.w(Utils.class.getName(), \"getScreenSize() gets the screen size in DP width=\" + screenWidthDp\n\t\t\t\t\t+ \" height=\" + screenHeightDp);\n\t\t\n\t\t// use width and height as in vertical mode, so width < height\n\t\tif(screenWidthDp > screenHeightDp)\n\t\t{\n\t\t\tfloat mid = screenWidthDp;\n\t\t\tscreenWidthDp = screenHeightDp;\n\t\t\tscreenHeightDp = mid; \n\t\t}\n\t\t\n\t\tint screenWidthInt = (int) screenWidthDp;\n\t\tint screenHeightInt = (int) screenHeightDp;\n\t\t\n\t\tif((screenWidthInt%2) != 0)\n\t\t{\n\t\t\tscreenWidthInt--;\n\t\t}\n\t\tif((screenHeightInt%2) != 0)\n\t\t{\n\t\t\tscreenHeightInt--;\n\t\t}\n\t\t\n\t\tUtils.ConstantVars.screenWidth = screenWidthInt;\n\t\tUtils.ConstantVars.screenHeight = screenHeightInt;\n\t\t\n\t\tLog.w(Utils.class.getName(), \"getScreenSize() optimized the screen size in integer width=\" \n\t\t\t\t+ Utils.ConstantVars.screenWidth + \" height=\" + Utils.ConstantVars.screenHeight);\n\t\t\t\t\n\t}", "@Override\n public int getCacheSize() {\n return 4 + 20 * 88;\n }", "public int getResolution() {\n return resolution;\n }", "@Test(timeout = 4000)\n public void test072() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.setVideoWidth(320);\n assertEquals(13684944, homeEnvironment0.getLightColor());\n assertEquals(13684944, homeEnvironment0.getCeillingLightColor());\n assertTrue(homeEnvironment0.isObserverCameraElevationAdjusted());\n assertEquals(240, homeEnvironment0.getVideoHeight());\n assertEquals(13427964, homeEnvironment0.getSkyColor());\n assertEquals(11053224, homeEnvironment0.getGroundColor());\n assertEquals(25, homeEnvironment0.getVideoFrameRate());\n assertEquals(0.0F, homeEnvironment0.getWallsAlpha(), 0.01F);\n assertEquals(400, homeEnvironment0.getPhotoWidth());\n assertEquals(300, homeEnvironment0.getPhotoHeight());\n }", "public static int offset_quality() {\n return (48 / 8);\n }", "public abstract int getDisplayWidth();", "private static final byte[] xfplot_image() {\n\t\tbyte data[] = { 71, 73, 70, 56, 57, 97, 16, 0, 16, 0, -60, 16, 0, -65,\n\t\t\t\t3, 28, -1, 0, 21, -1, 0, 68, 0, 0, 0, -1, 0, 114, -1, 0, -70,\n\t\t\t\t-18, 0, -1, -1, 0, -27, -52, 0, -1, -78, 0, -1, -121, 0, -1,\n\t\t\t\t59, 0, -1, 93, 0, -1, 0, -112, -1, 0, 102, -1, -1, -1, -1, -1,\n\t\t\t\t-1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n\t\t\t\t0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n\t\t\t\t0, 0, 0, 0, 0, 0, 33, -7, 4, 1, 0, 0, 16, 0, 44, 0, 0, 0, 0,\n\t\t\t\t16, 0, 16, 0, 0, 5, 103, 32, 36, -114, 16, 0, -112, 40, 25,\n\t\t\t\t-84, 65, -102, 10, -80, -112, 14, 36, 97, -33, 40, 61, 22,\n\t\t\t\t-123, -51, -25, 35, -61, -31, -64, 27, 26, 72, 58, 8, -62, 32,\n\t\t\t\t60, 48, 17, 72, 81, 2, 65, 125, 82, 19, 35, 93, 98, 75, -67,\n\t\t\t\t110, -77, 16, -123, 88, -79, -35, -114, 21, -94, -63, -126,\n\t\t\t\t-63, 62, -117, -39, -116, 5, -92, -31, 120, -40, -31, 112, -5,\n\t\t\t\t-61, -47, -128, 12, 6, 122, 11, -126, 11, 122, 127, 72, -128,\n\t\t\t\t15, -126, 118, -122, 46, 127, 14, 14, -116, 46, 35, 13, 125,\n\t\t\t\t41, 33, 0, 59 };\n\t\treturn data;\n\t}", "VectorArray getResHar();", "private static void decodeYUV420SP(RGB[] rgb, byte[] yuvs, int width,\n int height) {\n final int lumEnd = width * height;\n int lumPtr = 0;\n int chrPtr = lumEnd;\n int outPtr = 0;\n int lineEnd = width;\n\n while (true) {\n if (lumPtr == lineEnd) {\n if (lumPtr == lumEnd)\n break; // we've reached the end\n chrPtr = lumEnd + ((lumPtr >> 1) / width) * width;\n lineEnd += width;\n }\n\n final int Y1 = yuvs[lumPtr++] & 0xff;\n final int Y2 = yuvs[lumPtr++] & 0xff;\n final int Cr = (yuvs[chrPtr++] & 0xff) - 128;\n final int Cb = (yuvs[chrPtr++] & 0xff) - 128;\n int R, G, B;\n\n // generate first RGB components\n B = Y1 + ((454 * Cb) >> 8);\n if (B < 0)\n B = 0;\n else if (B > 255)\n B = 255;\n G = Y1 - ((88 * Cb + 183 * Cr) >> 8);\n if (G < 0)\n G = 0;\n else if (G > 255)\n G = 255;\n R = Y1 + ((359 * Cr) >> 8);\n if (R < 0)\n R = 0;\n else if (R > 255)\n R = 255;\n rgb[outPtr].r = (byte) R;\n rgb[outPtr].g = (byte) G;\n rgb[outPtr++].b = (byte) B;\n\n // generate second RGB components\n B = Y2 + ((454 * Cb) >> 8);\n if (B < 0)\n B = 0;\n else if (B > 255)\n B = 255;\n G = Y2 - ((88 * Cb + 183 * Cr) >> 8);\n if (G < 0)\n G = 0;\n else if (G > 255)\n G = 255;\n R = Y2 + ((359 * Cr) >> 8);\n if (R < 0)\n R = 0;\n else if (R > 255)\n R = 255;\n rgb[outPtr].r = (byte) R;\n rgb[outPtr].g = (byte) G;\n rgb[outPtr++].b = (byte) B;\n }\n }", "void mo33732Px();", "public int m12824k() {\n return this.f10120g;\n }", "private void m4809e() {\n if (f3853k.m4870e()) {\n if (f3853k.m4846M() == -1) {\n m4807c();\n }\n try {\n Thread.sleep(50);\n return;\n } catch (InterruptedException e) {\n e.printStackTrace();\n return;\n }\n }\n long startTime = System.currentTimeMillis();\n m4810f();\n LogUtil.m4440c(f3851i, \"JAVA got frame time = \" + (System.currentTimeMillis() - startTime));\n startTime = System.currentTimeMillis();\n if (f3853k.m4852a(f3831d) == -2 && !f3853k.m4843J()) {\n m4807c();\n }\n LogUtil.m4440c(f3851i, \"JAVA encode time = \" + (System.currentTimeMillis() - startTime));\n }", "public int getFrameSize();", "private final Tuples<Integer, Integer> m137836a() {\n int i;\n int measuredWidth = getMeasuredWidth() / getChildCount();\n if (getChildCount() == 1 || LPFit.f99531a.mo120373a()) {\n i = getMeasuredHeight();\n } else {\n i = (int) (((float) measuredWidth) / VideoParams.f96577a.mo116006l());\n }\n return new Tuples<>(Integer.valueOf(measuredWidth), Integer.valueOf(i));\n }", "public void setDimensionRatio(java.lang.String r9) {\n /*\n r8 = this;\n r0 = 0;\n if (r9 == 0) goto L_0x008e;\n L_0x0003:\n r1 = r9.length();\n if (r1 != 0) goto L_0x000b;\n L_0x0009:\n goto L_0x008e;\n L_0x000b:\n r1 = -1;\n r2 = r9.length();\n r3 = 44;\n r3 = r9.indexOf(r3);\n r4 = 0;\n r5 = 1;\n if (r3 <= 0) goto L_0x0037;\n L_0x001a:\n r6 = r2 + -1;\n if (r3 >= r6) goto L_0x0037;\n L_0x001e:\n r6 = r9.substring(r4, r3);\n r7 = \"W\";\n r7 = r6.equalsIgnoreCase(r7);\n if (r7 == 0) goto L_0x002c;\n L_0x002a:\n r1 = 0;\n goto L_0x0035;\n L_0x002c:\n r4 = \"H\";\n r4 = r6.equalsIgnoreCase(r4);\n if (r4 == 0) goto L_0x0035;\n L_0x0034:\n r1 = 1;\n L_0x0035:\n r4 = r3 + 1;\n L_0x0037:\n r3 = 58;\n r3 = r9.indexOf(r3);\n if (r3 < 0) goto L_0x0075;\n L_0x003f:\n r2 = r2 - r5;\n if (r3 >= r2) goto L_0x0075;\n L_0x0042:\n r2 = r9.substring(r4, r3);\n r3 = r3 + r5;\n r9 = r9.substring(r3);\n r3 = r2.length();\n if (r3 <= 0) goto L_0x0084;\n L_0x0051:\n r3 = r9.length();\n if (r3 <= 0) goto L_0x0084;\n L_0x0057:\n r2 = java.lang.Float.parseFloat(r2);\t Catch:{ NumberFormatException -> 0x0084 }\n r9 = java.lang.Float.parseFloat(r9);\t Catch:{ NumberFormatException -> 0x0084 }\n r3 = (r2 > r0 ? 1 : (r2 == r0 ? 0 : -1));\n if (r3 <= 0) goto L_0x0084;\n L_0x0063:\n r3 = (r9 > r0 ? 1 : (r9 == r0 ? 0 : -1));\n if (r3 <= 0) goto L_0x0084;\n L_0x0067:\n if (r1 != r5) goto L_0x006f;\n L_0x0069:\n r9 = r9 / r2;\n r9 = java.lang.Math.abs(r9);\t Catch:{ NumberFormatException -> 0x0084 }\n goto L_0x0085;\n L_0x006f:\n r2 = r2 / r9;\n r9 = java.lang.Math.abs(r2);\t Catch:{ NumberFormatException -> 0x0084 }\n goto L_0x0085;\n L_0x0075:\n r9 = r9.substring(r4);\n r2 = r9.length();\n if (r2 <= 0) goto L_0x0084;\n L_0x007f:\n r9 = java.lang.Float.parseFloat(r9);\t Catch:{ NumberFormatException -> 0x0084 }\n goto L_0x0085;\n L_0x0084:\n r9 = 0;\n L_0x0085:\n r0 = (r9 > r0 ? 1 : (r9 == r0 ? 0 : -1));\n if (r0 <= 0) goto L_0x008d;\n L_0x0089:\n r8.mDimensionRatio = r9;\n r8.mDimensionRatioSide = r1;\n L_0x008d:\n return;\n L_0x008e:\n r8.mDimensionRatio = r0;\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.support.constraint.solver.widgets.ConstraintWidget.setDimensionRatio(java.lang.String):void\");\n }", "protected byte desiredWinScale() { return 9; }", "public static int m8668h() {\n return 8;\n }", "private float m4812h(int i, float f) {\n return (i == 8388613 || i == 3) ? (((float) this.f6612t) - f) - ((float) this.f6595c.getDrawable().getIntrinsicWidth()) : f;\n }", "private long m18341d(long frameCount) {\n return (1000000 * frameCount) / ((long) this.f16625s);\n }", "public interface MetaInfo {\n\n String DIR_EMPTY = \"empty\";\n\n\n //===========================\n float WEIGHT_CAMERA_MOTION = 1;\n float WEIGHT_LOCATION = 1;\n float WEIGHT_MEDIA_TYPE = 1;\n float WEIGHT_SHORT_TYPE = 1;\n\n float WEIGHT_MEDIA_DIR = 3f;\n float WEIGHT_TIME = 3;\n float WEIGHT_VIDEO_TAG = 2.5f;\n float WEIGHT_SHOT_KEY = 5f;\n float WEIGHT_SHOT_CATEGORY = 2.5f;\n\n int FLAG_TIME = 0x0001;\n int FLAG_LOCATION = 0x0002;\n int FLAG_MEDIA_TYPE = 0x0004;\n int FLAG_MEDIA_DIR = 0x0008;\n int FLAG_SHOT_TYPE = 0x0010;\n int FLAG_CAMERA_MOTION = 0x0020;\n int FLAG_VIDEO_TAG = 0x0040;\n int FLAG_SHOT_KEY = 0x0080;\n int FLAG_SHOT_CATEGORY = 0x0100;\n\n //================= location ==================\n int LOCATION_NEAR_GPS = 1;\n int LOCATION_SAME_COUNTRY = 2;\n int LOCATION_SAME_PROVINCE = 3; //省,市,区\n int LOCATION_SAME_CITY = 4;\n int LOCATION_SAME_REGION = 5;\n\n //=================== for camera motion ====================\n int STILL = 0; // 静止, class 0\n int ZOOM = 3; // 前后移动(zoomIn or zoomOut), class 1\n int ZOOM_IN = 4;\n int ZOOM_OUT = 5;\n int PAN = 6; // 横向移动(leftRight or rightLeft), class 2\n int PAN_LEFT_RIGHT = 7;\n int PAN_RIGHT_LEFT = 8;\n int TILT = 9; // 纵向移动(upDown or downUp), class 3\n int TILT_UP_DOWN = 10;\n int TILT_DOWN_UP = 11;\n int CATEGORY_STILL = 1;\n int CATEGORY_ZOOM = 2;\n int CATEGORY_PAN = 3;\n int CATEGORY_TILT = 4;\n\n //图像类型。视频,图片。 已有\n\n //============== shooting device =================\n /**\n * the shoot device: cell phone\n */\n int SHOOTING_DEVICE_CELLPHONE = 1;\n /**\n * the shoot device: camera\n */\n int SHOOTING_DEVICE_CAMERA = 2;\n\n /**\n * the shoot device: drone\n */\n int SHOOTING_DEVICE_DRONE = 3; //无人机\n\n\n //====================== shooting mode ===========================\n /**\n * shooting mode: normal\n */\n int SHOOTING_MODE_NORMAL = 1;\n /**\n * shooting mode: slow motion\n */\n int SHOOTING_MODE_SLOW_MOTION = 2;\n /**\n * shooting mode: time lapse\n */\n int SHOOTING_MODE_TIME_LAPSE = 3;\n\n //=========================== shot type =======================\n /**\n * shot type: big - long- short ( 大远景)\n */\n int SHOT_TYPE_BIG_LONG_SHORT = 5;\n /**\n * shot type: long short ( 远景)\n */\n int SHOT_TYPE_LONG_SHORT = 4;\n\n /** medium long shot. (中远景) */\n int SHOT_TYPE_MEDIUM_LONG_SHOT = 3;\n /**\n * shot type: medium shot(中景)\n */\n int SHOT_TYPE_MEDIUM_SHOT = 2;\n /**\n * shot type: close up - chest ( 特写-胸)\n */\n int SHOT_TYPE_MEDIUM_CLOSE_UP = 1;\n\n /**\n * shot type: close up -head ( 特写-头)\n */\n int SHOT_TYPE_CLOSE_UP = 0;\n\n int SHOT_TYPE_NONE = -1;\n\n int CATEGORY_CLOSE_UP = 12; //特写/近景\n int CATEGORY_MIDDLE_VIEW = 11; //中景\n int CATEGORY_VISION = 10; //远景\n\n //========================== time ==========================\n int[] MORNING_HOURS = {7, 8, 9, 10, 11};\n int[] AFTERNOON_HOURS = {12, 13, 14, 15, 16, 17};\n //int[] NIGHT_HOURS = {18, 19, 20, 21, 22, 24, 1, 2, 3, 4, 5, 6};\n int TIME_SAME_DAY = 1;\n int TIME_SAME_PERIOD_IN_DAY = 2; //timeSamePeriodInDay\n\n class LocationMeta {\n private double longitude, latitude;\n /**\n * 高程精度比水平精度低原因,主要是GPS测出的是WGS-84坐标系下的大地高,而我们工程上,也就是电子地图上采用的高程一般是正常高,\n * 它们之间的转化受到高程异常和大地水准面等误差的制约。\n * 卫星在径向的定轨精度较差,也限制了GPS垂直方向的精度。\n */\n private int gpsHeight; //精度不高\n private String country, province, city, region; //国家, 省, 市, 区\n\n public double getLongitude() {\n return longitude;\n }\n\n public void setLongitude(double longitude) {\n this.longitude = longitude;\n }\n\n public double getLatitude() {\n return latitude;\n }\n\n public void setLatitude(double latitude) {\n this.latitude = latitude;\n }\n\n public String getCountry() {\n return country;\n }\n\n public void setCountry(String country) {\n this.country = country;\n }\n\n public String getProvince() {\n return province;\n }\n\n public void setProvince(String province) {\n this.province = province;\n }\n\n public String getCity() {\n return city;\n }\n\n public void setCity(String city) {\n this.city = city;\n }\n\n public String getRegion() {\n return region;\n }\n\n public void setRegion(String region) {\n this.region = region;\n }\n\n public int getGpsHeight() {\n return gpsHeight;\n }\n\n public void setGpsHeight(int gpsHeight) {\n this.gpsHeight = gpsHeight;\n }\n\n @Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n\n LocationMeta that = (LocationMeta) o;\n\n if (Double.compare(that.longitude, longitude) != 0) return false;\n if (Double.compare(that.latitude, latitude) != 0) return false;\n if (gpsHeight != that.gpsHeight) return false;\n if (country != null ? !country.equals(that.country) : that.country != null)\n return false;\n if (province != null ? !province.equals(that.province) : that.province != null)\n return false;\n if (city != null ? !city.equals(that.city) : that.city != null) return false;\n return region != null ? region.equals(that.region) : that.region == null;\n }\n }\n\n /**\n * the meta data of image/video ,something may from 'AI'.\n */\n class ImageMeta extends SimpleCopyDelegate{\n private String path;\n private int mediaType;\n /** in mills */\n private long date;\n\n /** in mill-seconds */\n private long duration;\n private int width, height;\n\n private LocationMeta location;\n\n /**\n * frames/second\n */\n private int fps = 30;\n /** see {@linkplain IShotRecognizer#CATEGORY_ENV} and etc. */\n private int shotCategory;\n /**\n * the shot type\n */\n private String shotType;\n\n /** shot key */\n private String shotKey;\n /**\n * 相机运动\n */\n private String cameraMotion;\n /** video tags */\n private List<List<Integer>> tags;\n\n /** the whole frame data of video(from analyse , like AI. ), after read should not change */\n private SparseArray<VideoDataLoadUtils.FrameData> frameDataMap;\n /** the high light data. key is the time in seconds. */\n private SparseArray<List<? extends IHighLightData>> highLightMap;\n private HighLightHelper mHighLightHelper;\n\n /** 主人脸个数 */\n private int mainFaceCount = -1;\n private int mBodyCount = -1;\n\n /** 通用tag信息 */\n private List<FrameTags> rawVideoTags;\n /** 人脸框信息 */\n private List<FrameFaceRects> rawFaceRects;\n\n //tag indexes\n private List<Integer> nounTags;\n private List<Integer> domainTags;\n private List<Integer> adjTags;\n\n private Location subjectLocation;\n\n //-------------------------- start High-Light ----------------------------\n /** set metadata for high light data. (from load high light) */\n public void setMediaData(MediaData mediaData) {\n List<MediaData.HighLightPair> hlMap = mediaData.getHighLightDataMap();\n if(!Predicates.isEmpty(hlMap)) {\n highLightMap = new SparseArray<>();\n VisitServices.from(hlMap).fire(new FireVisitor<MediaData.HighLightPair>() {\n @Override\n public Boolean visit(MediaData.HighLightPair pair, Object param) {\n List<MediaData.HighLightData> highLightData = VEGapUtils.filterHighLightByScore(pair.getDatas());\n if(!Predicates.isEmpty(highLightData)){\n highLightMap.put(pair.getTime(), highLightData);\n }\n return null;\n }\n });\n }\n mHighLightHelper = new HighLightHelper(highLightMap, mediaType == IPathTimeTraveller.TYPE_IMAGE);\n }\n @SuppressWarnings(\"unchecked\")\n public KeyValuePair<Integer, List<IHighLightData>> getHighLight(int time){\n return mHighLightHelper.getHighLight(time);\n }\n @SuppressWarnings(\"unchecked\")\n public KeyValuePair<Integer, List<IHighLightData>> getHighLight(ColorGapContext context, ITimeTraveller tt){\n return mHighLightHelper.getHighLight(context, tt);\n }\n\n public List<KeyValuePair<Integer, List<IHighLightData>>> getHighLights(ColorGapContext context, ITimeTraveller tt){\n return mHighLightHelper.getHighLights(context, tt);\n }\n @SuppressWarnings(\"unchecked\")\n public HighLightArea getHighLightArea(ColorGapContext context, ITimeTraveller tt){\n return mHighLightHelper.getHighLightArea(context, tt);\n }\n\n public void setHighLightMap(SparseArray<List<? extends IHighLightData>> highLightMap) {\n this.highLightMap = highLightMap;\n this.mHighLightHelper = new HighLightHelper(highLightMap, mediaType == IPathTimeTraveller.TYPE_IMAGE);\n }\n\n //-------------------------- end High-Light ----------------------------\n public SparseArray<VideoDataLoadUtils.FrameData> getFrameDataMap() {\n if(frameDataMap == null){\n frameDataMap = new SparseArray<>();\n }\n return frameDataMap;\n }\n public void setFrameDataMap(SparseArray<VideoDataLoadUtils.FrameData> frameDataMap) {\n this.frameDataMap = frameDataMap;\n }\n public void travelAllFrameDatas(Map.MapTravelCallback<Integer, VideoDataLoadUtils.FrameData> traveller){\n Throwables.checkNull(frameDataMap);\n CollectionUtils.travel(frameDataMap, traveller);\n }\n\n public List<Integer> getNounTags() {\n return nounTags != null ? nounTags : Collections.emptyList();\n }\n public void setNounTags(List<Integer> nounTags) {\n this.nounTags = nounTags;\n }\n\n public List<Integer> getDomainTags() {\n return domainTags != null ? domainTags : Collections.emptyList();\n }\n public void setDomainTags(List<Integer> domainTags) {\n this.domainTags = domainTags;\n }\n\n public List<Integer> getAdjTags() {\n return adjTags != null ? adjTags : Collections.emptyList();\n }\n public void setAdjTags(List<Integer> adjTags) {\n this.adjTags = adjTags;\n }\n public void setShotCategory(int shotCategory) {\n this.shotCategory = shotCategory;\n }\n\n public int getShotCategory() {\n return shotCategory;\n }\n public String getShotKey() {\n return shotKey;\n }\n public void setShotKey(String shotKey) {\n this.shotKey = shotKey;\n }\n\n public int getMainFaceCount() {\n return mainFaceCount;\n }\n public void setMainFaceCount(int mainFaceCount) {\n this.mainFaceCount = mainFaceCount;\n }\n public int getMediaType() {\n return mediaType;\n }\n public void setMediaType(int mediaType) {\n this.mediaType = mediaType;\n }\n\n public String getPath() {\n return path;\n }\n\n public void setPath(String path) {\n this.path = path;\n }\n\n /** date in mills */\n public long getDate() {\n return date;\n }\n /** date in mills */\n public void setDate(long date) {\n this.date = date;\n }\n\n public long getDuration() {\n return duration;\n }\n\n /** set duration in mill-seconds */\n public void setDuration(long duration) {\n this.duration = duration;\n }\n\n public int getWidth() {\n return width;\n }\n\n public void setWidth(int width) {\n this.width = width;\n }\n\n public int getHeight() {\n return height;\n }\n\n public void setHeight(int height) {\n this.height = height;\n }\n\n public int getFps() {\n return fps;\n }\n\n public void setFps(int fps) {\n this.fps = fps;\n }\n\n public String getShotType() {\n return shotType;\n }\n\n public void setShotType(String shotType) {\n this.shotType = shotType;\n }\n\n public String getCameraMotion() {\n return cameraMotion;\n }\n\n public void setCameraMotion(String cameraMotion) {\n this.cameraMotion = cameraMotion;\n }\n\n public List<List<Integer>> getTags() {\n return tags;\n }\n public void setTags(List<List<Integer>> tags) {\n this.tags = tags;\n }\n public LocationMeta getLocation() {\n return location;\n }\n public void setLocation(LocationMeta location) {\n this.location = location;\n }\n public void setBodyCount(int size) {\n this.mBodyCount = size;\n }\n public int getBodyCount(){\n return mBodyCount;\n }\n public int getPersonCount() {\n return Math.max(mBodyCount, mainFaceCount);\n }\n\n public Location getSubjectLocation() {\n return subjectLocation;\n }\n public void setSubjectLocation(Location subjectLocation) {\n this.subjectLocation = subjectLocation;\n }\n\n //============================================================\n public List<FrameFaceRects> getAllFaceRects() {\n if(frameDataMap == null){\n return Collections.emptyList();\n }\n List<FrameFaceRects> result = new ArrayList<>();\n final int size = frameDataMap.size();\n for (int i = 0; i < size ; i++) {\n FrameFaceRects faceRects = frameDataMap.valueAt(i).getFaceRects();\n if(faceRects != null) {\n result.add(faceRects);\n }else{\n //no face we just add a mock\n }\n }\n return result;\n }\n public List<FrameTags> getVideoTags(ITimeTraveller part) {\n return getVideoTags(part.getStartTime(), part.getEndTime());\n }\n\n /** get all video tags. startTime and endTime in frames */\n public List<FrameTags> getVideoTags(long startTime, long endTime) {\n if(frameDataMap == null){\n return Collections.emptyList();\n }\n List<FrameTags> result = new ArrayList<>();\n final int size = frameDataMap.size();\n for (int i = 0; i < size ; i++) {\n long key = CommonUtils.timeToFrame(frameDataMap.keyAt(i), TimeUnit.SECONDS);\n if(key >= startTime && key <= endTime){\n FrameTags tag = frameDataMap.valueAt(i).getTag();\n if(tag != null) {\n result.add(tag);\n }\n }\n }\n return result;\n }\n public List<FrameTags> getAllVideoTags() {\n if(frameDataMap == null){\n return Collections.emptyList();\n }\n List<FrameTags> result = new ArrayList<>();\n final int size = frameDataMap.size();\n for (int i = 0; i < size ; i++) {\n //long key = CommonUtils.timeToFrame(frameDataMap.keyAt(i), TimeUnit.SECONDS);\n FrameTags tag = frameDataMap.valueAt(i).getTag();\n if(tag != null) {\n result.add(tag);\n }\n }\n return result;\n }\n public List<FrameFaceRects> getFaceRects(ITimeTraveller part) {\n return getFaceRects(part.getStartTime(), part.getEndTime());\n }\n /** get all face rects. startTime and endTime in frames */\n public List<FrameFaceRects> getFaceRects(long startTime, long endTime) {\n if(frameDataMap == null){\n return Collections.emptyList();\n }\n List<FrameFaceRects> result = new ArrayList<>();\n final int size = frameDataMap.size();\n for (int i = 0; i < size ; i++) {\n long key = CommonUtils.timeToFrame(frameDataMap.keyAt(i), TimeUnit.SECONDS);\n if(key >= startTime && key <= endTime){\n FrameFaceRects faceRects = frameDataMap.valueAt(i).getFaceRects();\n if(faceRects != null) {\n result.add(faceRects);\n }\n }\n }\n return result;\n }\n\n public void setRawVideoTags(List<FrameTags> tags) {\n rawVideoTags = tags;\n }\n public List<FrameTags> getRawVideoTags() {\n return rawVideoTags;\n }\n\n public List<FrameFaceRects> getRawFaceRects() {\n return rawFaceRects;\n }\n public void setRawFaceRects(List<FrameFaceRects> rawFaceRects) {\n this.rawFaceRects = rawFaceRects;\n }\n /** 判断这段原始视频内容是否是“人脸为主”. work before cut */\n public boolean containsFaces(){\n if(rawFaceRects == null){\n if(frameDataMap == null){\n return false;\n }\n rawFaceRects = getAllFaceRects();\n }\n if(Predicates.isEmpty(rawFaceRects)){\n return false;\n }\n List<FrameFaceRects> tempList = new ArrayList<>();\n VisitServices.from(rawFaceRects).visitForQueryList((ffr, param) -> ffr.hasRect(), tempList);\n float result = tempList.size() * 1f / rawFaceRects.size();\n Logger.d(\"ImageMeta\", \"isHumanContent\", \"human.percent = \"\n + result + \" ,path = \" + path);\n return result > 0.55f;\n }\n\n /** 判断这段原始视频是否被标记原始tag(人脸 or 通用) . work before cut */\n public boolean hasRawTags(){\n return frameDataMap != null && frameDataMap.size() > 0;\n }\n\n @Override\n public void setFrom(SimpleCopyDelegate sc) {\n if(sc instanceof ImageMeta){\n ImageMeta src = (ImageMeta) sc;\n setShotType(src.getShotType());\n setShotCategory(src.getShotCategory());\n setShotKey(src.getShotKey());\n\n setMainFaceCount(src.getMainFaceCount());\n setDuration(src.getDuration());\n setMediaType(src.getMediaType());\n setPath(src.getPath());\n setCameraMotion(src.getCameraMotion());\n setDate(src.getDate());\n setFps(src.getFps());\n setHeight(src.getHeight());\n setWidth(src.getWidth());\n //not deep copy\n setTags(src.tags);\n setAdjTags(src.adjTags);\n setNounTags(src.nounTags);\n setDomainTags(src.domainTags);\n\n setLocation(src.getLocation());\n setRawFaceRects(src.getRawFaceRects());\n setRawVideoTags(src.getRawVideoTags());\n setFrameDataMap(src.frameDataMap);\n setHighLightMap(src.highLightMap);\n }\n }\n }\n\n}", "@Override\r\n\t\tpublic void onVideoSizeChanged(int width, int height) {\n\t\t\tUtils.printLog(TAG, \"onVideoSizeChanged width =\" + width + \" height =\" + height+\" mVideoContrl.isbVideoDisplayByHardware()=\"+mVideoContrl.isbVideoDisplayByHardware());\r\n//\t\t\tmSurfaceView.setBackgroundColor(getResources().getColor(R.color.transparent_background));\r\n\r\n\t\t\tif(clienttype.contains(\"938\")|| clienttype.contains(\"838\")){\r\n\t\t\t\tif(mVideoContrl.isbVideoDisplayByHardware()){//0067739: 多屏互动:手机端推送用手机拍的视频(竖着拍)到电视,在电视端播放时图像里的景物和人都压得很扁,没做适配处理\r\n\t\t\t\t\tsetVideoDisplayFullScreen();\r\n\t\t\t\t\tmVideoContrl.setbVideoDisplayByHardware(false);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tsetVideoDisplayRotate90();\r\n\t\t\t\t}\r\n\t\t\t\tif(mVideoContrl.getPlayMediaBean()!=null){\r\n\t\t\t\t\tLog.d(TAG\t,\"onVideoSizeChanged mVideoContrl.getPlayMediaBean()=\"+mVideoContrl.getPlayMediaBean().mPath);\r\n\t\t\t\t}\r\n\t\t\t}\r\n//\t\t\tif(mVideoContrl.isbVideoDisplayByHardware()){//如果返回硬解标志,App不处理\r\n//\t\t\t\tmVideoContrl.setbVideoDisplayByHardware(false);\r\n//\t\t\t\treturn;\r\n//\t\t\t}\r\n//\t\t\tif(mVideoContrl.getPlayMediaBean()!=null){\r\n//\t\t\t\tLog.d(TAG\t,\"onVideoSizeChanged mVideoContrl.getPlayMediaBean()=\"+mVideoContrl.getPlayMediaBean().mPath);\r\n//\t\t\t}\r\n//\t\t\tif(mVideoContrl.getPlayMediaBean()!=null){\r\n//\t\t\t\tMediaMetadataRetriever mediaMetadataRetriever = new MediaMetadataRetriever();\r\n//\t\t\t\tmediaMetadataRetriever.setDataSource(mVideoContrl.getPlayMediaBean().mPath);\r\n//\t\t\t\tString rotation = mediaMetadataRetriever.extractMetadata(MediaMetadataRetriever.METADATA_KEY_VIDEO_ROTATION);\r\n//\t\t\t\tUtils.printLog(TAG, \"onVideoSizeChanged mediaMetadataRetriever rotation = \"+rotation);\r\n//\t\t\t\tif(rotation.equals(\"90\")||rotation.equals(\"270\")){\r\n//\t\t\t\t\tsetVideoDisplayRotate90();\r\n//\t\t\t\t}\r\n//\t\t\t}\r\n\t\t}", "com.microsoft.schemas.office.x2006.digsig.STPositiveInteger xgetVerticalResolution();", "private int caculateInSampleSize(BitmapFactory.Options options, int width, int height) {\r\n int outWidth = options.outWidth;\r\n int outHeight = options.outHeight;\r\n int inSampleSize=1;\r\n if (outWidth>width||outHeight>height){\r\n int widthRadio= Math.round(outWidth*1.0f/width);\r\n int heightRadio= Math.round(outHeight*1.0f/height);\r\n inSampleSize= Math.max(widthRadio,heightRadio);\r\n }\r\n\r\n return inSampleSize;\r\n }", "private static boolean checkSupportedVideoQuality(int width, int height){\n List <Size> supported = mParameters.getSupportedVideoSizes();\n int flag = 0;\n for (Size size : supported){\n //since we are having two profiles with same height, we are checking with height\n if (size.height == 480) {\n if (size.height == height && size.width == width) {\n flag = 1;\n break;\n }\n } else {\n if (size.width == width) {\n flag = 1;\n break;\n }\n }\n }\n if (flag == 1)\n return true;\n\n return false;\n }", "com.google.protobuf.ByteString\n getField1080Bytes();", "private static java.lang.String[] a(android.content.Context r3, com.xiaomi.xmpush.thrift.u r4) {\n /*\n java.lang.String r0 = r4.h()\n java.lang.String r1 = r4.j()\n java.util.Map r4 = r4.s()\n if (r4 == 0) goto L_0x0073\n android.content.res.Resources r2 = r3.getResources()\n android.util.DisplayMetrics r2 = r2.getDisplayMetrics()\n int r2 = r2.widthPixels\n android.content.res.Resources r3 = r3.getResources()\n android.util.DisplayMetrics r3 = r3.getDisplayMetrics()\n float r3 = r3.density\n float r2 = (float) r2\n float r2 = r2 / r3\n r3 = 1056964608(0x3f000000, float:0.5)\n float r2 = r2 + r3\n java.lang.Float r3 = java.lang.Float.valueOf(r2)\n int r3 = r3.intValue()\n r2 = 320(0x140, float:4.48E-43)\n if (r3 > r2) goto L_0x0051\n java.lang.String r3 = \"title_short\"\n java.lang.Object r3 = r4.get(r3)\n java.lang.String r3 = (java.lang.String) r3\n boolean r2 = android.text.TextUtils.isEmpty(r3)\n if (r2 != 0) goto L_0x0042\n r0 = r3\n L_0x0042:\n java.lang.String r3 = \"description_short\"\n java.lang.Object r3 = r4.get(r3)\n java.lang.String r3 = (java.lang.String) r3\n boolean r4 = android.text.TextUtils.isEmpty(r3)\n if (r4 != 0) goto L_0x0073\n goto L_0x0072\n L_0x0051:\n r2 = 360(0x168, float:5.04E-43)\n if (r3 <= r2) goto L_0x0073\n java.lang.String r3 = \"title_long\"\n java.lang.Object r3 = r4.get(r3)\n java.lang.String r3 = (java.lang.String) r3\n boolean r2 = android.text.TextUtils.isEmpty(r3)\n if (r2 != 0) goto L_0x0064\n r0 = r3\n L_0x0064:\n java.lang.String r3 = \"description_long\"\n java.lang.Object r3 = r4.get(r3)\n java.lang.String r3 = (java.lang.String) r3\n boolean r4 = android.text.TextUtils.isEmpty(r3)\n if (r4 != 0) goto L_0x0073\n L_0x0072:\n r1 = r3\n L_0x0073:\n r3 = 2\n java.lang.String[] r3 = new java.lang.String[r3]\n r4 = 0\n r3[r4] = r0\n r4 = 1\n r3[r4] = r1\n return r3\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.xiaomi.push.service.ah.a(android.content.Context, com.xiaomi.xmpush.thrift.u):java.lang.String[]\");\n }", "public int getImageFileSize(int resolution)\n {\n if (resolution == 1000)\n return 35000;\n else\n return 120000;\n }", "public static Size m97137a(String str) {\n BitmapFactory.Options options = new BitmapFactory.Options();\n options.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(str, options);\n return new Size(options.outWidth, options.outHeight);\n }", "public void initSize() {\n WIDTH = 320;\n //WIDTH = 640;\n HEIGHT = 240;\n //HEIGHT = 480;\n SCALE = 2;\n //SCALE = 1;\n }", "void setVResolution(short resolution);", "@Test(timeout = 4000)\n public void test049() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n assertEquals(320, homeEnvironment0.getVideoWidth());\n \n homeEnvironment0.setVideoWidth(0);\n int int0 = homeEnvironment0.getVideoWidth();\n assertEquals(0, homeEnvironment0.getVideoHeight());\n assertEquals(0, int0);\n }", "int getSampleSize();", "@Test(timeout = 4000)\n public void test050() throws Throwable {\n HomeEnvironment homeEnvironment0 = new HomeEnvironment();\n homeEnvironment0.setVideoQuality((-5305));\n int int0 = homeEnvironment0.getVideoQuality();\n assertEquals((-5305), int0);\n }", "int[] getScreenSize() {\n qq scSize = new qq(game.z, game.d, game.e);\n return new int[] { scSize.a(), scSize.b() };\n }", "public void initForSwissCat(){\n hdBase = HD_BASED_ON_MMS;\n hdNoHdRankThreshold = 8;\n hdCorrection = 1; \n hdCeiling = 9;\n }", "public void set16BitMode() {\n/* 111 */ this.dstPixelFormat = 32859;\n/* */ }" ]
[ "0.6221418", "0.6055661", "0.59490514", "0.5639221", "0.56360775", "0.56065196", "0.55994046", "0.55011916", "0.54305774", "0.53805393", "0.53725773", "0.53659385", "0.53578204", "0.53401744", "0.5333907", "0.5330501", "0.5320628", "0.53085536", "0.52976364", "0.52746487", "0.5249338", "0.52228665", "0.52013516", "0.51976395", "0.5171715", "0.51605076", "0.51532084", "0.5136939", "0.5126477", "0.5103249", "0.5096194", "0.50806", "0.5075467", "0.5073867", "0.507116", "0.50594395", "0.50553757", "0.50481373", "0.50431824", "0.50201875", "0.5019806", "0.50032425", "0.49768588", "0.4976406", "0.49515003", "0.4948596", "0.49422795", "0.49410507", "0.4936751", "0.4929989", "0.491618", "0.4894242", "0.4893981", "0.48939753", "0.489347", "0.4892199", "0.48918518", "0.48911172", "0.4890509", "0.48897547", "0.48791087", "0.48711476", "0.48653108", "0.48637527", "0.48535278", "0.4836584", "0.48240915", "0.48176605", "0.48083007", "0.4800294", "0.47921515", "0.4791925", "0.47910598", "0.47902617", "0.47722208", "0.47718874", "0.4766974", "0.47643638", "0.47568125", "0.4755349", "0.47534874", "0.475049", "0.47498256", "0.4747998", "0.4747839", "0.4747357", "0.47440338", "0.47384435", "0.4737994", "0.47338107", "0.473015", "0.47263703", "0.4721127", "0.4713912", "0.47079822", "0.47059774", "0.47032115", "0.4699221", "0.46986812", "0.46931422", "0.4684537" ]
0.0
-1
Sets up member variables related to camera.
private void setupCameraOutputs(int width, int height) { MLog.d(TAG, "setupCameraOutputs()" + " width: " + width + " height: " + height); Activity activity = getActivity(); CameraManager manager = (CameraManager) activity.getSystemService(Context.CAMERA_SERVICE); Point displaySize = new Point(); activity.getWindowManager().getDefaultDisplay().getSize(displaySize); int rotatedPreviewWidth = width; int rotatedPreviewHeight = height; int screenWidth = displaySize.x; int screenHeight = displaySize.y; // screenWidth: 720 screenHeight: 1280 MLog.d(TAG, "setupCameraOutputs()" + " screenWidth: " + screenWidth + " screenHeight: " + screenHeight); try { for (String cameraId : manager.getCameraIdList()) { MLog.d(TAG, "setupCameraOutputs()" + " cameraId: " + cameraId); if (TextUtils.isEmpty(cameraId)) { continue; } mCameraId = cameraId; //获取某个相机(摄像头特性) CameraCharacteristics characteristics = manager.getCameraCharacteristics(cameraId); // 检查支持 int deviceLevel = characteristics.get( CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL); if (deviceLevel == CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY) { } // We don't use a front facing camera in this sample. Integer facing = characteristics.get(CameraCharacteristics.LENS_FACING); if (facing != null && facing == CameraCharacteristics.LENS_FACING_FRONT) { continue; } // 获取StreamConfigurationMap,它是管理摄像头支持的所有输出格式和尺寸 StreamConfigurationMap map = characteristics.get( CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP); if (map == null) { continue; } // 拍照时使用最大的宽高 // For still image captures, we use the largest available size. Size largest = Collections.max( Arrays.asList(map.getOutputSizes(ImageFormat.JPEG)), //Arrays.asList(map.getOutputSizes(TextureView.class)),// 不能这样使用 new CompareSizesByArea()); // ImageFormat.JPEG largest.getWidth(): 3264 largest.getHeight(): 2448 // ImageFormat.YV12 largest.getWidth(): 960 largest.getHeight(): 720 // ImageFormat.YUV_420_888 largest.getWidth(): 960 largest.getHeight(): 720 MLog.d(TAG, "setupCameraOutputs() " + printThis() + " largest.getWidth(): " + largest.getWidth() + " largest.getHeight(): " + largest.getHeight()); /*** * 实时帧数据获取类 * 由于获取实时帧所以选用YV12或者YUV_420_888两个格式,暂时不采用JPEG格式 * 在真机显示的过程中,不同的数据格式所设置的width和height需要注意,否侧视频会很卡顿 * YV12:width 720, height 960 * YUV_420_888:width 720, height 960 * JPEG:获取帧数据不能用 ImageFormat.JPEG 格式,否则你会发现预览非常卡的, * 因为渲染 JPEG 数据量过大,导致掉帧,所以预览帧请使用其他编码格式 * * 输入相机的尺寸必须是相机支持的尺寸,这样画面才能不失真,TextureView输入相机的尺寸也是这个 */ /*mImageReader = ImageReader.newInstance( largest.getWidth(), largest.getHeight(), ImageFormat.YUV_420_888, *//*maxImages*//*5);// ImageFormat.JPEG, 2 mImageReader.setOnImageAvailableListener( mOnImageAvailableListener, mBackgroundHandler);*/ // Find out if we need to swap dimension to get the preview size relative to sensor // coordinate. int displayRotation = activity.getWindowManager().getDefaultDisplay().getRotation(); // noinspection ConstantConditions mSensorOrientation = characteristics.get( CameraCharacteristics.SENSOR_ORIENTATION); MLog.d(TAG, "setupCameraOutputs() " + printThis() + " displayRotation: " + displayRotation + " mSensorOrientation: " + mSensorOrientation); boolean swappedDimensions = false; switch (displayRotation) { // 竖屏 case Surface.ROTATION_0: case Surface.ROTATION_180: if (mSensorOrientation == 90 || mSensorOrientation == 270) { swappedDimensions = true; } break; // 横屏 case Surface.ROTATION_90: case Surface.ROTATION_270: if (mSensorOrientation == 0 || mSensorOrientation == 180) { swappedDimensions = true; } break; default: Log.e(TAG, "Display rotation is invalid: " + displayRotation); break; } if (swappedDimensions) { rotatedPreviewWidth = height; rotatedPreviewHeight = width; screenWidth = displaySize.y; screenHeight = displaySize.x; } if (screenWidth > MAX_PREVIEW_WIDTH) { screenWidth = MAX_PREVIEW_WIDTH; } if (screenHeight > MAX_PREVIEW_HEIGHT) { screenHeight = MAX_PREVIEW_HEIGHT; } // Danger, W.R.! Attempting to use too large a preview size could exceed the camera // bus' bandwidth limitation, resulting in gorgeous previews but the storage of // garbage capture data. mPreviewSize = chooseOptimalSize( map.getOutputSizes(SurfaceTexture.class), rotatedPreviewWidth, rotatedPreviewHeight, screenWidth, screenHeight, largest); // mPreviewSize.getWidth(): 960 mPreviewSize.getHeight(): 720 MLog.d(TAG, "setupCameraOutputs()" + " mPreviewSize.getWidth(): " + mPreviewSize.getWidth() + " mPreviewSize.getHeight(): " + mPreviewSize.getHeight()); // We fit the aspect ratio of TextureView to the size of preview we picked. int orientation = getResources().getConfiguration().orientation; // 横屏 if (orientation == Configuration.ORIENTATION_LANDSCAPE) { mTextureView.setAspectRatio( mPreviewSize.getWidth(), mPreviewSize.getHeight()); } else { mTextureView.setAspectRatio( mPreviewSize.getHeight(), mPreviewSize.getWidth()); } // Check if the flash is supported. Boolean available = characteristics.get( CameraCharacteristics.FLASH_INFO_AVAILABLE); mFlashSupported = available == null ? false : available; return; } } catch (CameraAccessException e) { e.printStackTrace(); } catch (NullPointerException e) { // Currently an NPE is thrown when the Camera2API is used but not supported on the // device this code runs. Camera2Fragment.ErrorDialog.newInstance(getString(R.string.camera_error)) .show(getChildFragmentManager(), FRAGMENT_DIALOG); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void cameraSetup();", "public static void setCameraFrame() {\n\t\tCAMERA.src = VERTICES[CAMERA.v];\n\t\tVector zc = CAMERA.src.d.scale(-1).normalized();\n\t\tCAMERA.zAxis = zc;\n\t\tVector xc = MathUtils.cross(CAMERA.src.d, new Vector(0, 1, 0)).normalized();\n\t\tCAMERA.xAxis = xc;\n\t\tVector yc = MathUtils.cross(zc, xc).normalized();\n\t\tCAMERA.yAxis = yc;\n\t\t\n\t\tSystem.out.println(\"***** just set camera: \" + CAMERA.toString());\n\t}", "@Override\n public void init() {\n startCamera();\n }", "private void setUpAndConfigureCamera() {\n\t\t// Open and configure the camera\n\t\tmCamera = selectAndOpenCamera();\n\n\t\tCamera.Parameters param = mCamera.getParameters();\n\n\t\t// Smaller images are recommended because some computer vision operations are very expensive\n\t\tList<Camera.Size> sizes = param.getSupportedPreviewSizes();\n\t\tCamera.Size s = sizes.get(closest(sizes,640,360));\n\t\tparam.setPreviewSize(s.width,s.height);\n\t\tmCamera.setParameters(param);\n\n\t\t// start image processing thread\n\n\t\t// Start the video feed by passing it to mPreview\n\t\tmPreview.setCamera(mCamera);\n\t}", "private void setCamera() {\n\t\tVector viewTranslation = controller.getCameraPosition();\n\n\t\tGL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);\n\t\tGL11.glMatrixMode(GL11.GL_PROJECTION);\n\t\tGL11.glLoadIdentity();\n\n\t\tfloat whRatio = (float) windowWidth / (float) windowHeight;\n\t\tGLU.gluPerspective(controller.getFOV(), whRatio, 1, 100000);\n\t\tGLU.gluLookAt((float) viewTranslation.x, (float) viewTranslation.y,\n\t\t\t\t(float) controller.getCameraDistance(), (float) viewTranslation.x,\n\t\t\t\t(float) viewTranslation.y, 0, 0, 1, 0);\n\n\t\tGL11.glMatrixMode(GL11.GL_MODELVIEW);\n\t\tGL11.glLoadIdentity();\n\t}", "void initializeCamera() {\n camera_linear = (LinearLayout) findViewById(R.id.camera_linear);\n //The preview frame is overlayed on the layout which shows the camera view.\n preview = (FrameLayout) findViewById(R.id.camera_preview);\n //Get an instance of the phone's camera.\n mCamera = cameraRecorder.getCameraInstance();\n //Find content fort the camera preview frame using the instance of the camera initialized.\n mPreview = new CameraPreview(getApplicationContext(), mCamera);\n //Apply the camera previes content from the camera to the preview frame itself.\n preview.addView(mPreview);\n }", "public void setCamera(Camera camera) {\n mCamera = camera;\n }", "public void init(Camera cam);", "public void setCamera(Camera camera) {\r\n\t\tthis.camera = camera;\r\n\t}", "public void setupCamera() {\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\r\n if(isTiling) {\r\n float mod=1f/10f;\r\n p.frustum(width*((float)tileX/(float)tileNum-.5f)*mod,\r\n width*((tileX+1)/(float)tileNum-.5f)*mod,\r\n height*((float)tileY/(float)tileNum-.5f)*mod,\r\n height*((tileY+1)/(float)tileNum-.5f)*mod,\r\n cameraZ*mod, 10000);\r\n }\r\n\r\n }", "public Camera() {\n\t\treset();\n\t}", "void initCameraManager(){\n\t\tcameraManager = new CameraManager(getApplication());\n\t}", "public void configureCamera(){\n try{\n camera = Camera.open(findBackFacingCamera());\n } catch (Exception e){}\n\n if(camera != null) {\n cameraView = new CameraView(this.getApplicationContext(), camera);\n FrameLayout camera_view = (FrameLayout)findViewById(R.id.CameraView);\n camera_view.addView(cameraView);\n }\n }", "protected void initialize() {\n \tm_cameraThread = new CameraThread();\n \tm_cameraThread.start();\n \tm_onTarget = false;\n \tm_moving = false;\n \tm_desiredYaw = Gyro.getYaw();\n \t\n \t\n \tcount = 0;\n }", "protected void setupCameraAndPreview() {\n\n //\n // always release\n //\n releaseImageObjects();\n releaseVideoCapturebjects(true);\n\n // now setup...\n if (isImageButtonSelected) {\n\n //\n // Image Camera can be fetched here\n //\n if (!isBackCameraSelected) {\n mCamera = getCameraInstance(frontCamera);\n } else {\n mCamera = getCameraInstance(backCamera);\n }\n\n if (mImageCapture == null) {\n // Initiate MImageCapture\n mImageCapture = new MImageCapture(MCameraActivity.this);\n }\n\n //\n // Set Orientation\n //\n setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR);\n // Create our Preview view and set it as the content of our activity.\n // Add the copyright as an overlay...\n if (mImageCapture.mCameraPreview == null) {\n previewView = (LinearLayout) findViewById(R.id.camera_preview);\n mImageCapture.setCameraPreview(this, mCamera);\n previewView.addView(mImageCapture.mCameraPreview);\n }\n } else {\n //\n // Set Orientation\n //\n setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);\n\n /** handle video here... */\n if (mVideoCapture == null) {\n // now start over\n mVideoCapture = new MVideoCapture(this);\n }\n // Create our Preview view and set it as the content of our activity.\n // Add the copyright as an overlay...\n if (mVideoCapture.mTextureView != null) {\n previewView = (LinearLayout) findViewById(R.id.camera_preview);\n previewView.addView(mVideoCapture.mTextureView);\n }\n }\n\n }", "private void setCamera() {\n\t\tCamera.CameraInfo cameraInfo = new Camera.CameraInfo();\n\t\tint cameraCount = Camera.getNumberOfCameras();\n\t\tLog.i(TAG, \"count = \" + cameraCount);\n\t\tLog.i(TAG, \"isBack = \" + isBack);\n\t\tint id = 0;\n\n\t\tfor (int camIdx = 0; camIdx < cameraCount; camIdx++) {\n\t\t\tCamera.getCameraInfo(camIdx, cameraInfo);\n\t\t\tLog.i(TAG, \"cameraInfoFacing = \" + cameraInfo.facing);\n\t\t\tif (cameraInfo.facing == Camera.CameraInfo.CAMERA_FACING_BACK\n\t\t\t\t\t&& isBack) {\n\t\t\t\ttry {\n\t\t\t\t\tLog.i(TAG, \"SETTING mCamera\");\n\t\t\t\t\tmCamera = Camera.open(camIdx);\n\t\t\t\t\tid = camIdx;\n\t\t\t\t} catch (RuntimeException e) {\n\t\t\t\t\tLog.e(TAG,\n\t\t\t\t\t\t\t\"Camera failed to open: \" + e.getLocalizedMessage());\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t} else if (cameraInfo.facing == Camera.CameraInfo.CAMERA_FACING_FRONT\n\t\t\t\t\t&& !isBack){\n\t\t\t\ttry {\n\t\t\t\t\tLog.i(TAG, \"SETTING mCamera\");\n\t\t\t\t\tmCamera = Camera.open(camIdx);\n\t\t\t\t\tid = camIdx;\n\t\t\t\t} catch (RuntimeException e) {\n\t\t\t\t\tLog.e(TAG,\n\t\t\t\t\t\t\t\"Camera failed to open: \" + e.getLocalizedMessage());\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (mCamera != null) {\n\t\t\tCamera.Parameters cameraParameters = mCamera.getParameters();\n\t\t\tDisplay display = getActivity().getWindowManager().getDefaultDisplay();\n\t\t\tPoint size = new Point();\n\t\t\tdisplay.getSize(size);\n\t\t\tint screenWidth = size.x;\n\t\t\tint width = Integer.MAX_VALUE;\n\t\t\tint height = 0;\n\t\t\tLog.i(TAG, \"SCREENWIDTH: \" + screenWidth);\n\t\t\tList<Camera.Size> sizes = cameraParameters.getSupportedPreviewSizes();\n\t\t\tfor (Camera.Size cSize : sizes) {\n\t\t\t\tif (cSize.width >= screenWidth && cSize.width <= width) {\n\t\t\t\t\twidth = cSize.width;\n\t\t\t\t\theight = cSize.height;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tLog.i(TAG, \"Width: \" + width + \" HEIGHT: \" + height);\n\n\t\t\tif (mPreview != null) {\n\t\t\t\tmPreview.switchCamera(mCamera, id, width, height);\n\t\t\t} else {\n\t\t\t\tmPreview = new CameraPreview(getActivity(), mCamera, id, width, height);\n\t\t\t\tFrameLayout preview = (FrameLayout) view\n\t\t\t\t\t\t.findViewById(R.id.camera_preview);\n\t\t\t\tpreview.addView(mPreview);\n\t\t\t}\n\t\t\tmCamera.startPreview();\n\t\t}\n\t}", "private void configureCamera() {\n float fHeight = cam.getFrustumTop() - cam.getFrustumBottom();\n float fWidth = cam.getFrustumRight() - cam.getFrustumLeft();\n float fAspect = fWidth / fHeight;\n float yDegrees = 45f;\n float near = 0.02f;\n float far = 20f;\n cam.setFrustumPerspective(yDegrees, fAspect, near, far);\n\n flyCam.setMoveSpeed(5f);\n\n cam.setLocation(new Vector3f(2f, 4.7f, 0.4f));\n cam.setRotation(new Quaternion(0.348f, -0.64f, 0.4f, 0.556f));\n }", "private Camera() {\n viewport = new Rectangle();\n dirtyAreas = new ArrayList<Rectangle>();\n renderedAreas = new ArrayList<Rectangle>();\n fullUpdate = false;\n dirtyAreaCounter = 0;\n }", "private void initCameraPreview() {\n\t\tcameraPreview = (CameraPreview) findViewById(R.id.camera_preview);\n\t\tcameraPreview.init(camera);\n\t}", "public void updateCamera() {\n\t}", "@Override\n public Camera setupCamera() {\n mCamera = Camera.open(Camera.CameraInfo.CAMERA_FACING_BACK);\n try {\n Camera.Parameters parameters = mCamera.getParameters();\n parameters.setPreviewSize(mWidth, mHeight);\n parameters.setPreviewFormat(mFormat);\n mCamera.setDisplayOrientation(90);\n for (Camera.Size size : parameters.getSupportedPreviewSizes()) {\n Log.d(TAG, \"SIZE:\" + size.width + \"x\" + size.height);\n }\n for (Integer format : parameters.getSupportedPreviewFormats()) {\n Log.d(TAG, \"FORMAT:\" + format);\n }\n\n List<int[]> fps = parameters.getSupportedPreviewFpsRange();\n for (int[] count : fps) {\n Log.d(TAG, \"T:\");\n for (int data : count) {\n Log.d(TAG, \"V=\" + data);\n }\n }\n mCamera.setParameters(parameters);\n } catch (Exception e) {\n e.printStackTrace();\n }\n if (mCamera != null) {\n mWidth = mCamera.getParameters().getPreviewSize().width;\n mHeight = mCamera.getParameters().getPreviewSize().height;\n }\n return mCamera;\n }", "public void prepareCamera() {\n setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\n\n autoFocusHandler = new Handler();\n mCamera = getCameraInstance();\n\n /* Instance barcode scanner */\n scanner = new ImageScanner();\n scanner.setConfig(0, Config.X_DENSITY, 3);\n scanner.setConfig(0, Config.Y_DENSITY, 3);\n\n mPreview = new CameraPreview(this, mCamera, previewCb, autoFocusCB);\n\n cameraPreview.addView(mPreview);\n\n }", "private void setupCamera(final int camera) {\n try {\n // mPreview = new CamPreview(this, camera, CamPreview.LayoutMode.NoBlank);// .FitToParent);\n } catch (Exception e) {\n Toast.makeText(this, R.string.cannot_connect_to_camera, Toast.LENGTH_LONG).show();\n finish();\n return;\n }\n\n RelativeLayout.LayoutParams previewLayoutParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);\n Display display = getWindowManager().getDefaultDisplay();\n DisplayMetrics outMetrics = new DisplayMetrics();\n display.getMetrics(outMetrics);\n\n int width = outMetrics.widthPixels;\n int height = outMetrics.heightPixels;\n\n previewLayoutParams.height = width;\n previewLayoutParams.width = width;\n\n // Un-comment below line to specify the position.\n // mPreview.setCenterPosition(width / 2, height / 2);\n\n // previewParent.addView(mPreview, 0, previewLayoutParams);\n\n\n }", "public void setCamera(Camera camera) {\r\n\t\tsynchronized(camera) {\r\n\t\t\tthis.camera = camera;\r\n\t\t}\r\n\t}", "public void setCamera(Camera c) {\n\t\tmCamera = c;\n\t}", "private void getCamera() {\n if (camera == null) {\n try {\n camera = Camera.open();\n params = camera.getParameters();\n } catch (RuntimeException e) {\n\n }\n }\n }", "public Camera() {\r\n this(1, 1);\r\n }", "private void createCamera() {\n camera = getCameraInstance();\n // Setting the right parameters in the camera\n SetCameraParameters();\n // Create our Preview view and set it as the content of our activity.\n camera_preview = new CameraPreview(this, camera);\n // Adding the camera preview after the FrameLayout and before the mainact_btn_InOutAct\n // as a separated element.\n InOut_cameraLayout.addView(camera_preview, 0);\n }", "private void setCameraParameters() {\n mParameters = mCameraDevice.getParameters();\n\n// Camera.Size previewSize = getDefaultPreviewSize(mParameters);\n//\n// //获取计算过的摄像头分辨率\n// if(previewSize != null ){\n// mPreviewWidth = previewSize.width;\n// mPreviewHeight = previewSize.height;\n// } else {\n// mPreviewWidth = 480;\n// mPreviewHeight = 480;\n// }\n// mParameters.setPreviewSize(mPreviewWidth, mPreviewHeight);\n// //将获得的Preview Size中的最小边作为视频的大小\n// mVideoWidth = mPreviewWidth > mPreviewHeight ? mPreviewHeight : mPreviewWidth;\n// mVideoHeight = mPreviewWidth > mPreviewHeight ? mPreviewHeight : mPreviewWidth;\n// if(mFFmpegFrameRecorder != null) {\n// mFFmpegFrameRecorder.setImageWidth(mVideoWidth);\n// mFFmpegFrameRecorder.setImageHeight(mVideoHeight);\n// }\n//\n// mParameters.setPreviewFrameRate(mPreviewFrameRate);\n\n List<String> supportedFocusMode = mParameters.getSupportedFocusModes();\n if(isSupported(Camera.Parameters.FOCUS_MODE_AUTO, supportedFocusMode)) {\n mParameters.setFocusMode(Camera.Parameters.FOCUS_MODE_AUTO);\n }\n\n\n mCameraDevice.setParameters(mParameters);\n\n // 设置闪光灯,默认关闭\n setVideoFlash(false);\n\n //是否支持打开/关闭闪光灯\n mSettingWindow.setFlashEnabled(isSupportedVideoFlash());\n\n mTBtnFocus.setEnabled(isSupportedFocus());\n\n layoutPreView();\n }", "public void initializeCamera(){\n mCamera = Camera.open();\n\n Camera.Parameters parameters = mCamera.getParameters();\n parameters.setFlashMode(Camera.Parameters.FLASH_MODE_TORCH);\n\n List<Camera.Size> previewSizes = parameters.getSupportedPreviewSizes();\n // Get the supported preview size closest to the requested dimensions:\n Camera.Size previewSize = previewSizes.get(previewSizes.size() - 1); // getOptimalPreviewSize(previewSizes, width, height);\n width = previewSize.width;\n height = previewSize.height;\n Log.d(TAG, \"width: \" + width + \" , height: \" + height);\n nPixels = width * height;\n pixels = new int[nPixels];\n setSize(width, height);\n parameters.setPreviewSize(width, height);\n\n mCamera.setParameters(parameters);\n\n int dataBufferSize=(int)(height * width * (ImageFormat.getBitsPerPixel(parameters.getPreviewFormat())/8.0));\n\n mCamera.addCallbackBuffer(new byte[dataBufferSize]);\n mCamera.setPreviewCallbackWithBuffer(this);\n }", "public void startCamera()\n {\n startCamera(null);\n }", "private void init()\n {\n batch = new SpriteBatch();\n \n camera = new OrthographicCamera(Constants.VIEWPORT_WIDTH, Constants.VIEWPORT_HEIGHT);\n camera.position.set(0, 0, 0);\n camera.update();\n \n cameraGui = new OrthographicCamera(Constants.VIEWPORT_GUI_WIDTH, Constants.VIEWPORT_GUI_HEIGHT);\n cameraGui.position.set(0, 0, 0);\n cameraGui.setToOrtho(true); // flip y-axis\n cameraGui.update();\n \n cameraBg = new OrthographicCamera(Constants.VIEWPORT_GUI_WIDTH, Constants.VIEWPORT_GUI_HEIGHT);\n cameraBg.position.set(0, 0, 0);\n //cameraBg.setToOrtho(true);\n cameraBg.update();\n \n b2Debug = new Box2DDebugRenderer();\n }", "void Initialize(MainActivity mainActivity_, FrameLayout frameLayout_){\n mainActivity = mainActivity_;\n cameraPreviewLayout = frameLayout_;\n\n if (ContextCompat.checkSelfPermission(mainActivity, Manifest.permission.CAMERA) == PackageManager.PERMISSION_DENIED)\n ActivityCompat.requestPermissions(mainActivity, new String[] {Manifest.permission.CAMERA}, MY_CAMERA_REQUEST_CODE);\n else\n Setup();\n }", "private void createCameraSource() {\n\n int facing = CameraSource.CAMERA_FACING_FRONT;\n\n // If there's no existing cameraSource, create one.\n if (cameraSource == null) {\n cameraSource = new CameraSource(this, graphicOverlay);\n }\n\n CameraSource.setFacing(facing);\n cameraSource.setMachineLearningFrameProcessor(\n new FaceDetectorProcessor(this, defaultOptions));\n }", "private void updateCameraParametersInitialize() {\n List<Integer> frameRates = mParameters.getSupportedPreviewFrameRates();\n if (frameRates != null) {\n Integer max = Collections.max(frameRates);\n mParameters.setPreviewFrameRate(max);\n }\n\n //mParameters.setRecordingHint(false);\n\n // Disable video stabilization. Convenience methods not available in API\n // level <= 14\n String vstabSupported = mParameters\n .get(\"video-stabilization-supported\");\n if (\"true\".equals(vstabSupported)) {\n mParameters.set(\"video-stabilization\", \"false\");\n }\n }", "private CameraManager() {\n }", "public Camera(){\n // servoPan = new Servo(PAN);\n servoTilt = new Servo(TILT);\n }", "public void setCameraSettings(CameraSettings cameraSettings) {\n this.cameraSettings = cameraSettings;\n }", "Camera getCamera();", "public void getCameraInstance() {\n newOpenCamera();\n }", "public CameraPanel() {\n initComponents();\n jLabel1.setText(\"<html>Select Camera one<br>by one & press<br>Capture Button.\");\n System.loadLibrary(\"opencv_java330\"); \n facedetector = new CascadeClassifier(\"haarcascade_frontalface_alt.xml\");\n facedetections = new MatOfRect();\n \n }", "private void init () \n\t{ \n\t\tbatch = new SpriteBatch();\n\t\tcamera = new OrthographicCamera(Constants.VIEWPORT_WIDTH,\n\t\t\tConstants.VIEWPORT_HEIGHT);\n\t\tcamera.position.set(0, 0, 0);\n\t\tcamera.update();\n\t\tcameraGUI = new OrthographicCamera(Constants.VIEWPORT_GUI_WIDTH,\n\t\t\t\tConstants.VIEWPORT_GUI_HEIGHT);\n\t\tcameraGUI.position.set(0, 0, 0);\n\t\tcameraGUI.setToOrtho(true); // flip y-axis\n\t\tcameraGUI.update();\n\t\t\n\t\tb2debugRenderer = new Box2DDebugRenderer();\n\t}", "public void setCameraPreview(CameraPreview cameraPreview) {\n mCameraPreview = cameraPreview;\n }", "@Override\n public void startCamera() {\n super.startCamera();\n\n if(cameraListener != null)\n cameraListener.onCameraStart();\n }", "@Override\n\tpublic void initCameraGlSurfaceView() {\n\t\t\n\t}", "private void setupCamera(GL gl) {\r\n\t\tgl.glMatrixMode(GL.GL_MODELVIEW);\r\n\t\t// If there's a rotation to make, do it before everything else\r\n\t\tgl.glLoadIdentity();\r\n if (rotationMatrix == null) {\r\n\t\t\trotationMatrix = new double[16];\r\n\t\t\tgl.glGetDoublev(GL.GL_MODELVIEW, rotationMatrix, 0);\r\n\t\t}\r\n\t\tif (nextRotationAxis != null) {\r\n\t\t\tgl.glRotated(nextRotationAngle, nextRotationAxis.x, nextRotationAxis.y, nextRotationAxis.z);\r\n\t\t\tnextRotationAngle = 0;\r\n\t\t\tnextRotationAxis = null;\r\n\t\t}\r\n\t\tgl.glMultMatrixd(rotationMatrix, 0);\r\n\t\tgl.glGetDoublev(GL.GL_MODELVIEW, rotationMatrix, 0);\r\n\t\t// Move the objects according to the camera (instead of moving the camera)\r\n\t\tif (zoom != 0) {\r\n\t\t\tdouble[] oldMatrix = new double[16];\r\n\t\t\tgl.glGetDoublev(GL.GL_MODELVIEW, oldMatrix, 0);\r\n\t\t\tgl.glLoadIdentity();\r\n\t\t\tgl.glTranslated(0, 0, zoom);\r\n\t\t\tgl.glMultMatrixd(oldMatrix, 0);\r\n\t\t}\r\n\t}", "private void getControls() {\n mCameraView = findViewById(R.id.camView);\n mCameraButton = findViewById(R.id.cameraBtn);\n mCameraButtonCloud = findViewById(R.id.cameraBtnCloud);\n mGraphicOverlay = findViewById(R.id.graphic_overlay);\n }", "public void setCameraPos(CamPos in){\r\n\t\tresolveCamPos(in);\r\n\t\tpan_servo.setAngle(cur_pan_angle);\r\n\t\ttilt_servo.setAngle(cur_tilt_angle);\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n protected void onStart() {\n camera_ = getCameraInstance();\n Parameters params;\n\n if (camera_ != null) {\n params = camera_.getParameters();\n params.setPreviewFormat(ImageFormat.NV21);\n getSmallestPreviewSize(params);\n params.setPreviewSize(width_, height_);\n //params.setFlashMode(Parameters.FLASH_MODE_TORCH);\n params.setWhiteBalance(Parameters.WHITE_BALANCE_AUTO);\n camera_.setParameters(params);\n\n frame_ = new RGB[width_ * height_];\n for (int i = 0; i < frame_.length; ++i) {\n frame_[i] = new RGB();\n }\n\n camera_.setPreviewCallback(new PreviewCallback() {\n @Override\n public void onPreviewFrame(byte[] data, Camera camera) {\n synchronized (frame_) {\n decodeYUV420SP(frame_, data, width_, height_);\n }\n }\n });\n SurfaceTexture texture_ = new SurfaceTexture(0);\n try {\n camera_.setPreviewTexture(texture_);\n } catch (IOException e) {\n e.printStackTrace();\n }\n camera_.startPreview();\n }\n\n super.onStart();\n }", "@Override\r\n\tpublic void surfaceCreated(SurfaceHolder holder) {\n\t\tinitialCamera();\r\n\t}", "private void initCamera(SubScene scene, Group root){\n //Create a perspective camera for 3D use and add it to the scene.\n PerspectiveCamera camera = new PerspectiveCamera(true);\n scene.setCamera(camera);\n\n //Set the camera's field of view, near and far pane, and starting zoom.\n camera.setFieldOfView(80);\n camera.setNearClip(1);\n camera.setFarClip(5000);\n camera.setTranslateZ(-1000);\n\n //Initiate the rotation objects used for rotating the camera about the world.\n Rotate xRotate = new Rotate(0, Rotate.X_AXIS);\n Rotate yRotate = new Rotate(0, Rotate.Y_AXIS);\n root.getTransforms().addAll(xRotate, yRotate);\n\n //Bind the property so it automatically updates.\n xRotate.angleProperty().bind(angleX);\n yRotate.angleProperty().bind(angleY);\n\n //Add an event listener to track the start of a mouse drag when the mouse is clicked.\n scene.setOnMousePressed(event -> {\n dragStartX = event.getSceneX();\n dragStartY = event.getSceneY();\n anchorAngleX = angleX.get();\n anchorAngleY = angleY.get();\n });\n\n //Add an event listener to update the rotation objects based on the distance dragged.\n scene.setOnMouseDragged(event -> {\n //A modifier (0.2 in this case) is used to control the sensitivity.\n Double newAngleX = anchorAngleX - (dragStartY - event.getSceneY())*0.2;\n //Restrict the rotation to angles less than 90.\n if(newAngleX > 90){\n angleX.set(90);\n //Restrict the rotation to angles greater than 5.\n } else if (newAngleX < 5){\n angleX.set(5);\n } else {\n angleX.set(newAngleX);\n }\n angleY.set(anchorAngleY + (dragStartX - event.getSceneX())*0.2);\n });\n\n //Add an event listener to move the camera away or towards the scene using the mouse wheel.\n scene.setOnScroll(event -> {\n Double delta = event.getDeltaY();\n //If the mouse scrolls in, and the camera is not too close, then move the camera closer.\n if(delta > 0 && camera.getTranslateZ() <= -100){\n camera.setTranslateZ(camera.getTranslateZ()*0.975);\n //Else, if the mouse scrolls out and it's not too far away, then move the camera away.\n } else if(delta <0 && camera.getTranslateZ() >= -3000){\n camera.setTranslateZ(camera.getTranslateZ()* 1/0.975);\n }\n });\n }", "private RokidCamera(Activity activity, TextureView textureView) {\n this.mActivity = activity;\n this.mTextureView = textureView;\n }", "public AlignByCamera ()\n\t{\n\t\trequires(Subsystems.transmission);\n\t\trequires(Subsystems.goalVision);\n\n\t\tthis.motorRatio = DEFAULT_ALIGNMENT_SPEED;\n\t}", "protected void initialize() {\n \ttarget = Robot.trackingCamera.getTarget();\n targetX = target[0];\n targetY = target[1];\n \tstopTime = System.currentTimeMillis() + timeOut;\n }", "protected void initialize ()\n\t{\n\t\tSubsystems.goalVision.processNewImage();\n\t\t\n \t//Send positive values to go forwards.\n \tSubsystems.transmission.setLeftJoystickReversed(true);\n \tSubsystems.transmission.setRightJoystickReversed(true);\n\t}", "@Override\n protected Camera getCamera() {\n return Camera.createForPositionAndAngles(new ThreeDoubleVector(31.0, 7.0, 5.5), 0.0, 0.7);\n\n // Camera for orientation curve interpolation presentation\n// return Camera.createForPositionAndAngles(new ThreeDoubleVector(54.5, 10.0, 2.5), -0.5, 0.3);\n }", "@Override\n\tpublic void moveCamera() {\n\n\t}", "public void setCamera(int x, int y) {\n\t\tcamera[0] = x;\n\t\tcamera[1] = y;\n\t}", "protected void initRecorderParameters() {\n\t\tmMediaRecorder.setCamera(mCamera);\n\t\tmMediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);\n\t\tmMediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);\n\t\tmMediaRecorder.setVideoEncoder(mVideoEncoder);\n\t\tmMediaRecorder.setPreviewDisplay(mSurfaceHolder.getSurface());\n\t\tmMediaRecorder.setVideoSize(mQuality.resX,mQuality.resY);\n\t\tmMediaRecorder.setVideoFrameRate(mQuality.framerate);\n\t\tmMediaRecorder.setVideoEncodingBitRate(mQuality.bitrate);\n\t\tmMediaRecorder.setOrientationHint(mQuality.orientation);\n\t}", "public ReflectedCamera(Camera camera) {\n this(camera, true);\n }", "private void oldOpenCamera() {\n try {\n mCamera = Camera.open(); // attempt to get a Camera instance\n mCamera.setPreviewCallbackWithBuffer(this);\n Log.i(TAG, \"Instance created\");\n } catch (Exception e) {\n Log.e(TAG, \"Error getting Camera instance: \" + e.getMessage());\n }\n }", "public Camera getCam() {\n return this.cam;\n }", "public PlayerWL() {\n super();\n rotateYAxis = 0;\n positionZ = 0;\n positionX = 0;\n camera = new PerspectiveCamera(true);\n camera.getTransforms().addAll(\n new Rotate(0, Rotate.Y_AXIS),\n new Rotate(-10, Rotate.X_AXIS),\n new Translate(0, 0, 0));\n cameraGroup = new Group(camera);\n camera.setRotationAxis(new Point3D(0, 1, 0));\n }", "private void setupCamera(int width, int height) {\n CameraManager cameraManager = (CameraManager) mActivity.getSystemService(Context.CAMERA_SERVICE);\n\n if (cameraManager == null) {\n return;\n }\n\n try {\n for (String cameraId : cameraManager.getCameraIdList()) {\n // get camera characteristics\n CameraCharacteristics cameraCharacteristics = cameraManager.getCameraCharacteristics(cameraId);\n\n Integer currentCameraId = cameraCharacteristics.get(CameraCharacteristics.LENS_FACING);\n if (currentCameraId == null) {\n // The return value of that key could be null if the field is not set.\n return;\n }\n if (currentCameraId != mRokidCameraParamCameraId.getParam()) {\n // if not desired Camera ID, skip\n continue;\n }\n int deviceOrientation = mActivity.getWindowManager().getDefaultDisplay().getRotation();\n mTotalRotation = CameraDeviceUtils.sensorToDeviceRotation(cameraCharacteristics, deviceOrientation, ORIENTATIONS);\n\n mImageReader = ImageReader.newInstance(mSizeImageReader.getSize().getWidth(), mSizeImageReader.getSize().getHeight(), mImageFormat, mMaxImages);\n mImageReader.setOnImageAvailableListener(mOnImageAvailableListener, mBackgroundHandler);\n\n // Check if auto focus is supported\n int[] afAvailableModes = cameraCharacteristics.get(\n CameraCharacteristics.CONTROL_AF_AVAILABLE_MODES);\n if (afAvailableModes.length == 0 ||\n (afAvailableModes.length == 1\n && afAvailableModes[0] == CameraMetadata.CONTROL_AF_MODE_OFF)) {\n mAutoFocusSupported = false;\n } else {\n mAutoFocusSupported = true;\n }\n\n mCameraId = cameraId;\n return;\n }\n } catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }", "public Camera() {\n\t\tMatrix.setIdentityM(viewMatrix, 0);\n\t\tMatrix.setIdentityM(projectionMatrix, 0);\n\t\tcomputeReverseMatrix();\n\t}", "public void setCameraPosition(float x, float y, float z) {\n\t\tthis.x=x;\n\t\tthis.y=y;\n\t\tthis.z=z;\n\t}", "private void init() {\n\t\tdisplay = new Display(title, width, height);\n\t\tdisplay.getFrame().addKeyListener(keyManager); //lets us access keyboard\n\t\tdisplay.getFrame().addMouseListener(mouseManager);\n\t\tdisplay.getFrame().addMouseMotionListener(mouseManager);\n\t\tdisplay.getCanvas().addMouseListener(mouseManager);\n\t\tdisplay.getCanvas().addMouseMotionListener(mouseManager);\n\t\tAssets.init();\n\t\t\n\t\tgameCamera = new GameCamera(this, 0,0);\n\t\thandler = new Handler(this);\n\t\t\n\t\tgameState = new GameState(handler);\n\t\tmenuState = new MenuState(handler);\n\t\tsettingState = new SettingState(handler);\n\t\tmapState = new mapState(handler);\n\t\tmansionState = new mansionState(handler);\n\t\tparkState = new parkState(handler);\n\t\tjazzState = new jazzState(handler);\n\t\tmansionGardenState = new mansionGardenState(handler);\n\t\tmansionArcadeState = new mansionArcadeState(handler);\n\t\tmansionStudyState = new mansionStudyState(handler);\n\t\tjazzPRoomState = new jazzPRoomState(handler);\n\t\tState.setState(menuState);\n\t}", "public ToggleCameraMode() {\n requires(Robot.vision);\n }", "private void createCameraSource() {\n if (cameraSource == null) {\n cameraSource = new CameraSource(this, fireFaceOverlay);\n cameraSource.setFacing(CameraSource.CAMERA_FACING_FRONT);\n }\n\n try {\n processor = new FaceDetectionProcessor();\n processor.setFaceDetectionResultListener(getFaceDetectionListener());\n processor.setCustomization(cameraScreenCustomization);\n cameraSource.setMachineLearningFrameProcessor(processor);\n } catch (Exception e) {\n Logger.e(TAG, \"Can not create image processor: \" + Log.getStackTraceString(e));\n }\n\n }", "public State(GameStateManager gameStateManager){ //constructor\n this.gameStateManager = gameStateManager;\n camera = new OrthographicCamera();\n mouse = new Vector3();\n }", "public void setCamera(Point position, Point lookAt) {\n setValueInTransaction(PROP_CAMERA, new Camera(position, lookAt));\n }", "private void updateCamera() {\n\t\tVector3f x = new Vector3f();\n\t\tVector3f y = new Vector3f();\n\t\tVector3f z = new Vector3f();\n\t\tVector3f temp = new Vector3f(this.mCenterOfProjection);\n\n\t\ttemp.sub(this.mLookAtPoint);\n\t\ttemp.normalize();\n\t\tz.set(temp);\n\n\t\ttemp.set(this.mUpVector);\n\t\ttemp.cross(temp, z);\n\t\ttemp.normalize();\n\t\tx.set(temp);\n\n\t\ty.cross(z, x);\n\n\t\tMatrix4f newMatrix = new Matrix4f();\n\t\tnewMatrix.setColumn(0, x.getX(), x.getY(), x.getZ(), 0);\n\t\tnewMatrix.setColumn(1, y.getX(), y.getY(), y.getZ(), 0);\n\t\tnewMatrix.setColumn(2, z.getX(), z.getY(), z.getZ(), 0);\n\t\tnewMatrix.setColumn(3, mCenterOfProjection.getX(),\n\t\t\t\tmCenterOfProjection.getY(), mCenterOfProjection.getZ(), 1);\n\t\ttry {\n\t\t\tnewMatrix.invert();\n\t\t\tthis.mCameraMatrix.set(newMatrix);\n\t\t} catch (SingularMatrixException exc) {\n\t\t\tLog.d(\"Camera\",\n\t\t\t\t\t\"SingularMatrixException on Matrix: \"\n\t\t\t\t\t\t\t+ newMatrix.toString());\n\t\t}\n\t}", "public void onCamera();", "private void configureCamera(int width, int height)\n {\n mCameraId = CAMERA_FACE_BACK;\n ///Configure camera output surfaces\n setupCameraOutputs(mWidth, mHeight);\n }", "public CameraSubsystem() {\n\t\t// TODO Auto-generated constructor stub\t\t\n\t\tnetworkTableValues.put(\"area\", (double) 0);\n\t\tnetworkTableValues.put(\"centerX\", (double) 0);\n\t\tnetworkTableValues.put(\"centerY\", (double) 0);\n\t\tnetworkTableValues.put(\"width\", (double) 0);\n\t\tnetworkTableValues.put(\"height\", (double) 0);\n\t\t\n\t\tcoordinates.put(\"p1x\", (double) 0);\n\t\tcoordinates.put(\"p1y\", (double) 0);\n\t\tcoordinates.put(\"p2x\", (double) 0);\n\t\tcoordinates.put(\"p2y\", (double) 0);\n\t\tcoordinates.put(\"p3x\", (double) 0);\n\t\tcoordinates.put(\"p3y\", (double) 0);\n\t\tcoordinates.put(\"p4x\", (double) 0);\n\t\tcoordinates.put(\"p4y\", (double) 0);\n\n\t\t\n\t}", "@Override\n\tprotected void setupCameras(SceneManager sceneManager, RenderWindow renderWindow) {\n\t\tSceneNode rootNode = sceneManager.getRootSceneNode();\n\n\t\tCamera cameraOne = sceneManager.createCamera(\"cameraOne\", Projection.PERSPECTIVE);\n\t\trenderWindow.getViewport(0).setCamera(cameraOne);\n\n\t\tSceneNode cameraOneNode = rootNode.createChildSceneNode(cameraOne.getName() + \"Node\");\n\n\t\tcameraOneNode.attachObject(cameraOne);\n\t\tcameraOne.setMode('n');\n\t\tcameraOne.getFrustum().setFarClipDistance(1000.0f);\n\t\tinitializeMouse(renderSystem, renderWindow);\n\t}", "public void openCamera() {\n \n\n }", "private void setCamera(GL gl_, GLU glu) {\n \tGL2 gl2 = gl_.getGL2();\r\n gl2.glMatrixMode(GL2.GL_PROJECTION);\r\n gl2.glLoadIdentity();\r\n\r\n // Perspective.\r\n float widthHeightRatio = (float) getWidth() / (float) getHeight();\r\n glu.gluPerspective(45, widthHeightRatio, 1 , 4000 );\r\n glu.gluLookAt(camPosition.getEyeX(), camPosition.getCenterY(), camPosition.getCameraDist(),\r\n \t\tcamPosition.getCenterX(), \r\n \t\tcamPosition.getCenterY(), \r\n \t\t0, \r\n \t\t\t0, 1, 0);\r\n\r\n // Change back to model view matrix.\r\n gl2.glMatrixMode(GL2.GL_MODELVIEW);\r\n gl2.glLoadIdentity();\r\n }", "private void setEventListener() {\n mCameraView.addCameraKitListener(this);\n mCameraButton.setOnClickListener(this);\n mCameraButtonCloud.setOnClickListener(this);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n this.requestWindowFeature(Window.FEATURE_NO_TITLE);\n this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);\n setContentView(R.layout.main);\n cameraframe = (FrameLayout) findViewById(R.id.preview);\n overlayview = new ImageView(getApplicationContext());\n\t overlayview.setScaleType(ImageView.ScaleType.FIT_XY);\n\n previewing=false;\n freestyle=false;\n \n\t// set up camera, start button\n cameraView = new Preview(this); // <3>\n\n\t cameraframe.addView(cameraView,0); // <4>\n\n\t \n\t\n\t\n\t setupButtons();\n initCamera();\n \n \n\t\n\t\n\t\n \n\tloadFrames();\n\t initFileSystem();\n\t \n //retakeButton.setEnabled(false);\n\t toggleMode();\n \n Log.d(TAG, \"Fully initialized\");\n }", "@Override\n public void initialize(RenderManager rm, ViewPort vp) {\n reshape(vp, vp.getCamera().getWidth(), vp.getCamera().getHeight());\n viewPort.setOutputFrameBuffer(fb);\n guiViewPort.setClearFlags(true, true, true);\n\n guiNode.attachChild(display1);\n guiNode.attachChild(display2);\n guiNode.attachChild(display3);\n guiNode.attachChild(display4);\n guiNode.updateGeometricState();\n }", "public CameraManager(HardwareMap hardwareMap) {\n int cameraMonitorViewId = hardwareMap.appContext.getResources().getIdentifier(\"cameraMonitorViewId\", \"id\", hardwareMap.appContext.getPackageName());\n phoneCam = OpenCvCameraFactory.getInstance().createInternalCamera(OpenCvInternalCamera.CameraDirection.BACK, cameraMonitorViewId);\n pipeline = new CvPipeline();\n phoneCam.setPipeline(pipeline);\n }", "void setCameraIdPref(int cameraId);", "@Override\n public void setCamera (GL2 gl, GLU glu, GLUT glut) {\n glu.gluLookAt(0, 0, 2.5, // from position\n 0, 0, 0, // to position\n 0, 1, 0); // up direction\n }", "public void update() {\n\t\tupdateCamera();\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_camera);\n\t\t\n\t \n\t\t\n\t\t\tcam=(CameraPreview) this.findViewById(R.id.camera);\n\t\t\tthis.findViewById(R.id.startButton).setOnClickListener(new View.OnClickListener() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tcam.setCamera(getCameraInstance(getDefaultCameraId()));\n\t\t\t\t}\n\t\t\t});\n\t\t\t\n\t\t\t\t\n\t}", "private void setTheScene()\n {\n board.setLocalRotation(Quaternion.IDENTITY);\n board.rotate(-FastMath.HALF_PI, -FastMath.HALF_PI, 0);\n board.setLocalTranslation(0, 0, -3);\n\n cam.setLocation(new Vector3f(0, 0, 10));\n cam.lookAt(Vector3f.ZERO, Vector3f.UNIT_Y);\n }", "@Override\n public void onOpened(CameraDevice camera) {\n cameraDevice = camera;\n createCameraPreview();\n }", "@Override\n public void onOpened(CameraDevice camera) {\n cameraDevice = camera;\n createCameraPreview();\n }", "@Override\n public void onOpened(@NonNull CameraDevice camera) {\n cameraDevice = camera;\n createCameraPreview();\n }", "@Override\n public void run() {\n cameraDetector.setDetectJoy(true);\n cameraDetector.setDetectAnger(true);\n cameraDetector.setDetectSadness(true);\n cameraDetector.setDetectSurprise(true);\n cameraDetector.setDetectFear(true);\n cameraDetector.setDetectDisgust(true);\n }", "@Override\n public void robotInit() {\n // Hardware.getInstance().init();\n hardware.init();\n\n controllerMap = ControllerMap.getInstance();\n controllerMap.controllerMapInit();\n\n controllerMap.intake.IntakeInit();\n\n m_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n m_chooser.addOption(\"My Auto\", kCustomAuto);\n SmartDashboard.putData(\"Auto choices\", m_chooser);\n\n intakeCam = CameraServer.getInstance().startAutomaticCapture(\"Driver Camera :)\", 0);\n intakeCam.setPixelFormat(PixelFormat.kMJPEG);\n intakeCam.setResolution(160, 120);\n intakeCam.setFPS(15);\n // climberCam = CameraServer.getInstance().startAutomaticCapture(1);\n\n }", "public RobotContainer() {\n // Configure the button bindings\n configureButtonBindings();\n\n CameraServer.getInstance().startAutomaticCapture().setResolution(320, 240);\n }", "private void initCamera(SurfaceHolder surfaceHolder) {\n\t\tif (surfaceHolder == null) {\n\t\t throw new IllegalStateException(\"No SurfaceHolder provided\");\n\t\t }\n\t\tif (cameraManager.isOpen()) {\n\t\t Log.w(TAG, \"initCamera() while already open -- late SurfaceView callback?\");\n\t\t return;\n\t\t }\n\t\ttry {\n\t\t\tcameraManager.openDriver(surfaceHolder);\n\t\t\t// Creating the handler starts the preview, which can also throw a\n\t\t\t// RuntimeException.\n\t\t\t if (handler == null) {\n\t\t\t handler = new CaptureActivityHandler(this, null, null, \"UTF-8\", cameraManager);\n\t\t\t }\n\t\t\t decodeOrStoreSavedBitmap(null, null);\n\t\t} catch (IOException ioe) {\n\t\t\tLog.w(TAG, ioe);\n\t\t\t// displayFrameworkBugMessageAndExit();\n\t\t\tCommonTask.ShowMessage(this, \"IOException\\n\" + ioe.getMessage());\n\t\t} catch (RuntimeException e) {\n\t\t\t// Barcode Scanner has seen crashes in the wild of this variety:\n\t\t\t// java.?lang.?RuntimeException: Fail to connect to camera service\n\t\t\tLog.w(TAG, \"Unexpected error initializating camera\", e);\n\t\t\tCommonTask.ShowMessage(this, \"RuntimeException\\n\" + e.getMessage());\n\t\t\t// displayFrameworkBugMessageAndExit();\n\t\t}\n\t}", "private void createCameraSource() {\n Context ctx = getApplicationContext();\n Point displaySize = new Point();\n getWindowManager().getDefaultDisplay().getRealSize(displaySize);\n\n // dummy detector saving the last frame in order to send it to Microsoft in case of face detection\n ImageFetchingDetector imageFetchingDetector = new ImageFetchingDetector();\n\n // We need to provide at least one detector to the camera :x\n FaceDetector faceDetector = new FaceDetector.Builder(ctx).build();\n faceDetector.setProcessor(\n new LargestFaceFocusingProcessor.Builder(faceDetector, new FaceTracker(imageFetchingDetector))\n .build());\n\n BarcodeDetector barcodeDetector = new BarcodeDetector.Builder(ctx).build();\n //barcodeDetector.setProcessor(new BarcodeDetectionProcessor());\n barcodeDetector.setProcessor(\n new FirstFocusingProcessor<Barcode>(barcodeDetector, new BarcodeTracker())\n );\n\n TextRecognizer textRecognizer = new TextRecognizer.Builder(ctx).build();\n textRecognizer.setProcessor(new OcrDetectionProcessor());\n // TODO: Check if the TextRecognizer is operational.\n\n MultiDetector multiDetector = new MultiDetector.Builder()\n .add(imageFetchingDetector)\n .add(faceDetector)\n .add(barcodeDetector)\n .add(textRecognizer)\n .build();\n\n mCameraSource = new CameraSource.Builder(ctx, multiDetector)\n .setFacing(CameraSource.CAMERA_FACING_BACK)\n .setAutoFocusEnabled(true)\n .setRequestedFps(5.0f)\n .setRequestedPreviewSize(displaySize.y, displaySize.x)\n .build();\n }", "@Override\n public void onOpened(@NonNull CameraDevice camera) {\n mCameraDevice = camera;\n createCameraPreview();\n }", "@Override\n public void initialize() {\n //m_camera.setDriverMode(true);\n //m_camera.setLED(LEDMode.kOn);\n RobotContainer.m_Drive.auto = true;\n RobotContainer.m_Drive.setLightMode(3);\n }", "protected void initialize() {\n \tsetTimeout(0.0);\n \t\n \tRobot.vision_.setTargetSnapshot(null);\n \t\n \tpreviousTargetTransform = Robot.vision_.getLatestGearLiftTargetTransform();\n \tRobot.vision_.startGearLiftTracker(trackerFPS_);\n }", "public static void init(Context context) {\n\t\tif (cameraManager == null) {\n\t\t\tcameraManager = new CameraManager(context);\n\t\t}\n\t}", "@Override\r\n\tpublic void surfaceCreated(SurfaceHolder holder) \r\n\t{\n\t\t if (mCamera != null)\r\n\t\t {\r\n\t\t\t Parameters params = mCamera.getParameters();\r\n\t mCamera.setParameters(params);\r\n\t Log.i(\"Surface\", \"Created\");\r\n\t }\r\n\t\t else\r\n\t\t {\r\n\t\t\t Toast.makeText(getApplicationContext(), \"Camera not available!\",\r\n\t Toast.LENGTH_LONG).show();\r\n\r\n\t finish();\r\n\t }\r\n\t}", "protected void setupOrbitCameras(Engine engine, SceneManager sceneManager) {\n\t\tSceneNode cameraOneNode = sceneManager.getSceneNode(\"cameraOneNode\");\n\t\torbitCameraOne = new Camera3PController(cameraOneNode, targetNode,\n\t\t\t\tcom.dsgames.game.myGameEngine.controller.InputType.MOUSE, inputManager);\n\t}" ]
[ "0.79434925", "0.75714153", "0.75444806", "0.7431924", "0.741129", "0.7400925", "0.7345882", "0.7303766", "0.7296388", "0.7289243", "0.7270383", "0.72505695", "0.7221096", "0.7184847", "0.71646804", "0.706878", "0.7015198", "0.6947784", "0.694021", "0.6899687", "0.68680465", "0.6845153", "0.684164", "0.6804893", "0.6759274", "0.6736663", "0.6726871", "0.67058706", "0.67008835", "0.6676883", "0.66438013", "0.6639007", "0.6635904", "0.66331506", "0.66226375", "0.66168934", "0.66073287", "0.6594635", "0.6560228", "0.65598446", "0.6545656", "0.6533307", "0.6513229", "0.6458572", "0.6420264", "0.64030343", "0.6402434", "0.639936", "0.63917804", "0.63913476", "0.63912815", "0.63757527", "0.6374871", "0.6374472", "0.63658965", "0.63522375", "0.63467", "0.63414806", "0.6318822", "0.6318239", "0.6309649", "0.62990916", "0.62951565", "0.6291624", "0.62915313", "0.6289882", "0.62804204", "0.6270827", "0.62630594", "0.625882", "0.62563586", "0.6252445", "0.623875", "0.6234352", "0.62283176", "0.62260354", "0.62227815", "0.62193173", "0.62130696", "0.61900723", "0.6177588", "0.6171072", "0.6167201", "0.61536086", "0.6152697", "0.6148382", "0.61469376", "0.6140646", "0.6140646", "0.6129025", "0.6127484", "0.6124623", "0.6118109", "0.6117558", "0.6106574", "0.61053234", "0.60737705", "0.6068224", "0.6061876", "0.6061832", "0.6057333" ]
0.0
-1
The camera is already closed
@Override public void onConfigured( CameraCaptureSession cameraCaptureSession) { if (null == mCameraDevice) { return; } // When the session is ready, we start displaying the preview. mCaptureSession = cameraCaptureSession; try { // 自动对焦 // Auto focus should be continuous for camera preview. mPreviewRequestBuilder.set( CaptureRequest.CONTROL_AF_MODE, CaptureRequest.CONTROL_AF_MODE_CONTINUOUS_PICTURE); // Flash is automatically enabled when necessary. setAutoFlash(mPreviewRequestBuilder); // Finally, we start displaying the camera preview. mPreviewRequest = mPreviewRequestBuilder.build(); mCaptureSession.setRepeatingRequest( mPreviewRequest, // 如果想要拍照,那么绝不能设置为null // 如果单纯预览,那么可以设置为null mCaptureCallback, mBackgroundHandler); } catch (CameraAccessException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void cameraClosed();", "public void closeCamera()\n {\n }", "private void closeCamera() {\n if (null != cameraDevice) {\n cameraDevice.close();\n cameraDevice = null;\n }\n if (null != imageReader) {\n imageReader.close();\n imageReader = null;\n }\n }", "private void closeCamera() {\n if (mCameraDevice != null) {\n mCameraDevice.close();\n mCameraDevice = null;\n }\n if (mIsRecording) {\n long elapsedMillis = SystemClock.elapsedRealtime() - mTimer.getBase();\n mTimer.stop();\n mTimer.setVisibility(View.GONE);\n scrollContents();\n mIsRecording = false;\n mRecordButton.setImageResource(R.drawable.ic_record_white);\n mMediaRecorder.stop();\n mMediaRecorder.reset();\n\n //Scan the file to appear in the device studio\n Intent mediaScannerIntent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);\n mediaScannerIntent.setData(Uri.fromFile(new File(mVideoFilePath)));\n sendBroadcast(mediaScannerIntent);\n\n logFirebaseVideoEvent(elapsedMillis);\n\n }\n if (mMediaRecorder != null) {\n mMediaRecorder.release();\n mMediaRecorder = null;\n }\n if (mAnimator != null && mAnimator.isStarted()) {\n mAnimator.cancel();\n }\n }", "protected void closeCamera() {\n try {\n mCameraOpenCloseLock.acquire();\n if (null != mCameraDevice) {\n mCameraDevice.close();\n mCameraDevice = null;\n }\n if (null != mMediaRecorder) {\n mMediaRecorder.release();\n mMediaRecorder = null;\n }\n } catch (InterruptedException e) {\n throw new RuntimeException(\"Interrupted while trying to lock camera closing.\");\n } finally {\n mCameraOpenCloseLock.release();\n }\n }", "void releaseCamera() {\n\n if (mCamera != null) {\n mCamera.stopPreview();\n mCamera.release();\n }\n }", "private void releaseCamera() {\n if(camera != null) {\n camera.stopPreview();\n camera.release();\n camera = null;\n }\n }", "@Override\n protected void onPause() {\n ReleaseCamera();\n super.onPause();\n }", "public void releaseCamera()\n {\n\n if (mcCamera != null)\n {\n //stop the preview\n mcCamera.stopPreview();\n //release the camera\n mcCamera.release();\n //clear out the camera\n mcCamera = null;\n }\n }", "private void releaseCamera() {\n if (mCamera != null) {\n mCamera.release(); // release the camera for other applications\n mCamera = null;\n }\n }", "@Override\n protected void onPause() {\n closeCamera();\n\n stopBackgroundThread();\n super.onPause();\n }", "private void releaseCamera() {\n if (mCamera != null) {\n mCamera.stopPreview();\n mCamera.release();\n mCamera = null;\n }\n }", "public void onStop() {\n super.onStop();\n this.mZxingview.stopCamera();\n }", "@Override\n protected void onPause() {\n super.onPause();\n releaseCamera();\n }", "public void onPause() {\n releaseCamera();\n }", "@Override\n public void onCameraPreviewStopped() {\n }", "private void releaseCamera() {\n if (mCamera != null) {\n mCamera.stopPreview();\n mCamera.setPreviewCallback(null);\n mCamera.release();\n mCamera = null;\n }\n }", "private void releaseCamera() {\n if (mCamera != null) {\n mCamera.stopPreview();\n mCamera.setPreviewCallback(null);\n mCamera.release();\n mCamera = null;\n }\n }", "private static void releaseCameraAndPreview() {\n if (cam != null) {\n cam.release();\n cam = null;\n }\n }", "public synchronized void closeDriver() {\n if (camera != null) {\n camera.getCamera().release();\n camera = null;\n }\n }", "@Override\n public void surfaceDestroyed(SurfaceHolder holder)\n {\n this.releaseCamera();\n }", "public void surfaceDestroyed(SurfaceHolder holder) {\n stopCamera();\n }", "public void stop(){\n if (mCamera != null){\n mCamera.stopPreview();\n mCamera.setPreviewCallback(null);\n mCamera.release();\n mCamera = null;\n }\n if (mHolder != null) {\n mHolder.getSurface().release();\n mHolder = null;\n }\n }", "public void closeDriver() {\n\t\tif (camera != null) {\n\t\t\tcamera.release();\n\t\t\tcamera = null;\n\t\t\tinitialized = false;\n\t\t}\n\t}", "@SuppressLint(\"NewApi\")\n public void onPause() {\n Log.d(TAG, \"onPause\");\n try {\n mCameraOpenCloseLock.acquire();\n if (null != mCameraDevice) {\n mCameraDevice.close();\n mCameraDevice = null;\n Log.d(TAG, \"CameraDevice Close\");\n }\n } catch (InterruptedException e) {\n throw new RuntimeException(\"Interrupted while trying to lock camera closing.\");\n } finally {\n mCameraOpenCloseLock.release();\n }\n }", "@Override\r\n\tpublic void surfaceDestroyed(SurfaceHolder holder) \r\n\t{\n\t\tmCamera.stopPreview();\r\n\t\tmCamera.release(); \r\n\t}", "@Override\r\n\tpublic void surfaceDestroyed(SurfaceHolder holder) {\n\t\tif(myCamera!=null){\r\n\t\t\tmyCamera.stopPreview();\r\n\t\t\tmyCamera.release();//釋放相機\r\n\t\t\tmyCamera=null;\r\n\t\t}\r\n\t}", "protected static void stopInternalCamera() {\n if (internalCamera != null) {\n internalCamera.stopStreaming();\n internalCamera.closeCameraDevice();\n }\n }", "@Override\n public void onDisconnected(CameraDevice camera) {\n Log.e(TAG, \"onDisconnected\");\n }", "public final void destroy(){\n stop();\n LIBRARY.CLEyeDestroyCamera(camera_);\n camera_ = null;\n PS3_LIST_.remove(this);\n }", "public void end()\r\n\t{\n\t\ttry{\r\n\t\tNIVision.IMAQdxStopAcquisition(curCam);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\t\n\t\t}\r\n\t}", "public void stop() {\n\n\t\tif (!started.compareAndSet(true, false)) {\n\t\t\treturn;\n\t\t}\n\n\t\tLOG.debug(\"Stopping panel rendering and closing attached webcam\");\n\n\t\tupdater.stop();\n\t\tupdater = null;\n\n\t\timage = null;\n\n\t\ttry {\n\t\t\terrored = !webcam.close();\n\t\t} catch (WebcamException e) {\n\n\t\t\terrored = true;\n\n\t\t\tDisplay.getDefault().syncExec(new Runnable() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tredraw();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tthrow e;\n\t\t}\n\t}", "@Override\n public void onClick(View v) {\n int camerasNumber = Camera.getNumberOfCameras();\n if (camerasNumber > 1) {\n //release the old camera instance\n //switch camera, from the front and the back and vice versa\n\n releaseCamera();\n chooseCamera();\n } else {\n\n }\n }", "@Override\n protected void onPause() {\n super.onPause();\n if (theCamera != null){\n theCamera.stopPreview();\n theCamera.release();\n theCamera = null;\n }\n }", "@Override\n\tpublic void onCameraViewStopped() {\n\n\t}", "@Override\n public void stopCamera() {\n super.stopCamera();\n\n if(cameraListener != null)\n cameraListener.onCameraStop();\n }", "@Override\n public void windowClosing(WindowEvent e) {\n new Thread(new Runnable() {\n public void run() {\n pcu.setDone();\n camera.getDriver().cleanUp();\n frame.setVisible(false);\n frame.dispose();\n }\n }).start();\n }", "@Override // com.master.cameralibrary.CameraViewImpl\n public void stop() {\n Camera camera = this.mCamera;\n if (camera != null) {\n camera.stopPreview();\n }\n this.mShowingPreview = false;\n releaseCamera();\n }", "@Override\n\t\t\tpublic void surfaceDestroyed(SurfaceHolder holder) {\n\t\t\t\tif (mCamera != null) {\n\t\t\t\t\tmCamera.stopPreview();\t\t\t\t\t\t\t\t\t\t//Stop the preview \n\t\t\t\t}\n\t\t\t}", "@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\treleaseCamera();\n\t}", "public void surfaceDestroyed(SurfaceHolder holder) {\n camera.stopPreview();\n camera.release();\n camera = null;\n previewing = false;\n }", "@Override\n public void onPause() {\n mCameraView.stop();\n super.onPause();\n }", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\t//\t\tLog.e(\"destroy\", \"CameraActivity �׾�Ф�\");\n\t\t//\t\tsendMessage(\"exit\");\n\t\t//\t\tmodeEasyActivity.finish();\n\t}", "public void surfaceDestroyed(SurfaceHolder holder) {\n camera.stopPreview();\n camera.release();\n camera = null;\n }", "public void destroy(){\n Log.d(TAG, \"onDestroy called\");\n runRunnable = false;\n if (mCamera != null) {\n mCamera.stopPreview();\n mCamera.release();\n mCamera = null;\n }\n isPaused = true;\n // TODO stop executorService\n\n //executor.shutdown();\n cameraThread.stop();\n\n }", "@Override\n public void onClick(View v) {\n if (camera != null && previewing) {\n camera.stopPreview();\n camera.release();\n camera = null;\n\n previewing = false;\n }\n }", "private void stopAcquisition() {\r\n if (this.timer != null && !this.timer.isShutdown()) {\r\n try {\r\n // stop the timer\r\n this.timer.shutdown();\r\n this.timer.awaitTermination(33, TimeUnit.MILLISECONDS);\r\n } catch (InterruptedException e) {\r\n // log any exception\r\n System.err.println(\"Exception in stopping the frame capture, trying to close the video now... \" + e);\r\n }\r\n }\r\n\r\n if (this.capture.isOpened()) {\r\n // release the camera\r\n this.capture.release();\r\n }\r\n }", "private void stopAcquisition() {\n if (this.timer != null && !this.timer.isShutdown()) {\n try {\n // stop the timer\n this.timer.shutdown();\n this.timer.awaitTermination(33, TimeUnit.MILLISECONDS);\n } catch (InterruptedException e) {\n // log any exception\n System.err.println(\"Exception in stopping the frame capture, trying to release the camera now... \" + e);\n }\n }\n\n if (this.capture.isOpened()) {\n // release the camera\n this.capture.release();\n }\n }", "void closeVideo();", "@Override\n public void onCanceled(EasyImage.ImageSource source) {\n if (source == EasyImage.ImageSource.CAMERA) {\n File photoFile = EasyImage.lastlyTakenButCanceledPhoto(MainActivity.this);\n if (photoFile != null) photoFile.delete();\n }\n }", "@Override\n protected void onDestroy() {\n super.onDestroy();\n Log.d(TAG, \"onDestroy\");\n// mPhotoLoader.stop();\n if (mMatrixCursor != null)\n mMatrixCursor.close();\n }", "@Override\n\t\tpublic void surfaceDestroyed(SurfaceHolder holder) {\n\t\t\tif (DEBUG>=2) Log.d(TAG, \"surfaceDestroyed'd\");\n\n\t\t\t// Surface will be destroyed when we return, so stop the preview.\n\t\t\t// Because the CameraDevice object is not a shared resource, it's\n\t\t\t// very important to release it when the activity is paused.\n\t\t\tif (mCamera != null) {\n\t\t\t\tSHOWING_PREVIEW = false;\n\t\t\t\tmCamera.stopPreview();\n\t\t\t}\n\n\t\t\t//Log.d(TAG, \"surfaceDestroyed'd finish\");\n\t\t}", "private void checkCameraBeforeOpen() {\n // First get the back up camera\n List<String> backUpPreviewCamera = mCameraIdManager.getBackUpPreviewCameraId();\n // Second,get the remote camera and filter is connect camera\n LinkedHashMap<String, IRemoteDevice> remoteConnectedCamera = mIMultiCameraDeviceAdapter\n .queryRemoteDevices();\n // key-value is cameraId-deviceId\n LinkedHashMap<String, String> deviceId = mCameraIdManager.getDeviceId();\n List<String> deleteItem = new ArrayList<String>();\n int status = IMultiCameraDeviceAdapter.REMOTE_CAEMRA_STATUS_UNKNOWN;\n LogHelper.d(TAG, \"[checkCameraBeforeOpen],before check camera, the camera id :\"\n + backUpPreviewCamera);\n // back up camera maybe not equals remote camera,such as pause camera\n // and disconnect remote camera from cross mount setting.\n for (String needOpenCamera : mCameraIdManager.getDeviceId().keySet()) {\n if (!MultiCameraModuleUtil.isLocalCamera(needOpenCamera)) {\n if (remoteConnectedCamera.size() == 0) {\n deleteItem.add(needOpenCamera);\n } else {\n // get the device id according camera id from mDeviceId\n String needCheckdeviceId = deviceId.get(needOpenCamera);\n IRemoteDevice device = remoteConnectedCamera.get(needCheckdeviceId);\n if (device != null) {\n status = device.get(IRemoteDevice.KEY_REMOTE_SERVICE_STATUS);\n }\n // If the remote camera status is not connected,need remove it.\n if (IMultiCameraDeviceAdapter.REMOTE_CAEMRA_STATUS_CONNECTED != status) {\n deleteItem.add(needOpenCamera);\n }\n }\n }\n }\n // Update the back up preview camera id and update the camera id.\n for (String cameraId : deleteItem) {\n backUpPreviewCamera.remove(cameraId);\n updateCameraBeforeOpened(false, cameraId, null);\n }\n // if the camera id is null,need add the local camera into the preview list\n if (backUpPreviewCamera.size() == 0) {\n backUpPreviewCamera.add(mCameraId);\n updateCameraBeforeOpened(true, mCameraId, mLocalDeviceIdKeyPref + mCameraId);\n }\n\n LogHelper.d(TAG, \"[checkCameraBeforeOpen],after check camera, the camera id :\"\n + backUpPreviewCamera);\n }", "@Override\n\t\t\t\tpublic void onError(int error, Camera camera) {\n\t\t\t\t\tif (error == Camera.CAMERA_ERROR_SERVER_DIED) {\n\t\t\t\t\t\t// In this case the application must release the camera and instantiate a new one\n\t\t\t\t\t\tLog.e(TAG,\"Media server died !\");\n\t\t\t\t\t\t// We don't know in what thread we are so stop needs to be synchronized\n\t\t\t\t\t\tmCameraOpenedManually = false;\n\t\t\t\t\t\tstop();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tLog.e(TAG,\"Error unknown with the camera: \"+error);\n\t\t\t\t\t}\n\t\t\t\t}", "protected void close()\n {\n stopped = true;\n }", "@Override\n public void onPause() {\n super.onPause();\n zXingScannerView.stopCamera();\n }", "private void shutdown() {\n mMediaRecorder.reset();\n mMediaRecorder.release();\n mCamera.release();\n\n // once the objects have been released they can't be reused\n mMediaRecorder = null;\n mCamera = null;\n }", "public void getCameraInstance() {\n newOpenCamera();\n }", "@Override\r\n protected void onDestroy() {\n \r\n \r\n \r\n if(DJIDrone.getDjiCamera() != null)\r\n DJIDrone.getDjiCamera().setReceivedVideoDataCallBack(null);\r\n mDjiGLSurfaceView.destroy();\r\n super.onDestroy();\r\n }", "public void stopPreview() {\n\t\tif (autoFocusManager != null) {\n\t\t\tautoFocusManager.stop();\n\t\t\tautoFocusManager = null;\n\t\t}\n\t\tif (camera != null && previewing) {\n//\t\t\tLog.d(TAG, \"stopPreview\");\n\t\t\tcamera.stopPreview();\n//\t\t\tpreviewCallback.setHandler(null, 0);\n\t\t\tpreviewing = false;\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic void onDestroy() {\n\t\t\n\t\tLog.d(TAG,\"onDestroy\");\n\t\tif(mCameraDevices!=null){\n\t\t\tmCameraDevices.release();\n\t\t}\n\t\tshowFloatTool(false);\n\t\tsuper.onDestroy();\n\t}", "public void obtainCameraOrFinish() {\n mCamera = getCameraInstance();\n if (mCamera == null) {\n Toast.makeText(VideoCapture.getSelf(), \"Fail to get Camera\", Toast.LENGTH_LONG).show();\n VideoCapture.getSelf().finish();\n }\n }", "@Override\r\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tmVideoContrl.closeMediaControl();\r\n\r\n\t\t\t\t\t}", "@Override\n public void onCameraOpenFailed(Exception e) {\n }", "public void surfaceDestroyed(SurfaceHolder holder) {\n \tif(CameraActivity.mCamera == null) return; \n \tCameraActivity.mCamera.release();\n \tCameraActivity.mCamera = null;\n }", "public void releaseCameraAndPreview() {\n if (mCameraActivity.mCamera != null) {\n mCameraActivity.mCamera.setPreviewCallback(null);\n mCameraActivity.mCamera.stopPreview();\n mImageCapture.mSurfaceHolder.removeCallback(mCameraPreview);\n mCameraPreview.surfaceDestroyed(mImageCapture.mSurfaceHolder);\n mSurfaceHolder.getSurface().release();\n mSurfaceHolder = null;\n releaseCamera();\n }\n }", "@Override\n\tpublic void surfaceDestroyed(SurfaceHolder holder) {\n\t\tLog.e(TAG, \"Surface Destroyed\");\n\t\tcamera.stopPreview();\n\t\tmPreviewRunning = false;\n\t\tcamera.release();\n\t\tcamera = null;\n\t}", "public void surfaceDestroyed(SurfaceHolder holder) {\n\t\tif(camera != null){\r\n\t\t\tcamera.stopPreview();\r\n\t\t\tcamera.release();\r\n\t\t\tcamera = null;\r\n\t\t}\r\n\t}", "private void oldOpenCamera() {\n try {\n mCamera = Camera.open(); // attempt to get a Camera instance\n mCamera.setPreviewCallbackWithBuffer(this);\n Log.i(TAG, \"Instance created\");\n } catch (Exception e) {\n Log.e(TAG, \"Error getting Camera instance: \" + e.getMessage());\n }\n }", "@Override // com.master.cameralibrary.CameraViewImpl\n public boolean isCameraOpened() {\n return this.mCamera != null;\n }", "public int cameraOff() {\r\n System.out.println(\"hw- desligarCamera\");\r\n return serialPort.enviaDados(\"!111F*\"); //camera OFF\r\n }", "@Override\n public void surfaceDestroyed(SurfaceHolder holder) {\n stopPreview();\n }", "void onCameraError();", "public void stop() {\n synchronized (mLock) {\n //if (!mRunning)\n //{\n // throw new IllegalStateException(\"CameraStreamer is already stopped\");\n //} // if\n \t\n \tLog.d(TAG, \"Stop\");\n \t\n mRunning = false;\n if (mMJpegHttpStreamer != null) {\n mMJpegHttpStreamer.stop();\n mMJpegHttpStreamer = null;\n } // if\n \n if (mCamera != null) {\n mCamera.release();\n mCamera = null;\n } // if\n } // synchronized\n mLooper.quit();\n }", "@Override\n public void run() {\n mySurfaceView.setVisibility(View.GONE);\n qrEader.stop();\n\n\n }", "public void openCamera() {\n \n\n }", "public boolean hideCamera() {\n return false;\n }", "public boolean hideCamera() {\n return false;\n }", "public Camera() {\n\t\treset();\n\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n FrontCameraVerificationActivity.this.finish();\n }", "private void end() {\r\n isRunning = false;\r\n if( mineField.exploder.isRunning() ) mineField.exploder.stop();\r\n if( settingsOpen ) settingsFrame.dispose();\r\n }", "public native final void stopPreview();", "public void closeFrame() {\n framesize = wordpointer = bitindex = -1;\n }", "@Override\n\tpublic void close() {\n\t\tframe = null;\n\t\tclassic = null;\n\t\trace = null;\n\t\tbuild = null;\n\t\tbt_classic = null;\n\t\tbt_race = null;\n\t\tbt_build = null;\n\t\tGameView.VIEW.removeDialog();\n\t}", "public void onCameraOpened() {\n openCameraCommon();\n initializeControlByIntent();\n new Thread() {\n public void run() {\n try {\n Thread.sleep(500);\n PhotoModule.this.mIsCameraOpened = true;\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }.start();\n }", "public void surfaceDestroyed(SurfaceHolder holder) {\n mCamera.stopPreview();\n mCamera.release();\n mHolder.removeCallback(mPreview);\n preview = false;\n }", "@Override public void close() {\n\t\tthis.timer.cancel();\n\t\tthis.motionStream.removeListener(this);\n\t}", "@Override\r\n\t\tpublic void surfaceDestroyed(SurfaceHolder arg0) {\n\t\t\tIsRunning = false;\r\n\t\t}", "public void close(){\n \tisClosed = true;\n \tClawAct.set(true);\n\t\tRobot.oi.armRumble(RUMBLE_DURATION);\n }", "public void closeImage() {\n\n\t}", "@Override\n public void onCanceled(EasyImage.ImageSource source, int type) {\n if (source == EasyImage.ImageSource.CAMERA) {\n File photoFile = EasyImage.lastlyTakenButCanceledPhoto(MainActivity.this);\n if (photoFile != null) photoFile.delete();\n }\n }", "@Override\n public void onDisconnect(final UsbDevice device, final UsbControlBlock ctrlBlock) {\n if (mUVCCamera != null) {\n mUVCCamera.close();\n if (mPreviewSurface != null) {\n mPreviewSurface.release();\n mPreviewSurface = null;\n }\n }\n }", "@Override\n public void onClick(View arg0) {\n Intent i = new Intent(mContext, AddCameraThirdActivity.class);\n startActivity(i);\n finish();//@@8.10\n }", "public boolean canDismissWithTouchOutside() {\n return this.cameraOpened ^ 1;\n }", "@Override\n public void onOpened(CameraDevice cameraDevice) {\n mCameraOpenCloseLock.release();\n mCameraDevice = cameraDevice;\n createCameraPreviewSession();\n }", "@Override\n public void stop() throws Exception {\n mapView.dispose();\n map.dispose();\n System.exit(0);\n\n }", "@Override\n protected void onDestroy() {\n Bimp.tempSelectBitmap.clear();\n Bimp.max = 0;\n super.onDestroy();\n Constants.removeActivity(this);\n }", "public void closeGrabber() {\n grabberServo.setPosition(GRABBER_CLOSE);\n isGrab = false;\n }", "public void surfaceDestroyed(SurfaceHolder holder) {\n if (mCamera != null) {\n mCamera.setPreviewCallback(null);\n mCamera.stopPreview();\n mCamera.release();\n }\n mCamera = null;\n }", "@Override\n protected void onDestroy() {\n \tsuper.onDestroy();\n \tmActivities.removeActivity(\"AddCamera\");\n \tunregisterReceiver(receiver);\n }", "public void deactivate() {\n\t\tcameraNXT.enableTracking(false);\n\t}" ]
[ "0.819081", "0.80881274", "0.7260934", "0.7144884", "0.7136317", "0.7016478", "0.68920213", "0.68624574", "0.6841933", "0.6812349", "0.68049127", "0.67768633", "0.67685986", "0.674063", "0.66460407", "0.6603918", "0.6600197", "0.6600197", "0.6600033", "0.65916586", "0.65903795", "0.6564473", "0.65279543", "0.6526591", "0.6518447", "0.6476769", "0.64725345", "0.6454674", "0.6440186", "0.6426116", "0.64211875", "0.6408823", "0.6381997", "0.63772935", "0.63224244", "0.6316986", "0.63151515", "0.6314943", "0.63110447", "0.63093525", "0.6301668", "0.62920076", "0.62697035", "0.62569", "0.62545025", "0.6253917", "0.6249693", "0.62377644", "0.62345976", "0.6231464", "0.6213723", "0.61777276", "0.6174347", "0.6169776", "0.61599153", "0.61436385", "0.6140526", "0.61395156", "0.6116788", "0.61021703", "0.6099802", "0.60944635", "0.60927874", "0.60893375", "0.6057748", "0.60471934", "0.60381305", "0.60359216", "0.6031963", "0.60292304", "0.60257643", "0.6014675", "0.60048544", "0.60046744", "0.5994691", "0.5980291", "0.5979896", "0.5979896", "0.5968691", "0.5948731", "0.59459424", "0.59437674", "0.5941802", "0.5904438", "0.5897853", "0.5896336", "0.588362", "0.588242", "0.5877413", "0.5873143", "0.58545095", "0.5852079", "0.5841447", "0.58355254", "0.58343416", "0.583124", "0.58303636", "0.58284575", "0.5819756", "0.5818154", "0.58180344" ]
0.0
-1
Initiate a still image capture.
private void takePicture() { lockFocus(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void takePicture() {\n\n captureStillPicture();\n }", "public CaptureImage()\r\n\t{\r\n\t\tSystem.loadLibrary(Core.NATIVE_LIBRARY_NAME);\r\n\t\tcapturedFrame = new Mat();\r\n\t\tprocessedFrame = new Mat();\r\n\t\tboard = new byte[32];\r\n\t\tfor (int i=0;i<board.length;i++){\r\n\t\t\tboard[i] = 0;\r\n\t\t}\r\n\t\tcaptured = new byte[12];\r\n\t}", "private void startCapture() {\n if (checkAudioPermissions()) {\n requestScreenCapture();\n }\n }", "private void captureImage() {\n camera.takePicture(null, null, jpegCallback);\r\n }", "private void captureStillPicture() {\n try {\n final Activity activity = getActivity();\n if (null == activity || null == mCameraDevice) {\n return;\n }\n // This is the CaptureRequest.Builder that we use to take a picture.\n final CaptureRequest.Builder captureBuilder =\n mCameraDevice.createCaptureRequest(CameraDevice.TEMPLATE_STILL_CAPTURE);\n captureBuilder.addTarget(mImageReader.getSurface());\n\n // Use the same AE and AF modes as the preview.\n captureBuilder.set(CaptureRequest.CONTROL_AF_MODE,\n CaptureRequest.CONTROL_AF_MODE_CONTINUOUS_PICTURE);\n setAutoFlash(captureBuilder);\n\n // Orientation\n int rotation = activity.getWindowManager().getDefaultDisplay().getRotation();\n captureBuilder.set(CaptureRequest.JPEG_ORIENTATION, getOrientation(rotation));\n\n CameraCaptureSession.CaptureCallback CaptureCallback\n = new CameraCaptureSession.CaptureCallback() {\n\n @Override\n public void onCaptureCompleted(@NonNull CameraCaptureSession session,\n @NonNull CaptureRequest request,\n @NonNull TotalCaptureResult result) {\n Log.e(TAG, \"Saved:\" + mFile);\n Log.d(TAG, mFile.toString());\n unlockFocus();\n }\n };\n\n mCaptureSession.stopRepeating();\n mCaptureSession.abortCaptures();\n mCaptureSession.capture(captureBuilder.build(), CaptureCallback, null);\n } catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }", "private void captureImage() {\n //Information about intents: http://developer.android.com/reference/android/content/Intent.html\n //Basically used to start up activities or send data between parts of a program\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n //Obtains the unique URI which sets up and prepares the image file to be taken, where it is to be placed,\n //and errors that may occur when taking the image.\n fileUri = getOutputMediaFileUri(MEDIA_TYPE_IMAGE);\n //Stores this information in the Intent (which can be usefully passed on to the following Activity)\n intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);\n // start the image capture Intent (opens up the camera application)\n startActivityForResult(intent, CAMERA_CAPTURE_IMAGE_REQUEST_CODE);\n }", "void onCaptureStart();", "private void captureImage() {\n\t\tIntent intent = new Intent( MediaStore.ACTION_IMAGE_CAPTURE );\n\t\tmFileUri = getOutputMediaFileUri(); // create a file to save the image\n\t\tintent.putExtra(MediaStore.EXTRA_OUTPUT, mFileUri); // set the image file name\n\t\t// start the image capture Intent\n\t\tstartActivityForResult( intent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE );\n\t}", "@Override\n public void capture() {\n captureScreen();\n }", "public void takePictureInternal() {\n if (!this.isPictureCaptureInProgress.getAndSet(true)) {\n this.mCamera.takePicture(null, null, null, new Camera.PictureCallback() {\n /* class com.master.cameralibrary.Camera1.AnonymousClass3 */\n\n public void onPictureTaken(byte[] bArr, Camera camera) {\n Camera1.this.isPictureCaptureInProgress.set(false);\n Camera1.this.mCallback.onPictureTaken(bArr);\n camera.cancelAutoFocus();\n camera.startPreview();\n }\n });\n }\n }", "public void tryaAainPhoto() {\n\t\tthis.photo_attache_capture = false;\n\t}", "public Bitmap startCapture() {\n if (mMediaProjection == null) {\n return null;\n }\n Image image = mImageReader.acquireLatestImage();\n int width = image.getWidth();\n int height = image.getHeight();\n final Image.Plane[] planes = image.getPlanes();\n final ByteBuffer buffer = planes[0].getBuffer();\n int pixelStride = planes[0].getPixelStride();\n int rowStride = planes[0].getRowStride();\n int rowPadding = rowStride - pixelStride * width;\n Bitmap bitmap = Bitmap.createBitmap(width + rowPadding / pixelStride, height, Bitmap.Config.ARGB_8888);\n bitmap.copyPixelsFromBuffer(buffer);\n bitmap = Bitmap.createBitmap(bitmap, 0, 0, width, height ); //按范围截取图片\n image.close();\n Log.i(TAG, \"image data captured\");\n\n //Write local\n// final Bitmap finalBitmap = bitmap;\n// new Thread(){\n// @Override\n// public void run() {\n// super.run();\n// if( finalBitmap != null) {\n// try{\n// File fileImage = new File(getLocalPath());\n// if(!fileImage.exists()){\n// fileImage.createNewFile();\n// Log.i(TAG, \"image file created\");\n// }\n// FileOutputStream out = new FileOutputStream(fileImage);\n// if(out != null){\n// finalBitmap.compress(Bitmap.CompressFormat.PNG, 100, out);\n// out.flush();\n// out.close();\n// //发送广播刷新图库\n// Intent media = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);\n// Uri contentUri = Uri.fromFile(fileImage);\n// media.setData(contentUri);\n// mContext.sendBroadcast(media);\n// Log.i(TAG, \"screen image saved\");\n// }\n// }catch(Exception e) {\n// e.printStackTrace();\n// }\n// }\n// }\n// }.start();\n return bitmap;\n }", "public VideoCapture()\n {\n \n nativeObj = VideoCapture_0();\n \n return;\n }", "private void captureImage() {\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1);\n\n if (intent.resolveActivity(getPackageManager()) != null) {\n try {\n mImageFile = createImageFile();\n } catch (IOException ex) {\n Log.e(TAG, ex.getLocalizedMessage(), ex);\n }\n\n // Continue only if the File was successfully created\n if (mImageFile != null) {\n// intent.putExtra(MediaStore.EXTRA_OUTPUT,\n// Uri.fromFile(mImageFile));\n startActivityForResult(intent, IMAGE_CAPTURE_REQ_CODE);\n } else {\n Toast.makeText(this, R.string.error_capture_image, Toast.LENGTH_SHORT).show();\n }\n } else {\n Toast.makeText(this, R.string.no_cam_app, Toast.LENGTH_SHORT).show();\n }\n }", "protected void startCamera() {\n profileImageCaptured = new File(\n Environment.getExternalStorageDirectory() + \"/\" + \"temp.png\");\n if (profileImageCaptured.exists())\n profileImageCaptured.delete();\n\n outputFileUri = Uri.fromFile(profileImageCaptured);\n Intent intent = new Intent(\n android.provider.MediaStore.ACTION_IMAGE_CAPTURE);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);\n intent.putExtra(\"return-data\", true);\n startActivityForResult(intent, CAMERA_REQUEST);\n\n }", "private void runPrecaptureSequence() {\n try {\n // This is how to tell the camera to trigger.\n mPreviewRequestBuilder.set(CaptureRequest.CONTROL_AE_PRECAPTURE_TRIGGER,\n CaptureRequest.CONTROL_AE_PRECAPTURE_TRIGGER_START);\n // Tell #mCaptureCallback to wait for the precapture sequence to be set.\n mState = STATE_WAITING_PRECAPTURE;\n mCaptureSession.capture(mPreviewRequestBuilder.build(), mCaptureCallback,\n mBackgroundHandler);\n } catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }", "private void startCropImage() {\n }", "public void takePicture() {\n LightMeter lightMeter = new LightMeter(film.getSpeed());\n shutter.setSeconds(lightMeter.getRecommendedSpeed());\n aperture.setSize(lightMeter.getRecommendedAperture());\n shutter.trigger();\n }", "public RoeImage takePicture() \r\n {\r\n // return variable\r\n RoeImage result = new RoeImage();\r\n \r\n // take picture \r\n this.cam.read(this.frame);\r\n \r\n // update timestamp for image capturing\r\n this.timestamp = System.currentTimeMillis();\r\n \r\n // add picture to result\r\n result.SetImage(this.frame);\r\n \r\n // add timestamp of captured image\r\n result.setTimeStamp(this.timestamp);\r\n\r\n // the image captured with properties\r\n return result;\r\n }", "private void startRecord() {\n try {\n if (mIsRecording) {\n setupMediaRecorder();\n } else if (mIsTimelapse) {\n setupTimelapse();\n }\n SurfaceTexture surfaceTexture = mTextureView.getSurfaceTexture();\n surfaceTexture.setDefaultBufferSize(mPreviewSize.getWidth(), mPreviewSize.getHeight());\n Surface previewSurface = new Surface(surfaceTexture);\n Surface recordSurface = mMediaRecorder.getSurface();\n mCaptureRequestBuilder = mCameraDevice.createCaptureRequest(CameraDevice.TEMPLATE_RECORD);\n mCaptureRequestBuilder.addTarget(previewSurface);\n mCaptureRequestBuilder.addTarget(recordSurface);\n\n mCameraDevice.createCaptureSession(Arrays.asList(previewSurface, recordSurface, mImageReader.getSurface()),\n new CameraCaptureSession.StateCallback() {\n\n\n @Override\n public void onConfigured(CameraCaptureSession session) {\n\n mRecordCaptureSession = session;\n\n try {\n mRecordCaptureSession.setRepeatingRequest(mCaptureRequestBuilder.build(), null, null);\n } catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onConfigureFailed(@NonNull CameraCaptureSession session) {\n\n }\n }, null);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Override // com.master.cameralibrary.CameraViewImpl\n public void takePicture() {\n if (!isCameraOpened()) {\n throw new IllegalStateException(\"Camera is not ready. Call start() before takePicture().\");\n } else if (getAutoFocus()) {\n this.mCamera.cancelAutoFocus();\n this.mCamera.autoFocus(new Camera.AutoFocusCallback() {\n /* class com.master.cameralibrary.Camera1.AnonymousClass2 */\n\n public void onAutoFocus(boolean z, Camera camera) {\n Camera1.this.takePictureInternal();\n }\n });\n } else {\n takePictureInternal();\n }\n }", "private void onImageProcessed() {\n /* creating random bitmap and then using in TextureView.getBitmap(bitmap) instead of simple TextureView.getBitmap() will not cause lags & memory leaks */\n if (captureBitmap == null) {\n captureBitmap = Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888);\n }\n captureBitmap = Bitmap.createScaledBitmap(targetView.getBitmap(captureBitmap), captureW, captureH, false);\n\n if (captureProcessor != null) {\n if (isThreadingEnabled) {\n cameraThreadHandler.Queue(captureBitmap);\n }\n else {\n captureProcessor.process(captureBitmap, targetView, parentActivity);\n }\n /*\n else if (!skipNextFrame){\n long time = System.currentTimeMillis();\n captureProcessor.process(captureBitmap, targetView, parentActivity);\n time = System.currentTimeMillis() - time;\n if (time > 0.035)\n skipNextFrame = true;\n }\n else {\n skipNextFrame = false;\n }*/\n }\n }", "void startCapturing() {\n //YOUR CODE HERE\n\t if (hasCaptured() == false) {\n\t\t pieceCaptured = true;\n\t }\n }", "private void QueryScreenShot() {\n\t\tThread initThread = new Thread() {\n\t\t\tpublic void run() {\n\t\t\t\tlbIm1.setIcon(new ImageIcon(images.get(currentFrameNum)));\n\t\t\t}\n\t\t};\n\t\tinitThread.start();\n\t}", "public void camera(){\n System.out.println(\"I am taking pictures...\");\r\n }", "public Camera() {\n\t\treset();\n\t}", "public void startCamera()\n {\n startCamera(null);\n }", "public void capture()\r\n\t{ \r\n\t VideoCapture camera = new VideoCapture();\r\n\t \r\n\t camera.set(12, -20); // change contrast, might not be necessary\r\n\t \r\n\t //CaptureImage image = new CaptureImage();\r\n\t \r\n\t \r\n\t \r\n\t camera.open(0); //Useless\r\n\t if(!camera.isOpened())\r\n\t {\r\n\t System.out.println(\"Camera Error\");\r\n\t \r\n\t // Determine whether to use System.exit(0) or return\r\n\t \r\n\t }\r\n\t else\r\n\t {\r\n\t System.out.println(\"Camera OK\");\r\n\t }\r\n\t\t\r\n\t\t \r\n\t\tboolean success = camera.read(capturedFrame);\r\n\t\tif (success)\r\n\t\t{\r\n\t\t\ttry {\r\n\t\t\t\tprocessWithContours(capturedFrame, processedFrame);\r\n\t\t\t}\r\n\t\t\tcatch(Exception e){\r\n\t\t\t\tSystem.out.println(e);\r\n\t\t\t}\r\n\t\t //image.processFrame(capturedFrame, processedFrame);\r\n\t\t // processedFrame should be CV_8UC3\r\n\t\t \r\n\t\t //image.findCaptured(processedFrame);\r\n\t\t \r\n\t\t //image.determineKings(capturedFrame);\r\n\t\t \r\n\t\t int bufferSize = processedFrame.channels() * processedFrame.cols() * processedFrame.rows();\r\n\t\t byte[] b = new byte[bufferSize];\r\n\t\t \r\n\t\t processedFrame.get(0,0,b); // get all the pixels\r\n\t\t // This might need to be BufferedImage.TYPE_INT_ARGB\r\n\t\t img = new BufferedImage(processedFrame.cols(), processedFrame.rows(), BufferedImage.TYPE_INT_RGB);\r\n\t\t int width = (int)camera.get(Highgui.CV_CAP_PROP_FRAME_WIDTH);\r\n\t\t int height = (int)camera.get(Highgui.CV_CAP_PROP_FRAME_HEIGHT);\r\n\t\t //img.getRaster().setDataElements(0, 0, width, height, b);\r\n\t\t byte[] a = new byte[bufferSize];\r\n\t\t System.arraycopy(b, 0, a, 0, bufferSize);\r\n\r\n\t\t Highgui.imwrite(\"camera.jpg\",processedFrame);\r\n\t\t System.out.println(\"Success\");\r\n\t\t}\r\n\t\telse\r\n\t\t\tSystem.out.println(\"Unable to capture image\");\r\n\t\t\r\n\t camera.release();\r\n\t}", "private void previewCapturedImage() {\n try {\n imageProfile.setVisibility(View.VISIBLE);\n Log.d(\"preview\", currentPhotoPath);\n final Bitmap bitmap = CameraUtils.scaleDownAndRotatePic(currentPhotoPath);\n imageProfile.setImageBitmap(bitmap);\n } catch (NullPointerException e) {\n e.printStackTrace();\n }\n }", "public void startFrontCam() {\n }", "private void captureImages() {\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n\n imageFileUri = FileUtil.getOutputMediaFileUri(FileUtil.MEDIA_TYPE_IMAGE); // create a file to save the image\n intent.putExtra(MediaStore.EXTRA_OUTPUT, imageFileUri); // set the image file name\n\n // start the image capture Intent\n startActivityForResult(intent, FileUtil.CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE);\n }", "@FXML\n public void startCapture(ActionEvent event) throws IOException, PcapNativeException, NotOpenException {\n \tex = Executors.newScheduledThreadPool(3);\n \tallThreads = Executors.newFixedThreadPool(6);\n handle = DeviceListController.getPcapNetworkInterface().openLive(65535, PromiscuousMode.PROMISCUOUS, 50);\n \n //set to capture network in\n handle.setDirection(PcapDirection.IN);\n\n //start capture thread\n Capture cap = new Capture(handle);\n allThreads.execute(cap);\n \n //turn on defragmenter\n Runnable defrag = new Defragmenter();\n ex.scheduleAtFixedRate(defrag, 0, 1000, TimeUnit.MILLISECONDS);\n\n //detection engine\n DetectionHandler detectionHandler = new DetectionHandler();\n allThreads.execute(detectionHandler); \n \n //start db handler - has to be started last\n DatabaseHandler dbHandler = new DatabaseHandler();\n allThreads.execute(dbHandler);\n\n editRuleFileButton.setDisable(true);\n editRuleFilePath.setDisable(true);\n startButton.setDisable(true);\n stopButton.setDisable(false);\n }", "@Override\n public BufferedImage createScreenCapture(Rectangle screenRect) {\n if (screenRect == null) {\n return null;\n }\n WinFileMappingBuffer fm = createScreenCaptureAsFileMapping(screenRect);\n //return null;\n if (fm == null) {\n return null;\n }\n BufferedImage image = CreateBuffedImage(fm, false);\n fm.close();\n return image;\n }", "public void prepareVisionProcessing(){\n usbCamera = CameraServer.getInstance().startAutomaticCapture();\n /*\n MjpegServer mjpegServer1 = new MjpegServer(\"serve_USB Camera 0\", 1181);\n mjpegServer1.setSource(usbCamera);\n\n // Creates the CvSink and connects it to the UsbCamera\n CvSink cvSink = new CvSink(\"opencv_USB Camera 0\");\n cvSink.setSource(usbCamera);\n\n // Creates the CvSource and MjpegServer [2] and connects them\n CvSource outputStream = new CvSource(\"Blur\", PixelFormat.kMJPEG, 640, 480, 30);\n MjpegServer mjpegServer2 = new MjpegServer(\"serve_Blur\", 1182);\n mjpegServer2.setSource(outputStream);\n */\n }", "@Override\n public boolean capture() {\n if (mCameraState == SNAPSHOT_IN_PROGRESS || mCameraDevice == null) {\n return false;\n }\n setCameraState(SNAPSHOT_IN_PROGRESS);\n\n return true;\n }", "private void captureImage(){\n\t\t\n\t\t//Setup location\n\t\tLocationManager lm = (LocationManager)getSystemService(Context.LOCATION_SERVICE);\n\t\tLocation location = lm.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);\n\t\t\n\t\tdouble latitude = location.getLatitude();\n\t\tdouble longitude = location.getLongitude();\n\t\t\n\t\tIntent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n\t\t\n\t\tfileUri = getOutputMediaFileUri(MEDIA_TYPE_IMAGE, latitude, longitude);\n\t\t\n\t\tintent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);\n\t\t\n\t\t//Start the image capture Intent\n\t\tstartActivityForResult(intent, CAMERA_CAPTURE_IMAGE_REQUEST_CODE);\n\t}", "public void startCamera()\n \t{\n\t\t// start the video capture\n\t\t//this.capture.open(0);\n\t\tcapture.open(cameraNumber);\n\n\n\n\t\t// is the video stream available?\n\t\tif (capture.isOpened())\n\t\t{\n\t\t\t// grab a frame every 33 ms (30 frames/sec)\n\t\t\tRunnable frameGrabber = new Runnable() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void run()\n\t\t\t\t{\n\t\t\t\t\tgrabFrame();\n\t\t\t\t}\n\t\t\t};\n\n\t\t\ttimer = Executors.newSingleThreadScheduledExecutor();\n\t\t\ttimer.scheduleAtFixedRate(frameGrabber, 0, 500, TimeUnit.MILLISECONDS);\n\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// log the error\n\t\t\tSystem.err.println(\"Impossible to open the camera connection...\");\n\t\t}\n \t}", "@Override\n public void init() {\n startCamera();\n }", "public void onStart() {\n\n mVideoFolder = createVideoFolder();\n mImageFolder = createImageFolder();\n mMediaRecorder = new MediaRecorder();\n\n startBackgroundThread();\n\n if (mTextureView.isAvailable()) {\n // TODO: see Google Example add comments\n // pause and resume\n openCamera(mTextureView.getWidth(), mTextureView.getHeight());\n\n } else {\n // first time\n mTextureView.setSurfaceTextureListener(mSurfaceTextureListener);\n }\n }", "private void previewCapturedImage(){\n \ttry{\n \t\timgPreview.setVisibility(View.VISIBLE);\n \t\t\n \t\t//Bitmap Factory\n \t\tBitmapFactory.Options options = new BitmapFactory.Options();\n \t\t\n \t\t//Downsizing image as it throws OutOfMemory Exception for large images\n \t\toptions.inSampleSize = 4;\n \t\t\n \t\tfinal Bitmap bitmap = BitmapFactory.decodeFile(fileUri.getPath(), options);\n \t\t\n \t\timgPreview.setImageBitmap(bitmap);\n \t}catch(NullPointerException e){\n \t\te.printStackTrace();\n \t}catch(OutOfMemoryError e){\n \t\te.printStackTrace();\n \t}\n }", "private void startPreview() {\n if (cameraConfigured && camera!=null) {\n camera.startPreview();\n inPreview=true;\n }\n }", "@Override\n public void capture() {\n }", "@Override\n public void onClick(View v) {\n Cam.takePicture(shutterCallback, null, mPicture);\n// Cam.takePicture();\n }", "public void doVideoCapture() {\n /*\n r6 = this;\n r0 = r6.mPaused;\n if (r0 != 0) goto L_0x0043;\n L_0x0004:\n r0 = r6.mCameraDevice;\n if (r0 != 0) goto L_0x0009;\n L_0x0008:\n goto L_0x0043;\n L_0x0009:\n r0 = r6.mMediaRecorderRecording;\n if (r0 == 0) goto L_0x0042;\n L_0x000d:\n r0 = r6.mNeedGLRender;\n if (r0 == 0) goto L_0x0029;\n L_0x0011:\n r0 = r6.isSupportEffects();\n if (r0 == 0) goto L_0x0029;\n L_0x0017:\n r0 = r6.mCameraDevice;\n r1 = 0;\n r0.enableShutterSound(r1);\n r0 = r6.mAppController;\n r0 = r0.getCameraAppUI();\n r1 = r6.mPictureTaken;\n r0.takePicture(r1);\n goto L_0x0041;\n L_0x0029:\n r0 = r6.mSnapshotInProgress;\n if (r0 != 0) goto L_0x0041;\n L_0x002d:\n r0 = java.lang.System.currentTimeMillis();\n r2 = r6.mLastTakePictureTime;\n r2 = r0 - r2;\n r4 = 2000; // 0x7d0 float:2.803E-42 double:9.88E-321;\n r2 = (r2 > r4 ? 1 : (r2 == r4 ? 0 : -1));\n if (r2 >= 0) goto L_0x003c;\n L_0x003b:\n return;\n L_0x003c:\n r6.mLastTakePictureTime = r0;\n r6.takeASnapshot();\n L_0x0041:\n return;\n L_0x0042:\n return;\n L_0x0043:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.hmdglobal.app.camera.VideoModule.doVideoCapture():void\");\n }", "private void captureImageWithPermission() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n int rc = ActivityCompat.checkSelfPermission(this, Manifest.permission.CAMERA);\n if (rc == PackageManager.PERMISSION_GRANTED) {\n captureImage();\n } else {\n EasyPermissions.requestPermissions(\n this,\n getString(R.string.msg_no_camera_permission),\n RC_CAMERA,\n Manifest.permission.CAMERA);\n }\n } else {\n captureImage();\n }\n }", "private void DBScreenShot() {\n\t\tThread initThread = new Thread() {\n\t\t\tpublic void run() {\n\t\t\t\tlbIm2.setIcon(new ImageIcon(dbImages.get(currentDBFrameNum)));\n\t\t\t}\n\t\t};\n\t\tinitThread.start();\n\t}", "private void initCamera(SurfaceHolder surfaceHolder) {\n\t\tif (surfaceHolder == null) {\n\t\t throw new IllegalStateException(\"No SurfaceHolder provided\");\n\t\t }\n\t\tif (cameraManager.isOpen()) {\n\t\t Log.w(TAG, \"initCamera() while already open -- late SurfaceView callback?\");\n\t\t return;\n\t\t }\n\t\ttry {\n\t\t\tcameraManager.openDriver(surfaceHolder);\n\t\t\t// Creating the handler starts the preview, which can also throw a\n\t\t\t// RuntimeException.\n\t\t\t if (handler == null) {\n\t\t\t handler = new CaptureActivityHandler(this, null, null, \"UTF-8\", cameraManager);\n\t\t\t }\n\t\t\t decodeOrStoreSavedBitmap(null, null);\n\t\t} catch (IOException ioe) {\n\t\t\tLog.w(TAG, ioe);\n\t\t\t// displayFrameworkBugMessageAndExit();\n\t\t\tCommonTask.ShowMessage(this, \"IOException\\n\" + ioe.getMessage());\n\t\t} catch (RuntimeException e) {\n\t\t\t// Barcode Scanner has seen crashes in the wild of this variety:\n\t\t\t// java.?lang.?RuntimeException: Fail to connect to camera service\n\t\t\tLog.w(TAG, \"Unexpected error initializating camera\", e);\n\t\t\tCommonTask.ShowMessage(this, \"RuntimeException\\n\" + e.getMessage());\n\t\t\t// displayFrameworkBugMessageAndExit();\n\t\t}\n\t}", "public interface CaptureViewer {\n public void displayImage(Bitmap image);\n\n public void imageCleared();\n}", "@Override\n public void run() {\n preview.startAnimation(fadein);\n //Launch camera layout\n camera_linear.startAnimation(fadein);\n //Launch capture button\n captureButton.startAnimation(fadein);\n //Make these components visible\n preview.setVisibility(View.VISIBLE);\n captureButton.setVisibility(View.VISIBLE);\n camera_linear.setVisibility(View.VISIBLE);\n //Create onClickListener for the capture button\n captureButton.setOnClickListener(\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // get an image from the camera\n if(cameraRecorder.getSafeToTakePicture()) {\n Log.i(\"Taking Picture: \", \"Safe\");\n captureButton.setImageResource(R.drawable.kids_ui_record_anim_alt_mini);\n mCamera.takePicture(null, null, mPicture);\n cameraRecorder.setSafeToTakePicture(false);\n }\n\n else {\n Log.i(\"Taking Picture: \", \"Unsafe\");\n }\n }\n }\n );\n\n }", "private void takePicture() {\n\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n startActivityForResult(intent, REQUEST_CAMERA);\n\n }", "public void finishCapturing() {\n //YOUR CODE HERE\n\t pieceCaptured = false;\n\t \n }", "public void inicializarCaptura() {\n try {\n fingerprintSDK = new MatchingContext(); \n //Inicializa la captura de huella digital.\n GrFingerJava.initializeCapture(this); \n objpantprincipal.writeLog(\"**SDK de huella dactilar inicializado con éxito**\");\n } catch (Exception e) {\n //Si ocurre un error se cierra la aplicación.\n //If any error ocurred while initializing GrFinger,\n //writes the error to log\n Toolkit.getDefaultToolkit().beep();\n objpantprincipal.writeLog(e.getMessage());\n //System.exit(1);\n }\n }", "protected void setupCameraAndPreview() {\n\n //\n // always release\n //\n releaseImageObjects();\n releaseVideoCapturebjects(true);\n\n // now setup...\n if (isImageButtonSelected) {\n\n //\n // Image Camera can be fetched here\n //\n if (!isBackCameraSelected) {\n mCamera = getCameraInstance(frontCamera);\n } else {\n mCamera = getCameraInstance(backCamera);\n }\n\n if (mImageCapture == null) {\n // Initiate MImageCapture\n mImageCapture = new MImageCapture(MCameraActivity.this);\n }\n\n //\n // Set Orientation\n //\n setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR);\n // Create our Preview view and set it as the content of our activity.\n // Add the copyright as an overlay...\n if (mImageCapture.mCameraPreview == null) {\n previewView = (LinearLayout) findViewById(R.id.camera_preview);\n mImageCapture.setCameraPreview(this, mCamera);\n previewView.addView(mImageCapture.mCameraPreview);\n }\n } else {\n //\n // Set Orientation\n //\n setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);\n\n /** handle video here... */\n if (mVideoCapture == null) {\n // now start over\n mVideoCapture = new MVideoCapture(this);\n }\n // Create our Preview view and set it as the content of our activity.\n // Add the copyright as an overlay...\n if (mVideoCapture.mTextureView != null) {\n previewView = (LinearLayout) findViewById(R.id.camera_preview);\n previewView.addView(mVideoCapture.mTextureView);\n }\n }\n\n }", "public void takeRGBPicture() {\n\t\ttry {\n\t\t\tpixels = this.takeStillAsRGB(width, height, false);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n public void onClick(View v) {\n if(cameraRecorder.getSafeToTakePicture()) {\n Log.i(\"Taking Picture: \", \"Safe\");\n captureButton.setImageResource(R.drawable.kids_ui_record_anim_alt_mini);\n mCamera.takePicture(null, null, mPicture);\n cameraRecorder.setSafeToTakePicture(false);\n }\n\n else {\n Log.i(\"Taking Picture: \", \"Unsafe\");\n }\n }", "public void startTakingSnapShots() {\n setNumber(\"snapshot\", 0);\n }", "void onCaptureEnd();", "public boolean captureImage(int[][] image_pos) {\r\n\t\tbuttonListener.displayMessage(\"Capturing image at \" + Arrays.toString(getPosition()) + \" now\", 1);\r\n\t\tSystem.out.println(\"Capturing Image\");\r\n\t\ttry {\r\n\t\t\tTimeUnit.SECONDS.sleep(2);\r\n\t\t}\r\n\t\tcatch (Exception e){\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private void startPreview(CameraCaptureSession session) throws CameraAccessException{\n mPreviewBuilder.addTarget(mSurface);\n mPreviewBuilder.addTarget(mImageReader.getSurface());\n session.setRepeatingRequest(mPreviewBuilder.build(), mSessionCaptureCallback, mCamSessionHandler);\n }", "private void captureImageInitialization() {\n final String[] items = new String[] { \"Take from camera\",\n \"Select from gallery\" };\n\n ArrayAdapter<String> adapter = new ArrayAdapter<>(this,\n android.R.layout.select_dialog_item, items);\n\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n builder.setTitle(\"Select Image\");\n builder.setAdapter(adapter, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int item) { // pick from\n // Open camera\n if (item == 0) {\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n /**\n * Also specify the Uri to save the image on specified path\n * and file name. Note that this Uri variable also used by\n * gallery app to hold the selected image path.\n */\n mImageCaptureUri = Uri.fromFile(new File(Environment\n .getExternalStorageDirectory(), \"tmp_avatar_\"\n + String.valueOf(System.currentTimeMillis())\n + \".jpg\"));\n intent.putExtra(android.provider.MediaStore.EXTRA_OUTPUT,\n mImageCaptureUri);\n try {\n intent.putExtra(\"return-data\", true);\n startActivityForResult(intent, PICK_FROM_CAMERA);\n\n } catch (ActivityNotFoundException e) {\n e.printStackTrace();\n }\n } else {\n // Pick from file\n /**\n * To select an image from existing files, use\n * Intent.createChooser to open image chooser. Android will\n * automatically display a list of supported applications,\n * such as image gallery or file manager.\n */\n\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n intent.setType(\"image/*\");\n\n intent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n\n startActivityForResult(Intent.createChooser(intent, \"Complete action using\"), PICK_FROM_FILE);\n }\n }\n });\n dialog = builder.create();\n }", "@Override\n\t\tpublic void run() {\n\t\t\tsynchronized (mSync) {\n\t\t\t\t// 描画スレッドが実行されるまで待機\n\t\t\t\tif (!isRunning) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tmSync.wait();\n\t\t\t\t\t} catch (final InterruptedException e) {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tinit();\n\t\t\tif (egl.getGlVersion() > 2) {\n\t\t\t\tcaptureLoopGLES3();\n\t\t\t} else {\n\t\t\t\tcaptureLoopGLES2();\n\t\t\t}\n\t\t\t// release resources\n\t\t\trelease();\n//\t\t\tif (DEBUG) Log.v(TAG, \"captureTask finished\");\n\t\t}", "public void startGearCam() {\n }", "private void captureImage() {\n String imagename = \"urPics.jpg\";\n File file = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES) + File.separator + imagename);\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n FileUri = Uri.fromFile(file);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, FileUri);\n // start the image capture Intent\n startActivityForResult(intent, REQUEST_CODE_CAMERA);\n }", "@Override\n public void robotInit() {\n m_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n m_chooser.addOption(\"My Auto\", kCustomAuto);\n SmartDashboard.putData(\"Auto choices\", m_chooser);\n //starts the dual cameras\n CameraServer.getInstance().startAutomaticCapture(0);\n CameraServer.getInstance().startAutomaticCapture(1);\n //auto start (disabled atm)\n //pressBoy.setClosedLoopControl(true);\n pressBoy.setClosedLoopControl(false);\n \n \n }", "private void startCamera() {\n PreviewConfig previewConfig = new PreviewConfig.Builder().setTargetResolution(new Size(640, 480)).build();\n Preview preview = new Preview(previewConfig);\n preview.setOnPreviewOutputUpdateListener(output -> {\n ViewGroup parent = (ViewGroup) dataBinding.viewFinder.getParent();\n parent.removeView(dataBinding.viewFinder);\n parent.addView(dataBinding.viewFinder, 0);\n dataBinding.viewFinder.setSurfaceTexture(output.getSurfaceTexture());\n updateTransform();\n });\n\n\n // Create configuration object for the image capture use case\n // We don't set a resolution for image capture; instead, we\n // select a capture mode which will infer the appropriate\n // resolution based on aspect ration and requested mode\n ImageCaptureConfig imageCaptureConfig = new ImageCaptureConfig.Builder().setCaptureMode(ImageCapture.CaptureMode.MIN_LATENCY).build();\n\n // Build the image capture use case and attach button click listener\n ImageCapture imageCapture = new ImageCapture(imageCaptureConfig);\n dataBinding.captureButton.setOnClickListener(v -> {\n File file = new File(getExternalMediaDirs()[0], System.currentTimeMillis() + \".jpg\");\n imageCapture.takePicture(file, executor, new ImageCapture.OnImageSavedListener() {\n @Override\n public void onImageSaved(@NonNull File file) {\n String msg = \"Photo capture succeeded: \" + file.getAbsolutePath();\n Log.d(\"CameraXApp\", msg);\n dataBinding.viewFinder.post(\n () -> Toast.makeText(CameraXDemo.this, msg, Toast.LENGTH_SHORT).show()\n );\n }\n\n @Override\n public void onError(@NonNull ImageCapture.ImageCaptureError\n imageCaptureError, @NonNull String message, @Nullable Throwable cause) {\n String msg = \"Photo capture failed: \" + message;\n Log.e(\"CameraXApp\", msg, cause);\n dataBinding.viewFinder.post(\n () -> Toast.makeText(CameraXDemo.this, msg, Toast.LENGTH_SHORT).show()\n );\n }\n });\n });\n\n\n // Setup image analysis pipeline that computes average pixel luminance\n ImageAnalysisConfig analyzerConfig = new ImageAnalysisConfig.Builder().setImageReaderMode(\n ImageAnalysis.ImageReaderMode.ACQUIRE_LATEST_IMAGE).build();\n // Build the image analysis use case and instantiate our analyzer\n ImageAnalysis analyzerUseCase = new ImageAnalysis(analyzerConfig);\n analyzerUseCase.setAnalyzer(executor, new LuminosityAnalyzer());\n\n CameraX.bindToLifecycle(this, preview, imageCapture, analyzerUseCase);\n }", "@Override\r\n public void run() {\n currentHud.setReceivedPictureScreen();\r\n }", "private void StartSyncCapture() {\n\n new Thread(new Runnable() {\n\n @Override\n public void run() {\n SetTextOnUIThread(\"\");\n isCaptureRunning = true;\n try {\n FingerData fingerData = new FingerData();//predefined class to get result data\n\n //Method to capture finger print with in time out session\n int ret = mfs100.AutoCapture(fingerData, timeout,false);\n Log.e(\"StartSyncCapture.RET\", \"\"+ret);\n if (ret != 0) {\n SetTextOnUIThread(mfs100.GetErrorMsg(ret));\n } else {\n lastCapFingerData = fingerData;\n final Bitmap bitmap = BitmapFactory.decodeByteArray(fingerData.FingerImage(), 0,\n fingerData.FingerImage().length);\n activity.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n //set bitmap image to the image view\n imgFinger.setImageBitmap(bitmap);\n }\n });\n\n SetTextOnUIThread(\"Capture Success\");\n String log = \"\\nQuality: \" + fingerData.Quality()\n + \"\\nNFIQ: \" + fingerData.Nfiq()\n + \"\\nWSQ Compress Ratio: \"\n + fingerData.WSQCompressRatio()\n + \"\\nImage Dimensions (inch): \"\n + fingerData.InWidth() + \"\\\" X \"\n + fingerData.InHeight() + \"\\\"\"\n + \"\\nImage Area (inch): \" + fingerData.InArea()\n + \"\\\"\" + \"\\nResolution (dpi/ppi): \"\n + fingerData.Resolution() + \"\\nGray Scale: \"\n + fingerData.GrayScale() + \"\\nBits Per Pixal: \"\n + fingerData.Bpp() + \"\\nWSQ Info: \"\n + fingerData.WSQInfo();\n SetLogOnUIThread(log);\n\n SetData2(fingerData);\n\n }\n } catch (Exception ex) {\n SetTextOnUIThread(ex.toString());\n } finally {\n isCaptureRunning = false;\n }\n }\n }).start();\n }", "private void captureImage() {\n\n if (ContextCompat.checkSelfPermission(Main2Activity.this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(Main2Activity.this, new String[]{Manifest.permission.CAMERA, Manifest.permission.WRITE_EXTERNAL_STORAGE}, 0);\n } else {\n Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n if (takePictureIntent.resolveActivity(getPackageManager()) != null) {\n // Create the File where the photo should go\n try {\n\n photoFile = createImageFile();\n //displayMessage(getBaseContext(), photoFile.getAbsolutePath());\n //Log.i(\"path_check\", photoFile.getAbsolutePath());\n\n // Continue only if the File was successfully created\n if (photoFile != null) {\n Uri photoURI = FileProvider.getUriForFile(Main2Activity.this,\n \"com.example.mobileai.fileprovider\",\n photoFile);\n takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, photoURI);\n startActivityForResult(takePictureIntent, requestCode);\n }\n } catch (Exception ex) {\n // Error occurred while creating the File\n //displayMessage(getBaseContext(), ex.getMessage().toString());\n }\n\n\n } else {\n // displayMessage(getBaseContext(), \"Null\");\n }\n }\n\n\n }", "public void init(HardwareMap hwMap){\n int cameraMonitorViewID = hwMap.appContext.getResources().getIdentifier(\"cameraMonitorViewId\", \"id\", hwMap.appContext.getPackageName());\n phoneCam = OpenCvCameraFactory.getInstance().createInternalCamera(OpenCvInternalCamera.CameraDirection.BACK,cameraMonitorViewID);\n phoneCam.openCameraDevice();\n phoneCam.setPipeline(counter);\n phoneCam.openCameraDeviceAsync(new OpenCvCamera.AsyncCameraOpenListener()\n {\n @Override\n public void onOpened()\n {\n phoneCam.startStreaming(320, 240, OpenCvCameraRotation.UPRIGHT);\n }\n });\n }", "private void runMainLoop() {\n\n ImageProcessor imageViewer = new ImageProcessor();\n Mat webcamMatImage = new Mat();\n Image tempImage;\n\n //VideoCapture capture = new VideoCapture(0); // Capture from web cam\n VideoCapture capture = new VideoCapture(\"rtsp://192.168.2.64/Streaming/Channels/101\"); // Capture from IP Camera\n //VideoCapture capture = new VideoCapture(\"src/main/resources/videos/192.168.2.64_20160804140448.avi\"); // Capture avi file\n\n // Setting camera resolution\n capture.set(Videoio.CAP_PROP_FRAME_WIDTH, 800);\n capture.set(Videoio.CAP_PROP_FRAME_HEIGHT, 600);\n\n if (capture.isOpened()) { // Check whether the camera is instantiated\n while (true) { // Retrieve each captured frame in a loop\n capture.read(webcamMatImage);\n if (!webcamMatImage.empty()) {\n tempImage = imageViewer.toBufferedImage(webcamMatImage);\n ImageIcon imageIcon = new ImageIcon(tempImage, \"Captured Video\");\n imageLabel.setIcon(imageIcon);\n frame.pack(); // This will resize the window to fit the image\n } else {\n System.out.println(\" -- Frame not captured or the video has finished! -- Break!\");\n break;\n }\n }\n } else {\n System.out.println(\"Couldn't open capture.\");\n }\n }", "@Override\n public void robotInit() {\n // Hardware.getInstance().init();\n hardware.init();\n\n controllerMap = ControllerMap.getInstance();\n controllerMap.controllerMapInit();\n\n controllerMap.intake.IntakeInit();\n\n m_chooser.setDefaultOption(\"Default Auto\", kDefaultAuto);\n m_chooser.addOption(\"My Auto\", kCustomAuto);\n SmartDashboard.putData(\"Auto choices\", m_chooser);\n\n intakeCam = CameraServer.getInstance().startAutomaticCapture(\"Driver Camera :)\", 0);\n intakeCam.setPixelFormat(PixelFormat.kMJPEG);\n intakeCam.setResolution(160, 120);\n intakeCam.setFPS(15);\n // climberCam = CameraServer.getInstance().startAutomaticCapture(1);\n\n }", "private void getSampleImage() {\n\t\t_helpingImgPath = \"Media\\\\\"+_camType.toString()+_downStream.toString()+_camProfile.toString()+\".bmp\";\n//\t\tswitch( _downStream ){\n//\t\tcase DownstreamPage.LEVER_NO_DOWNSTREAM:\n//\t\t\tswitch ( _camProfile )\n//\t\t\t{\n//\t\t\tcase CamProfilePage.LEVER_BEAD_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.LEVER_DOUBLE_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.LEVER_GROOVE_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.LEVER_OUTER_CAM:\n//\t\t\t\tbreak;\t\n//\t\t\t}\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.LEVER_CRANK:\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.LEVER_FOUR_JOIN:\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.LEVER_PUSHER_TUGS:\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.CAMS_CRANK:\n//\t\t\tswitch ( _camProfile )\n//\t\t\t{\n//\t\t\tcase CamProfilePage.SLIDER_BEAD_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.SLIDER_DOUBLE_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.SLIDER_GROOVE_CAM:\n//\t\t\t\tbreak;\n//\t\t\tcase CamProfilePage.SLIDER_OUTER_CAM:\n//\t\t\t\tbreak;\n//\t\t\t}\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.CAMS_DOUBLE_SLIDE:\n//\t\t\tbreak;\n//\t\tcase DownstreamPage.CAMS_NO_DOWNSTREAM:\n//\t\t\tbreak;\n//\t\t}\n\t\t\n\t}", "private void takePhotosGoogle() throws Exception \n {\n UiObject swipeScreen = new UiObject(new UiSelector().resourceId(\"com.android.camera2:id/mode_options_overlay\"));\n swipeScreen.swipeRight(5);\n\n // switch to video mode\n UiObject changeModeToCapture = new UiObject(new UiSelector().descriptionMatches(\"Switch to Camera Mode\"));\n changeModeToCapture.click();\n sleep(sleepTime);\n\n // click to capture photos\n UiObject clickCaptureButton = new UiObject(new UiSelector().descriptionMatches(\"Shutter\"));\n\n for (int i = 0; i < iterations; i++) {\n clickCaptureButton.longClick();\n sleep(timeDurationBetweenEachCapture);\n }\n }", "public void disabledInit() {\n\t\tvision.disableCameraSaving();\n\t}", "public void disabledInit()\n {\n //cam.stopCapture();\n m_USBVCommand.start();\n }", "@Override\n public void imageFromCamera() {\n Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n if (takePictureIntent.resolveActivity(getPackageManager()) != null) {\n startActivityForResult(takePictureIntent, REQUEST_IMAGE_CAPTURE);\n }\n }", "protected void initialize() {\n \tm_cameraThread = new CameraThread();\n \tm_cameraThread.start();\n \tm_onTarget = false;\n \tm_moving = false;\n \tm_desiredYaw = Gyro.getYaw();\n \t\n \t\n \tcount = 0;\n }", "public void captureGame() {\n gameScreen = robot.createScreenCapture(rect);\n gamePixels = gameScreen.getRGB(0, 0, gameScreen.getWidth(),\n gameScreen.getHeight(), null, 0, gameScreen.getWidth());\n }", "void imReady();", "void onCaptureCompleted(CaptureRequest request, TotalCaptureResult result);", "private void videoRecordingPrepared() {\n Log.d(\"Camera\", \"videoRecordingPrepared()\");\n isCameraXHandling = false;\n // Keep disabled status for a while to avoid fast click error with \"Muxer stop failed!\".\n binding.capture.postDelayed(() -> binding.capture.setEnabled(true), 500);\n }", "public void onCameraOpened() {\n openCameraCommon();\n initializeControlByIntent();\n new Thread() {\n public void run() {\n try {\n Thread.sleep(500);\n PhotoModule.this.mIsCameraOpened = true;\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }.start();\n }", "@Override\n public void onClick(View arg0) {\n try {\n mPreview.captureImage();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }", "public static void letCamera(Activity activity) {\n\t\tIntent imageCaptureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n\t\tstrImgPath = Environment.getExternalStorageDirectory().toString()\n\t\t\t\t+ \"/dlion/\";// �����Ƭ���ļ���\n\t\tString fileName = new SimpleDateFormat(\"yyyyMMddHHmmss\")\n\t\t\t\t.format(new Date()) + \".jpg\";// ��Ƭ����\n\t\tFile out = new File(strImgPath);\n\t\tif (!out.exists()) {\n\t\t\tout.mkdirs();\n\t\t}\n\t\tout = new File(strImgPath, fileName);\n\t\tstrImgPath = strImgPath + fileName;// ����Ƭ�ľ���·��\n\n\t\tUri uri = Uri.fromFile(out);\n\t\timageCaptureIntent.putExtra(MediaStore.EXTRA_OUTPUT, uri);\n\t\timageCaptureIntent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 2);\n\t\tactivity.startActivityForResult(imageCaptureIntent, 1);\n\t}", "@FXML\r\n protected void startCamera() {\r\n // set a fixed width for the frame\r\n this.currentFrame.setFitWidth(600);\r\n // preserve image ratio\r\n this.currentFrame.setPreserveRatio(true);\r\n\r\n if (!this.cameraActive) {\r\n\r\n // start the video capture\r\n //this.capture.open(0);\r\n //Read the video (Chage video)\r\n this.capture.open(\"Faruri.m4v\");\r\n\r\n\r\n System.out.println(\"start capture...\");\r\n // is the video stream available?\r\n if (this.capture.isOpened()) {\r\n System.out.println(\"inif\");\r\n this.cameraActive = true;\r\n\r\n // grab a frame every 33 ms (30 frames/sec)\r\n Runnable frameGrabber = new Runnable() {\r\n\r\n @Override\r\n public void run() {\r\n // effectively grab and process a single frame\r\n Mat frame = grabFrame();\r\n\r\n//\t\t\t\t\t\t// convert and show the frame\r\n//\t\t\t\t\t\tImage imageToShow = Utils.mat2Image(frame);\r\n//\t\t\t\t\t\tupdateImageView(currentFrame, imageToShow);\r\n }\r\n };\r\n\r\n this.timer = Executors.newSingleThreadScheduledExecutor();\r\n this.timer.scheduleAtFixedRate(frameGrabber, 0, 33, TimeUnit.MILLISECONDS);\r\n\r\n // update the button content\r\n this.button.setText(\"Stop Video\");\r\n } else {\r\n // log the error\r\n System.err.println(\"Impossible to open the video...\");\r\n }\r\n } else {\r\n // the camera is not active at this point\r\n this.cameraActive = false;\r\n // update again the button content\r\n this.button.setText(\"Start Video\");\r\n\r\n // stop the timer\r\n this.stopAcquisition();\r\n }\r\n }", "public Vision() {\n\n visionCam = CameraServer.getInstance().startAutomaticCapture(\"HatchCam\", 0);\n visionCam.setVideoMode(PixelFormat.kMJPEG, 320, 240, 115200);\n \n int retry = 0;\n while(cam == null && retry < 10) {\n try {\n System.out.println(\"Connecting to jevois serial port ...\");\n cam = new SerialPort(115200, SerialPort.Port.kUSB1);\n System.out.println(\"Success!!!\");\n } catch (Exception e) {\n System.out.println(\"We all shook out\");\n e.printStackTrace();\n sleep(500);\n System.out.println(\"Retry\" + Integer.toString(retry));\n retry++;\n }\n }\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n }", "private static void releaseCameraAndPreview() {\n if (cam != null) {\n cam.release();\n cam = null;\n }\n }", "public void startDefaultCapture(View view) {\n Intent intent=new Intent(this,DefaultCaptureActivity.class);\n startActivityForResult(intent,RESULT_CODE_CAPTURE_DEFAULT);\n }", "@Override\n public void capture() {\n captureMySpace();\n }", "@Override\n public void capture() {\n captureMySpace();\n }", "@Override\n public void capture() {\n captureMySpace();\n }", "public void onCaptureClick(View button){\n\t\tcamera.takePicture(null, null, this);\n\t}", "boolean restoreBufferedImage();", "private boolean grabOnceBlocking() {\n long frameTime = videoSink.grabFrameNoTimeout(imageStorage);\n if (frameTime == 0) {\n log.warning(\"Error when grabbing frame from camera '\" + getName() + \"': \" + videoSink.getError());\n return false;\n } else {\n Image image = imageConverter.convert(imageStorage);\n if (getData() == null) {\n setData(new CameraServerData(getName(), image));\n } else {\n setData(getData().withImage(image));\n }\n }\n return true;\n }", "public void takeScreenShot();", "public void takeScreenShot() {\r\n \t\tgraph.clearSelection();\r\n \t\tgraph.showScreenShotDialog();\r\n \t}", "protected void initialize ()\n\t{\n\t\tSubsystems.goalVision.processNewImage();\n\t\t\n \t//Send positive values to go forwards.\n \tSubsystems.transmission.setLeftJoystickReversed(true);\n \tSubsystems.transmission.setRightJoystickReversed(true);\n\t}", "public default void onCaptureDevicesLoaded() { /* empty */ }", "public void onVideoRecordingStarted() {\n this.mUI.unlockCaptureView();\n }", "private void clickpic() {\n if (getApplicationContext().getPackageManager().hasSystemFeature(\n PackageManager.FEATURE_CAMERA)) {\n // Open default camera\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);\n\n // start the image capture Intent\n startActivityForResult(intent, 100);\n\n\n } else {\n Toast.makeText(getApplication(), \"Camera not supported\", Toast.LENGTH_LONG).show();\n }\n }" ]
[ "0.73084533", "0.71856374", "0.7028567", "0.6878867", "0.6532955", "0.64858645", "0.64834964", "0.6456495", "0.64400095", "0.63163525", "0.6301249", "0.62468773", "0.6100211", "0.60924256", "0.6057044", "0.60431314", "0.6030755", "0.60129994", "0.60012037", "0.5905046", "0.5892191", "0.5870249", "0.5825102", "0.5819025", "0.5814726", "0.5812317", "0.58027977", "0.5801415", "0.5766166", "0.57613605", "0.5751373", "0.57465696", "0.57444715", "0.5743429", "0.5743254", "0.57277715", "0.5693865", "0.56777006", "0.56712276", "0.56647485", "0.5663909", "0.5655386", "0.564881", "0.56388754", "0.5628445", "0.5617487", "0.5610048", "0.56018454", "0.55896586", "0.5581993", "0.555664", "0.5555816", "0.55550593", "0.55519", "0.5545793", "0.55454606", "0.55214626", "0.55169004", "0.5500048", "0.549141", "0.5483892", "0.5480695", "0.5480456", "0.5469453", "0.54466796", "0.5438001", "0.5429035", "0.54263586", "0.54236263", "0.54218996", "0.54029506", "0.5398756", "0.5398619", "0.53924376", "0.53922886", "0.53864753", "0.5377081", "0.5375836", "0.5373444", "0.5373124", "0.5365427", "0.5364378", "0.5363549", "0.5361802", "0.53550696", "0.5345004", "0.5339441", "0.5334005", "0.533255", "0.533255", "0.533255", "0.5320449", "0.53199035", "0.53029674", "0.5302288", "0.52979434", "0.52955014", "0.5290336", "0.52890307", "0.52865595" ]
0.6084847
14
Unlock the focus. This method should be called when still image capture sequence is finished.
private void unlockFocus() { if (DEBUG) MLog.d(TAG, "unlockFocus(): " + printThis()); try { // Reset the auto-focus trigger // 重置自动对焦 mPreviewRequestBuilder.set( CaptureRequest.CONTROL_AF_TRIGGER, CameraMetadata.CONTROL_AF_TRIGGER_CANCEL); setAutoFlash(mPreviewRequestBuilder); mCaptureSession.capture( mPreviewRequestBuilder.build(), // 这里好像可以设置为null mCaptureCallback, mBackgroundHandler); // After this, the camera will go back to the normal state of preview. mState = STATE_PREVIEW; // 打开连续取景模式 mCaptureSession.setRepeatingRequest( mPreviewRequest, // 如果想要拍照,那么绝不能设置为null // 如果单纯预览,那么可以设置为null mCaptureCallback, mBackgroundHandler); } catch (CameraAccessException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void unlockFocus() {\n try {\n // Reset the auto-focus trigger\n mPreviewRequestBuilder.set(CaptureRequest.CONTROL_AF_TRIGGER,\n CameraMetadata.CONTROL_AF_TRIGGER_CANCEL);\n setAutoFlash(mPreviewRequestBuilder);\n mCaptureSession.capture(mPreviewRequestBuilder.build(), mCaptureCallback,\n mBackgroundHandler);\n // After this, the camera will go back to the normal state of preview.\n mState = STATE_PREVIEW;\n mCaptureSession.setRepeatingRequest(mPreviewRequest, mCaptureCallback,\n mBackgroundHandler);\n } catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }", "private void unlockFocus() {\n try {\n // Reset the auto-focus trigger\n mCaptureRequestBuilder.set(CaptureRequest.CONTROL_AF_TRIGGER,\n CameraMetadata.CONTROL_AF_TRIGGER_CANCEL);\n mPreviewCaptureSession.capture(mCaptureRequestBuilder.build(), mPreviewCaptureCallback,\n mBackgroundHandler);\n // After this, the camera will go back to the normal state of preview.\n mCaptureState = STATE_PREVIEW;\n mPreviewCaptureSession.setRepeatingRequest(mPreviewRequest, mPreviewCaptureCallback,\n mBackgroundHandler);\n } catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }", "private void unlockFocus() {\n try {\n // Reset the auto-focus trigger\n if (mCaptureSession != null) {\n mPreviewRequestBuilder.set(CaptureRequest.CONTROL_AF_TRIGGER, CameraMetadata.CONTROL_AF_TRIGGER_CANCEL);\n mCaptureSession.capture(mPreviewRequestBuilder.build(), mCaptureCallback, mBackgroundHandler);\n // After this, the camera will go back to the normal state of preview.\n mState = STATE_PREVIEW;\n mCaptureSession.setRepeatingRequest(mPreviewRequest, mCaptureCallback, mBackgroundHandler);\n }\n } catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }", "private void lockFocus() {\n try {\n // This is how to tell the camera to lock focus.\n mPreviewRequestBuilder.set(CaptureRequest.CONTROL_AF_TRIGGER, CameraMetadata.CONTROL_AF_TRIGGER_START);\n // Tell #mCaptureCallback to wait for the lock.\n mState = STATE_WAITING_LOCK;\n mCaptureSession.capture(mPreviewRequestBuilder.build(), mCaptureCallback, mBackgroundHandler);\n } catch (CameraAccessException e) {\n e.printStackTrace();\n }\n }", "private void stopAcquisition() {\n if (this.timer != null && !this.timer.isShutdown()) {\n try {\n // stop the timer\n this.timer.shutdown();\n this.timer.awaitTermination(33, TimeUnit.MILLISECONDS);\n } catch (InterruptedException e) {\n // log any exception\n System.err.println(\"Exception in stopping the frame capture, trying to release the camera now... \" + e);\n }\n }\n\n if (this.capture.isOpened()) {\n // release the camera\n this.capture.release();\n }\n }", "public void unlock() {\n islandLocked = false;\n }", "private void takePicture() {\n lockFocus();\n }", "void unlockScanner() {\n\t\ttry {\n\t\t\t\n\t\t\tWindow window = getWindow(); // in Activity's onCreate() for instance\n\t\t\twindow.addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD);\n\t\t\n\t\t} catch (Exception ex) {\n\n\t\t}\n\t}", "private void stopAcquisition() {\r\n if (this.timer != null && !this.timer.isShutdown()) {\r\n try {\r\n // stop the timer\r\n this.timer.shutdown();\r\n this.timer.awaitTermination(33, TimeUnit.MILLISECONDS);\r\n } catch (InterruptedException e) {\r\n // log any exception\r\n System.err.println(\"Exception in stopping the frame capture, trying to close the video now... \" + e);\r\n }\r\n }\r\n\r\n if (this.capture.isOpened()) {\r\n // release the camera\r\n this.capture.release();\r\n }\r\n }", "@Override\n public void cancelAutoFocus() {\n mCameraDevice.cancelAutoFocus();\n if (mCameraState != SELFTIMER_COUNTING\n && mCameraState != SNAPSHOT_IN_PROGRESS) {\n setCameraState(IDLE);\n }\n setCameraParameters(UPDATE_PARAM_PREFERENCE);\n isTouchCalled = false;\n }", "public void stopPreview() {\n\t\tif (autoFocusManager != null) {\n\t\t\tautoFocusManager.stop();\n\t\t\tautoFocusManager = null;\n\t\t}\n\t\tif (camera != null && previewing) {\n//\t\t\tLog.d(TAG, \"stopPreview\");\n\t\t\tcamera.stopPreview();\n//\t\t\tpreviewCallback.setHandler(null, 0);\n\t\t\tpreviewing = false;\n\t\t}\n\t\t\n\t}", "public void endFocus() {\n\t\tlog.fine(\"Ending focus\");\n\t\tthis.placeTime = Calendar.getInstance().getTimeInMillis();\n\t\tthis.focusTime = 0;\n\t\tthis.focused = false;\n\t\tthis.userId = -1;\n\t}", "private void releaseCamera() {\n if (mCamera != null) {\n mCamera.stopPreview();\n mCamera.release();\n mCamera = null;\n }\n }", "public void releaseImagePreview() {\n previewView.removeView(mImageCapture.mCameraPreview);\n mImageCapture.mCameraPreview = null;\n }", "public synchronized void stopPreview() {\n if (autoFocusManager != null) {\n autoFocusManager.stop();\n autoFocusManager = null;\n }\n if (camera != null && previewing) {\n camera.getCamera().stopPreview();\n previewCallback.setHandler(null, 0);\n previewing = false;\n }\n }", "private void releaseCamera() {\n if (mCamera != null) {\n mCamera.stopPreview();\n mCamera.setPreviewCallback(null);\n mCamera.release();\n mCamera = null;\n }\n }", "private void releaseCamera() {\n if (mCamera != null) {\n mCamera.stopPreview();\n mCamera.setPreviewCallback(null);\n mCamera.release();\n mCamera = null;\n }\n }", "protected void closeCamera() {\n try {\n mCameraOpenCloseLock.acquire();\n if (null != mCameraDevice) {\n mCameraDevice.close();\n mCameraDevice = null;\n }\n if (null != mMediaRecorder) {\n mMediaRecorder.release();\n mMediaRecorder = null;\n }\n } catch (InterruptedException e) {\n throw new RuntimeException(\"Interrupted while trying to lock camera closing.\");\n } finally {\n mCameraOpenCloseLock.release();\n }\n }", "void releaseCamera() {\n\n if (mCamera != null) {\n mCamera.stopPreview();\n mCamera.release();\n }\n }", "private void setFocus() {\n\t\tif (held) {\n\t\t\tfocus.x = img.getWidth() / 2;\n\t\t\tfocus.y = img.getHeight();\n\t\t} else {\n\t\t\tfocus.x = img.getWidth();\n\t\t\tfocus.y = img.getHeight() /2;\n\t\t} // end else\n\t}", "public void onVideoRecordingStarted() {\n this.mUI.unlockCaptureView();\n }", "public synchronized void stopPreview() {\n if (autoFocusManager != null) {\n autoFocusManager.stop();\n autoFocusManager = null;\n }\n if (camera != null && previewing) {\n camera.getCamera().stopPreview();\n previewing = false;\n }\n }", "public void unlockBack()\n {\n m_bBackLock = false;\n }", "public void end()\r\n\t{\n\t\ttry{\r\n\t\tNIVision.IMAQdxStopAcquisition(curCam);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\t\n\t\t}\r\n\t}", "private void releaseCamera() {\n if(camera != null) {\n camera.stopPreview();\n camera.release();\n camera = null;\n }\n }", "@Override\n public void stop() {\n animatorThread = null;\n\n //Get rid of the objects necessary for double buffering.\n offGraphics = null;\n offImage = null;\n }", "public void releaseCamera()\n {\n\n if (mcCamera != null)\n {\n //stop the preview\n mcCamera.stopPreview();\n //release the camera\n mcCamera.release();\n //clear out the camera\n mcCamera = null;\n }\n }", "private void endDrawing() {\n\t\tp_view.getHolder().unlockCanvasAndPost(p_canvas);\n\t}", "public void stop(){\n if (mCamera != null){\n mCamera.stopPreview();\n mCamera.setPreviewCallback(null);\n mCamera.release();\n mCamera = null;\n }\n if (mHolder != null) {\n mHolder.getSurface().release();\n mHolder = null;\n }\n }", "public void clearFocusWithoutChangingState() {\n this.mFocusManager.removeMessages();\n this.mUI.clearFocus();\n this.mCameraDevice.cancelAutoFocus();\n this.mUI.clearEvoPendingUI();\n if (this.mEvoFlashLock != null) {\n this.mAppController.getButtonManager().enableButtonWithToken(0, this.mEvoFlashLock.intValue());\n this.mEvoFlashLock = null;\n }\n this.mFocusManager.setAeAwbLock(false);\n setCameraParameters(4);\n }", "public native final void stopPreview();", "@Override\n public void unlock() {\n }", "@Override // com.master.cameralibrary.CameraViewImpl\n public void stop() {\n Camera camera = this.mCamera;\n if (camera != null) {\n camera.stopPreview();\n }\n this.mShowingPreview = false;\n releaseCamera();\n }", "private void releaseCamera() {\n if (mCamera != null) {\n mCamera.release(); // release the camera for other applications\n mCamera = null;\n }\n }", "public void unlock() {\n setLock.unlock(this);\n }", "@Override\n public void onCaptureAreaReleased(Point point) {\n switch (this.mCameraType) {\n case 1: {\n this.setFocusPositionToDeviceAndViewFinder(point, FocusRectangles.FocusSetType.RELEASE);\n }\n default: {\n break;\n }\n case 2: {\n FastViewFinder.this.mStateMachine.sendEvent(StateMachine.TransitterEvent.EVENT_SCREEN_CLEAR, new Object[0]);\n }\n }\n FastViewFinder.this.mStateMachine.sendEvent(StateMachine.TransitterEvent.EVENT_CANCEL_TOUCH_ZOOM, new Object[0]);\n }", "public void releaseCameraAndPreview() {\n if (mCameraActivity.mCamera != null) {\n mCameraActivity.mCamera.setPreviewCallback(null);\n mCameraActivity.mCamera.stopPreview();\n mImageCapture.mSurfaceHolder.removeCallback(mCameraPreview);\n mCameraPreview.surfaceDestroyed(mImageCapture.mSurfaceHolder);\n mSurfaceHolder.getSurface().release();\n mSurfaceHolder = null;\n releaseCamera();\n }\n }", "protected void unlock() {\n synchronized ( lock )\n {\n lock.notify();\n }\n }", "public void unlockGarage()\n {\n m_bGarageLock = false;\n }", "public void stopRecording() {\n cameraPreview.stopRecording();\n mediaRecorder.stop(); // stop the recording\n releaseMediaRecorder(); // release the MediaRecorder object\n camera.lock(); // take camera access back from MediaRecorder\n isRecording = false;\n }", "@Override\n\tpublic void unlock() {\n\t\t\n\t}", "void onCaptureEnd();", "public final void stop() {\n isKeyPressed = false;\n keyReleased();\n }", "public void releaseOCR(){\n \tif(baseApi != null){ baseApi.end(); baseApi = null; } \n\t\tmState = State.UNINITIALIZED;\n }", "void unlockInputConnection() {\n if (proxyAdapterView == null) {\n return;\n }\n\n proxyAdapterView.setLocked(false);\n }", "public void loseFocus(){\r\n\t//\tthis.setId(\"single-image-widget\");\r\n//\t\t((ColumnViewPane) this.getParent()).refresh();\r\n\t\thasFocus = false;\r\n\t}", "public void stop() {\n\n\t\tif (!started.compareAndSet(true, false)) {\n\t\t\treturn;\n\t\t}\n\n\t\tLOG.debug(\"Stopping panel rendering and closing attached webcam\");\n\n\t\tupdater.stop();\n\t\tupdater = null;\n\n\t\timage = null;\n\n\t\ttry {\n\t\t\terrored = !webcam.close();\n\t\t} catch (WebcamException e) {\n\n\t\t\terrored = true;\n\n\t\t\tDisplay.getDefault().syncExec(new Runnable() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tredraw();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tthrow e;\n\t\t}\n\t}", "@SuppressLint(\"NewApi\")\n public void onPause() {\n Log.d(TAG, \"onPause\");\n try {\n mCameraOpenCloseLock.acquire();\n if (null != mCameraDevice) {\n mCameraDevice.close();\n mCameraDevice = null;\n Log.d(TAG, \"CameraDevice Close\");\n }\n } catch (InterruptedException e) {\n throw new RuntimeException(\"Interrupted while trying to lock camera closing.\");\n } finally {\n mCameraOpenCloseLock.release();\n }\n }", "public void onUnfocusAnimationShortCircuited() {\n mShortCircuitUnfocusAnimation = false;\n }", "public void stop() {\r\n\t\tisRecording = false;\r\n\t}", "private static void releaseCameraAndPreview() {\n if (cam != null) {\n cam.release();\n cam = null;\n }\n }", "@Override\n\tprotected void OnRelease() {\n\t\tsetSelected(false);\n\t}", "public void deactivate() {\n\t\tcameraNXT.enableTracking(false);\n\t}", "public void unlockDevice() {\n ((AndroidDriver) getDriver()).pressKey(new KeyEvent().withKey(AndroidKey.HOME));\n }", "public void abandonAudioFocus() {\n if (this.needAbandonAudioFocus && this.mAudioManager != null && this.mAudioFocusListener != null) {\n Log.m26i(TAG, \"abandonAudioFocus\");\n this.mAudioManager.abandonAudioFocusRequest(getAudioFocusRequest());\n }\n }", "private void finishReset() {\n DefenceField.fieldActivated = true;\n time.setPaused(false);\n nuiManager.closeScreen(DefenceUris.DEATH_SCREEN);\n }", "private void toggle_focus() {\n\t\ttry {\n\t\t\tif (!lock_autofocus) {\n\t\t\t\t//getCameraManager().requestAutoFocus(handler, R.id.auto_focus);\n\t\t\t\t\n\t\t\t\tlockAutoFocus.setBackgroundResource(R.drawable.eye_selected);\n\t\t\t} else {\n\t\t\t\tlockAutoFocus.setBackgroundResource(R.drawable.eye);\n\t\t\t\tstatusView.setText(getString(R.string.set_focus));\n\t\t\t\tCommonValues.getInstance().CameraMessage = CameraMessageStatus.Stopped;\n\t\t\t //getCameraManager().requestAutoFocus(handler, R.id.auto_focus);\n\t\t\t\t\n\t\t\t}\n\t\t\tlock_autofocus = !lock_autofocus;\n\t\t\tcameraManager.setAutoFocus(lock_autofocus);\n\t\t} catch (Exception oEx) {\n\n\t\t}\n\t}", "public native void exitScreenShotModeNative();", "@Override\r\n\tpublic void releaseObject() {\r\n\t\tfinished = false;\r\n\r\n\t\tarm.rotate(90);\r\n\r\n\t\topenHand();\r\n\t\ttry {\r\n\t\t\tThread.sleep(WAIT_TIME);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t}\r\n\r\n\t\tarm.rotate(-90);\r\n\t\tarm.stop();\r\n\t\tarm.flt();\r\n\t\tfinished = true;\r\n\t}", "@Override\n protected void onDestroy() {\n Bimp.tempSelectBitmap.clear();\n Bimp.max = 0;\n super.onDestroy();\n Constants.removeActivity(this);\n }", "@Override\n protected void onPause() {\n super.onPause();\n if (theCamera != null){\n theCamera.stopPreview();\n theCamera.release();\n theCamera = null;\n }\n }", "public void setScreenUnlockSecurityNone() {\n // try {\n // new LockPatternUtils(mContext).clearLock();\n // } catch (Exception e) {\n // // e.printStackTrace();\n // }\n }", "public final void release() {\n explicitlyLocked = false;\n byteBase.unlock();\n }", "@Override\n public void onFinish() {\n if (camera == null)\n return;\n\n Camera.Parameters parameters = camera.getParameters();\n parameters.setFocusAreas(null);\n if (supportedFocusModes == null)\n supportedFocusModes = getSupportedFocusModes(parameters);\n if (supportedFocusModes.get(FOCUS_CONTINUOUS_PICTURE)) {\n parameters.setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE);\n } else if (supportedFocusModes.get(FOCUS_CONTINUOUS_VIDEO)) {\n parameters.setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_VIDEO);\n }\n camera.setParameters(parameters);\n }", "public void closeGrabber() {\n grabberServo.setPosition(GRABBER_CLOSE);\n isGrab = false;\n }", "private void takePicture() {\n\n captureStillPicture();\n }", "public void stop ()\n\t{\n\t\tif (core.hasLock (frame))\n\t\t{\n\t\t\tif (model != null) model.stop();\n\t\t\tstop = true;\n\t\t}\n\t}", "@Override\r\n\tpublic boolean unlockIt() {\n\t\treturn false;\r\n\t}", "public void releaseVideoPreview() {\n previewView.removeView(mVideoCapture.mTextureView);\n }", "@Override public void stop() {\n\t\t_active = false;\n\t}", "public void unlock(){\n logger.log(Level. INFO,\"unlock() \"+lockState+\".\");\n this.lock.lock();\n logger.log(Level. INFO,\"unlock taking mutex :\"+lockState+\".\");\n switch(this.lockState){\n \t\t\tcase RLT:\n \t\t\tlockState = State.RLC;\n \t\t\tbreak;\n \t\t\tcase WLT:\n \t\t\tlockState = State.WLC;\n \t\t\tcase RLT_WLC:\n \t\t\tlockState = State.WLC;\t\n break;\n default:\n logger.log(Level.WARNING,\"Unlock with : \"+lockState+\".\");\n break;\n \t\t}\n this.available.signal();\t\n logger.log(Level.WARNING,\"SIGNAL\");\n this.lock.unlock();\n \t}", "public void notifyPausing() {\n if (mSurfaceTexture != null) {\n Log.d(TAG, \"renderer pausing -- releasing SurfaceTexture\");\n mSurfaceTexture.release();\n mSurfaceTexture = null;\n }\n if (mFullScreen != null) {\n mFullScreen.release(false); // assume the GLSurfaceView EGL context is about\n mFullScreen = null; // to be destroyed\n }\n mIncomingWidth = mIncomingHeight = -1;\n }", "public void endDrawing() {\r\n SelectionResult res = SelectionResult.getInstance();\r\n\r\n res.selection = selection;\r\n res.referenceY = selectedY;\r\n\r\n res.previewWidth = getWidth();\r\n res.previewHeight = getHeight();\r\n\r\n selectedY = -1;\r\n }", "private void Back() {\n this.dispose();\n tmrTime.stop();\n }", "public void unlock() {\n if(semaphore != null && semaphore.availablePermits() == 0) {\n semaphore.release();\n }\n }", "public void unlockUI (ProcessInfo pi)\r\n\t {\r\n\t\t this.setEnabled(true);\r\n\t\t this.setCursor(Cursor.getDefaultCursor());\r\n\t\t //\r\n\t\t //generateShipments_complete(pi);\r\n\t }", "public void stop() {\n\t\tmAudioManager.abandonAudioFocus(mOuterEventsListener);\n\t\tinternalStop();\n\t}", "private void release() {\n\t\tinitialized = false;\n\t\tpause();\n\t\tsetOnCompletionListener(null);\n\t\tgetMp().release();\n\t\tmp = null;\n\t}", "@Override\n protected void onPause() {\n closeCamera();\n\n stopBackgroundThread();\n super.onPause();\n }", "private void handleScreenTurnedOff() {\n DejankUtils.startDetectingBlockingIpcs(\"KeyguardUpdateMonitor#handleScreenTurnedOff\");\n Assert.isMainThread();\n this.mHardwareFingerprintUnavailableRetryCount = 0;\n this.mHardwareFaceUnavailableRetryCount = 0;\n for (int i = 0; i < this.mCallbacks.size(); i++) {\n KeyguardUpdateMonitorCallback keyguardUpdateMonitorCallback = this.mCallbacks.get(i).get();\n if (keyguardUpdateMonitorCallback != null) {\n keyguardUpdateMonitorCallback.onScreenTurnedOff();\n }\n }\n DejankUtils.stopDetectingBlockingIpcs(\"KeyguardUpdateMonitor#handleScreenTurnedOff\");\n }", "void deleteCurrentImageBuffered();", "private void unlockButton() {\n\t\tconversionPdf_Txt.setEnabled(true);\n\t\tavisJury.setEnabled(true);\n\t\tstatistique.setEnabled(true);\n bData.setEnabled(true);\n\t}", "public final void restore() {\r\n\t\tbi_image.restore();\r\n\t}", "public void deactivate()\n\t{\n\t\t_active = false;\n\t\t_leader.setObjectHandler(null);\n\t}", "@Override\n\tpublic boolean unlockIt() {\n\t\treturn false;\n\t}", "protected void end() {\n \t//Robot.motor.disable();\n \tRobot.motor.disable();\n }", "public synchronized void closeDriver() {\n if (camera != null) {\n camera.getCamera().release();\n camera = null;\n }\n }", "public void stop() {\n\tanimator = null;\n\toffImage = null;\n\toffGraphics = null;\n }", "public void tryLockFocus() {\n }", "public void release() {\n synchronized (mLock) {\n super.release();\n detachMediaController();\n setContentUri(PlayMode.NONE, null);\n setContentFd(PlayMode.NONE, null);\n setCurrentState(State.RELEASED);\n mContext = null;\n }\n }", "@Override\n public void onStop() {\n if(toggleButton.isChecked()) {\n toggleButton.setChecked(false);\n mediaRecorder.stop();\n mediaRecorder.reset();\n Log.v(TAG, \"Recording Stopped\");\n }\n\n mediaProjection = null;\n stopScreenSharing();\n }", "public static void pause() {\n\t\tmyWasPausedInPreview = false;\n\t\tif (myCurrentCamera != null) {\n\t\t\tif (myIsInPreview == true) {\n\t\t\t\tmyWasPausedInPreview = true;\n\t\t\t\tstop();\n\t\t\t}\n\n\t\t\tmyCurrentCamera.setPreviewCallbackWithBuffer(null);\n\t\t\tmyCurrentCamera.release();\n\t\t}\n\t}", "private void stop() {\r\n\t\tif (!running)\r\n\t\t\treturn;\r\n\t\trunning = false;\r\n\t\ttry {\r\n\t\t\tthread.join();//ends thread to close program correctly\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.exit(0);//closes canvas\r\n\t\t}\r\n\t}", "public void stop() {\n pause();\n if (isInPreviewMode) {\n isInPreviewMode = false;\n }\n seekTo(0, new OnCompletionListener() {\n @Override\n public void onComplete() {\n //no-op\n }\n });\n }", "private void closeCamera() {\n if (mCameraDevice != null) {\n mCameraDevice.close();\n mCameraDevice = null;\n }\n if (mIsRecording) {\n long elapsedMillis = SystemClock.elapsedRealtime() - mTimer.getBase();\n mTimer.stop();\n mTimer.setVisibility(View.GONE);\n scrollContents();\n mIsRecording = false;\n mRecordButton.setImageResource(R.drawable.ic_record_white);\n mMediaRecorder.stop();\n mMediaRecorder.reset();\n\n //Scan the file to appear in the device studio\n Intent mediaScannerIntent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);\n mediaScannerIntent.setData(Uri.fromFile(new File(mVideoFilePath)));\n sendBroadcast(mediaScannerIntent);\n\n logFirebaseVideoEvent(elapsedMillis);\n\n }\n if (mMediaRecorder != null) {\n mMediaRecorder.release();\n mMediaRecorder = null;\n }\n if (mAnimator != null && mAnimator.isStarted()) {\n mAnimator.cancel();\n }\n }", "protected void end() {\n // Robot.drive.setMoveVisionAssist(0);\n // Robot.drive.setTurnVisionAssist(0);\n Robot.limelight.setPipeline(1.0); \n }", "void removeFocus();", "public void pause() {\n // This must be safe to call multiple times.\n Util.validateMainThread();\n Log.d(TAG, \"pause()\");\n\n openedOrientation = -1;\n if (cameraInstance != null) {\n cameraInstance.close();\n cameraInstance = null;\n previewActive = false;\n }\n if (currentSurfaceSize == null && surfaceView != null) {\n SurfaceHolder surfaceHolder = surfaceView.getHolder();\n surfaceHolder.removeCallback(surfaceCallback);\n }\n if(currentSurfaceSize == null && textureView != null && Build.VERSION.SDK_INT >= 14) {\n textureView.setSurfaceTextureListener(null);\n }\n\n this.containerSize = null;\n this.previewSize = null;\n this.previewFramingRect = null;\n rotationListener.stop();\n\n fireState.previewStopped();\n }", "protected void ACTION_B_STOP(ActionEvent e) {\n\t\tcaptureState=false;\r\n\t\tCAPTAIN.finished();\r\n\t}", "public void onUnlockHintFinished() {\n super.onUnlockHintFinished();\n this.mNotificationStackScroller.setUnlockHintRunning(false);\n }" ]
[ "0.7994598", "0.7986453", "0.7944067", "0.6697191", "0.6481172", "0.646617", "0.6455761", "0.6430685", "0.641867", "0.639637", "0.6201543", "0.616481", "0.6141927", "0.61394435", "0.6132339", "0.6130657", "0.6130657", "0.6095788", "0.60863024", "0.60519296", "0.60391814", "0.60204494", "0.6015925", "0.60118365", "0.60066766", "0.5994985", "0.5984529", "0.5972354", "0.5965743", "0.595738", "0.5912324", "0.5906897", "0.58586997", "0.5839174", "0.58365417", "0.5834879", "0.58308095", "0.58281565", "0.58266026", "0.58241826", "0.58210546", "0.57950175", "0.57933104", "0.5789004", "0.5782419", "0.5762165", "0.5737709", "0.5697305", "0.5690336", "0.5666235", "0.5663366", "0.5643366", "0.5641686", "0.56373656", "0.56331563", "0.56265265", "0.5589962", "0.5579649", "0.5578025", "0.557654", "0.5557951", "0.5539944", "0.5532482", "0.55271685", "0.5523936", "0.55233455", "0.55229694", "0.5510969", "0.5510268", "0.5508689", "0.55059403", "0.550037", "0.5492101", "0.54778403", "0.5476531", "0.54730517", "0.5467672", "0.54644334", "0.5461023", "0.5443591", "0.54384875", "0.54361486", "0.54307276", "0.54299724", "0.54220945", "0.541977", "0.54078776", "0.54074097", "0.5402591", "0.54011965", "0.5400538", "0.5378921", "0.5376365", "0.53762907", "0.53738666", "0.53725713", "0.5368377", "0.53511757", "0.5347843", "0.53462243" ]
0.79731876
2
We cast here to ensure the multiplications won't overflow
@Override public int compare(Size lhs, Size rhs) { return Long.signum((long) lhs.getWidth() * lhs.getHeight() - (long) rhs.getWidth() * rhs.getHeight()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic int mul() {\n\t\treturn 0;\r\n\t}", "private void mul() {\n\n\t}", "int mul( int a , int b)\n {\n double c,d;\n \tif (a==0)\n\t c=65536;\n\tif(b==0)\n\t d=65536;\n c=(double)a;\n d=(double)b;\n a= (int)((c*d)%65537);\n return a;\n }", "@Override\r\n\tpublic void mul(int x, int y) {\n\t\t\r\n\t}", "@Override\n public BinaryType multiplyToBinary(BinaryType multiplicand) {\n int intMultiplicand = multiplicand.asInt().getValue();\n int intMultiplier = this.asInt().getValue();\n return TypeFactory.getIntType(intMultiplicand * intMultiplier).asBinary();\n }", "public T mul(T first, T second);", "private static native double mul(int n);", "public void multiply() {\n\t\t\n\t}", "public final void mul() {\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tpush(secondTopMostValue * topMostValue);\n\t\t}\n\t}", "@Override\n public IntType multiplyToInt(IntType multiplicand) {\n int intMultiplier = this.asInt().getValue();\n int intMultiplicand = multiplicand.getValue();\n return TypeFactory.getIntType(intMultiplicand * intMultiplier);\n }", "BaseNumber multiply(BaseNumber operand);", "abstract void mulS();", "@Override\n public FloatType multiplyToFloat(FloatType multiplicand) {\n double floatMultiplier = this.asFloat().getValue();\n double floatMultiplicand = multiplicand.getValue();\n return TypeFactory.getFloatType(floatMultiplicand * floatMultiplier);\n }", "@Override\n\tpublic double multiply(double in1, double in2) {\n\t\treturn 0;\n\t}", "@Override\n public Float mul(Float lhs, Float rhs) {\n\t\n\tfloat res = lhs*rhs;\n\treturn res;\n }", "@Override\npublic void mul(int a, int b) {\n\t\n}", "public Scalar mul(Scalar s) {\n\t\treturn new RealScalar(getValue() * ((RealScalar)s).getValue());\n\t}", "@Override\n\tpublic long multi(int num1, int num2) throws TException {\n\t\treturn Long.valueOf(num1 * num2); \n\t}", "public static Object multiply(Object val1, Object val2) {\n\t\tif (isFloat(val1) && isFloat(val2)) {\n\t\t\treturn ((BigDecimal) val1).multiply((BigDecimal) val2);\n\t\t} else if (isFloat(val1) && isInt(val2)) {\n\t\t\treturn ((BigDecimal) val1).multiply(new BigDecimal(\n\t\t\t\t\t(BigInteger) val2));\n\t\t} else if (isInt(val1) && isFloat(val2)) {\n\t\t\treturn new BigDecimal((BigInteger) val1)\n\t\t\t\t\t.multiply((BigDecimal) val2);\n\t\t} else if (isInt(val1) && isInt(val2)) {\n\t\t\treturn ((BigInteger) val1).multiply((BigInteger) val2);\n\t\t}\n\t\tthrow new OrccRuntimeException(\"type mismatch in multiply\");\n\t}", "public void multiply()\r\n {\r\n resultDoubles = Operations.multiply(leftOperand, rightOperand);\r\n resultResetHelper();\r\n }", "@Override\r\n\tpublic int mul(int a,int b) {\n\t\treturn a*b;\r\n\t}", "@Override\n\tpublic void mul(double dx, double dy) {\n\t\t\n\t}", "@Override\n public InterpreterValue mul(InterpreterValue v) {\n\n // If the given value is a IntegerValue create a new DoubleValue from\n // the multiplication-result\n if(v instanceof IntegerValue) return new DoubleValue(getValue() * ((IntegerValue) v).getValue());\n\n // If the given value is a DoubleValue create a new DoubleValue from\n // the multiplication-result\n if(v instanceof DoubleValue) return new DoubleValue(getValue() * ((DoubleValue) v).getValue());\n\n // In other case just throw an error\n throw new Error(\"Operator '*' is not defined for type double and \" + v.getName());\n\n }", "public void MUL( ){\n String tipo1 = pilhaVerificacaoTipos.pop().toString();\n String tipo2 = pilhaVerificacaoTipos.pop().toString();\n String val1 = dads.pop().toString();\n float fresult = -1;\n int iresult = -1;\n String val2 = dads.pop().toString();\n if(val1 != null && val2 != null){\n if (tipo1 != null && tipo2 != null){\n if(tipo1 == \"inteiro\" && tipo2 == \"real\"){\n fresult = Integer.parseInt(val1) * Float.parseFloat(val2);\n dads.push(fresult);\n pilhaVerificacaoTipos.push(\"real\");\n }else if(tipo1 == \"real\" && tipo2 ==\"inteiro\"){\n fresult = Integer.parseInt(val2) * Float.parseFloat(val1);\n dads.push(fresult);\n pilhaVerificacaoTipos.push(\"real\");\n }else if(tipo1 == \"real\" && tipo2 ==\"real\"){\n fresult = Float.parseFloat(val2) * Float.parseFloat(val1);\n dads.push(fresult);\n pilhaVerificacaoTipos.push(\"real\");\n }else if(tipo1 == \"inteiro\" && tipo2 ==\"inteiro\"){\n iresult = Integer.parseInt(val2) * Integer.parseInt(val1);\n dads.push(iresult);\n pilhaVerificacaoTipos.push(\"inteiro\");\n }\n else{\n mensagensErrosVM += \"\\nRUNTIME ERROR(1): essa instrução é válida apenas para valores inteiros ou reais.\";\n numErrVM += 1;\n return;\n }\n }else{\n mensagensErrosVM += \"\\nRUNTIME ERROR(2): não foi possível executar a instrução, tipo null encontrado.\";\n numErrVM += 1;\n return;\n }\n }else{\n mensagensErrosVM += \"\\nRUNTIME ERROR(3): não foi possível executar a instrução, valor null encontrado.\";\n numErrVM += 1;\n return;\n }\n\n\n\n topo += -1;\n ponteiro += 1;\n }", "abstract int multiplication(int num1, int num2);", "public void multiply(Object mulValue) {\r\n\r\n\t\tNumberOperation operator = new NumberOperation(this.value, mulValue) {\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tpublic Number doAnOperation() {\r\n\t\t\t\tTypeEnum typeOfResult = getFinalType();\r\n\t\t\t\tif(typeOfResult == TypeEnum.TYPE_INTEGER) {\r\n\t\t\t\t\treturn getO1().intValue() * getO2().intValue();\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn getO1().doubleValue() * getO2().doubleValue();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis.value = operator.doAnOperation();\r\n\t}", "@Override\n\tpublic double multiply(double a, double b) {\n\t\treturn (a*b);\n\t}", "Sum getMultiplier();", "public void mul() {\n //TODO: Fill in this method, then remove the RuntimeException\n throw new RuntimeException(\"RatPolyStack->mul() unimplemented!\\n\");\n }", "void mul(double val) {\r\n\t\tresult = result * val;\r\n\t}", "private Expr mult(Expr x) throws Err {\n if (x instanceof ExprUnary) {\n ExprUnary y=(ExprUnary)x;\n if (y.op==ExprUnary.Op.SOME) return ExprUnary.Op.SOMEOF.make(y.pos, y.sub);\n if (y.op==ExprUnary.Op.LONE) return ExprUnary.Op.LONEOF.make(y.pos, y.sub);\n if (y.op==ExprUnary.Op.ONE) return ExprUnary.Op.ONEOF.make(y.pos, y.sub);\n }\n return x;\n }", "public void testMultiply() {\r\n System.out.println(\"Multiply\");\r\n Double [][] n = new Double[][]{{-3., -2.5, -1., 0., 1., 2., 3.4, 3.5, 1.1E100, -1.1E100}, \r\n {-3., 2.5, 0., 0., 1., -2., 3., 3.7, 1.1E100, 1.1E100}, \r\n {9., -6.25, 0., 0., 1., -4., 10.2, 12.95, 1.21E200, -1.21E200}};\r\n for(int i = 0; i < 10; i++){\r\n Double x = n[0][i];\r\n Double y = n[1][i];\r\n double expResult = n[2][i];\r\n double result = MathOp.Multiply(x, y);\r\n assertEquals(expResult, result, 0.001);\r\n }\r\n }", "public BigInt multiply(BigInt rhs) throws BigIntException {\n if (null == rhs) {\n throw new BigIntException(\"null parameter\");\n }\n\n BigInt product = new BigInt(new ArrayList<Integer>(), true);\n ArrayList<Integer> digitProduct = new ArrayList<>();\n for (int i = 0; i < number.size(); ++i) {\n // Add zero's to the digit product\n for (int j = 0; j < i; ++j) {\n digitProduct.add(0);\n }\n\n // calculate the digit product\n int prod = 0;\n for (int j = 0; j < rhs.number.size(); ++j) {\n prod += (number.get(i) * rhs.number.get(j));\n digitProduct.add(prod % 10);\n prod = Math.floorDiv(prod, 10);\n }\n\n if (prod != 0) {\n digitProduct.add(prod);\n }\n\n // Sum the digit product to the number product\n product = product.plus(new BigInt(digitProduct, true));\n digitProduct.clear();\n }\n\n product.isPositive = (isPositive == rhs.isPositive);\n\n return product;\n }", "private void multiplication()\n\t{\n\t\tFun = Function.MULTIPLY; //Function set to determine what action should be taken later.\n\t\t\n\t\t\tsetLeftValue();\n\t\t\tentry.grabFocus();\n\t\t\n\t}", "@Test(expectedExceptions = IllegalArgumentException.class)\n\tpublic void testMultiplyWrongDimensions() {\n\t\tm1.multiply(m1);\n\t}", "Multiply createMultiply();", "public long product() {\n\t\tlong result = 1;\n\t\tfor (int i=0; i<numElements; i++) {\n\t\t\tresult *= theElements[i];\n\t\t}\n\t\treturn result;\n\t}", "@Override\n\tpublic int mult(int val1, int val2) {\n\t\treturn val1 * val2;\n\t}", "void subMult(long x, long y) {\n long pll = (x & LONG_MASK) * (y & LONG_MASK);\n long phl = (x >>> 32) * (y & LONG_MASK);\n long plh = (x & LONG_MASK) * (y >>> 32);\n long phh = (x >>> 32) * (y >>> 32);\n long s0 = (lo & LONG_MASK) - (pll & LONG_MASK);\n long s1 = (s0 >> 32) + (lo >>> 32) - (pll >>> 32) - (phl & LONG_MASK) - (plh & LONG_MASK);\n lo = (s0 & LONG_MASK) | (s1 << 32);\n long s2 = (s1 >> 32) + (hi & LONG_MASK) - (phl >>> 32) - (plh >>> 32) - (phh & LONG_MASK);\n long s3 = (s2 >> 32) + (hi >>> 32) - (phh >>> 32);\n hi = (s2 & LONG_MASK) | (s3 << 32);\n high += (int) (s3 >> 32);\n// BigInteger newV = toBigInteger();\n// assert oldV.subtract(DoubleParseHard64.longArrayToBigInteger(new long[]{x}, 1, false).multiply(DoubleParseHard64.longArrayToBigInteger(new long[]{y}, 1, false))).\n// equals(newV);\n }", "public static int mul(int value1, int value2){\r\n return value1 * value2;\r\n }", "int multiply (int a, int b) {\n\t\t//let me do it in one step\n\t\treturn a * b; \n\t\t\n\t\t\n\t}", "public static double mul(double a, double b){\r\n\t\treturn a*b;\r\n\t}", "public AncientEgyptianMultiplication( ) {\r\n }", "void multiply(double value);", "@Test\n public void test27() throws Throwable {\n Complex complex0 = new Complex(0.9999997615814209, 0.9999997615814209);\n try { \n complex0.multiply((Complex) null);\n } catch(IllegalArgumentException e) {\n //\n // null is not allowed\n //\n assertThrownBy(\"org.apache.commons.math.util.MathUtils\", e);\n }\n }", "public HugeUInt multiply(int arg) {\r\n HugeUInt result = new HugeUInt(this);\r\n int cur = 0;\r\n for (int i = 0; i < getSize(); i++) {\r\n int m = array[i] * arg + cur;\r\n cur = m / 10;\r\n result.array[i] = m % 10;\r\n }\r\n int[] tmp = new int[10];\r\n int ctr = 0;\r\n while (cur > 0) {\r\n tmp[ctr] = cur % 10;\r\n cur /= 10;\r\n ctr++;\r\n }\r\n int[] mult = new int[ctr+getSize()];\r\n if(ctr > 0){\r\n \tfor(int i = 0;i<getSize();i++){\r\n \t\tmult[i] = result.array[i];\r\n \t}\r\n \tfor(int i = 0;i<ctr;i++){\r\n \t\tmult[i+getSize()] = tmp[i];\r\n \t}\r\n \tresult.array = mult;\r\n }\r\n result.trim();\r\n return result;\r\n }", "private ASTNode binaryMultiplyRules(ASTNode left, ASTNode right) throws Exception {\n Token leftToken = left.getToken();\n Token rightToken = right.getToken();\n\n TokenType leftType = leftToken.getType();\n TokenType rightType = rightToken.getType();\n\n Token tempToken;\n TokenType numType = TokenType.NUMBER;\n TokenType minusType = TokenType.MINUS;\n TokenType mulType = TokenType.MUL;\n\n if (rightToken.getIdentifier().equals(\"0\")){\n //left is anything and right is 0\n tempToken = new Token(numType, \"0\");\n return new Num(tempToken);\n }\n else if (rightToken.getIdentifier().equals(\"1\")){\n //left is anything and right is 1\n return left;\n }\n else if (leftToken.getIdentifier().equals(\"0\")){\n //left is 0 and right is anything\n tempToken = new Token(numType, \"0\");\n return new Num(tempToken);\n }\n else if (leftToken.getIdentifier().equals(\"1\")){\n //left is 1 and right is anything\n return right;\n }\n else if(patternMatcher(leftType, rightType, numType, numType)){\n Double leftVal = Double.parseDouble(leftToken.getIdentifier());\n Double rightVal = Double.parseDouble(rightToken.getIdentifier());\n\n String prod = String.valueOf(leftVal * rightVal);\n tempToken = new Token(numType, prod);\n return new Num(tempToken);\n }\n else if (patternMatcher(leftType, rightType, minusType, minusType)){\n if (left instanceof UnaryOP && right instanceof UnaryOP){\n tempToken = new Token(mulType);\n ASTNode leftOP = ((UnaryOP) left).getOperand();\n ASTNode rightOp = ((UnaryOP) right).getOperand();\n return new BinaryOp(tempToken, leftOP, rightOp);\n }\n }\n tempToken = new Token(mulType);\n return new BinaryOp(tempToken ,left, right);\n }", "public BigDecimal multiplyNumbers(List<Integer> numbers) throws Exception;", "Double getMultiplier();", "@Override\r\n\tpublic int mulNo(int a, int b) {\n\t\treturn a*b;\r\n\t}", "public static void main(String[] args) {\ndouble anInt=1234;\nbyte aByte=12;\nshort aShort=12;\nlong aLong=1234567890987654321L;\ndouble anotherInt= (anInt * 10000000);\nSystem.out.println(\"The int is \" + anInt);\nSystem.out.println(\"The byte is \" + aByte);\nSystem.out.println(\"The short is \" + aShort);\nSystem.out.println(\"The long is \" + aLong);\nSystem.out.println(\"Another int is \" + anotherInt); \n\t}", "@Override\r\n\tpublic int multi(int x, int y) {\n\t\treturn x * y;\r\n\t}", "public static double multiply(int left, int right){\n return left * right;\n }", "@Override\r\n\tpublic double convert(double number) {\n\t\tfinal double value=0.08333;\r\n\t\treturn number*value;\r\n\t}", "LengthScalarMultiply createLengthScalarMultiply();", "public String multiply()\r\n {\r\n\r\n return First.multiply(Second).stripTrailingZeros().toString();\r\n }", "@ZenCodeType.Operator(ZenCodeType.OperatorType.MUL)\n default IData mul(IData other) {\n \n return notSupportedOperator(OperatorType.MUL);\n }", "@Override\n\tpublic float multiplicar(float op1, float op2) {\n\t\treturn op1 * op2;\n\t}", "@Override\n public void outMulExp(MulExp node){\n Type lexpType = this.mCurrentST.getExpType(node.getLExp());\n Type rexpType = this.mCurrentST.getExpType(node.getRExp());\n if(lexpType == Type.BYTE && rexpType == Type.BYTE){\n mPrintWriter.println(\"pop r18\");\n mPrintWriter.println(\"pop r22\");\n mPrintWriter.println(\"mov r24, r18\");\n mPrintWriter.println(\"mov r26, r22\");\n mPrintWriter.println(\"muls r24, r26\");\n mPrintWriter.println(\"push r1\");\n mPrintWriter.println(\"push r0\");\n\n mPrintWriter.println(\"eor r0,r0\");\n mPrintWriter.println(\"eor r1,r1\");\n }\n }", "final void mulV2() {\n\t\t\tV2Obj r = stack[--sp];\r\n\t\t\tV2Obj l = stack[--sp];\r\n\t\t\tV2Obj res = heap[hp++];\r\n\t\t\tres.a = l.a * r.a - l.a * r.b;\r\n\t\t\tres.b = l.a * r.b + l.b * r.a;\r\n\t\t\tstack[sp++] = res;\r\n\t\t}", "public static void main(String[] args) {\n PyObject v = Py.newLong(6), w = Py.newFloat(7.01);\n System.out.println(v._mul(w));\n }", "public StatementParse mulDivTransform(StatementParse node) {\n // This function is called on _every_ multiply and divide node.\n StatementParse node1 = node.getChildren().get(0);\n StatementParse node2 = node.getChildren().get(1);\n if (!(node1 instanceof IntegerParse) || !(node2 instanceof IntegerParse)){\n return node;\n }\n int value1 = ((IntegerParse) node1).getValue();\n int value2 = ((IntegerParse) node2).getValue();\n int result;\n if (node.getName().equals(\"*\")){\n result = value1 * value2;\n } else{ // div node\n if (value2 == 0) return node;\n result = value1 / value2;\n }\n\n IntegerParse newNode = new IntegerParse(result);\n if (node.isNegative()) newNode.setNegative(true);\n return newNode;\n }", "BigInteger multiply(long v) {\n if (v == 0 || signum == 0)\n return ZERO;\n if (v == BigDecimal.INFLATED)\n return multiply(BigInteger.valueOf(v));\n int rsign = (v > 0 ? signum : -signum);\n if (v < 0)\n v = -v;\n long dh = v >>> 32; // higher order bits\n long dl = v & LONG_MASK; // lower order bits\n\n int xlen = mag.length;\n int[] value = mag;\n int[] rmag = (dh == 0L) ? (new int[xlen + 1]) : (new int[xlen + 2]);\n long carry = 0;\n int rstart = rmag.length - 1;\n for (int i = xlen - 1; i >= 0; i--) {\n long product = (value[i] & LONG_MASK) * dl + carry;\n rmag[rstart--] = (int)product;\n carry = product >>> 32;\n }\n rmag[rstart] = (int)carry;\n if (dh != 0L) {\n carry = 0;\n rstart = rmag.length - 2;\n for (int i = xlen - 1; i >= 0; i--) {\n long product = (value[i] & LONG_MASK) * dh +\n (rmag[rstart] & LONG_MASK) + carry;\n rmag[rstart--] = (int)product;\n carry = product >>> 32;\n }\n rmag[0] = (int)carry;\n }\n if (carry == 0L)\n rmag = java.util.Arrays.copyOfRange(rmag, 1, rmag.length);\n return new BigInteger(rmag, rsign);\n }", "public static BigDecimal mul(BigDecimal a, BigDecimal b) {\n\t\treturn mul(a, b, 18);\n\t}", "private static Number convert(Number value, UnitConverter cvtr,\r\n \t\t\tMathContext ctx) {\r\n \t\tif (cvtr instanceof RationalConverter) { // Try converting through Field\r\n \t\t\t\t\t\t\t\t\t\t\t\t\t// methods.\r\n \t\t\tRationalConverter rCvtr = (RationalConverter) cvtr;\r\n \t\t\tBigInteger dividend = rCvtr.getDividend();\r\n \t\t\tBigInteger divisor = rCvtr.getDivisor();\r\n \t\t\tif (dividend.abs().compareTo(BigInteger.valueOf(Long.MAX_VALUE)) > 0)\r\n \t\t\t\tthrow new ArithmeticException(\"Multiplier overflow\"); //$NON-NLS-1$\r\n \t\t\tif (divisor.compareTo(BigInteger.valueOf(Long.MAX_VALUE)) > 0)\r\n \t\t\t\tthrow new ArithmeticException(\"Divisor overflow\"); //$NON-NLS-1$\r\n\t\t\tif (value instanceof BigInteger || value instanceof Long || value instanceof Integer) {\r\n\t\t\t\treturn (value.longValue() * dividend.longValue())\r\n \t\t\t\t\t/ (divisor.longValue());\r\n\t\t\t} else {\r\n\t\t\t\treturn (value.doubleValue() * dividend.doubleValue())\r\n\t\t\t\t\t/ (divisor.doubleValue());\r\n\t\t\t\t// TODO use actual BigDecimal methods for BigDecimal\r\n\t\t\t}\r\n \t\t} else if (cvtr instanceof AbstractConverter.Compound\r\n \t\t\t\t&& cvtr.isLinear()) { // Do it in two parts.\r\n \t\t\tAbstractConverter.Compound compound = (AbstractConverter.Compound) cvtr;\r\n \t\t\tNumber firstConversion = convert(value, compound.getRight(), ctx);\r\n \t\t\tNumber secondConversion = convert(firstConversion,\r\n \t\t\t\t\tcompound.getLeft(), ctx);\r\n \t\t\treturn secondConversion;\r\n \t\t} else { // Try using BigDecimal as intermediate.\r\n \t\t\tBigDecimal decimalValue = BigDecimal.valueOf(value.doubleValue());\r\n \t\t\tBigDecimal newValue = cvtr.convert(decimalValue, ctx);\r\n \t\t\treturn newValue;\r\n \t\t\t// if (((FieldNumber)value) instanceof Decimal)\r\n \t\t\t// return (N)((FieldNumber)Decimal.valueOf(newValue));\r\n \t\t\t// if (((FieldNumber)value) instanceof Float64)\r\n \t\t\t// return (N)((FieldNumber)Float64.valueOf(newValue.doubleValue()));\r\n \t\t\t// throw new ArithmeticException(\r\n \t\t\t// \"Generic amount conversion not implemented for amount of type \" +\r\n \t\t\t// value.getClass());\r\n \t\t}\r\n \t}", "private static void multiply(float[] a, float[] b, float[] destination) {\r\n\t\tfor(int i = 0; i < 4; i++){\r\n\t\t\tfor(int j = 0; j < 4; j++){\r\n\t\t\t\tfor(int k = 0; k < 4; k++){\r\n\t\t\t\t\tset(destination, i, j, get(destination, i, j) + get(a, i, k) * get(b, k, j));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void mul_(JType value) {\n TH.THTensor_(mul)(this, this, value);\n }", "public final void mult (double s) throws ArithmeticException {\n\t\tif (((mksa&_abs)!=0) && (s != 1)) throw new \t// On a date\n\t\tArithmeticException(\"****Unit.mult on a date!\");\n\t\tvalue *= s;\n\t\t// Offset not changed.\n\t}", "public double multiply(Coordinate other) {\n return _coord * other._coord;\n }", "private RealMatrix scalarMultiplication(RealMatrix matrix1, RealMatrix matrix2) {\n\t\tdouble a = matrix1.getEntry(0, 0);\n\t\tdouble b = matrix1.getEntry(1, 0);\n\t\tdouble c = matrix1.getEntry(2, 0);\n\t\tdouble d = matrix1.getEntry(3, 0);\n\t\t\n\t\tdouble[][] result = new double[matrix2.getRowDimension()][matrix2.getColumnDimension()];\n\t\t\n\t\tfor (int i=0; i < matrix2.getRowDimension(); i++) {\n\t\t\tfor (int j=0; j < matrix2.getColumnDimension(); j++) {\n\t\t\t\tif (i == 0) result[i][j] = a * matrix2.getEntry(i, j);\n\t\t\t\tif (i == 1) result[i][j] = b * matrix2.getEntry(i, j);\n\t\t\t\tif (i == 2) result[i][j] = c * matrix2.getEntry(i, j);\n\t\t\t\tif (i == 3) result[i][j] = d * matrix2.getEntry(i, j);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn MatrixUtils.createRealMatrix(result);\n\t}", "@RepeatedTest(20)\n void multTest(){\n assertEquals(f.mult(f), new Float(decimal*decimal));\n assertEquals(f.mult(g), new Float(decimal*random));\n assertEquals(f.mult(g), g.mult(f));\n assertEquals(f.mult(i), new Float(decimal*seed));\n assertEquals(f.mult(bi), new Float(decimal*bi.toInt(bi.getBinary())));\n assertEquals(i.mult(f), new Float(seed*decimal));\n assertEquals(i.mult(i), new Int(seed*seed));\n assertEquals(i.mult(j), new Int(seed*random));\n assertEquals(i.mult(j), j.mult(i));\n assertEquals(i.mult(bi), new Int(seed*bi.toInt(bi.getBinary())));\n\n //nulls\n //Bool * ITypes\n assertEquals(bot.mult(st),Null);\n assertEquals(bof.mult(st),Null);\n assertEquals(bot.mult(bot),Null);\n assertEquals(bof.mult(bot), Null);\n assertEquals(bot.mult(f), Null);\n assertEquals(bof.mult(i), Null);\n assertEquals(bot.mult(bi), Null);\n //Float * ITypes \\ {Numbers}\n assertEquals(f.mult(st), Null);\n assertEquals(f.mult(bot), Null);\n assertEquals(f.mult(bof), Null);\n //Int * ITypes \\ {Numbers}\n assertEquals(i.mult(st), Null);\n assertEquals(i.mult(bot),Null);\n assertEquals(i.mult(bof), Null);\n //Binary * ITypes \\ {Int, Binary}\n assertEquals(bi.mult(st), Null);\n assertEquals(bi.mult(bot), Null);\n assertEquals(bi.mult(f), Null);\n //NullType multiplications\n assertEquals(Null.mult(st), Null);\n assertEquals(Null.mult(bof), Null);\n assertEquals(Null.mult(f), Null);\n assertEquals(Null.mult(i), Null);\n assertEquals(Null.mult(bi), Null);\n assertEquals(Null.mult(Null), Null);\n assertEquals(st.mult(Null), Null);\n assertEquals(bot.mult(Null), Null);\n assertEquals(f.mult(Null), Null);\n assertEquals(i.mult(Null), Null);\n assertEquals(bi.mult(Null), Null);\n }", "static Integer mul(final Integer a, final Integer b) {\n\t\tif (a > b) {\n\t\t\treturn doMul(a, b, null);\n\t\t} else {\n\t\t\treturn doMul(b, a, null);\n\t\t}\n\t}", "public final void mult (Unit unit) throws ArithmeticException {\n\t\tlong u = mksa ; double r = factor; double v = value; double o = offset;\n\t\t/* dump(\"mult:this \"); unit.dump(\"mult:unit\"); */\n\t\tif (((mksa&_abs)!=0) && (unit.factor != 1)) throw\t// On a date\n\t\tnew ArithmeticException(\"****Unit.mult on a date!\");\n\t\tif (((mksa|unit.mksa)&_log) != 0) {\n\t\t\tif ((mksa == underScore) && (factor == 1.)) ;\n\t\t\telse if ((unit.mksa == underScore) && (unit.factor == 1.)) ;\n\t\t\telse throw new ArithmeticException\n\t\t\t(\"****Unit: can't multiply logs: \" + symbol + \" x \" + unit.symbol);\n\t\t}\n\t\t/* As soon as there is an operation, the offset is ignored \n\t\t * except if one of the factors is unity.\n\t\t */\n\t\tif ((offset!=0) || (unit.offset!=0)) {\n\t\t\tif (mksa == underScore) offset = unit.offset;\n\t\t\telse if (unit.mksa == underScore) ;\n\t\t\telse offset = 0;\n\t\t}\n\t\tv *= unit.value; \n\t\tr *= unit.factor;\n\t\tu += unit.mksa; u -= underScore;\n\t\tif ((u&0x0c80808080808080L) != 0) throw new ArithmeticException\n\t\t(\"****too large powers in: \" + symbol + \" x \" + unit.symbol);\n\t\tmksa = u;\n\t\tfactor = r;\n\t\tvalue = v;\n\t\t/* Decision for the new symbol */\n\t\tif ((symbol != null) && (unit.symbol != null)) {\n\t\t\tif ((unit.mksa == underScore) && (unit.factor == 1)) return;\t// No unit ...\n\t\t\tif (( mksa == underScore) && ( factor == 1)) symbol = unit.symbol;\n\t\t\telse if ((symbol.equals(unit.symbol)) && (factor == unit.factor))\n\t\t\t\tsymbol = toExpr(symbol) + \"2\" ;\n\t\t\telse symbol = toExpr(symbol) + \".\" + toExpr(unit.symbol) ;\n\t\t}\n\t}", "@Test\n public void testMultiplyAll() {\n System.out.println(\"multiplyAll\");\n int multiplier = 0;\n int[] numbers = null;\n int[] expResult = null;\n int[] result = ArrayExerciseB.multiplyAll(multiplier, numbers);\n assertArrayEquals(expResult, result);\n }", "public void enfoncerMult() {\n\t\ttry {\n\t\t\tthis.op = new Mult();\n\t\t\tif (!raz) {\n\t\t\t\tthis.pile.push(valC);\n\t\t\t}\n\t\t\tint a = this.pile.pop(); int b = this.pile.pop();\n\t\t\tthis.valC = this.op.eval(b,a);\n\t\t\tthis.pile.push(this.valC);\n\t\t\tthis.raz = true;\n\t\t}\n\t\tcatch (EmptyStackException e) {\n\t\t\tSystem.out.println(\"Erreur de syntaxe : Saisir deux operandes avant de saisir un operateur\");\n\t\t}\n\t}", "@Override\n public Value64 read() {\n int s = input0.read().intValue();\n int t = input1.read().intValue();\n long d = 0;\n switch (mduOp.read().byteValue()) {\n case AluOp.Multiply:\n d = s * t;\n break;\n case AluOp.Divide:\n d = s / t;\n break;\n }\n return new Value64(d);\n }", "private String multiply(String strOP1, String strOP2) {\n if (log4j.isDebugEnabled())\n log4j.debug(\"CreateCashFlowStatement - multiply - strOP1 - \" + strOP1 + \" - strOP2 - \"\n + strOP2);\n BigDecimal op1 = new BigDecimal(strOP1);\n BigDecimal op2 = new BigDecimal(strOP2);\n op1 = op1.setScale(200);\n op2 = op2.setScale(200);\n String strResult = \"\";\n try {\n strResult = op1.multiply(op2).toString();\n } catch (Exception e) {\n e.printStackTrace();\n log4j.warn(\"Servlet CreateCashFlowStatement - multiply - Exception\");\n }\n return strResult;\n }", "public final void prod (Unit unit) throws ArithmeticException {\n\t\tUnit runit, tunit;\n\n\t\tif (((mksa&_log)==0) && ((unit.mksa&_log)==0)) {\n\t\t\tmult(unit); \n\t\t\treturn; \n\t\t}\n\n\t\t/* Convert to non-log Unit */\n\t\trunit = new Unit(this);\n\t\ttunit = new Unit(unit);\n\t\tif ((runit.mksa&_log) != 0) {\n\t\t\trunit.mksa &= ~(_log|_mag);\n\t\t\trunit.convertFrom(this);\n\t\t}\n\t\tif ((tunit.mksa&_log) != 0) {\n\t\t\ttunit.mksa &= ~(_log|_mag);\n\t\t\ttunit.convertFrom(this);\n\t\t}\n\t\trunit.mult(tunit) ;\n\t\tif ((mksa&_log) != 0) {\t\t// Convert to log scale\n\t\t\tif ((mksa&_mag) != 0) runit.mag() ;\n\t\t\telse runit.log() ;\n\t\t}\n\t\t// Copy the result\n\t\tset(runit);\n\t\t// System.arraycopy(runit, 0, this, 0, 1) ; // this = runit;\n\t}", "public void multiply(double multiplier) {\n x *= multiplier;\n y *= multiplier;\n }", "public void multiplication(){\n ObjEmp obj1 = this.depile();\n ObjEmp obj2 = this.depile();\n try{ \n obj2.multiplication(obj1);\n this.empile(obj2);\n }\n catch(NullPointerException nullPE){\n try{\n writer.write(\"Impossible to multiply : either obj1=\"+obj1+\" or obj2=\"+obj2+ \" is null\\n\");\n writer.flush();\n }\n catch(IOException e){\n printStream.println(\"I/O exception!!!\");\n }\n if(obj2 != null)\n this.empile(obj2);\n if(obj1 != null)\n this.empile(obj1);\n }\n }", "@Test\n public void testMultiplic() {\n System.out.println(\"multiplic\");\n float num1 = 0.0F;\n float num2 = 0.0F;\n float expResult = 0.0F;\n float result = Calculadora_teste.multiplic(num1, num2);\n assertEquals(expResult, result, 0.0);\n \n }", "Point mult (double s, Point result);", "public static <T extends Vector> T Multiply(T a, T b,T result){\n if(Match(a,b)) {\n for (int i = 0; i < result.axis.length; i++) {\n result.axis[i] = a.axis[i] * b.axis[i];\n }\n return result;\n }\n return result;\n }", "public void arithmeticMultiplication(Operator operatorType, Operator clickedOperator) {\n switch (operatorType) {\n case ADDITION, SUBTRACT -> {\n if (numberStored[1] == 0) {\n operatorAssigned = operatorType;\n numberStored[1] = Double.parseDouble(mainLabel.getText());\n } else {\n //numberStored[1] = numberStored[1] / Double.parseDouble(mainLabel.getText());\n numberStored[1] = basicCalculation(numberStored[1], Double.parseDouble(mainLabel.getText()), clickedOperator);\n mainLabel.setText(Double.toString(hasNegSign(numberStored[1])));\n }\n }\n case MULTIPLY, DIVIDE -> {\n if (numberStored[1] != 0) {\n //numberStored[1] = numberStored[1] / Double.parseDouble(mainLabel.getText());\n numberStored[1] = basicCalculation(numberStored[1], Double.parseDouble(mainLabel.getText()), operatorType);\n mainLabel.setText(Double.toString(numberStored[1]));\n } else {\n numberStored[0] = basicCalculation(numberStored[0], Double.parseDouble(mainLabel.getText()), operatorType);\n mainLabel.setText(Double.toString(numberStored[0]));\n }\n }\n case POW -> {\n double exp = Double.parseDouble(mainLabel.getText());\n double result = Math.pow(numberStored[2], exp);\n numberStored[2] = 0;\n\n if (numberStored[1] != 0) {\n numberStored[1] = basicCalculation(numberStored[1], result, operatorBfPow);\n mainLabel.setText(Double.toString(numberStored[1]));\n } else {\n numberStored[0] = basicCalculation(numberStored[0], result, operatorBfPow);\n mainLabel.setText(Double.toString(numberStored[0]));\n }\n operatorBfPow = Operator.NON;\n }\n default -> numberStored[0] = Double.parseDouble(mainLabel.getText());\n }\n }", "public T elementMult( T b ) {\n convertType.specify(this, b);\n T A = convertType.convert(this);\n b = convertType.convert(b);\n\n T c = A.createLike();\n A.ops.elementMult(A.mat, b.mat, c.mat);\n return c;\n }", "private double convertToDbl(Object a) {\n double result = 0;\n\n //If the object is a Character...\n if(a instanceof Character){\n char x = (Character)a;\n result = (double)(x - '0'); // -'0' as it will convert the ascii number (e.g 4 is 52 in ascii) to the standard number\n }\n\n //If it is a Double...\n else if(a instanceof Double){\n result = (Double)a;\n }\n\n return result;\n }", "private static long mapType1QuantValues(long entries, long dimension) {\n return (long) Math.floor(Math.pow(entries, 1.d / dimension));\n }", "public static void main (String[] args){\n int myValue = 2_000;\n\n //Byte = 2^8 (8 bits - 1 byte)\n byte myByteValue = 10;\n\n //Java promotes variables to int to perform any binary operation.\n //Thus, results of expressions are integers. In order to store the result\n //in a variables of different type, explicit cast is needed.\n //The parenthesis are needed to cast the whole expression.\n byte myNewByteValue = (byte)(myByteValue/2);\n\n\n //Short = 2^16 (16 bits - 2 bytes)\n short myShort = 1_000;\n short myNewShortValue = (short)(myShort/2);\n /*\n Long = 2^64 (64 bits - 8 bytes)\n Without L suffix, Java considers the literal as an integer.\n Since int is a smaller type than long, int is auto casted and stored as a long\n without information loss (underflow or overflow)\n */\n long myLongValue = 100_000L;\n\n //Exercise:\n //Converts the expression automatically to long, since sizeof(long) > sizeof(int)\n //This rule applies for any two types that one is lager than the order, since the smaller is stored into the larger.\n //Otherwise, a explicit cast is need, like the short type below\n long myNewLongValue = 50_000L + 10L *(myByteValue+myShort+myValue);\n short myShortCastedValue = (short) (100 + 2*(myByteValue+myNewShortValue+myValue));\n System.out.println(myNewLongValue);\n System.out.println(myShortCastedValue);\n }", "public static BIGNUM multiply(BIGNUM bn1, BIGNUM bn2) {\n\t\tdouble multiply = bn1.NUM * bn2.NUM;\n\t\tdouble newE = bn1.E + bn2.E;\n\t\t//System.out.println(\"multiply function: \" + multiply + \"\\t\" + newE);\n\t\tBIGNUM result = new BIGNUM(multiply, newE);\n\t\treturn result;\n\t}", "private int[] multiply(int[] x, int[] y, int[] z)\n {\n for (int i = z.length - 1; i >= 0; i--)\n {\n long a = z[i] & IMASK;\n long value = 0;\n\n for (int j = y.length - 1; j >= 0; j--)\n {\n value += a * (y[j] & IMASK) + (x[i + j + 1] & IMASK);\n\n x[i + j + 1] = (int)value;\n\n value >>>= 32;\n }\n\n x[i] = (int)value;\n }\n\n return x;\n }", "public int multiply(int a,int b) throws RemoteException;", "public <V extends Number> FluentExp<V> times (SQLExpression<V> expr)\n {\n return new Mul<V>(this, expr);\n }", "public int multiply(int x, int y) {\n int n1 = x; //n1 = c_n * 2^n + c_n-1 * 2^n-1 + ... + c_1 * 2 + c_0 * 1 where c_i = {0, 1} \n int n2 = y; //n2 = c_m * 2^m + c_m-1 * 2^m-1 + ... + c_1 * 2 + c_0 * 1 where c_i ] {0, 1}\n int sum = 0; //named sum b/c represent the product of n1 and n2 as the sum of their constituent parts\n /*\n let n1 be rep as in its binary form (***...***) a bit string\n n1*n2 = (***...***)(c_m * 2^m + ... + c_0 * 1)\n = (***...***)(c_0 * 1) + (***...***)(c_1 * 2) + ... + (***...***)(c_m * 2^m)\n since << has the effect of multiplying a number by 2, can rep as\n = (***...***)(c_0 * 1) + (***...***)(c_1 * 1) << 1 + (***...***)(c_2 * 1) << 2 + ... + (***...***)(c_m * 1) << m\n so for each loop through a loop left shift n1 by one to simulate multiplying the next term by 2\n also right shift n2 to find c_i, the value of the bit in the bit string n2\n */\n while (n2 != 0) { // if n2 == 0 run through the length of n2 and nothing left to do\n if ((n2 & 1) == 0) { //find the last bit of n2; if it is 0 then do nothing because the n1 term will be multiplied by 0\n } else {//else it is 1 so add n1 to the sum\n sum = add(sum, n1); //bitwise addition has already been defined (implemented)\n }\n n1 = n1 << 1; //leftshift n1 to mult by 2; see above comments\n n2 = n2 >>> 1; //rightshift n2 to find value of next bit in bit string\n }\n return sum;\n }", "protected MatrixToken _multiplyElement(Token rightArgument)\n\t\t\tthrows IllegalActionException {\n\t\tlong scalar;\n\t\tif (rightArgument instanceof LongMatrixToken) {\n\t\t\tif (((LongMatrixToken) rightArgument).getRowCount() != 1\n\t\t\t\t\t|| ((LongMatrixToken) rightArgument).getColumnCount() != 1) {\n\t\t\t\t// Throw an exception.\n\t\t\t\treturn super._moduloElement(rightArgument);\n\t\t\t}\n\t\t\tscalar = ((LongMatrixToken) rightArgument).getElementAt(0, 0);\n\t\t} else {\n\t\t\tscalar = ((LongToken) rightArgument).longValue();\n\t\t}\n\t\tlong[] result = LongArrayMath.multiply(_value, scalar);\n\t\treturn new LongMatrixToken(result, _rowCount, _columnCount, DO_NOT_COPY);\n\t}", "public static byte GMul(int a, int b) {\n\n byte p = 0;\n byte counter;\n byte hi_bit_set;\n for (counter = 0; counter < 8; counter++) {\n if ((b & 1) != 0) {\n p ^= a;\n }\n hi_bit_set = (byte) (a & 0x80);\n a <<= 1;\n if (hi_bit_set != 0) {\n a ^= 0x1b; /* x^8 + x^4 + x^3 + x + 1 */\n }\n b >>= 1;\n }\n return p;\n}", "public static String mult(String bytes,int size, int value){\n if(value<=1||size<1||size>bytes.length()||!Cript2010x8b.USEDIVMULT) return bytes; \n value=Math.abs(value);\n \n size=Operations.multAndDivFixer(size);\n \n String out=\"\"; \n int max=bytes.length()/size; \n if(bytes.length()%size!=0) \n max++; \n for(int i=0;i<max;i++){ \n String subStr=\"\"; \n for(int l=0;l<size;l++) \n try{ \n subStr+=bytes.charAt(i*size+(size-l-1)); \n }catch(Exception e){ \n String bug=bytes.substring(i*size); \n bug=addLong(bug,1,value); \n return out+bug; \n } \n BigInteger current=strToBInt(subStr); \n current=current.multiply(BigInteger.valueOf(value)); \n while(current.compareTo(BigInteger.valueOf(2).pow(8*size))>0)current=current.add(BigInteger.valueOf(2).pow(8*size).negate()); \n while(current.compareTo(BigInteger.ZERO)<0)current=current.add(BigInteger.valueOf(2).pow(8*size)); \n \n out+=BintToStr(current,size); \n } \n return out; \n }", "public void multiply(Object mulValue) {\n\t\tvalue = operate(\n\t\t\t\ttransform(value),\n\t\t\t\ttransform(mulValue),\n\t\t\t\t(v1, v2) -> v1 * v2,\n\t\t\t\t(v1, v2) -> v1 * v2\n\t\t);\n\t}", "static double convert(double in) {\n return (in * 0.254);\n }", "public int multi(Integer x, Integer y) {\n\t\treturn x*y;\n\t}", "public int producto(){\r\n return x*y;\r\n }", "@Test\n\tpublic void multiplyTest() {\n\t\t\n\t\tFraction expected = new Fraction(10, 200);\n\t\tFraction actual = y.multiply(x);\n\n\t\tassertEquals(expected.getNumerator(), actual.getNumerator());\n\t\tassertEquals(expected.getDenominator(), actual.getDenominator());\n\t\tassertEquals(expected.toString(), actual.toString());\n\t}" ]
[ "0.6908364", "0.66634375", "0.63965327", "0.63280904", "0.62943107", "0.61848056", "0.61254025", "0.61102873", "0.61073506", "0.61052406", "0.60968256", "0.60906345", "0.6079607", "0.6035606", "0.601618", "0.6000751", "0.60002416", "0.5997322", "0.5987571", "0.5974536", "0.5918767", "0.59136236", "0.5880263", "0.5842789", "0.58365506", "0.58241093", "0.581746", "0.5814837", "0.5728664", "0.569111", "0.56278807", "0.5602641", "0.5593747", "0.5585678", "0.55558044", "0.5550755", "0.55479676", "0.55448717", "0.55446184", "0.5526266", "0.55104816", "0.55069137", "0.5494675", "0.54922163", "0.5468012", "0.54655087", "0.5453621", "0.5438476", "0.5437747", "0.54288006", "0.5410678", "0.540196", "0.53963727", "0.53867215", "0.53818274", "0.5378127", "0.537504", "0.53715926", "0.5364943", "0.535468", "0.5354251", "0.53460956", "0.53217286", "0.5308589", "0.5307565", "0.52904254", "0.5262041", "0.52549136", "0.52448595", "0.5242433", "0.5237461", "0.5229225", "0.5222831", "0.52213407", "0.5211003", "0.5210712", "0.52086544", "0.5203414", "0.5201862", "0.5198805", "0.5198527", "0.5198405", "0.5186431", "0.51855457", "0.5183768", "0.5183241", "0.5182983", "0.5173039", "0.51704377", "0.51667535", "0.51660424", "0.5165492", "0.5161227", "0.5159504", "0.51576173", "0.51562417", "0.51472414", "0.5143079", "0.5141426", "0.5141284", "0.51358616" ]
0.0
-1
Driver class main method
public static void main(String[] args) throws Exception { KegiatanSatu keg1 = new KegiatanSatu(); System.out.println("Kegiatan Satu"); keg1.kegiatanSatu(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args){\n //The driver of the methods created above\n //first display homeowork header\n homeworkHeader();\n //calls driver method\n System.out.println(\"Calling driver method:\");\n driver(true);//runs choice driver\n //when prompted for a choice input 9 to see test driver\n System.out.println(\"End calling of driver method\");\n \n }", "public static void main(String[] args) {\n\t\tDriver driveClass = new Driver();\r\n\t\tdriveClass.runDriver();\r\n\t}", "public static void main() {\n \n }", "public static void main(String[] args){\n new Testing().runTests();\r\n \r\n }", "public static void main()\n\t{\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\tDriver driver = new Driver();\n\t\t\tdriver.init();\n\t\t\tdriver.run();\n\t}", "public static void main(){\n\t}", "public static void main(String[] args) {\r\n// Use for unit testing\r\n }", "public static void main(String[] args) {\r\n // 2. Call your method in various ways to test it here.\r\n }", "public static void main(String[] args) {\n\n experiment();\n }", "public static void main(String[] args) {\n\t\tDriver driver = new BenzDriver();\r\n\t\tCar car = driver.driverCar();\r\n\t\tcar.driver();\r\n\t}", "public static void main(String args[]) throws Exception\n {\n \n \n \n }", "public static void main() {\n }", "public static void main(String[] args) {\n \n \n \n \n }", "public void main(){\n }", "public Main() {\n \n \n }", "public static void main(String[] args) {\n \n \n }", "public static void main(String[] args) {\n \n \n }", "public Main() {\r\n\t}", "public static void main(String[] args) {\n demoClass();\n }", "public static void main(String[] args) {\n demoClass();\n }", "public static void main (String[] args) {\n\n Config config = ConfigUtils.loadConfig(\"/home/gregor/git/matsim/examples/scenarios/pt-tutorial/0.config.xml\");\n// config.controler().setLastIteration(0);\n// config.plans().setHandlingOfPlansWithoutRoutingMode(PlansConfigGroup.HandlingOfPlansWithoutRoutingMode.useMainModeIdentifier);\n// Scenario scenario = ScenarioUtils.loadScenario(config);\n// Controler controler = new Controler(scenario);\n// controler.run();\n\n\n// Config config = this.utils.loadConfig(IOUtils.extendUrl(ExamplesUtils.getTestScenarioURL(\"pt-tutorial\"), \"0.config.xml\"));\n config.controler().setLastIteration(1);\n config.plans().setHandlingOfPlansWithoutRoutingMode(PlansConfigGroup.HandlingOfPlansWithoutRoutingMode.useMainModeIdentifier);\n\n\n// try {\n Controler controler = new Controler(config);\n// final EnterVehicleEventCounter enterVehicleEventCounter = new EnterVehicleEventCounter();\n// final StageActivityDurationChecker stageActivityDurationChecker = new StageActivityDurationChecker();\n// controler.addOverridingModule( new AbstractModule(){\n// @Override public void install() {\n// this.addEventHandlerBinding().toInstance( enterVehicleEventCounter );\n// this.addEventHandlerBinding().toInstance( stageActivityDurationChecker );\n// }\n// });\n controler.run();\n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) throws Exception {\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t}", "@Test\n public void testMain() {\n System.out.println(\"main\");\n String[] args = null;\n GOL_Main.main(args);\n }", "public static void main(String[] args) {\n // PUT YOUR TEST CODE HERE\n }", "public void Main(){\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tAbstractexample c =new Abstractexample();\r\n\t\tc.run();\r\n\t\t\r\n\t}", "public Main() {}", "public static void main(String[] args) {\n \n \n \n\t}", "public Main() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\r\n\t}", "public static void main(String[] args)\r\t{", "public Main() {\r\n }", "public Main() {\r\n }", "public static void main(String[] args) {\n\t \t\n\t \t\n\t }", "@Test\n public void main() {\n MainApp.main(new String[] {});\n }", "public static void main() {\n\t\tElectionDriverCode EDC = new ElectionDriverCode();\n\t\tSystem.setOut(EDC.fileout());\n\t}", "public static void main(String[] args) {\n \n\n }", "public static void main(String[] args) {\n\t\t\n\t\tSystem.out.println(\"main method\");\n\t\ttest();\n\t\t//RunprogramwithoutObject.test();// no need to create any object of class\n\t\tcover();\n\n\t}", "public static void main(String[] args) {\n \r\n\t}", "@Test\r\n\tpublic void mainTest(){\r\n\t\tMain m = new Main();\r\n\t\tm.main(null);\r\n\t}", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\r\n \r\n }", "public static void main(String[] args) {\r\n \r\n }", "public Main() {\n }", "public static void main(String[] args) throws Exception\n {\n TinySearchEngineBase searchEngine = new TinySearchEngine();\n MyDriver d = new MyDriver();\n d.run(searchEngine);\n }", "public static void main(String[] args) {\r\n\t\tBankSimulator runBankSimulator = new BankSimulator();\r\n\t\trunBankSimulator.setupParameters();\r\n\t\trunBankSimulator.doSimulation();\r\n\t\trunBankSimulator.printStatistics();\r\n\t}", "public Main() {\n }", "public Main() {\n }", "@Test\n public void testMain() {\n System.out.println(\"main\");\n String[] args = null;\n Cic.main(args);\n \n }", "public static void main(String[] args) {\r\n\t\t//method body\r\n\t}", "public static void main(String[] args) {\n\t\trun();\n\t\t//runTest();\n\n\t}", "private Main() {\n }", "public static void main(String[] args) {\n Simulation sim = new Simulation();\n //runs it.\n sim.Run();\n }", "public static void main(String[] args) {\n new Main();\n }", "public static void main(String args[]){\n\t\t\n\t\n\t}", "public static void main(String[] args)\r\n {\n \r\n \r\n }", "public static void main(String args[]){\n\t\tTestingUtils.runTests();\n\t\t\n\t}", "public static void main(String[] args){\n\t\t\n\t\t\n \t}", "public static void main (String args[]){\n SplData();\n }", "public static void main(String[] args)\r\n {\r\n \r\n \r\n \r\n }", "public static void main (String args[]) {\n\t\t\n }", "public Main() {\n\t\tsuper();\n\t}", "public static void main(String[] args) {\n \n\t}", "public static void main(String[] args) {\n try {\n Configuration configuration = new Configuration();\n ToolRunner.run(configuration,new FruitDriver(),args);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public static void main(String[] args) {\n DatabaseCommunicator test = new DatabaseCommunicator();\n// HashMap<String,LabTest> methods = test.getMethods();\n// System.out.println(methods.get(\"mingi labTest\").getMatrix());\n LabTest labTest = new LabTest();\n ArrayList testData = test.fileReader();\n DatabaseCommunicator.testSendingToDatabase(test, labTest, testData);\n }", "public static void main (String[] args) {\r\n\t\t \r\n\t\t}", "public static void main(String[] args) throws IOException, InterruptedException {\r\n\t\r\n TournamentTest();\r\n //humanPlayersTest();\r\n }", "public static void main(String [] args) throws Exception{\n\tint Systemexit= ToolRunner.run(new DriverIndianAirport(), args);\r\n\tSystem.exit(Systemexit);\r\n}", "static void main(String[] args)\n {\n }", "public static void main(String[] args) {\n\t\tTestST st2 = TestST.getInstance();\r\n\t}", "public static void main(String[] args) {\n \n\t\tAudi audi = new Audi();\n\t\t\n\t\taudi.go();\n\t\t\n\t\tTrain train = new Train();\n\t\t\n\t\ttrain.go();\n\t\t\n\t\ttrain.setGoByAlgo(new GoByCar());\n\t\t\n\t\ttrain.go();\n\t\t\n\t\t\n\t}", "private Main() {}", "public static void main(String[] args){\n\t\t\r\n\t}", "public static void main(String args[]){\n\t\t\r\n\t}", "private Main() {\n\n super();\n }", "static void main(String[] args) {\n }", "public static void main(String[] args) {\n ItemRegistry itemRegistry = new ItemRegistry();\n Printer printer = new Printer();\n AccountingHandler accountingHandler = new AccountingHandler();\n InventoryHandler inventoryHandler = new InventoryHandler();\n Register register = new Register(printer, itemRegistry, accountingHandler, inventoryHandler);\n Controller contr = new Controller(register);\n View view = new View(contr);\n\n view.sampleExecution();\n }", "public static void main(String[] args) {\n // TODO code application logic here\n // some testing? or actually we can't run it standalone??\n }", "public static void main(String[] args) {\n\n\n CarFactory.createCar(\"audi\").run();\n CarFactory.createCar(\"byd\").run();\n\n }", "public static void main(String[] args) {\n\t\t\n\t\t\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\t\n\t}", "public static void main(String[] args) throws IOException, ClassNotFoundException {\n displayInventoryTest();\n updateInventoryTest();\n getItemTest();\n }", "public static void main (String []args){\n }", "public static void main(String... args) {\n doMain().run();\n }", "public static void main(String[] args) {}", "public static void main(String[] args) {}" ]
[ "0.78424543", "0.7573542", "0.7463127", "0.7401283", "0.7314264", "0.7278195", "0.72677463", "0.7267111", "0.7258915", "0.71955293", "0.7187062", "0.7111401", "0.7110124", "0.7070836", "0.70680535", "0.70404816", "0.69703734", "0.69703734", "0.69689924", "0.69674635", "0.69674635", "0.6955805", "0.69506013", "0.69506013", "0.69506013", "0.69506013", "0.69506013", "0.69506013", "0.69436836", "0.693261", "0.6929803", "0.69279575", "0.69270754", "0.69263005", "0.6915222", "0.68950766", "0.68949485", "0.6894723", "0.6894723", "0.6892237", "0.6889346", "0.6872204", "0.6860727", "0.6844755", "0.6844611", "0.68425626", "0.68406445", "0.6840476", "0.6840476", "0.6827771", "0.6824045", "0.680432", "0.68039644", "0.68039644", "0.6802129", "0.6801038", "0.6798224", "0.6787667", "0.6784447", "0.67843086", "0.6783026", "0.6773843", "0.677069", "0.67662287", "0.6759585", "0.67543626", "0.67541295", "0.6750118", "0.6740452", "0.6740012", "0.67376757", "0.6733219", "0.6729317", "0.67277545", "0.67242926", "0.6717247", "0.67164683", "0.6715191", "0.67148143", "0.6714269", "0.67124486", "0.6710752", "0.6708275", "0.6707214", "0.6704348", "0.6702101", "0.6697658", "0.6697658", "0.6697658", "0.6697658", "0.6697658", "0.6697658", "0.6697658", "0.6697658", "0.6697658", "0.66976374", "0.6695903", "0.66950035", "0.66941166", "0.6690596", "0.6690596" ]
0.0
-1
gets the first child of the specific class
public AbstractDrawableSceneObject getChild(Class<?> childType, boolean removeChild) { AbstractDrawableSceneObject child = null; for (AbstractDrawableSceneObject abstractDrawableSceneObject : getChildren(true)) { if (abstractDrawableSceneObject.getClass().equals(childType)) { child = abstractDrawableSceneObject; break; } } if (child != null) { getChildren(true).remove(child); } return child; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Jode first() {\n return children().first();\n }", "public <T extends AbstractSceneElement> T getChildOfClass(Class<T> childClass) {\n for(AbstractSceneElement element : children) {\n if(element.getClass() == childClass) {\n return (T)element;\n }\n }\n throw new NullPointerException();\n }", "HNode getFirstChild();", "public SaveGameNode getFirstChild() {\r\n SaveGameNode node;\r\n node = this.children.get(0);\r\n return node;\r\n }", "public SaveGameNode getFirstChild(String name) {\r\n SaveGameNode node;\r\n node = this.children.stream().filter(child -> child.equals(name)).findFirst().get();\r\n return node;\r\n }", "public <T extends RMShape> T getParent(Class<T> aClass)\n{\n for(RMShape s=getParent(); s!=null; s=s.getParent()) if(aClass.isInstance(s)) return (T)s;\n return null; // Return null since parent of class wasn't found\n}", "@Override\r\n\t\tpublic Node getFirstChild()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "@objid (\"808c0861-1dec-11e2-8cad-001ec947c8cc\")\n public final GmNodeModel getFirstChild(String role) {\n for (GmNodeModel c : this.children) {\n if (role.equals(c.getRoleInComposition())) {\n return c;\n }\n }\n return null;\n }", "ILitePackItem getFirstChild();", "public Object firstElement();", "static Element firstChild(Element element, String name) {\n NodeList nodes = element.getChildNodes();\n if (nodes != null) {\n for (int i = 0, size = nodes.getLength(); i < size; i++) {\n Node item = nodes.item(i);\n if (item instanceof Element) {\n Element childElement = (Element) item;\n\n if (name.equals(childElement.getTagName())) {\n return childElement;\n }\n }\n }\n }\n return null;\n }", "public PlanNode getFirstChild() {\n return this.children.isEmpty() ? null : this.children.getFirst();\n }", "public static Component getFirstChildType(Component parent, int type) {\n\t\tList<Component> comps = Component.organizeComponents(Arrays.asList(parent));\n\t\tfor (Component c : comps) {\n\t\t\tif (type == c.getType()) {\n\t\t\t\treturn c;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private IClass getDirectCommonChild(IClass c1, IClass c2) {\n\t\t// take care of base conditions\n\t\tif (c1.equals(c2))\n\t\t\treturn c1;\n\n\t\t// subsube its own children\n\t\tif (c1.hasSubClass(c2))\n\t\t\treturn c2;\n\t\tif (c2.hasSubClass(c1))\n\t\t\treturn c1;\n\n\t\t// check direct children\n\t\tList<IClass> c1c = getChildren(c1);\n\t\tList<IClass> c2c = getChildren(c2);\n\t\tList<IClass> common = new ArrayList<IClass>();\n\t\tfor (IClass c : c1c) {\n\t\t\tif (c2c.contains(c))\n\t\t\t\tcommon.add(c);\n\t\t}\n\t\tif(common.isEmpty())\n\t\t\treturn null;\n\t\tif(common.size() == 1)\n\t\t\treturn common.get(0);\n\t\t\n\t\t// return best one, if multiple\n\t\tIClass best = null;\n\t\tfor(IClass c: common){\n\t\t\tif(best == null)\n\t\t\t\tbest = c;\n\t\t\t// the one with less direct superclasses wins\n\t\t\telse if(best.getDirectSuperClasses().length > c.getDirectSuperClasses().length)\n\t\t\t\tbest = c;\n\t\t}\n\t\treturn best;\n\t}", "public static OntClass getFirstNamedSuperClass(OntClass c)\n\t{\n\t\tfor (BreadthFirstIterator<OntClass> i = new BreadthFirstIterator<OntClass>(new SuperClassSearchNode(c)); i.hasNext(); ) {\n\t\t\tOntClass superClass = i.next();\n\t\t\tif (superClass.isURIResource() && !superClass.equals(c))\n\t\t\t\treturn superClass;\n\t\t}\n\t\treturn c.getOntModel().getOntClass(OWL.Thing.getURI());\n\t}", "private TreeNode getOnlyChild() {\n return templateRoot.getChildren().get(0);\n }", "ComponentAgent getFirstChild();", "public Jode first(Predicate<Jode> filter) {\n return children().first(filter);\n }", "public Node getChild();", "private int firstChild(int index) {\n // Formula to calculate the index of the first child of parent node\n return d * index + 1;\n }", "public A getFirst() { return first; }", "public static Node getFirstChildByName(Node parent, String name) {\n\t\t// Goes through all the child nodes.\n\t\tNodeList children = parent.getChildNodes();\n\t\tfor (int idx = 0; idx < children.getLength(); idx++) {\n\t\t\tNode child = children.item(idx);\n\t\t\t\n\t\t\t// If a node with the name we're looking for is found, returns it.\n\t\t\tif (child.getNodeName().equalsIgnoreCase(name)) return child;\n\t\t}\n\t\t\n\t\t// If no node with the name we're looking for was found, returns null.\n\t\treturn null;\n\t}", "public T getFirst();", "public T getFirst();", "public N getChild() {\n\t\tcheckRep();\n\t\treturn this.child;\n\t}", "public Jode first(String nodeName) {\n return children().first(nodeName);\n }", "public Node getFirst() {\r\n\t\treturn getNode(1);\r\n\t}", "public O first()\r\n {\r\n if (isEmpty()) return null; \r\n return first.getObject();\r\n }", "@Override\r\n\tpublic T first() {\n\t\treturn head.content;\r\n\t}", "private IClass getDirectCommonChild(IClass c1, IClass c2, IClass c3) {\n\t\t// take care of base conditions\n\t\t/*\n\t\tif (c1.equals(c2))\n\t\t\treturn c1;\n\t\t\n\t\t// subsube its own children\n\t\tif (c1.hasSubClass(c2))\n\t\t\treturn c2;\n\t\tif (c2.hasSubClass(c1))\n\t\t\treturn c1;\n\t\tif (c1.hasSubClass(c3))\n\t\t\treturn c3;\n\t\tif (c2.hasSubClass(c3))\n\t\t\treturn c3;\n\t\t*/ \n\t\t\n\t\t\n\t\t// check direct children\n\t\tList<IClass> c1c = getChildren(c1);\n\t\tList<IClass> c2c = getChildren(c2);\n\t\tList<IClass> c3c = getChildren(c3);\n\t\tList<IClass> common = new ArrayList<IClass>();\n\t\tfor (IClass c : c1c) {\n\t\t\tif (c2c.contains(c) && c3c.contains(c))\n\t\t\t\tcommon.add(c);\n\t\t}\n\t\tif(common.isEmpty())\n\t\t\treturn null;\n\t\tif(common.size() == 1)\n\t\t\treturn common.get(0);\n\t\t\n\t\t// return best one, if multiple\n\t\tIClass best = null;\n\t\tfor(IClass c: common){\n\t\t\tif(best == null)\n\t\t\t\tbest = c;\n\t\t\t// the one with less direct superclasses wins\n\t\t\telse if(best.getDirectSuperClasses().length > c.getDirectSuperClasses().length)\n\t\t\t\tbest = c;\n\t\t}\n\t\treturn best;\n\t}", "public Class<?> getSuperClass(Class<?> aClass) {\n\t\tClass<?> result = aClass.getSuperclass();\n\t\tif (result != Object.class) {\n\t\t\treturn result;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "private <T extends Element> T getNearestElement(Element element, Class<T> klass) {\n List elements = element.nearestDescendants(klass);\n if (elements == null || elements.isEmpty()) {\n return null;\n }\n\n return (T) elements.get(0);\n }", "public T getFirst()\n\t{\n\t\treturn getFirstNode().getData();\n\t}", "public SeleniumQueryObject first() {\n\t\treturn FirstFunction.first(this, this.elements);\n\t}", "public MoveAddress firstChild(ReplayGame game, ReplayGameState state) {\n MoveAddress address = state.getParent().getMoveAddress();\n MoveAddress lastElement = new MoveAddress();\n lastElement.mElements.add(address.getLastElement());\n MoveAddress incremented = lastElement.increment(game, state);\n return firstChild(1, incremented.getLastElement().moveIndex);\n }", "public T getFirst() {\n\treturn _front.getCargo();\n }", "@JsProperty\n Node getFirstChild();", "public E getFirst() {\n\t\t// Bitte fertig ausprogrammieren:\n\t\treturn null;\n\t}", "public Item getFirst();", "public E getFirst()// you finish (part of HW#4)\n\t{\n\t\tif (root == null)\n\t\t\treturn null;\n\t\tBinaryNode<E> iteratorNode = root;\n\t\twhile (iteratorNode.hasLeftChild())\n\t\t\titeratorNode = iteratorNode.getLeftChild();\n\t\treturn iteratorNode.getData();\n\t}", "public E first() {\n if (this.isEmpty()) return null;\r\n return this.head.getElement();\r\n }", "Node getFirst() {\n return this.first;\n }", "public E first() {\n if(isEmpty()){\n return null;\n }else{\n return header.getNext().getElement();\n }\n }", "public E first() {\n if (isEmpty()) return null;\n return first.item;\n }", "public A first() {\n return first;\n }", "public E getFirst() {\r\n\t\t// element checks to see if the list is empty\r\n\t\treturn element();\r\n\t}", "public E first() {\n\r\n if (head == null) {\r\n return null;\r\n } else {\r\n return head.getItem();\r\n }\r\n\r\n }", "public Pageable first() {\n\t\t\t\treturn null;\r\n\t\t\t}", "public Node returnNextChild(){\n try{\n return children.get(counter);\n }catch(Exception ex){\n return null;\n }\n }", "public ChildType getChildAt( int index );", "<T extends IElement> T findChildElement(IElement parentElement, By childLoc, Class<? extends IElement> clazz);", "public static FuzzyXMLElement getFirstElement(FuzzyXMLElement element){\r\n\t\tFuzzyXMLNode[] nodes = element.getChildren();\r\n\t\tfor(int i=0;i<nodes.length;i++){\r\n\t\t\tif(nodes[i] instanceof FuzzyXMLElement){\r\n\t\t\t\treturn (FuzzyXMLElement)nodes[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "XClass getClassOrElementClass();", "private AttributeNode findSuper(String className, String attributeName) {\n \n // find the superclass by searching the OCR's for a generalization \n \n List<ObjectClassRelationship> ocrs = \n elements.getElements(DomainObjectFactory.newObjectClassRelationship());\n \n String superClassName = null;\n for(ObjectClassRelationship ocr : ocrs) {\n if (ocr.getType() == ObjectClassRelationship.TYPE_IS && \n ocr.getSource().getLongName().equals(className)) {\n superClassName = ocr.getTarget().getLongName();\n break;\n }\n }\n \n if (superClassName == null) {\n System.err.println(\"Superclass not found for \"+className);\n return null;\n }\n \n // find the super class in the tree\n \n int div = superClassName.lastIndexOf(\".\");\n String sPackage = superClassName.substring(0, div);\n String sName = superClassName.substring(div+1);\n \n for(Object pchild : rootNode.getChildren()) {\n PackageNode pnode = (PackageNode)pchild;\n if (pnode.getFullPath().equals(sPackage)) {\n for(Object cchild : pnode.getChildren()) {\n ClassNode cnode = (ClassNode)cchild;\n if (cnode.getDisplay().equals(sName)) {\n PackageNode inherited = null;\n for(Object achild : cnode.getChildren()) {\n if (\"Inherited Attributes\".equals(\n ((UMLNode)achild).getDisplay())) {\n // remember the inheritance subtree for later\n inherited = (PackageNode)achild;\n }\n else if (achild instanceof AttributeNode) {\n AttributeNode anode = (AttributeNode)achild;\n if (anode.getDisplay().equals(attributeName)) {\n return anode;\n }\n }\n }\n // attribute wasn't found, check inheritance subtree\n if (inherited != null) {\n for(Object achild : inherited.getChildren()) {\n AttributeNode anode = (AttributeNode)achild;\n if (anode.getDisplay().equals(attributeName)) {\n return findSuper(cnode.getFullPath(), attributeName);\n }\n }\n \n }\n }\n } \n }\n }\n \n return null;\n }", "public Element first() {\n if(isEmpty()) return null;\n else return header.getNextNode().getContent();\n }", "@Override\r\n\tpublic E getFirst() {\n\t\treturn null;\r\n\t}", "public Object getFirstObject()\n {\n \tcurrentObject = firstObject;\n\n if (firstObject == null)\n \treturn null;\n else\n \treturn AL.get(0);\n }", "public E getFirst();", "@Override\r\n\t\tpublic final E getFirst() {\n\t\t\treturn null;\r\n\t\t}", "public Node getFirst()\n {\n return this.first;\n }", "public <T extends EObject> Optional<T> getFirstRootContentOfType(Resource resource, Class<T> klass) {\r\n\t\tif (!resource.isLoaded())\r\n\t\t\treturn Optional.absent();\r\n\r\n\t\tEList<EObject> contents = resource.getContents();\r\n\t\tfor (EObject eObject : contents) {\r\n\t\t\tif (klass.isInstance(eObject)) {\r\n\t\t\t\treturn Optional.of(klass.cast(eObject));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn Optional.absent();\r\n\t}", "public Node<T> getFirst() \r\n {\r\n if (isEmpty()) return sentinel;\r\n return sentinel.next;\r\n }", "public Profile getChild() {\n \treturn null;\n\t}", "@objid (\"808c0841-1dec-11e2-8cad-001ec947c8cc\")\n public final GmNodeModel getChild(MRef ref) {\n for (GmNodeModel child : this.children) {\n if (child.getRepresentedRef().equals(ref)) {\n return child;\n }\n }\n return null;\n }", "private Node getFirstChild(Node node){\n\t\tNode firstChild=node.getFirstChild();\n\t\tif(firstChild!=null &&firstChild.getNodeType()==Node.TEXT_NODE){\n\t\t\tString value=firstChild.getTextContent();\n\t\t\tif(value!=null){\n\t\t\t\tvalue=value.replaceAll(\"\\t\", \"\");\n\t\t\t\tvalue=value.replaceAll(\"\\n\", \"\");\n\t\t\t\tvalue=value.replaceAll(\" \", \"\");\n\t\t\t\tif(Utils.isEmpty(value)){\n\t\t\t\t\tfirstChild=getNextSibling(firstChild);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tlogger.log(Level.FINEST, \"First Child of the Node\",firstChild);\n\t\treturn firstChild;\n\t}", "public F first() {\n return this.first;\n }", "public Object getFirst()\n {\n if (first == null)\n {\n throw new NoSuchElementException();\n }\n else\n return first.getValue();\n }", "public Object getFirst() {\n if (first == null)\n return null;\n return first.getInfo();\n }", "default Optional<ClassElement> getClassElement(Class<?> type) {\n if (type != null) {\n return getClassElement(type.getName());\n }\n return Optional.empty();\n }", "public E getFirst(){\n return head.getNext().getElement();\n }", "public Object getFirst()\n {\n if(first == null){\n throw new NoSuchElementException();}\n \n \n \n return first.data;\n }", "@Override\n public int getMinChild() {\n if (isEmpty()) {\n throw new IllegalStateException(\"Heap is empty.\");\n }\n return heap[0];\n }", "public Node getFirstNode() {\n\t return firstNode;\r\n\t }", "public Node<T> getFirst() {\r\n\t\treturn first;\r\n\t}", "public Loop getFather(Loop lp){\n\t\treturn parent.get(lp);\n\t}", "public T first() throws NoSuchElementException {\n\t\tif (root == null) throw new NoSuchElementException();\n\n\t\tBinaryTreeNode current = root;\n\t\twhile (current.left != null) {\n\t\t\tcurrent = current.left;\n\t\t}\n\t\treturn current.data;\n\t}", "StackType getFirstItem();", "private Node getChild(char key) {\n for (Node child : children) {\n if (child.getKey() == key) {\n return child;\n }\n }\n return null;\n }", "public child getChild() {\n return this.child;\n }", "@Override\n\tpublic Entity SelectFirstOrDefault() {\n\t\treturn null;\n\t}", "protected PortalObject getDefaultChild()\n {\n String portalName = getDeclaredProperty(PORTAL_PROP_DEFAULT_OBJECT_NAME);\n if (portalName == null)\n {\n portalName = DEFAULT_OBJECT_NAME;\n }\n return getChild(portalName);\n }", "public RMShape getChild(int anIndex) { return null; }", "T first();", "public Nodo getNextHijo() {\n Nodo result = null;\n Vector<Nodo> hijos = this.getHijos();\n int lastIndex = hijos.size() - 1;\n if (this.nextChildIndex <= lastIndex) {\n result = hijos.get(this.nextChildIndex);\n this.nextChildIndex++;\n }\n return result;\n }", "@NotNull\n public F getFirst() {\n return first;\n }", "<P extends CtElement> P getParent(Class<P> parentType) throws ParentNotInitializedException;", "private Node<TokenAttributes> findFirst(Node<TokenAttributes> current_node) {\n if (current_node.getParent() != null && current_node.getParent().getChildren().size() == 1) {\n return findFirst(current_node.getParent());\n }\n if (current_node.getParent() == null) {\n return current_node;\n }\n return current_node;\n }", "public DomainObject getChild(Integer childId, Class childClass) {\n DomainObjectDao<?> dao = getDaoFinder().findDao(childClass);\n return dao.getById(childId);\n }", "public ChildMessage getChild(String t){\t\t\t\t\t\t\t\t// get the specific header\n\t\tfor(ChildMessage c : cMessages){\t\t\t\t\t\t\t\t// for all cMessages\n\t\t\tif(c.text.equals(t))\t\t\t\t\t\t\t\t\t\t// if the texts equals t\n\t\t\t\treturn c;\t\t\t\t\t\t\t\t\t\t\t\t// return it\n\t\t}\n\t\treturn null;\t\t\t\t\t\t\t\t\t\t\t\t\t// else return null\n\t}", "public static SpItem findSpItemInContext(SpItem spItem, Class<?> c) {\n SpItem returnableItem = null;\n Enumeration<SpItem> e = spItem.children();\n\n while (e.hasMoreElements()) {\n SpItem child = e.nextElement();\n\n if (c.isInstance(child)) {\n returnableItem = child;\n\n break;\n }\n }\n\n return returnableItem;\n }", "@Override\n public Node getImmediateChild(ChildKey name) {\n if (name.isPriorityChildName() && !this.priority.isEmpty()) {\n return this.priority;\n } else if (children.containsKey(name)) {\n return children.get(name);\n } else {\n return EmptyNode.Empty();\n }\n }", "Fish findFish(){\r\n\t\t//step through GameCollection using iterator to find first instance of a fish\r\n\t\tIterator iterator = gc.getIterator();\r\n\t\twhile(iterator.hasNext()){\r\n\t\t\tGameObject g = iterator.getNext();\r\n\t\t\tif (g instanceof Fish)return (Fish)g;\r\n\t\t}\r\n\treturn nullFish;\r\n\t}", "XClass getSuperclass();", "public PileupElement getFirst() { return PE1; }", "Object getParent();", "public final Node<N> first() {\n throw new UnsupportedOperationException();\n }", "public String isFirstClassSeat();", "public T getFirst( ){\r\n\t\tif (isEmpty())\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t//first node\r\n\t\tArrayNode<T> first = beginMarker.next;\r\n\t\ttry{\r\n\t\t\t//first elem\r\n\t\t\treturn first.getFirst();\r\n\t\t}catch( IndexOutOfBoundsException e){\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t}\r\n\t\t\r\n\t}", "private static <T> Optional<T> find(ClassPath path, ClassNode in, Function<ClassNode, Optional<T>> get) {\n Optional<T> v = get.apply(in);\n if (v.isPresent()) {\n return v;\n }\n return supers(in).map(s -> {\n Optional<ClassNode> superClass = path.findClass(new ClassDescriptor(s));\n return superClass.<T>flatMap(c -> find(path, c, get));\n }).filter(Optional::isPresent).map(Optional::get).findFirst();\n }", "public StringDt getDiscriminatorFirstRep() {\n\t\tif (getDiscriminator().isEmpty()) {\n\t\t\treturn addDiscriminator();\n\t\t}\n\t\treturn getDiscriminator().get(0); \n\t}", "public T getFirst()\n\t{\n\t\treturn head.getData();\n\t}" ]
[ "0.687375", "0.6822408", "0.668785", "0.6646118", "0.657514", "0.63935596", "0.6380748", "0.62833655", "0.62099916", "0.620104", "0.61312735", "0.6129812", "0.6123954", "0.6107332", "0.60968095", "0.6034349", "0.60271955", "0.60145235", "0.6009823", "0.59655845", "0.5948868", "0.59187067", "0.59161234", "0.59161234", "0.5912428", "0.590295", "0.5897283", "0.58796805", "0.5857312", "0.5853036", "0.58385533", "0.583049", "0.5819405", "0.5816307", "0.581186", "0.57926977", "0.5780263", "0.5765566", "0.57579464", "0.5736665", "0.5735156", "0.57282656", "0.572451", "0.57105875", "0.5703997", "0.56898636", "0.56686485", "0.5659821", "0.56554717", "0.56473494", "0.5619713", "0.5617882", "0.5617088", "0.5615188", "0.5609511", "0.55917495", "0.55862314", "0.55753773", "0.55505806", "0.5550373", "0.5546475", "0.55429643", "0.55383813", "0.5537983", "0.5517686", "0.5510242", "0.5502384", "0.5496844", "0.5487424", "0.548056", "0.5477899", "0.54614043", "0.54608685", "0.5456989", "0.54479486", "0.5445333", "0.54368985", "0.54326195", "0.54317087", "0.5431687", "0.5431078", "0.54276216", "0.5426486", "0.5425964", "0.5424113", "0.5423082", "0.54108685", "0.53998756", "0.53991956", "0.5388346", "0.5380453", "0.5377228", "0.53653216", "0.53636956", "0.53617203", "0.53568226", "0.5354197", "0.5350997", "0.5345017", "0.5330439", "0.53239626" ]
0.0
-1
defining min and max coordinates
public void constructBoundingBox() { double a = m_Qmin.x; double b = m_Qmin.y; double c = m_Qmin.z; double d = m_Qmax.x; double e = m_Qmax.y; double f = m_Qmax.z; //constructing the vertexes of the bounding box SceneVertex A = new SceneVertex( new Vector3d(a, b, c)); SceneVertex B = new SceneVertex( new Vector3d(d, b, c)); SceneVertex C = new SceneVertex( new Vector3d(d, b, f)); SceneVertex D = new SceneVertex( new Vector3d(d, e, f)); SceneVertex E = new SceneVertex( new Vector3d(a, e, f)); SceneVertex F = new SceneVertex( new Vector3d(a, e, c)); SceneVertex G = new SceneVertex( new Vector3d(d, e, c)); SceneVertex H = new SceneVertex( new Vector3d(a, b, f)); // building the vertices arrays for the faces ArrayList<SceneVertex> verArrP0front = new ArrayList<SceneVertex>(4); verArrP0front.add(A); verArrP0front.add(B); verArrP0front.add(G); verArrP0front.add(F); ArrayList<SceneVertex> verArrP1left = new ArrayList<SceneVertex>(4); verArrP1left.add(A); verArrP1left.add(F); verArrP1left.add(E); verArrP1left.add(H); ArrayList<SceneVertex> verArrP2back = new ArrayList<SceneVertex>(4); verArrP2back.add(H); verArrP2back.add(C); verArrP2back.add(D); verArrP2back.add(E); ArrayList<SceneVertex> verArrP3right = new ArrayList<SceneVertex>(4); verArrP3right.add(G); verArrP3right.add(D); verArrP3right.add(C); verArrP3right.add(B); ArrayList<SceneVertex> verArrP4bottom = new ArrayList<SceneVertex>(4); verArrP4bottom.add(A); verArrP4bottom.add(H); verArrP4bottom.add(C); verArrP4bottom.add(B); ArrayList<SceneVertex> verArrP5top = new ArrayList<SceneVertex>(4); verArrP5top.add(F); verArrP5top.add(G); verArrP5top.add(D); verArrP5top.add(E); // creating BoundingBox m_BoundingBox = new SceneNode(DrawingMode.GL_LINE, "BoundingBox", null); m_BoundingBox.addChild( new ScenePolygon(verArrP0front, "FRONT")); m_BoundingBox.addChild( new ScenePolygon(verArrP1left, "LEFT")); m_BoundingBox.addChild( new ScenePolygon(verArrP2back, "BACK")); m_BoundingBox.addChild( new ScenePolygon(verArrP3right, "RIGHT")); m_BoundingBox.addChild( new ScenePolygon(verArrP4bottom, "BOTTOM")); m_BoundingBox.addChild( new ScenePolygon(verArrP5top, "TOP")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void initMaxMin(){\n\t\tmax = dja.max();\n\t\tmin = dja.min();\n\t}", "private void calculateMinMaxPositions() {\n boundingVolume = null;\n if ( minMax == null ) {\n minMax = new double[6];\n\n double minX = Double.MAX_VALUE;\n double minY = Double.MAX_VALUE;\n double minZ = Double.MAX_VALUE;\n double maxX = -Double.MAX_VALUE;\n double maxY = -Double.MAX_VALUE;\n double maxZ = -Double.MAX_VALUE;\n int i;\n\n for ( i = 0; i < getNumVertices(); i++ ) {\n double x = vertexPositions[3*i+0];\n double y = vertexPositions[3*i+1];\n double z = vertexPositions[3*i+2];\n\n if ( x < minX ) minX = x;\n if ( y < minY ) minY = y;\n if ( z < minZ ) minZ = z;\n if ( x > maxX ) maxX = x;\n if ( y > maxY ) maxY = y;\n if ( z > maxZ ) maxZ = z;\n }\n minMax[0] = minX;\n minMax[1] = minY;\n minMax[2] = minZ;\n minMax[3] = maxX;\n minMax[4] = maxY;\n minMax[5] = maxZ;\n }\n }", "@Override\r\n public void setMinMax(Double min, Double max) {\r\n this.minIn = min;\r\n this.maxIn = max;\r\n }", "@Override\r\n\tpublic void setMinCoordinates() {\n\t\t\r\n\t}", "@Override\r\n public void map(Double minX, Double maxX, Double minY, Double maxY) {\r\n this.minX = minX;\r\n this.maxX = maxX;\r\n this.minY = minY;\r\n this.maxY = maxY;\r\n }", "public void allMinMax() {\n\t\tthis.theMaxX();\n\t\tthis.theMinX();\n\t\tthis.theMaxY();\n\t\tthis.theMinY();\n\t}", "protected void calcMinMax() {\n }", "private void findMinandMaxValues(SparklineValues values) {\n minY = values.getValues().stream().filter(value -> value.getValue() != null).mapToDouble(SparklineValues.SparklineValue::getValue).min().orElse(0.0);\n maxY = values.getValues().stream().filter(value -> value.getValue() != null).mapToDouble(SparklineValues.SparklineValue::getValue).max().orElse(0.0);\n\n if (Math.abs(minY) > 1E30 || Math.abs(maxY) > 1E30) {\n // something is probably wrong\n System.out.println(\"Unexpectedly small/large min or max: \");\n values.getValues().forEach(value -> {\n System.out.print(value.getValue() + \" \");\n });\n System.out.println();\n minY = -1.0;\n maxY = 1.0;\n }\n\n if (minY.equals(maxY)) {\n if (minY.equals(0.0)) {\n minY = -1.0;\n maxY = 1.0;\n } else {\n minY = minY - 0.1 * Math.abs(minY);\n maxY = maxY + 0.1 * Math.abs(maxY);\n }\n }\n }", "public void setMinMax(double min, double max)\n {\n if (max == min)\n throw new IllegalArgumentException(\"Max value must be bigger than Min value!\");\n\n this.min = min;\n this.max = max;\n if (max < min)\n {\n this.max = min;\n this.min = max;\n }\n }", "public int coordinateGenerator(int max, int min) {\n\t\tRandom r = new Random();\n\t\tint a =r.nextInt(max - min) + min;\n\t\treturn a;\n\t}", "@Override\n public void getLocalBounds(Vector3 min, Vector3 max) {\n\n // Maximum bounds\n max.setX(radius + margin);\n max.setY(halfHeight + margin);\n max.setZ(max.getX());\n\n // Minimum bounds\n min.setX(-max.getX());\n min.setY(-max.getY());\n min.setZ(min.getX());\n }", "public void setAxisRange(double xMin,double xMax, double yMin, double yMax) {\n minXValue=xMin;\n maxXValue=xMax;\n minYValue=yMin;\n maxYValue=yMax;\n this.customAxis=true;\n addGraphPanel();\n\n }", "private void setMin(int min) { this.min = new SimplePosition(false,false,min); }", "public void setXDataRange(float min, float max);", "private void findExtremes( Vector<? extends AbstractWirelessDevice> coll )\r\n {\r\n for( AbstractWirelessDevice e: coll )\r\n {\r\n double x = e.getLocation().getX();\r\n double y = e.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 }", "public InterpolatorGrid(double min, double max) {\n minValue = min;\n maxValue = max;\n }", "public DynamicPart minMax(float min, float max) {\n return this.min(min).max(max);\n }", "public void ComputeBounds( Vec3 min, Vec3 max )\r\n\t{\r\n\t\tfor ( int iTempCount = 1; iTempCount <= 3; iTempCount++ )\r\n\t\t{\r\n\t\t\tVec3 tempPoint = m_vertices[iTempCount];\r\n\t\t\t\r\n\t\t\tif ( tempPoint.xCoord < min.xCoord )\r\n\t\t\t{\r\n\t\t\t\tmin.xCoord = tempPoint.xCoord;\r\n\t\t\t}\r\n\t\t\telse if ( tempPoint.xCoord > max.xCoord )\r\n\t\t\t{\r\n\t\t\t\tmax.xCoord = tempPoint.xCoord;\r\n\t\t\t}\t\t\t\r\n\t\t\t\r\n\t\t\tif ( tempPoint.yCoord < min.yCoord )\r\n\t\t\t{\r\n\t\t\t\tmin.yCoord = tempPoint.yCoord;\r\n\t\t\t}\r\n\t\t\telse if ( tempPoint.yCoord > max.yCoord )\r\n\t\t\t{\r\n\t\t\t\tmax.yCoord = tempPoint.yCoord;\r\n\t\t\t}\t\t\t\r\n\t\t\t\r\n\t\t\tif ( tempPoint.zCoord < min.zCoord )\r\n\t\t\t{\r\n\t\t\t\tmin.zCoord = tempPoint.zCoord;\r\n\t\t\t}\r\n\t\t\telse if ( tempPoint.zCoord > max.zCoord )\r\n\t\t\t{\r\n\t\t\t\tmax.zCoord = tempPoint.zCoord;\r\n\t\t\t}\t\t\t\r\n\t\t}\t\t\r\n\t}", "protected void calcMinMax(T t) {\n if (this.mYMax < t.getYMax()) {\n this.mYMax = t.getYMax();\n }\n if (this.mYMin > t.getYMin()) {\n this.mYMin = t.getYMin();\n }\n if (this.mXMax < t.getXMax()) {\n this.mXMax = t.getXMax();\n }\n if (this.mXMin > t.getXMin()) {\n this.mXMin = t.getXMin();\n }\n if (t.getAxisDependency() == YAxis.AxisDependency.LEFT) {\n if (this.mLeftAxisMax < t.getYMax()) {\n this.mLeftAxisMax = t.getYMax();\n }\n if (!(this.mLeftAxisMin > t.getYMin())) return;\n {\n this.mLeftAxisMin = t.getYMin();\n return;\n }\n } else {\n if (this.mRightAxisMax < t.getYMax()) {\n this.mRightAxisMax = t.getYMax();\n }\n if (!(this.mRightAxisMin > t.getYMin())) return;\n {\n this.mRightAxisMin = t.getYMin();\n return;\n }\n }\n }", "private void initialize(int initialValue, int extent, int minimum, int maximum) {\r\n if ((maximum >= minimum)\r\n && (initialValue >= minimum)\r\n && ((initialValue + extent) >= initialValue)\r\n && ((initialValue + extent) <= maximum)) {\r\n // this.theExtent = extent;\r\n this.min = minimum;\r\n this.max = maximum;\r\n } else {\r\n throw new IllegalArgumentException(\"invalid range properties \" +\r\n \"max = \" + maximum + \" min = \" + minimum + \" initialValue = \" + initialValue + \" extent = \" + extent);\r\n\r\n }\r\n }", "public static Point minmax (int[] a) {\n int n = a.length;\n Point mm = new Point (a[0], a[0]);\n\n for (int i=1; i<n; i++) {\n if (a[i] > mm.x) mm.x = a[i];\n if (a[i] < mm.y) mm.y = a[i];\n }\n return mm;\n }", "Coordinate getMinY();", "@Override\r\n\tpublic void setMaxCoordinates() {\n\t\t\r\n\t}", "public Range(int minIn, int maxIn) {\n min = minIn;\n max = maxIn;\n }", "public static void checkMinMax() {\r\n\t\tSystem.out.println(\"Beginning min/max test (should be -6 and 17)\");\r\n\t\tSortedIntList list = new SortedIntList();\r\n\t\tlist.add(5);\r\n\t\tlist.add(-6);\r\n\t\tlist.add(17);\r\n\t\tlist.add(2);\r\n\t\tSystem.out.println(\" min = \" + list.min());\r\n\t\tSystem.out.println(\" max = \" + list.max());\r\n\t\tSystem.out.println();\r\n\t}", "public void setBounds(Double min, Double max) {\n Double aMin = Math.min(min, max);\n Double aMax = Math.max(min, max);\n if (aMin != this.min || aMax != this.max) {\n super.setMinimum(aMin);\n super.setMaximum(aMax);\n }\n fireStateChanged();\n }", "public void setBounds(Point3D minBounds, Point3D maxBounds) {\n this.minBounds = minBounds;\n this.maxBounds = maxBounds;\n }", "Coordinate getMinX();", "public void updateMinMax( ) {\r\n if( (data == null) || (data.size() < 1) ) {\r\n min = 0.0;\r\n max = 0.0;\r\n return;\r\n }\r\n\r\n min = data.get( 0 );\r\n max = data.get( 0 );\r\n\r\n for( int i = 1; i < data.size(); i++ ) {\r\n if( min > data.get( i ) )\r\n min = data.get( i );\r\n if( max < data.get( i ) )\r\n max = data.get( i );\r\n }\r\n\r\n }", "public AdornmentTypeRange(final float min, final float max) {\n\t\tthis.maxFloat = max;\n\t\tthis.minFloat = min;\n\t}", "private Envelope makeExtent(String sMinX, String sMinY, String sMaxX, String sMaxY, String wkid) {\n if (sMinX.length() > 0 && sMaxX.length() > 0 && sMinY.length() > 0 && sMaxY.length() > 0) {\n double minx = Val.chkDbl(sMinX, -180.0);\n double maxx = Val.chkDbl(sMaxX, 180.0);\n double miny = Val.chkDbl(sMinY, -90.0);\n double maxy = Val.chkDbl(sMaxY, 90.0);\n Envelope envelope = new Envelope(minx, miny, maxx, maxy);\n envelope.setWkid(wkid);\n return envelope;\n }\n return null;\n }", "@Override public void setMinMax(float minValue, float maxValue) {\n this.valueTrack.min = minValue; this.valueTrack.max = maxValue;\n }", "public void setLeftRange(int min, int max) {\n leftBeginning = min;\n leftEnd = max;\n }", "public AdornmentTypeRange(final int min, final int max) {\n\t\tthis.maxInteger = max;\n\t\tthis.minInteger = min;\n\t}", "public Bounds(int minX, int minZ, int maxX, int maxZ) {\n this.minX = minX;\n this.minZ = minZ;\n this.maxX = maxX;\n this.maxZ = maxZ;\n }", "public LongRange(long number1, long number2) {\n/* 110 */ if (number2 < number1) {\n/* 111 */ this.min = number2;\n/* 112 */ this.max = number1;\n/* */ } else {\n/* 114 */ this.min = number1;\n/* 115 */ this.max = number2;\n/* */ } \n/* */ }", "public ArrayList<Integer> pointsInRange( int min, int max )\n {\n ArrayList<Integer> points = new ArrayList<Integer>();\n _root.findPoints( min, max, points );\n return points;\n }", "public double[] setMapBounds(double ulLon, double ulLat, double lrLon, double lrLat)\n/* 154: */ {\n/* 117:182 */ int x_min = 2147483647;\n/* 118:183 */ int y_min = 2147483647;\n/* 119:184 */ int x_max = -2147483648;\n/* 120:185 */ int y_max = -2147483648;\n/* 121:186 */ int mapZoomMax = 20;\n/* 122: */\n/* 123:188 */ x_max = Math.max(x_max, MercatorProj.LonToX(lrLon, mapZoomMax));\n/* 124:189 */ x_max = Math.max(x_max, MercatorProj.LonToX(ulLon, mapZoomMax));\n/* 125:190 */ y_max = Math.max(y_max, MercatorProj.LatToY(ulLat, mapZoomMax));\n/* 126:191 */ y_max = Math.max(y_max, MercatorProj.LatToY(lrLat, mapZoomMax));\n/* 127:192 */ x_min = Math.min(x_min, MercatorProj.LonToX(ulLon, mapZoomMax));\n/* 128:193 */ x_min = Math.min(x_min, MercatorProj.LonToX(lrLon, mapZoomMax));\n/* 129:194 */ y_min = Math.min(y_min, MercatorProj.LatToY(ulLat, mapZoomMax));\n/* 130:195 */ y_min = Math.min(y_min, MercatorProj.LatToY(lrLat, mapZoomMax));\n /* x_max= (int)(Math.max(ulLon,lrLon)*1000000);\n x_min= (int)(Math.min(ulLon,lrLon)*1000000);\n y_max= (int)(Math.max(ulLat,lrLat)*1000000);\n y_min= (int)(Math.min(ulLat,lrLat)*1000000);*/\n/* 134:199 */ int height = Math.max(0, this.mapPanel.getHeight());\n/* 135:200 */ int width = Math.max(0, this.mapPanel.getWidth());\n/* 136:201 */ int newZoom = mapZoomMax;\n/* 137:202 */ int x = x_max - x_min;\n/* 138:203 */ int y = y_max - y_min;\n/* 139:204 */ while ((x > width) || (y > height))\n/* 140: */ {\n/* 141:205 */ newZoom--;\n/* 142:206 */ x >>= 1;\n/* 143:207 */ y >>= 1;\n/* 144: */ }\n/* 145:209 */ x = x_min + (x_max - x_min)/2;\n/* 146:210 */ y = y_min + (y_max - y_min)/2;\n/* 147:211 */ int z = 1 << mapZoomMax - newZoom;\n/* 148:212 */ x /= z;\n/* 149:213 */ y /= z;\n /* int Cx=256;\n int Cy=256;\n //Cx>>=(newZoom);\n //Cy>>=(newZoom);\n double x1=((x*(width/2))/Cx);\n double y1=((y*(height/2))/Cy);\n x=(int) x1;\n y=(int) y1;\n x >>=(newZoom-this.mapPanel.zoom);\n y >>=(newZoom-this.mapPanel.zoom);\n //x = x+156;\n //y = y-137;*/\n x=x/10000;\n y=y/10000;\n /* 150:214 */ this.mapPanel.setZoom(new Point((int)x, (int)y), newZoom);\n double[] res = { this.mapPanel.zoom, this.mapPanel.centerX, this.mapPanel.centerY,x,y, newZoom, z };\n traceln(Arrays.toString(res));\n traceln( x_max+\",\"+x_min+\",\"+y_max+\",\"+y_min+\",x:\"+x+\",y:\"+y+\",z:\"+z+\",nZomm:\"+newZoom);\n // this.mapPanel.getBounds().getX()setBounds( (int)ulLon,(int)ulLat, (int)width,(int)height);\n return res;\n\n/* 167: */ }", "public MaxAndMin(){\n this.list=new ListOfData().getData();\n }", "protected void calcMinMax() {\n if (this.mDataSets != null) {\n T t;\n this.mYMax = -3.4028235E38f;\n this.mYMin = Float.MAX_VALUE;\n this.mXMax = -3.4028235E38f;\n this.mXMin = Float.MAX_VALUE;\n Iterator<T> iterator = this.mDataSets.iterator();\n while (iterator.hasNext()) {\n this.calcMinMax((IDataSet)iterator.next());\n }\n this.mLeftAxisMax = -3.4028235E38f;\n this.mLeftAxisMin = Float.MAX_VALUE;\n this.mRightAxisMax = -3.4028235E38f;\n this.mRightAxisMin = Float.MAX_VALUE;\n T t2 = this.getFirstLeft(this.mDataSets);\n if (t2 != null) {\n this.mLeftAxisMax = t2.getYMax();\n this.mLeftAxisMin = t2.getYMin();\n for (IDataSet iDataSet : this.mDataSets) {\n if (iDataSet.getAxisDependency() != YAxis.AxisDependency.LEFT) continue;\n if (iDataSet.getYMin() < this.mLeftAxisMin) {\n this.mLeftAxisMin = iDataSet.getYMin();\n }\n if (!(iDataSet.getYMax() > this.mLeftAxisMax)) continue;\n this.mLeftAxisMax = iDataSet.getYMax();\n }\n }\n if ((t = this.getFirstRight(this.mDataSets)) != null) {\n this.mRightAxisMax = t.getYMax();\n this.mRightAxisMin = t.getYMin();\n for (IDataSet iDataSet : this.mDataSets) {\n if (iDataSet.getAxisDependency() != YAxis.AxisDependency.RIGHT) continue;\n if (iDataSet.getYMin() < this.mRightAxisMin) {\n this.mRightAxisMin = iDataSet.getYMin();\n }\n if (!(iDataSet.getYMax() > this.mRightAxisMax)) continue;\n this.mRightAxisMax = iDataSet.getYMax();\n }\n }\n }\n }", "public Range FindXmaxmin(graph g) {\r\n\r\n\t\tdouble xmin=Double.MAX_VALUE; \r\n\t\tdouble xmax=Double.MIN_VALUE; \r\n\t\tCollection<node_data> nc = g.getV();\r\n\t\tfor(node_data n: nc) {\r\n\r\n\t\t\tdouble px=n.getLocation().x();\r\n\r\n\t\t\tif(px>xmax) {\r\n\t\t\t\txmax=px;\r\n\t\t\t}\r\n\r\n\t\t\tif(px<xmin) {\r\n\t\t\t\txmin=px;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn new Range(xmin-0.001,xmax+0.001);\r\n\t}", "@Override\n public double[] getMinMax() {\n if ( minMax == null ) {\n calculateMinMaxPositions();\n }\n return minMax;\n }", "public double getXRangeMax() {\n return xRangeMax;\n }", "public void setRange(double min, double max) {\n super.setRange(min, max);\n }", "public LongRange(Number number1, Number number2) {\n/* 132 */ if (number1 == null || number2 == null) {\n/* 133 */ throw new IllegalArgumentException(\"The numbers must not be null\");\n/* */ }\n/* 135 */ long number1val = number1.longValue();\n/* 136 */ long number2val = number2.longValue();\n/* 137 */ if (number2val < number1val) {\n/* 138 */ this.min = number2val;\n/* 139 */ this.max = number1val;\n/* 140 */ if (number2 instanceof Long) {\n/* 141 */ this.minObject = (Long)number2;\n/* */ }\n/* 143 */ if (number1 instanceof Long) {\n/* 144 */ this.maxObject = (Long)number1;\n/* */ }\n/* */ } else {\n/* 147 */ this.min = number1val;\n/* 148 */ this.max = number2val;\n/* 149 */ if (number1 instanceof Long) {\n/* 150 */ this.minObject = (Long)number1;\n/* */ }\n/* 152 */ if (number2 instanceof Long) {\n/* 153 */ this.maxObject = (Long)number2;\n/* */ }\n/* */ } \n/* */ }", "int getXMin();", "public double getXRangeMin() {\n return xRangeMin;\n }", "float yMin();", "public void setRange(int min, int max) {\n range = new PriceRange();\n range.setMaximum(max);\n range.setMinimum(min);\n }", "protected static double clamp(double pos, double min, double max) {\n\t\tif(pos < min) {\n\t\t\treturn min;\n\t\t} else if (pos\t> max) {\n\t\t\treturn max;\n\t\t} else {\n\t\t\treturn pos;\n\t\t}\n\t}", "public RangeSlider(int min, int max) {\n super(min, max);\n initSlider();\n }", "public Annotation(int min, int max) {\n annotMin = min;\n annotMax = max;\n checkAnnotation();\n }", "public ZlExRangeSpec(Object min, Object max, boolean minex, boolean maxex) {\n\t\tthis.min = min;\n\t\tthis.max = max;\n\t\tthis.minex = minex;\n\t\tthis.maxex = maxex;\n\t}", "public GridColormap(double min, double max)\n {\n setMinMax(min, max);\n }", "public void view(double min, double max)\n {\n this.assertArea();\n this.view(min, max, this.direction.getSide(this.area));\n }", "private void positionMinimap(){\n\t\tif(debutX<0)//si mon debutX est negatif(ca veut dire que je suis sorti de mon terrain (ter))\n\t\t\tdebutX=0;\n\t\tif(debutX>ter.length)//si debutX est plus grand que la taille de mon terrain(ter).\n\t\t\tdebutX=ter.length-100;\n\t\tif(debutY<0)\n\t\t\tdebutY=0;\n\t\tif(debutY>ter.length)\n\t\t\tdebutY=ter.length-100;\n\t\tif(debutX+100>ter.length)\n\t\t\tdebutX=ter.length-100;\n\t\tif(debutY+100>ter.length)\n\t\t\tdebutY=ter.length-100;\n\t\t//cette fonction est appelee uniquement si le terrain est strictement Superieur a 100\n\t\t// Donc je sais que ma fin se situe 100 cases apres.\n\t\tfinX=debutX+100;\n\t\tfinY=debutY+100;\n\t}", "public void setRightRange(int min, int max) {\n rightBeginning = min;\n rightEnd = max;\n }", "public void setMin ( Point min ) {\r\n\r\n\tsetA ( min );\r\n }", "@Test\n\tpublic void testMinMinMax(){\n\t int min=3, mid=5, max=10;\n\t assertEquals( max, MaxDiTre.max(min, min, max) );\n\t}", "protected void setValues() {\n values = new double[size];\n int pi = 0; // pixelIndex\n int siz = size - nanW - negW - posW;\n int biw = min < max ? negW : posW;\n int tiw = min < max ? posW : negW;\n double bv = min < max ? Double.NEGATIVE_INFINITY : Double.POSITIVE_INFINITY;\n double tv = min < max ? Double.POSITIVE_INFINITY : Double.NEGATIVE_INFINITY;\n double f = siz > 1 ? (max - min) / (siz - 1.) : 0.;\n for (int i = 0; i < biw && pi < size; i++,pi++) {\n values[pi] = bv;\n }\n for (int i = 0; i < siz && pi < size; i++,pi++) {\n double v = min + i * f;\n values[pi] = v;\n }\n for (int i = 0; i < tiw && pi < size; i++,pi++) {\n values[pi] = tv;\n }\n for (int i = 0; i < nanW && pi < size; i++,pi++) {\n values[pi] = Double.NaN;\n }\n }", "public void setMinMaxLabel() {\n minMaxLabel.setText(min + \" ≤ val ≤ \" + max);\n }", "private void setMax(int max) { this.max = new SimplePosition(false,false,max); }", "public SettingInteger setValidRange(int min, int max) { _minValue = min; _maxValue = max; return this; }", "public SpriteIndexRandom(int min, int max) {\n\n this.min = min;\n this.max = max;\n }", "public double getYRangeMin() {\n return yRangeMin;\n }", "public LongRange(long number) {\n/* 73 */ this.min = number;\n/* 74 */ this.max = number;\n/* */ }", "public void clamp(double min, double max) {\n\n\t\tr = Math.max(Math.min(r, max), min);\n\t\tg = Math.max(Math.min(g, max), min);\n\t\tb = Math.max(Math.min(b, max), min);\n\n\t}", "void setValues(final T value, final T min, final T max)\n {\n setValue(value, valueLabel);\n setValue(min, minValueLabel);\n setValue(max, maxValueLabel);\n }", "public double getMaxCoordinateValue() {\n if (this.max_x > this.max_y)\n return this.max_x;\n else\n return this.max_y;\n }", "private Coordinate[] generateBoundingBox(final Geometry geometry) {\n if (geometry == null || geometry.getCoordinates() == null || geometry.getCoordinates().length == 0) {\n return new Coordinate[]{new Coordinate(0,0),new Coordinate(0,0)};\n }\n final Coordinate firstPoint = geometry.getCoordinates()[0];\n double minLat = firstPoint.y;\n double minLon = firstPoint.x;\n double maxLat = firstPoint.y;\n double maxLon = firstPoint.x;\n for (final Coordinate coordinate : geometry.getCoordinates()) {\n if (coordinate.x < minLon) {\n minLon = coordinate.x;\n }\n if (coordinate.y < minLat) {\n minLat = coordinate.y;\n }\n if (coordinate.x > maxLon) {\n maxLon = coordinate.x;\n }\n if (coordinate.y > maxLat) {\n maxLat = coordinate.y;\n }\n }\n return new Coordinate[]{\n new Coordinate(minLon, minLat),\n new Coordinate(maxLon, maxLat)\n };\n }", "@Override\n public int between(int min, int max) {\n return super.between(min, max);\n }", "public double getMaximumX () {\n return minimumX + width;\n }", "public void theMaxX() {\n\t\tfloat maxx = coords.getFirst().getX(); // set the largest x to the first one\n\t\tfor(Coord2D c: coords) { // go through the whole linked list\n\t\t\tif(c.getX() > maxx) { // if the x of the current coordinate set is larger than the current max\n\t\t\t\tmaxx = c.getX(); // make that current coordinate the new max\n\t\t\t}\n\t\t}\n\t\tthis.setMaxX(maxx);\n\t}", "@Test\n\tpublic void testMinMinMin(){\n\t int min=3, mid=5, max=10;\n\t assertEquals( min, MaxDiTre.max(min, min, min) );\n\t}", "public static void main(String[] args) {\n MinMax minMax = new MinMax();\n System.out.println(\"Minimum =\" + minMax.getMin());\n System.out.println(\"Maximum =\" + minMax.getMax());\n }", "MinmaxEntity getStart();", "public MinDisplay(TextField minTemp, TextField minPres, TextField minHum, TextField minTempMin, TextField minTempMax) {\r\n this.minTemp = minTemp;\r\n this.minPres = minPres;\r\n this.minHum = minHum;\r\n this.minTempMin = minTempMin;\r\n this.minTempMax = minTempMax;\r\n }", "public GeometryBoundingBox(double west, double south, double east, double north, Double minAltitude,\n Double maxAltitude) {\n this.west = west;\n this.south = south;\n this.east = east;\n this.north = north;\n this.minAltitude = minAltitude;\n this.maxAltitude = maxAltitude;\n }", "public Point[] getPointsInRangeRegAxis(int min, int max, Boolean axis) {\n\t\tint Number = NumInRangeAxis(min, max, axis); //how much points are there ?\n\t\tPoint[] pointsInRange = new Point[Number];\n\t\tif (Number==0) return pointsInRange;\n\t\tint i = 0;\n\t\tif (axis){\n\t\t\tthis.current=this.minx;\n\t\t\twhile (i<Number){\n\t\t\t\tif (this.current.getData().getX()>=min && this.current.getData().getX()<=max){\n\t\t\t\t\tpointsInRange[i]=this.current.getData();\n\t\t\t\t\ti++;}\n\t\t\t\tthis.current=this.current.getNextX();\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthis.current=this.miny;\n\t\t\twhile (i<Number){\n\t\t\t\tif (this.current.getData().getY()>=min && this.current.getData().getY()<=max){\n\t\t\t\t\tpointsInRange[i]=this.current.getData();\n\t\t\t\t\ti++;}\n\t\t\t\tthis.current=this.current.getNextY();\n\t\t\t}\n\t\t}\n\t\treturn pointsInRange;\n\t}", "@Override\r\n public void merge(Integer minX, Integer maxX, Integer minY, Integer maxY) {\r\n if (this.minX == null) {\r\n this.minX = (minX == null) ? null : minX.doubleValue();\r\n }\r\n if (this.maxX == null) {\r\n this.maxX = (maxX == null) ? null : maxX.doubleValue();\r\n }\r\n if (this.minY == null) {\r\n this.minY = (minY == null) ? null : minY.doubleValue();\r\n }\r\n if (this.maxY == null) {\r\n this.maxY = (maxY == null) ? null : maxY.doubleValue();\r\n }\r\n }", "@Override\n public double between(double min, double max) {\n return super.between(min, max);\n }", "private void setMinMaxPoints(BlockVector pt1, BlockVector pt2) {\r\n List<Vector> points = new ArrayList<Vector>();\r\n points.add(pt1);\r\n points.add(pt2);\r\n setMinMaxPoints(points);\r\n }", "public static void setMaxPoint(Point p) {\n X_MAX = p.x - 10;\n Y_MAX = p.y - 10;\n\n WIDTH = p.x;\n HEIGHT = p.y;\n }", "public static ArrayList<XYCoord> findLocationsInRange(GameMap map, XYCoord origin, int minRange, int maxRange)\n {\n ArrayList<XYCoord> locations = new ArrayList<XYCoord>();\n\n // Loop through all the valid x and y offsets, as dictated by the max range, and add valid spaces to our collection.\n for( int yOff = -maxRange; yOff <= maxRange; ++yOff )\n {\n for( int xOff = -maxRange; xOff <= maxRange; ++xOff )\n {\n int currentRange = Math.abs(xOff) + Math.abs(yOff);\n XYCoord coord = new XYCoord(origin.xCoord + xOff, origin.yCoord + yOff);\n if( currentRange >= minRange && currentRange <= maxRange && map.isLocationValid(coord) )\n {\n // Add this location to the set.\n locations.add(coord);\n }\n }\n }\n\n return locations;\n }", "public int getMinRange() {\r\n return fMinRange;\r\n }", "private int NumInRangeAxis(int min, int max, Boolean axis){\n\t\tint counter = 0;\n\t\tboolean stop = false;\n\t\tif (this.size==0) return 0;\n\t\tif (axis){ //axis x\n\t\t\tif (min>this.maxx.getData().getX() || max<this.minx.getData().getX()) stop=true;\n\t\t\tthis.current=this.minx;\n\t\t\twhile (!stop && this.current!=null){\n\t\t\t\tif (this.current.getData().getX()>=min && this.current.getData().getX() <=max)\n\t\t\t\t\tcounter++;\n\t\t\t\tif (this.current.getData().getX() >= max) stop=true;\n\t\t\t\tthis.current=this.current.getNextX();\n\t\t\t}}\n\t\telse { //axis y\n\t\t\tif (min>this.maxy.getData().getY() || max<this.miny.getData().getY()) stop=true;\n\t\t\tthis.current=this.miny;\n\t\t\twhile (!stop && this.current!=null){\n\t\t\t\tif (this.current.getData().getY()>=min && this.current.getData().getY() <=max)\n\t\t\t\t\tcounter++;\n\t\t\t\tif (this.current.getData().getY() >= max) stop=true;\n\t\t\t\tthis.current=this.current.getNextY();\n\t\t\t}}\n\t\treturn counter;\n\t}", "public void displayMinValues() {\n if (deltaX < deltaXMin) {\n deltaXMin = deltaX;\n minX.setText(_DF.format(deltaXMin));\n }\n if (deltaY < deltaYMin) {\n deltaYMin = deltaY;\n minY.setText(_DF.format(deltaYMin));\n }\n if (deltaZ < deltaZMin) {\n deltaZMin = deltaZ;\n minZ.setText(_DF.format(deltaZMin));\n }\n }", "public void setMin(int min) {\n this.min = min;\n }", "public void setMin(int min) {\n this.min = min;\n }", "public void setMaxMin(long maxMin) {\n\t\tthis.maxMin = maxMin;\r\n\t}", "private void setStartValues() {\n startValues = new float[9];\n mStartMatrix = new Matrix(getImageMatrix());\n mStartMatrix.getValues(startValues);\n calculatedMinScale = minScale * startValues[Matrix.MSCALE_X];\n calculatedMaxScale = maxScale * startValues[Matrix.MSCALE_X];\n }", "@Override\r\n\tpublic Point[] getPointsInRangeRegAxis(int min, int max, Boolean axis) {\n\t\tPoint[] pointsArr = new Point[counter(min, max, axis)];\r\n\t\t//Fill in the array with fitting points\r\n\t\tint ind = 0;\r\n\t\tif(axis){\r\n\t\t\tContainer currX = firstX;\r\n\t\t\twhile (currX!=null){\r\n\t\t\t\tif(((Point)currX.getData()).getX() >= min &&((Point)currX.getData()).getX() <= max){\r\n\t\t\t\t\tpointsArr[ind] = currX.getData();\r\n\t\t\t\t\tind++;\r\n\t\t\t\t}\r\n\t\t\t\tcurrX = currX.next;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\r\n\t\t\tContainer currY = firstY;\r\n\t\t\twhile (currY!=null){\r\n\t\t\t\tif(((Point)currY.getData()).getY() >= min &&((Point)currY.getData()).getY() <= max){\r\n\t\t\t\t\tpointsArr[ind] = currY.getData();\r\n\t\t\t\t\tind++;\r\n\t\t\t\t}\r\n\t\t\t\tcurrY = currY.next;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn pointsArr;\r\n\t}", "public LongRange(Number number) {\n/* 87 */ if (number == null) {\n/* 88 */ throw new IllegalArgumentException(\"The number must not be null\");\n/* */ }\n/* 90 */ this.min = number.longValue();\n/* 91 */ this.max = number.longValue();\n/* 92 */ if (number instanceof Long) {\n/* 93 */ this.minObject = (Long)number;\n/* 94 */ this.maxObject = (Long)number;\n/* */ } \n/* */ }", "public static void minMaxS(IplImage src, double min, double max, IplImage dst) {\n\n switch (src.depth) {\n case cxcore.IPL_DEPTH_8U: {\n ByteBuffer sb = src.getByteBuffer();\n ByteBuffer db = dst.getByteBuffer();\n for (int i = 0; i < sb.capacity(); i++) {\n db.put(i, (byte)Math.max(Math.min(sb.get(i) & 0xFF,max),min));\n }\n break; }\n case cxcore.IPL_DEPTH_16U: {\n ShortBuffer sb = src.getByteBuffer().asShortBuffer();\n ShortBuffer db = dst.getByteBuffer().asShortBuffer();\n for (int i = 0; i < sb.capacity(); i++) {\n db.put(i, (short)Math.max(Math.min(sb.get(i) & 0xFFFF,max),min));\n }\n break; }\n case cxcore.IPL_DEPTH_32F: {\n FloatBuffer sb = src.getByteBuffer().asFloatBuffer();\n FloatBuffer db = dst.getByteBuffer().asFloatBuffer();\n for (int i = 0; i < sb.capacity(); i++) {\n db.put(i, (float)Math.max(Math.min(sb.get(i),max),min));\n }\n break; }\n case cxcore.IPL_DEPTH_8S: {\n ByteBuffer sb = src.getByteBuffer();\n ByteBuffer db = dst.getByteBuffer();\n for (int i = 0; i < sb.capacity(); i++) {\n db.put(i, (byte)Math.max(Math.min(sb.get(i),max),min));\n }\n break; }\n case cxcore.IPL_DEPTH_16S: {\n ShortBuffer sb = src.getByteBuffer().asShortBuffer();\n ShortBuffer db = dst.getByteBuffer().asShortBuffer();\n for (int i = 0; i < sb.capacity(); i++) {\n db.put(i, (short)Math.max(Math.min(sb.get(i),max),min));\n }\n break; }\n case cxcore.IPL_DEPTH_32S: {\n IntBuffer sb = src.getByteBuffer().asIntBuffer();\n IntBuffer db = dst.getByteBuffer().asIntBuffer();\n for (int i = 0; i < sb.capacity(); i++) {\n db.put(i, (int)Math.max(Math.min(sb.get(i),max),min));\n }\n break; }\n case cxcore.IPL_DEPTH_64F: {\n DoubleBuffer sb = src.getByteBuffer().asDoubleBuffer();\n DoubleBuffer db = dst.getByteBuffer().asDoubleBuffer();\n for (int i = 0; i < sb.capacity(); i++) {\n db.put(i, Math.max(Math.min(sb.get(i),max),min));\n }\n break; }\n default: assert(false);\n }\n\n }", "public static double normalizeMapminmax(double num) {\r\n \t\tint MAXsetvaluefaktor = 1;\r\n \t\tint MINsetvaluefaktor = 1;\r\n \r\n \t\tswitch (GAMETYPE) {\r\n \t\tcase SAYISALLOTO: {\r\n \t\t\tif (INPUTVALUETYPE == DIGITAL) {\r\n \t\t\t\tMAXsetvaluefaktor = SAYISALMINSETVALUE1;\r\n \t\t\t\tMINsetvaluefaktor = 0;\r\n \t\t\t} else if (INPUTVALUETYPE == RAWVALUE) {\r\n \t\t\t\tMAXsetvaluefaktor = SAYISALMAXSETVALUE49;\r\n \t\t\t\tMINsetvaluefaktor = SAYISALMINSETVALUE1;\r\n \t\t\t}\r\n \t\t\tbreak;\r\n \t\t}\r\n \t\tdefault: {\r\n \r\n \t\t}\r\n \t\t}\r\n \r\n \t\tdouble result = ((MAPMAX - MAPMIN) * (num - MINsetvaluefaktor));\r\n \t\tresult = result / (MAXsetvaluefaktor - MINsetvaluefaktor);\r\n \t\tresult = result + MAPMIN;\r\n \t\treturn result;\r\n \t}", "public void setValues(float minValue, float maxValue) {\n _minValue = minValue;\n _maxValue = maxValue;\n _min.setValue(_minValue);\n _max.setValue(_maxValue);\n }", "public static void setMinimumRange(int first, int last) {\r\n \tif (first > last) throw new IllegalArgumentException();\r\n \tIndex.valueOf(first);\r\n \tIndex.valueOf(last);\r\n }", "public double getMinRange() {\n return minRange;\n }", "public double getMaxX() { return getX() + getWidth(); }", "public MyRectangle MBR(int id,String minx2_s, String miny2_s, String maxx2_s, String maxy2_s)\n\t{\t\n\t\tMyRectangle rec;\t\t\t\t\n\t\t\t\n\t\tif(!HasRMBR(id))\n\t\t{\t\n\t\t\trec = new MyRectangle();\n\t\t\trec.min_x = Double.parseDouble(minx2_s);\n\t\t\trec.min_y = Double.parseDouble(miny2_s);\n\t\t\trec.max_x = Double.parseDouble(maxx2_s);\n\t\t\trec.max_y = Double.parseDouble(maxy2_s);\n\t\t\treturn rec;\n\t\t}\n\n\t\trec = GetRMBR(id);\t\n\t\t\n\t\tdouble minx2 = Double.parseDouble(minx2_s);\n\t\tdouble miny2 = Double.parseDouble(miny2_s);\n\t\tdouble maxx2 = Double.parseDouble(maxx2_s);\n\t\tdouble maxy2 = Double.parseDouble(maxy2_s);\n\t\t\n\t\tboolean flag = false;\n\t\tif(minx2 < rec.min_x)\n\t\t{\n\t\t\trec.min_x = minx2;\n\t\t\tflag = true;\n\t\t}\n\t\t\n\t\tif(miny2 < rec.min_y)\n\t\t{\n\t\t\trec.min_y = miny2;\n\t\t\tflag = true;\n\t\t}\n\t\t\n\t\tif(maxx2 > rec.max_x)\n\t\t{\n\t\t\trec.max_x = maxx2;\n\t\t\tflag = true;\n\t\t}\n\t\t\n\t\tif(maxy2 > rec.max_y)\n\t\t{\n\t\t\trec.max_y = maxy2;\n\t\t\tflag = true;\n\t\t}\n\t\t\n\t\tif(flag)\n\t\t\treturn rec;\n\t\telse\n\t\t\treturn null;\n\t}", "public abstract Move launchMinMax();" ]
[ "0.7184689", "0.7120432", "0.71030825", "0.6886036", "0.6869718", "0.68288755", "0.67624545", "0.675346", "0.66790575", "0.6636058", "0.6583776", "0.6575398", "0.6542853", "0.6526052", "0.64940965", "0.6408475", "0.6384374", "0.63556683", "0.63353497", "0.63179266", "0.6314579", "0.63065106", "0.6285955", "0.6268798", "0.62634075", "0.62607163", "0.62435627", "0.6231454", "0.6230694", "0.622254", "0.6219088", "0.62185127", "0.6189281", "0.61853343", "0.61821306", "0.6180804", "0.61481184", "0.6120099", "0.61150604", "0.61046827", "0.60979235", "0.6082545", "0.6080715", "0.60596293", "0.6031239", "0.60276866", "0.6022837", "0.60031146", "0.6000213", "0.5997478", "0.5977216", "0.5972563", "0.59677184", "0.5962668", "0.59491897", "0.59437335", "0.59432113", "0.5931352", "0.5925977", "0.59236157", "0.59232146", "0.5912789", "0.5905304", "0.5904013", "0.5883119", "0.5881284", "0.5868022", "0.5837332", "0.5835741", "0.5834452", "0.58335596", "0.5819205", "0.5816316", "0.5801311", "0.5799799", "0.579301", "0.578953", "0.5784642", "0.5779925", "0.5771598", "0.5766382", "0.5757386", "0.57545674", "0.5746839", "0.574218", "0.5735678", "0.57326275", "0.5725152", "0.5725152", "0.57215303", "0.57179683", "0.5707168", "0.57068485", "0.57061195", "0.5696448", "0.5693961", "0.5690463", "0.5679295", "0.56762046", "0.56687963", "0.5668343" ]
0.0
-1
update QMin and QMax
protected void buildRadius() { if (m_Qmax == null || m_Qmin == null) { updateQMinQMax(); } m_Radius = getMaxDistanceOrigin(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateMinMax( ) {\r\n if( (data == null) || (data.size() < 1) ) {\r\n min = 0.0;\r\n max = 0.0;\r\n return;\r\n }\r\n\r\n min = data.get( 0 );\r\n max = data.get( 0 );\r\n\r\n for( int i = 1; i < data.size(); i++ ) {\r\n if( min > data.get( i ) )\r\n min = data.get( i );\r\n if( max < data.get( i ) )\r\n max = data.get( i );\r\n }\r\n\r\n }", "@Override\r\n public void setMinMax(Double min, Double max) {\r\n this.minIn = min;\r\n this.maxIn = max;\r\n }", "public void setMinMax(double min, double max)\n {\n if (max == min)\n throw new IllegalArgumentException(\"Max value must be bigger than Min value!\");\n\n this.min = min;\n this.max = max;\n if (max < min)\n {\n this.max = min;\n this.min = max;\n }\n }", "@Override public void setMinMax(float minValue, float maxValue) {\n this.valueTrack.min = minValue; this.valueTrack.max = maxValue;\n }", "public void setRange(double min, double max) {\n super.setRange(min, max);\n }", "public void initMaxMin(){\n\t\tmax = dja.max();\n\t\tmin = dja.min();\n\t}", "private void updateQueueSize() {\n\t\tsims.minQS = state.queueSize < sims.minQS ? state.queueSize : sims.minQS;\n\t\tsims.maxQS = state.queueSize > sims.maxQS ? state.queueSize : sims.maxQS;\n\t}", "public void setBounds(Double min, Double max) {\n Double aMin = Math.min(min, max);\n Double aMax = Math.max(min, max);\n if (aMin != this.min || aMax != this.max) {\n super.setMinimum(aMin);\n super.setMaximum(aMax);\n }\n fireStateChanged();\n }", "public void setRange(int min, int max) {\n range = new PriceRange();\n range.setMaximum(max);\n range.setMinimum(min);\n }", "private void add_range(Question q)\n\t{\n\t\tlog.debug(\"Question \" + q.getQid() + \" is getting checked for ranges\");\n\t\tString min = doc.selectSingleNode(\"//document/question_attributes/rows/row[qid=\" + q.getQid() + \" and attribute='min_num_value_n']/value\").getText();\n\t\tString max = doc.selectSingleNode(\"//document/question_attributes/rows/row[qid=\" + q.getQid() + \" and attribute='max_num_value_n']/value\").getText();\n\n\t\tif (min != \"\") {\n\t\t\tq.setFloat_range_min(min);\n\t\t}\n\t\tif (max != \"\") {\n\t\t\tq.setFloat_range_max(max);\n\t\t}\n\t\tlog.debug(\"range check finished\");\n\t}", "public void setAxisRange(double xMin,double xMax, double yMin, double yMax) {\n minXValue=xMin;\n maxXValue=xMax;\n minYValue=yMin;\n maxYValue=yMax;\n this.customAxis=true;\n addGraphPanel();\n\n }", "protected void calcMinMax() {\n }", "@Override\r\n public void update(double t, double p, double h, double tMax, double tMin) {\r\n\r\n Platform.runLater(()-> {\r\n tValues.add(t);\r\n pValues.add(p);\r\n hValues.add(h);\r\n tMaxValues.add(tMax);\r\n tMinValues.add(tMin);\r\n\r\n double mintempMin = tValues.get(0);\r\n double presMin = pValues.get(0);\r\n double humMin = hValues.get(0);\r\n double tempMinMin = tMinValues.get(0);\r\n double tempMaxMin = tMaxValues.get(0);\r\n\r\n for (int i = 1; i < tValues.size(); i++){\r\n if(mintempMin > tValues.get(i))\r\n mintempMin = tValues.get(i);\r\n if(presMin > pValues.get(i))\r\n presMin = pValues.get(i);\r\n if(humMin > hValues.get(i))\r\n humMin = hValues.get(i);\r\n if(tempMinMin > tMinValues.get(i))\r\n tempMinMin = tMinValues.get(i);\r\n if(tempMaxMin > tMaxValues.get(i))\r\n tempMaxMin = tMaxValues.get(i);\r\n }\r\n\r\n minTemp.clear();\r\n minTemp.appendText(String.valueOf(mintempMin));\r\n minPres.clear();\r\n minPres.appendText(String.valueOf(presMin));\r\n minHum.clear();\r\n minHum.appendText(String.valueOf(humMin));\r\n minTempMin.clear();\r\n minTempMin.appendText(String.valueOf(tempMinMin));\r\n minTempMax.clear();\r\n minTempMax.appendText(String.valueOf(tempMaxMin));\r\n });\r\n }", "private void doSetRangeProps(\n double v,\n double e,\n double minimum,\n double maximum,\n int p)\n {\n double dblValue;\n\n if (minimum > maximum)\n {\n maximum = minimum;\n }\n if (maximum < minimum)\n {\n minimum = maximum;\n }\n if ((v + e) > maximum)\n {\n v = maximum - e;\n }\n if (v < minimum)\n {\n v = minimum;\n }\n\n precision = p;\n multiplier = Double.valueOf(Math.pow(10, p)).intValue();\n\n dblMinimum = minimum;\n setMinimum((int) (dblMinimum * multiplier));\n dblMaximum = maximum;\n setMaximum((int) (dblMaximum * multiplier));\n dblValue = v;\n setValue((int) (dblValue * multiplier));\n dblExtent = e;\n setExtent((int) (dblExtent * multiplier));\n }", "void setValues(final T value, final T min, final T max)\n {\n setValue(value, valueLabel);\n setValue(min, minValueLabel);\n setValue(max, maxValueLabel);\n }", "@Override\n public void synchronizeMinMaxNFreshs() {\n\t\n }", "public void setValues(float minValue, float maxValue) {\n _minValue = minValue;\n _maxValue = maxValue;\n _min.setValue(_minValue);\n _max.setValue(_maxValue);\n }", "private synchronized void updateNumberFormat()\n\t{\n\n\t\tfinal int sw = rangeSlider.getWidth();\n\t\tif ( sw > 0 )\n\t\t{\n\t\t\tfinal double vrange = range.getMaxBound() - range.getMinBound();\n\t\t\tfinal int digits = ( int ) Math.ceil( Math.log10( sw / vrange ) );\n\n\t\t\tblockUpdates = true;\n\n\t\t\tJSpinner.NumberEditor numberEditor = ( ( JSpinner.NumberEditor ) minSpinner.getEditor() );\n\t\t\tnumberEditor.getFormat().setMaximumFractionDigits( digits );\n\t\t\tnumberEditor.stateChanged( new ChangeEvent( minSpinner ) );\n\n\t\t\tnumberEditor = ( ( JSpinner.NumberEditor ) maxSpinner.getEditor() );\n\t\t\tnumberEditor.getFormat().setMaximumFractionDigits( digits );\n\t\t\tnumberEditor.stateChanged( new ChangeEvent( maxSpinner ) );\n\n\t\t\tblockUpdates = false;\n\t\t}\n\t}", "protected final void setMax() {\n\n\tint prevmax = this.max;\n\n\tint i1 = this.high;\n\tint i2 = left.max;\n\tint i3 = right.max;\n\n\tif ((i1 >= i2) && (i1 >= i3)) {\n\t this.max = i1;\n\t} else if ((i2 >= i1) && (i2 >= i3)) {\n\t this.max = i2;\n\t} else {\n\t this.max = i3;\n\t}\n\t\n\tif ((p != IntervalNode.nullIntervalNode) &&\n\t (prevmax != this.max)) {\n \t p.setMax();\n\t}\n }", "@Override protected void updateAxisRange() {\n final Axis<X> xa = getXAxis();\n final Axis<Y> ya = getYAxis();\n List<X> xData = null;\n List<Y> yData = null;\n if(xa.isAutoRanging()) xData = new ArrayList<X>();\n if(ya.isAutoRanging()) yData = new ArrayList<Y>();\n if(xData != null || yData != null) {\n for(Series<X,Y> series : getData()) {\n for(Data<X,Y> data: series.getData()) {\n if(xData != null) {\n xData.add(data.getXValue());\n xData.add(xa.toRealValue(xa.toNumericValue(data.getXValue()) + getLength(data.getExtraValue())));\n }\n if(yData != null){\n yData.add(data.getYValue());\n }\n }\n }\n if(xData != null) xa.invalidateRange(xData);\n if(yData != null) ya.invalidateRange(yData);\n }\n }", "public void changeBounds(Point3D minDelta, Point3D maxDelta) {\n this.minBounds = this.minBounds.add(minDelta);\n this.maxBounds = this.maxBounds.add(maxDelta);\n\n if (minBounds == NO_MIN_BOUNDS) {\n this.minBounds = minDelta;\n }\n if (maxBounds == NO_MAX_BOUNDS) {\n this.maxBounds = maxDelta;\n }\n }", "public void setBounds(Point3D minBounds, Point3D maxBounds) {\n this.minBounds = minBounds;\n this.maxBounds = maxBounds;\n }", "public void allMinMax() {\n\t\tthis.theMaxX();\n\t\tthis.theMinX();\n\t\tthis.theMaxY();\n\t\tthis.theMinY();\n\t}", "@Override\n protected void updateAxisRange(){\n Axis<X> xAxis = getXAxis();\n Axis<Y> yAxis = getYAxis();\n ArrayList<X> xList = null;\n ArrayList<Y> yList = null;\n if(xAxis.isAutoRanging()) { xList = new ArrayList<>(); }\n if(yAxis.isAutoRanging()) { yList = new ArrayList<>(); }\n\n if(xAxis != null || yAxis != null) {\n for (Series<X, Y> series : getData()) {\n for (Data<X, Y> data : series.getData()) {\n if(xList != null) {\n xList.add(data.getXValue());\n xList.add(xAxis.toRealValue(xAxis.toNumericValue(data.getXValue())\n + getLength(data.getExtraValue())));\n }\n if(yList != null) {\n yList.add(data.getYValue());\n }\n }\n }\n if(xList != null) { xAxis.invalidateRange(xList); }\n if(yList != null) { yAxis.invalidateRange(yList); }\n }\n\n }", "public SettingInteger setValidRange(int min, int max) { _minValue = min; _maxValue = max; return this; }", "private static void setQui(){\n int mX, mY;\n for (Integer integer : qList) {\n mY = (int) (Math.floor(1.f * integer / Data.meshRNx));\n mX = integer - Data.meshRNx * mY;\n if (Data.densCells[mX][mY] > Data.gwCap[mX][mY] * .75) {\n for (int j = 0; j < Data.densCells[mX][mY]; j++) {\n Cell cell = (Cell) cells.get(Data.idCellsMesh[mX][mY][j]);\n cell.vState = true;\n cell.quiescent = Data.densCells[mX][mY] >= Data.gwCap[mX][mY];\n }\n }\n }\n }", "public void setXDataRange(float min, float max);", "protected final void setMin() {\n\tint prevmin = this.min;\n\n\tint i1 = this.low;\n\tint i2 = left.min;\n\tint i3 = right.min;\n\n\tif (i2 == -1) \n\t i2 = i1;\n\tif (i3 == -1) \n\t i3 = i1;\n\n\tif ((i1 <= i2) && (i1 <= i3)) {\n\t this.min = i1;\n\t} else if ((i2 <= i1) && (i2 <= i3)) {\n\t this.min = i2;\n\t} else {\n\t this.min = i3;\n\t}\n\n\tif ((p != IntervalNode.nullIntervalNode) &&\n\t (prevmin != this.min)) {\n \t p.setMin();\n\t}\n }", "public void narrowRange(int min, int max, Boolean axis) {\n\t\tint counter=0; // how much points we erasing total ?\n\t\tboolean erasingAll=false; // if we eventually erasing all the database\n\t\t// by axis X-----------------------------------------//\n\t\tif (axis){ \n\t\t\tthis.current = this.minx;\n\t\t\twhile (!erasingAll && this.current.getData().getX()<min){\n\t\t\t\tnarrowOppPoint(this.current,axis); // deleting this point in y axis\n\t\t\t\tthis.current = this.current.getNextX(); \n\t\t\t\tcounter++;\n\t\t\t\tif (this.current==null) //if we get to the edge of the DS\n\t\t\t\t\terasingAll=true;\n\t\t\t}\n\t\t\tif (!erasingAll)\n\t\t\t\tthis.current.setPrevX(null);\n\t\t\tthis.minx = this.current; // the actual erasing\n\t\t\t//---//\n\t\t\tthis.current = this.maxx;\n\t\t\twhile (!erasingAll && this.current.getData().getX() > max){\n\t\t\t\tnarrowOppPoint(this.current,axis);\n\t\t\t\tthis.current = this.current.getPrevX(); \n\t\t\t\tcounter++;\n\t\t\t\tif (this.current==null) //if we get to the edge of the DS\n\t\t\t\t\terasingAll=true;\n\t\t\t}\n\t\t\tif (!erasingAll)\n\t\t\t\tthis.current.setNextX(null);\n\t\t\tthis.maxx = this.current; //the actual erasing\n\t\t}\n\t\t// by axis Y -----------------------------------------------------------//\n\t\telse{ \n\t\t\tthis.current = this.miny;\n\t\t\twhile (!erasingAll && this.current.getData().getY()<min){\n\t\t\t\tnarrowOppPoint(this.current,axis);\n\t\t\t\tthis.current = this.current.getNextY(); \n\t\t\t\tcounter++;\n\t\t\t\tif (this.current==null) //if we get to the edge of the DS\n\t\t\t\t\terasingAll=true;\n\t\t\t}\n\t\t\tif (!erasingAll)\n\t\t\t\tthis.current.setPrevY(null);\n\t\t\tthis.miny = this.current; //the actual erasing\n\t\t\t//--//\n\t\t\tthis.current = this.maxy;\n\t\t\twhile (!erasingAll && this.current.getData().getY() > max){\n\t\t\t\tnarrowOppPoint(this.current,axis);\n\t\t\t\tthis.current = this.current.getPrevY(); \n\t\t\t\tcounter++;\n\t\t\t\tif (this.current==null) //if we get to the edge of the DS\n\t\t\t\t\terasingAll=true;\n\t\t\t}\n\t\t\tif (!erasingAll)\n\t\t\t\tthis.current.setNextY(null);\n\t\t\tthis.maxy = this.current; //the actual erasing\n\t\t}\n\t\tthis.size = this.size - counter; // Update the size of the DS\n\t}", "public void set(int min, int max, double score){\r\n\t\tchart[min][max] = score;\r\n\t}", "public void setRangeProperties(\r\n int newValue,\r\n int newExtent,\r\n int newMin,\r\n int newMax,\r\n boolean adjusting) {\r\n\r\n\r\n if (newMin > newMax) {\r\n newMin = newMax;\r\n }\r\n if (newValue > newMax) {\r\n newMax = newValue;\r\n }\r\n if (newValue < newMin) {\r\n newMin = newValue;\r\n }\r\n\r\n /* Convert the addends to long so that extent can be\r\n * Integer.MAX_VALUE without rolling over the sum.\r\n * A JCK test covers this, see bug 4097718.\r\n */\r\n if (((long) newExtent + (long) newValue) > newMax) {\r\n newExtent = newMax - newValue;\r\n\r\n\r\n }\r\n if (newExtent < 0) {\r\n newExtent = 0;\r\n }\r\n boolean isChange =\r\n (newValue != getValue())\r\n || (newExtent != getExtent())\r\n || (newMin != min)\r\n || (newMax != max)\r\n || (adjusting != isAdjusting);\r\n if (isChange) {\r\n setValue0(newValue);\r\n setExtent0(newExtent);\r\n min = newMin;\r\n max = newMax;\r\n isAdjusting = adjusting;\r\n fireStateChanged();\r\n }\r\n }", "@Override\n public void getLocalBounds(Vector3 min, Vector3 max) {\n\n // Maximum bounds\n max.setX(radius + margin);\n max.setY(halfHeight + margin);\n max.setZ(max.getX());\n\n // Minimum bounds\n min.setX(-max.getX());\n min.setY(-max.getY());\n min.setZ(min.getX());\n }", "public synchronized void setOutputRange(double minOutput, double maxOutput)\n {\n final String funcName = \"setOutputRange\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API, \"min=%f,max=%f\", minOutput, maxOutput);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);\n }\n\n if (maxOutput <= minOutput)\n {\n throw new IllegalArgumentException(\"maxOutput must be greater than minOutput\");\n }\n\n if (Math.abs(minOutput) == Math.abs(maxOutput))\n {\n outputLimit = maxOutput;\n }\n\n this.minOutput = minOutput;\n this.maxOutput = maxOutput;\n }", "public synchronized void setRatio(int min, int max, int curr) {\n setRatio(getRatio(min, max, curr));\r\n }", "public void setRightRange(int min, int max) {\n rightBeginning = min;\n rightEnd = max;\n }", "public void clamp(double min, double max) {\n\n\t\tr = Math.max(Math.min(r, max), min);\n\t\tg = Math.max(Math.min(g, max), min);\n\t\tb = Math.max(Math.min(b, max), min);\n\n\t}", "public void updateFeaturesMinMax() throws DatabaseAccessException {\n\t\tStatement stmt;\n\t\tResultSet rs;\n\n\t\ttry {\n\t\t\tstmt = this.connection.createStatement();\n\t\t\trs = stmt.executeQuery(\"SELECT Id FROM Features;\");\n\t\t\tArrayList<Integer> featureIds = new ArrayList<Integer>();\n\t\t\twhile (rs.next()) {\n\t\t\t\tfeatureIds.add(rs.getInt(\"Id\"));\n\t\t\t}\n\t\t\tstmt.close();\n\n\t\t\tfor (Integer id : featureIds) {\n\t\t\t\tstmt = this.connection.createStatement();\n\t\t\t\trs = stmt.executeQuery(\"SELECT MIN(\\\"\" + id + \"\\\"), MAX(\\\"\" + id + \"\\\") FROM Objects;\");\n\t\t\t\tfloat min = rs.getFloat(1);\n\t\t\t\tfloat max = rs.getFloat(2);\n\t\t\t\trs.close();\n\t\t\t\tstmt.close();\n\n\t\t\t\tPreparedStatement prepStmt = this.connection\n\t\t\t\t\t\t.prepareStatement(\"UPDATE Features SET Min=?, Max=? WHERE Id=?\");\n\t\t\t\tprepStmt.setFloat(1, min);\n\t\t\t\tprepStmt.setFloat(2, max);\n\t\t\t\tprepStmt.setInt(3, id);\n\t\t\t\tprepStmt.execute();\n\t\t\t\tprepStmt.close();\n\t\t\t}\n\t\t} catch (SQLException ex) {\n\t\t\tthrow new DatabaseAccessException(Failure.WRITE);\n\t\t}\n\t}", "private void updateMinMax(Instance instance){\n\n for (int j = 0; j < m_Train.numAttributes(); j++) {\n if(m_Train.classIndex() == j || m_Train.attribute(j).isNominal())\n\tcontinue;\n if (instance.value(j) < m_MinArray[j]) \n\tm_MinArray[j] = instance.value(j);\n if (instance.value(j) > m_MaxArray[j])\n\tm_MaxArray[j] = instance.value(j);\n } \n }", "public void setPowerRange(double min, double max) {\n\t\tsetOutputRange(new APPDriveData(min, 0, 0), new APPDriveData(max, 0, 0),\n\t\t\t\t(data1, data2) -> Double.compare(data1.power, data2.power));\n\t}", "public void setMinRange(double minRange) {\n this.minRange = minRange;\n }", "public MaxAndMin(){\n this.list=new ListOfData().getData();\n }", "protected void updateValues(){\n double total = 0;\n for(int i = 0; i < values.length; i++){\n values[i] = \n operation(minimum + i * (double)(maximum - minimum) / (double)numSteps);\n \n total += values[i];\n }\n for(int i = 0; i < values.length; i++){\n values[i] /= total;\n }\n }", "private void onChange() {\n startTime = -1L;\n endTime = -1L;\n minLat = Double.NaN;\n maxLat = Double.NaN;\n minLon = Double.NaN;\n maxLon = Double.NaN;\n }", "public RangeSlider(int min, int max) {\n super(min, max);\n initSlider();\n }", "protected void calcMinMax() {\n if (this.mDataSets != null) {\n T t;\n this.mYMax = -3.4028235E38f;\n this.mYMin = Float.MAX_VALUE;\n this.mXMax = -3.4028235E38f;\n this.mXMin = Float.MAX_VALUE;\n Iterator<T> iterator = this.mDataSets.iterator();\n while (iterator.hasNext()) {\n this.calcMinMax((IDataSet)iterator.next());\n }\n this.mLeftAxisMax = -3.4028235E38f;\n this.mLeftAxisMin = Float.MAX_VALUE;\n this.mRightAxisMax = -3.4028235E38f;\n this.mRightAxisMin = Float.MAX_VALUE;\n T t2 = this.getFirstLeft(this.mDataSets);\n if (t2 != null) {\n this.mLeftAxisMax = t2.getYMax();\n this.mLeftAxisMin = t2.getYMin();\n for (IDataSet iDataSet : this.mDataSets) {\n if (iDataSet.getAxisDependency() != YAxis.AxisDependency.LEFT) continue;\n if (iDataSet.getYMin() < this.mLeftAxisMin) {\n this.mLeftAxisMin = iDataSet.getYMin();\n }\n if (!(iDataSet.getYMax() > this.mLeftAxisMax)) continue;\n this.mLeftAxisMax = iDataSet.getYMax();\n }\n }\n if ((t = this.getFirstRight(this.mDataSets)) != null) {\n this.mRightAxisMax = t.getYMax();\n this.mRightAxisMin = t.getYMin();\n for (IDataSet iDataSet : this.mDataSets) {\n if (iDataSet.getAxisDependency() != YAxis.AxisDependency.RIGHT) continue;\n if (iDataSet.getYMin() < this.mRightAxisMin) {\n this.mRightAxisMin = iDataSet.getYMin();\n }\n if (!(iDataSet.getYMax() > this.mRightAxisMax)) continue;\n this.mRightAxisMax = iDataSet.getYMax();\n }\n }\n }\n }", "public AdornmentTypeRange(final float min, final float max) {\n\t\tthis.maxFloat = max;\n\t\tthis.minFloat = min;\n\t}", "public void setValues( final int selection,\n final int minimum,\n final int maximum,\n final int thumb,\n final int increment,\n final int pageIncrement )\n {\n \tcheckWidget();\n \tif( selection >= minimum && selection <= maximum ) {\n \t this.selection = selection;\n }\n if( 0 <= minimum && minimum < maximum ) {\n this.minimum = minimum;\n if( selection < minimum ) {\n this.selection = minimum;\n }\n }\n if( 0 <= minimum && minimum < maximum ) {\n this.maximum = maximum;\n if( selection > maximum - thumb ) {\n this.selection = maximum - thumb;\n }\n }\n if( thumb >= 1 ) {\n this.thumb = thumb;\n }\n if( increment >= 1 && increment <= ( maximum - minimum ) ) {\n this.increment = increment;\n }\n if( pageIncrement >= 1 && pageIncrement <= ( maximum - minimum ) ) {\n this.pageIncrement = pageIncrement;\n }\n if( thumb >= maximum - minimum ) {\n this.thumb = maximum - minimum;\n this.selection = minimum;\n }\n }", "public Range(Double val) {\n\t\tminSum = maxSum = val;\n\t\tupdated = false;\n\t}", "private void setMin(int min) { this.min = new SimplePosition(false,false,min); }", "private void calculateMinMaxPositions() {\n boundingVolume = null;\n if ( minMax == null ) {\n minMax = new double[6];\n\n double minX = Double.MAX_VALUE;\n double minY = Double.MAX_VALUE;\n double minZ = Double.MAX_VALUE;\n double maxX = -Double.MAX_VALUE;\n double maxY = -Double.MAX_VALUE;\n double maxZ = -Double.MAX_VALUE;\n int i;\n\n for ( i = 0; i < getNumVertices(); i++ ) {\n double x = vertexPositions[3*i+0];\n double y = vertexPositions[3*i+1];\n double z = vertexPositions[3*i+2];\n\n if ( x < minX ) minX = x;\n if ( y < minY ) minY = y;\n if ( z < minZ ) minZ = z;\n if ( x > maxX ) maxX = x;\n if ( y > maxY ) maxY = y;\n if ( z > maxZ ) maxZ = z;\n }\n minMax[0] = minX;\n minMax[1] = minY;\n minMax[2] = minZ;\n minMax[3] = maxX;\n minMax[4] = maxY;\n minMax[5] = maxZ;\n }\n }", "public synchronized void setTargetRange(double minTarget, double maxTarget)\n {\n final String funcName = \"setTargetRange\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API, \"min=%f,max=%f\", minTarget, maxTarget);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);\n }\n\n this.minTarget = minTarget;\n this.maxTarget = maxTarget;\n }", "@Override\r\n public void map(Double minX, Double maxX, Double minY, Double maxY) {\r\n this.minX = minX;\r\n this.maxX = maxX;\r\n this.minY = minY;\r\n this.maxY = maxY;\r\n }", "private void initLimits() {\n lowerLimit1 = quarterHolderWidth;\n lowerLimit2 = (2 * quarterHolderWidth);\n lowerLimit3 = (3 * quarterHolderWidth);\n lowerLimit4 = holderWidth;\n }", "public void setDistanceRange( float min_distance, float max_distance )\n {\n if ( min_distance > max_distance )\n {\n float temp = min_distance;\n min_distance = max_distance;\n max_distance = temp;\n }\n\n if ( min_distance == max_distance )\n max_distance = min_distance + 1;\n\n distance_slider.setMinimum( (int)(DISTANCE_SCALE_FACTOR * min_distance) );\n distance_slider.setMaximum( (int)(DISTANCE_SCALE_FACTOR * max_distance) );\n }", "public final void adjustLimits(int max) {\n this.invalid = false;\n if (this.value < 1) {\n this.value = 1;\n this.invalid = true;\n }\n if (max > 0) {\n if (this.value > max) {\n this.value = max;\n this.invalid = true;\n }\n }\n }", "private void findMinandMaxValues(SparklineValues values) {\n minY = values.getValues().stream().filter(value -> value.getValue() != null).mapToDouble(SparklineValues.SparklineValue::getValue).min().orElse(0.0);\n maxY = values.getValues().stream().filter(value -> value.getValue() != null).mapToDouble(SparklineValues.SparklineValue::getValue).max().orElse(0.0);\n\n if (Math.abs(minY) > 1E30 || Math.abs(maxY) > 1E30) {\n // something is probably wrong\n System.out.println(\"Unexpectedly small/large min or max: \");\n values.getValues().forEach(value -> {\n System.out.print(value.getValue() + \" \");\n });\n System.out.println();\n minY = -1.0;\n maxY = 1.0;\n }\n\n if (minY.equals(maxY)) {\n if (minY.equals(0.0)) {\n minY = -1.0;\n maxY = 1.0;\n } else {\n minY = minY - 0.1 * Math.abs(minY);\n maxY = maxY + 0.1 * Math.abs(maxY);\n }\n }\n }", "protected void calcMinMax(T t) {\n if (this.mYMax < t.getYMax()) {\n this.mYMax = t.getYMax();\n }\n if (this.mYMin > t.getYMin()) {\n this.mYMin = t.getYMin();\n }\n if (this.mXMax < t.getXMax()) {\n this.mXMax = t.getXMax();\n }\n if (this.mXMin > t.getXMin()) {\n this.mXMin = t.getXMin();\n }\n if (t.getAxisDependency() == YAxis.AxisDependency.LEFT) {\n if (this.mLeftAxisMax < t.getYMax()) {\n this.mLeftAxisMax = t.getYMax();\n }\n if (!(this.mLeftAxisMin > t.getYMin())) return;\n {\n this.mLeftAxisMin = t.getYMin();\n return;\n }\n } else {\n if (this.mRightAxisMax < t.getYMax()) {\n this.mRightAxisMax = t.getYMax();\n }\n if (!(this.mRightAxisMin > t.getYMin())) return;\n {\n this.mRightAxisMin = t.getYMin();\n return;\n }\n }\n }", "public void changeRangeX(double limiteInitial, double limiteFinal, double space){\n //rango eje x\n xAxis = (NumberAxis) plot.getDomainAxis();\n xAxis.setRange(limiteInitial, limiteFinal);//agrego el rango en el eje de las x\n xAxis.setTickUnit(new NumberTickUnit(space));//agrego el espacio entre cada rango\n }", "public DynamicPart minMax(float min, float max) {\n return this.min(min).max(max);\n }", "private List<HashMap<TimeSelector, Long>> updateLeq(\n HashMap<ComparableExpression, HashSet<ComparableExpression>> rLeq,\n HashMap<TimeSelector, Long> lowerBounds, HashMap<TimeSelector, Long> upperBounds)\n throws QueryContradictoryException {\n\n ArrayList<ArrayList<ComparableExpression>> leq = relationToTuples(rLeq);\n for (ArrayList<ComparableExpression> tuple : leq) {\n TimeSelector selector = null;\n Long literalValue = null;\n // only comparisons between a selector and a literal are interesting here\n // selector <= literal => upper(selector) = min(upper(selector), literal)\n if (tuple.get(0) instanceof TimeSelector && tuple.get(1) instanceof TimeLiteral) {\n selector = (TimeSelector) tuple.get(0);\n literalValue = ((TimeLiteral) tuple.get(1)).getMilliseconds();\n upperBounds.put(selector, Math.min(upperBounds.get(selector), literalValue));\n } else if (tuple.get(1) instanceof TimeSelector &&\n tuple.get(0) instanceof TimeLiteral) {\n // selector >= literal => lower(selector) = max(lower(selector), literal)\n selector = (TimeSelector) tuple.get(1);\n literalValue = ((TimeLiteral) tuple.get(0)).getMilliseconds();\n lowerBounds.put(selector, Math.max(lowerBounds.get(selector), literalValue));\n } else {\n continue;\n }\n\n if (lowerBounds.get(selector) > upperBounds.get(selector)) {\n throw new QueryContradictoryException();\n }\n }\n\n return Arrays.asList(lowerBounds, upperBounds);\n }", "private double correctToRange(double value, double min, double max) {\r\n\t\t// If the value is below the range, set it equal to the minimum.\r\n\t\tif (value < min) {\r\n\t\t\treturn min;\r\n\t\t\t// If it is above the range, set it equal to the maximum.\r\n\t\t} else if (value > max) {\r\n\t\t\treturn max;\r\n\t\t}\r\n\t\t// Otherwise, it is in-range and no adjustments are needed.\r\n\t\treturn value;\r\n\t}", "private void initSnapLimits() {\n int halfInterval = quarterHolderWidth / 2;\n snapLimit0 = halfInterval;\n snapLimit1 = lowerLimit1 + halfInterval;\n snapLimit2 = lowerLimit2 + halfInterval;\n snapLimit3 = lowerLimit3 + halfInterval;\n }", "private void populateMinMaxTime()\n {\n final ColumnHolder columnHolder = index.getColumnHolder(ColumnHolder.TIME_COLUMN_NAME);\n try (final NumericColumn column = (NumericColumn) columnHolder.getColumn()) {\n this.minTime = DateTimes.utc(column.getLongSingleValueRow(0));\n this.maxTime = DateTimes.utc(column.getLongSingleValueRow(column.length() - 1));\n }\n }", "public void setValue(int n) {\r\n Throwable t = new Throwable();\r\n t.printStackTrace();\r\n int newValue = Math.max(n, min);\r\n if (newValue + getExtent() > max) {\r\n newValue = max - getExtent();\r\n }\r\n\r\n setRangeProperties(newValue, getExtent(), min, max, isAdjusting);\r\n }", "public void setRangeProperties(\n double v,\n double e,\n double minimum,\n double maximum,\n int precision,\n boolean newValueIsAdjusting)\n {\n doSetRangeProps(v, e, minimum, maximum, precision);\n setValueIsAdjusting(newValueIsAdjusting);\n fireStateChanged();\n }", "protected void autoAdjustRange() {\n/* 1284 */ Plot plot = getPlot();\n/* */ \n/* 1286 */ if (plot == null) {\n/* */ return;\n/* */ }\n/* */ \n/* 1290 */ if (plot instanceof ValueAxisPlot) {\n/* 1291 */ ValueAxisPlot vap = (ValueAxisPlot)plot;\n/* */ \n/* 1293 */ DateRange dateRange = vap.getDataRange(this);\n/* 1294 */ if (dateRange == null) {\n/* 1295 */ if (this.timeline instanceof SegmentedTimeline) {\n/* */ \n/* */ \n/* */ \n/* 1299 */ DateRange dateRange1 = new DateRange(((SegmentedTimeline)this.timeline).getStartTime(), (((SegmentedTimeline)this.timeline).getStartTime() + 1L));\n/* */ }\n/* */ else {\n/* */ \n/* 1303 */ dateRange = new DateRange();\n/* */ } \n/* */ }\n/* */ \n/* 1307 */ long upper = this.timeline.toTimelineValue(\n/* 1308 */ (long)dateRange.getUpperBound());\n/* */ \n/* 1310 */ long fixedAutoRange = (long)getFixedAutoRange();\n/* 1311 */ if (fixedAutoRange > 0.0D) {\n/* 1312 */ lower = upper - fixedAutoRange;\n/* */ } else {\n/* */ \n/* 1315 */ lower = this.timeline.toTimelineValue((long)dateRange.getLowerBound());\n/* 1316 */ double range = (upper - lower);\n/* 1317 */ long minRange = (long)getAutoRangeMinimumSize();\n/* 1318 */ if (range < minRange) {\n/* 1319 */ long expand = (long)(minRange - range) / 2L;\n/* 1320 */ upper += expand;\n/* 1321 */ lower -= expand;\n/* */ } \n/* 1323 */ upper += (long)(range * getUpperMargin());\n/* 1324 */ lower -= (long)(range * getLowerMargin());\n/* */ } \n/* */ \n/* 1327 */ upper = this.timeline.toMillisecond(upper);\n/* 1328 */ long lower = this.timeline.toMillisecond(lower);\n/* 1329 */ DateRange dr = new DateRange(new Date(lower), new Date(upper));\n/* 1330 */ setRange(dr, false, false);\n/* */ } \n/* */ }", "DbQuery setRangeFilter(int startValue, int endValue) {\n return setRangeFilter((double) startValue, (double) endValue);\n }", "NumericRangeFilter(double p_min, double p_max) {\n maximum = p_max;\n minimum = p_min;\n }", "public void validateMinimum() {\n/* */ double newMin;\n/* */ try {\n/* 373 */ newMin = Double.parseDouble(this.minimumRangeValue.getText());\n/* 374 */ if (newMin >= this.maximumValue) {\n/* 375 */ newMin = this.minimumValue;\n/* */ }\n/* */ }\n/* 378 */ catch (NumberFormatException e) {\n/* 379 */ newMin = this.minimumValue;\n/* */ } \n/* */ \n/* 382 */ this.minimumValue = newMin;\n/* 383 */ this.minimumRangeValue.setText(Double.toString(this.minimumValue));\n/* */ }", "public void SetMinVal(int min_val);", "void update(double temperature, double maxTemperature, double minTemperature, int humidity);", "public void setQuarters(int q)\n {\n\tthis.quarters = q;\n\tchangeChecker();\n }", "private void setMinsAndMaxs() {\n settingsPreferences = getSharedPreferences(\"settings\", MODE_PRIVATE);\n\n float pH_min = settingsPreferences.getFloat(\"pH_min\", -1);\n if(pH_min != -1) { // if there is a saved value\n pHMin.setText(String.valueOf(pH_min));\n }\n float pH_max = settingsPreferences.getFloat(\"pH_max\", -1);\n if(pH_max != -1) { // if there is a saved value\n pHMax.setText(String.valueOf(pH_max));\n }\n\n int orp_min = settingsPreferences.getInt(\"orp_min\", -1);\n if(orp_min != -1) { // if there is a saved value\n orpMin.setText(String.valueOf(orp_min));\n }\n int orp_max = settingsPreferences.getInt(\"orp_max\", -1);\n if(orp_max != -1) { // if there is a saved value\n orpMax.setText(String.valueOf(orp_max));\n }\n\n float turbidity_min = settingsPreferences.getFloat(\"turbidity_min\", -1);\n if(turbidity_min != -1) { // if there is a saved value\n turbidityMin.setText(String.valueOf(turbidity_min));\n }\n float turbidity_max = settingsPreferences.getFloat(\"turbidity_max\", -1);\n if(turbidity_max != -1) { // if there is a saved value\n turbidityMax.setText(String.valueOf(turbidity_max));\n }\n\n float temperature_min = settingsPreferences.getFloat(\"temperature_min\", -1);\n if(temperature_min != -1) { // if there is a saved value\n temperatureMin.setText(String.valueOf(temperature_min));\n }\n float temperature_max = settingsPreferences.getFloat(\"temperature_max\", -1);\n if(temperature_max != -1) { // if there is a saved value\n temperatureMax.setText(String.valueOf(temperature_max));\n }\n }", "public abstract void setRange(double value, int start, int count);", "private void updateValue() {\n int minValue = 100; //Minimum value to be calculated, initialized to a large number\n value = 0; //Value reinitialized to 0\n for (Integer i : values) {\n if (i > value && i <= 21) {\n value = i; //Sets value to maximum value less than or equal to 21\n }\n if (i < minValue) {\n minValue = i; //Sets minimum value to lowest value in the list\n }\n }\n if (value == 0) {\n value = minValue; //Sets value to minValue if no values 21 or less\n }\n valueLabel.setText(\"Value: \" + value); //Sets text of value label\n if (value > 21) {\n bust(); //Busts if value greater than 21\n }\n }", "private void updateEncoders(){\r\n \r\n double min = Double.MAX_VALUE;\r\n double max = Double.MIN_VALUE;\r\n \r\n for(Encoder<T> encoder : encoders){\r\n if(encoder instanceof SimpleEncoder){\r\n SimpleEncoder<T> simpleEncoder = (SimpleEncoder<T>) encoder;\r\n if(simpleEncoder.getMin() < min)\r\n min = simpleEncoder.getMin();\r\n \r\n if(max < simpleEncoder.getMax())\r\n max=simpleEncoder.getMax();\r\n \r\n }\r\n }\r\n \r\n for(Encoder<T> encoder : encoders){\r\n if(encoder instanceof SimpleEncoder){\r\n SimpleEncoder<T> simpleEncoder = (SimpleEncoder<T>) encoder;\r\n simpleEncoder.setMin(min);\r\n simpleEncoder.setMax(max);\r\n }\r\n }\r\n \r\n }", "void setMinValue();", "public void setMaxMin(long maxMin) {\n\t\tthis.maxMin = maxMin;\r\n\t}", "private void initMinMax(final Configuration currentConfiguration,\n\t\t\tfinal Map<DateTime, Position> minX,\n\t\t\tfinal Map<DateTime, Position> maxX,\n\t\t\tfinal Map<DateTime, Velocity> minV,\n\t\t\tfinal Map<DateTime, Velocity> maxV,\n\t\t\tfinal Map<DateTime, Amount<Power>> minCharges) {\n\n\t\t// set minX, maxX, minV, maxV\n\t\tfor (PossibleRun possibleRun : currentConfiguration\n\t\t\t\t.getPossibleRunsConfiguration().getPossibleRuns()) {\n\t\t\tAmount<Power> minXThisDim = Amount.valueOf(Double.NaN, Power.UNIT);\n\t\t\tAmount<Power> maxXThisDim = Amount.valueOf(Double.NaN, Power.UNIT);\n\n\t\t\tswitch (possibleRun.getLoadFlexibilityOfRun()) {\n\t\t\tcase FIXED:\n\t\t\t\tfor (Slot slot : possibleRun.getNeededSlots()) {\n\t\t\t\t\tif (slot.getLoad().isLessThan(minXThisDim)) {\n\t\t\t\t\t\tminXThisDim = slot.getLoad();\n\t\t\t\t\t}\n\t\t\t\t\tif (slot.getLoad().isGreaterThan(maxXThisDim)) {\n\t\t\t\t\t\tmaxXThisDim = slot.getLoad();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\tcase LIMITED_CHOICE:\n\t\t\t\tif (possibleRun.getPossibleLoads().isEmpty()) {\n\t\t\t\t\tthrow new UnsupportedOperationException(\n\t\t\t\t\t\t\t\"Possible Loads must contain at least one element!\");\n\t\t\t\t}\n\t\t\t\tminXThisDim = Amount.valueOf(0, Power.UNIT);\n\t\t\t\tmaxXThisDim = Amount.valueOf(possibleRun.getPossibleLoads()\n\t\t\t\t\t\t.size() - 1, Power.UNIT);\n//\t\t\t\tLOG.trace(\n//\t\t\t\t\t\t\"There are {} possibilities for run with start date {}\",\n//\t\t\t\t\t\tpossibleRun.getPossibleLoads().size(),\n//\t\t\t\t\t\tpossibleRun.getEarliestStartTime());\n\t\t\t\tbreak;\n\t\t\tcase RANGE:\n\t\t\t\tminXThisDim = possibleRun.getRangeOfPossibleLoads()\n\t\t\t\t\t\t.lowerEndpoint();\n\t\t\t\tmaxXThisDim = possibleRun.getRangeOfPossibleLoads()\n\t\t\t\t\t\t.upperEndpoint();\n\t\t\t\tLOG.trace(\n\t\t\t\t\t\t\"Run with start date {} has dimension limits {} to {}\",\n\t\t\t\t\t\tpossibleRun.getEarliestStartTime(), minXThisDim,\n\t\t\t\t\t\tmaxXThisDim);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tminX.put(possibleRun.getEarliestStartTime(), new Position(\n\t\t\t\t\tpossibleRun, minXThisDim));\n\t\t\tmaxX.put(possibleRun.getEarliestStartTime(), new Position(\n\t\t\t\t\tpossibleRun, maxXThisDim));\n\n\t\t\tminV.put(possibleRun.getEarliestStartTime(), new Velocity(\n\t\t\t\t\tpossibleRun, minXThisDim.minus(maxXThisDim)));\n\t\t\tmaxV.put(possibleRun.getEarliestStartTime(), new Velocity(\n\t\t\t\t\tpossibleRun, maxXThisDim.minus(minXThisDim)));\n\t\t}\n\n\t\t// incorporate no charging times!\n\t\tRunConstraint constraint = currentConfiguration\n\t\t\t\t.getPossibleRunsConfiguration().getRunConstraint();\n\t\tfor (DateTime noCharge : constraint.getLossOfEnergyAtPointsInTime()\n\t\t\t\t.keySet()) {\n\t\t\tif (minX.containsKey(noCharge)) {\n\t\t\t\tPossibleRun run = minX.get(noCharge).getPossibleRun();\n\n\t\t\t\tif (LoadFlexiblity.LIMITED_CHOICE.equals(run\n\t\t\t\t\t\t.getLoadFlexibilityOfRun())) {\n\t\t\t\t\tminX.get(noCharge).setChosenValue(\n\t\t\t\t\t\t\tgetZeroChargeForLimitedChoice(run));\n\t\t\t\t} else if (LoadFlexiblity.RANGE.equals(run\n\t\t\t\t\t\t.getLoadFlexibilityOfRun())) {\n\t\t\t\t\tminX.get(noCharge).setChosenValue(\n\t\t\t\t\t\t\tAmount.valueOf(0, Power.UNIT));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (maxX.containsKey(noCharge)) {\n\t\t\t\tPossibleRun run = maxX.get(noCharge).getPossibleRun();\n\n\t\t\t\tif (LoadFlexiblity.LIMITED_CHOICE.equals(run\n\t\t\t\t\t\t.getLoadFlexibilityOfRun())) {\n\t\t\t\t\tmaxX.get(noCharge).setChosenValue(\n\t\t\t\t\t\t\tgetZeroChargeForLimitedChoice(run));\n\t\t\t\t} else if (LoadFlexiblity.RANGE.equals(run\n\t\t\t\t\t\t.getLoadFlexibilityOfRun())) {\n\t\t\t\t\tmaxX.get(noCharge).setChosenValue(\n\t\t\t\t\t\t\tAmount.valueOf(0, Power.UNIT));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (minV.containsKey(noCharge)) {\n\t\t\t\tminV.get(noCharge)\n\t\t\t\t\t\t.setChosenValue(Amount.valueOf(0, Power.UNIT));\n\t\t\t}\n\t\t\tif (maxV.containsKey(noCharge)) {\n\t\t\t\tmaxV.get(noCharge)\n\t\t\t\t\t\t.setChosenValue(Amount.valueOf(0, Power.UNIT));\n\t\t\t}\n\t\t}\n\n\t\t// set minCharges\n\t\tAmount<Power> powerToCharge = Amount.valueOf(0, Power.UNIT);\n\t\tAmount<Power> lastValueOfChargesAtPointsInTime = Amount.valueOf(0,\n\t\t\t\tPower.UNIT);\n\t\tSet<DateTime> reverseKeys = ImmutableSortedSet.copyOf(minX.keySet())\n\t\t\t\t.descendingSet();\n\t\tfor (DateTime now : reverseKeys) {\n\t\t\tif (!lastValueOfChargesAtPointsInTime.approximates(Amount.valueOf(\n\t\t\t\t\t0, Power.UNIT))) {\n\t\t\t\tpowerToCharge = powerToCharge\n\t\t\t\t\t\t.plus(lastValueOfChargesAtPointsInTime);\n\t\t\t\tlastValueOfChargesAtPointsInTime = Amount\n\t\t\t\t\t\t.valueOf(0, Power.UNIT);\n\t\t\t}\n\n\t\t\tif (constraint.getChargesAtPointsInTime().containsKey(now)) {\n\t\t\t\tlastValueOfChargesAtPointsInTime = constraint\n\t\t\t\t\t\t.getChargesAtPointsInTime().get(now);\n\t\t\t}\n\n\t\t\tPossibleRun run = minX.get(now).getPossibleRun();\n\n\t\t\tif (powerToCharge.approximates(Amount.valueOf(0, Power.UNIT))\n\t\t\t\t\t|| powerToCharge.isLessThan(Amount.valueOf(0, Power.UNIT))) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tdouble hours = run.getLengthOfRun().toStandardMinutes()\n\t\t\t\t\t.getMinutes()\n\t\t\t\t\t/ HOUR_IN_MINUTES;\n\t\t\tAmount<Power> charge = null;\n\t\t\tif (LoadFlexiblity.LIMITED_CHOICE.equals(run\n\t\t\t\t\t.getLoadFlexibilityOfRun())) {\n\t\t\t\tfor (Amount<Power> possibleLoad : run.getPossibleLoads()) {\n\t\t\t\t\tif (possibleLoad.isLessThan(Amount.valueOf(0, Power.UNIT))) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tcharge = possibleLoad;\n\n\t\t\t\t\tif (charge.times(hours).isGreaterThan(powerToCharge)) {\n\t\t\t\t\t\tcharge = powerToCharge.divide(hours);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (charge == null) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tAmount<Power> maxChargeNow = maxX.get(now).getChosenValue();\n\t\t\t\tif (powerToCharge.isGreaterThan(maxChargeNow)) {\n\t\t\t\t\tcharge = maxChargeNow;\n\t\t\t\t} else if (powerToCharge.isGreaterThan(Amount.valueOf(0,\n\t\t\t\t\t\tPower.UNIT))) {\n\t\t\t\t\tcharge = powerToCharge;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tminCharges.put(now, powerToCharge);\n\t\t\tpowerToCharge = powerToCharge.minus(charge.times(hours));\n\t\t}\n\n\t\tif (powerToCharge.isGreaterThan(Amount.valueOf(0, Power.UNIT))) {\n\t\t\tLOG.debug(\"powerToCharge is greater than 0, which means that the charging constraints cannot be satisfied!\");\n\t\t}\n\t}", "public void setTimeRange(int itmin, int itmax) {\n _itmin = itmin;\n _itmax = itmax;\n }", "protected void setValues() {\n values = new double[size];\n int pi = 0; // pixelIndex\n int siz = size - nanW - negW - posW;\n int biw = min < max ? negW : posW;\n int tiw = min < max ? posW : negW;\n double bv = min < max ? Double.NEGATIVE_INFINITY : Double.POSITIVE_INFINITY;\n double tv = min < max ? Double.POSITIVE_INFINITY : Double.NEGATIVE_INFINITY;\n double f = siz > 1 ? (max - min) / (siz - 1.) : 0.;\n for (int i = 0; i < biw && pi < size; i++,pi++) {\n values[pi] = bv;\n }\n for (int i = 0; i < siz && pi < size; i++,pi++) {\n double v = min + i * f;\n values[pi] = v;\n }\n for (int i = 0; i < tiw && pi < size; i++,pi++) {\n values[pi] = tv;\n }\n for (int i = 0; i < nanW && pi < size; i++,pi++) {\n values[pi] = Double.NaN;\n }\n }", "Limits limits();", "private void updateBoundingBox(Point_dt p) {\n\t\tdouble x = p.x(), y = p.y(), z = p.z();\n\t\tif (m_boundingBoxMin == null) {\n\t\t\tm_boundingBoxMin = new Point_dt(p);\n\t\t\tm_boundingBoxMax = new Point_dt(p);\n\t\t} else {\n\t\t\tif (x < m_boundingBoxMin.x())\n\t\t\t\tm_boundingBoxMin.setX(x);\n\t\t\telse if (x > m_boundingBoxMax.x())\n\t\t\t\tm_boundingBoxMax.setX(x);\n\t\t\tif (y < m_boundingBoxMin.y())\n\t\t\t\tm_boundingBoxMin.setY(y);\n\t\t\telse if (y > m_boundingBoxMax.y())\n\t\t\t\tm_boundingBoxMax.setY(y);\n\t\t\tif (z < m_boundingBoxMin.z())\n\t\t\t\tm_boundingBoxMin.setZ(z);\n\t\t\telse if (z > m_boundingBoxMax.z())\n\t\t\t\tm_boundingBoxMax.setZ(z);\n\t\t}\n\t}", "@Override\n public void setMinRange(int minRange) {\n this.minRange = minRange;\n }", "DbQuery setRangeFilter(long startValue, long endValue) {\n return setRangeFilter((double) startValue, (double) endValue);\n }", "public void setYDataRange(float min, float max);", "public void setRange(double lower, double upper) {\n/* 625 */ if (lower >= upper) {\n/* 626 */ throw new IllegalArgumentException(\"Requires 'lower' < 'upper'.\");\n/* */ }\n/* 628 */ setRange(new DateRange(lower, upper));\n/* */ }", "public void setMinMaxLabel() {\n minMaxLabel.setText(min + \" ≤ val ≤ \" + max);\n }", "private void normalize() {\r\n // GET MAX PRICE \r\n for (Alternative alt : alternatives) {\r\n if (alt.getPrice() > 0 && alt.getPrice() < minPrice) {\r\n minPrice = alt.getPrice();\r\n }\r\n }\r\n\r\n for (Alternative alt : alternatives) {\r\n // NORMALIZE PRICE - NON BENIFICIAL using max - min \r\n double price = alt.getPrice();\r\n double value = minPrice / price;\r\n alt.setPrice(value);\r\n // BENITIFICIAL v[i,j] = x[i,j] / x[max,j]\r\n double wood = alt.getWood();\r\n value = wood / maxWood;\r\n alt.setWood(value);\r\n\r\n double brand = alt.getBrand();\r\n value = wood / maxBrand;\r\n alt.setBrand(value);\r\n\r\n double origin = alt.getOrigin();\r\n value = origin / maxOrigin;\r\n alt.setOrigin(value);\r\n\r\n }\r\n }", "@Override\r\n public void merge(Integer minX, Integer maxX, Integer minY, Integer maxY) {\r\n if (this.minX == null) {\r\n this.minX = (minX == null) ? null : minX.doubleValue();\r\n }\r\n if (this.maxX == null) {\r\n this.maxX = (maxX == null) ? null : maxX.doubleValue();\r\n }\r\n if (this.minY == null) {\r\n this.minY = (minY == null) ? null : minY.doubleValue();\r\n }\r\n if (this.maxY == null) {\r\n this.maxY = (maxY == null) ? null : maxY.doubleValue();\r\n }\r\n }", "public void setRange(int start, int end) {\n\t\tmStart = start;\n\t\tmEnd = end;\n\t\tmCurrent = start;\n\t\tupdateView();\n\t}", "public void setMaximum( final int value ) {\n checkWidget();\n if( 0 <= minimum && minimum < value ) {\n maximum = value;\n if( selection > maximum - thumb ) {\n selection = maximum - thumb;\n }\n }\n if( thumb >= maximum - minimum ) {\n thumb = maximum - minimum;\n selection = minimum;\n }\n }", "public InterpolatorGrid(double min, double max) {\n minValue = min;\n maxValue = max;\n }", "public void changeRangeY(double limiteInitial, double limiteFinal, double space){\n //rango eje y\n //plot.getRangeAxis().setRange(limiteInitial, limiteFinal);\n yaxis = (NumberAxis) plot.getRangeAxis();\n yaxis.setRange(limiteInitial, limiteFinal);//agrego el rango en el eje de las y\n yaxis.setTickUnit(new NumberTickUnit(space));//agrego el espacio entre cada rango\n }", "public void setValidRange (int lowerBounds, int upperBounds)\r\n\t{\r\n\t\tm_lowerBounds = lowerBounds;\r\n\t\tm_upperBounds = upperBounds;\r\n\t}", "@Override\r\n public void merge(Double minX, Double maxX, Double minY, Double maxY) {\r\n if (this.minX == null) {\r\n this.minX = minX;\r\n }\r\n if (this.maxX == null) {\r\n this.maxX = maxX;\r\n }\r\n if (this.minY == null) {\r\n this.minY = minY;\r\n }\r\n if (this.maxY == null) {\r\n this.maxY = maxY;\r\n }\r\n }", "public void resetQValues() {\n\t\tqValues = new HashMap<StateActionPair, Double>();\n\t}", "void makeAnalysis(double v_min, double v_max) {\n\t\t\tfmt_result = universalFormat;\n\t\t\tdouble range = v_max - v_min;\n\t\t\tscale = 0.;\n\t\t\tif (range > 0.) {\n\t\t\t\tscale = Math.pow(10., Math.floor(1.000001 * Math.log(range) / Math.log(10.0)));\n\t\t\t}\n\t\t\tif (scale == 0.) {\n\t\t\t\tscale = 1.;\n\t\t\t\tvalue_min = -1.0;\n\t\t\t\tvalue_max = +1.0;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvalue_min = scale * Math.floor(v_min / scale);\n\t\t\tvalue_max = scale * Math.ceil(v_max / scale);\n\t\t\tif (value_min * value_max == 0. && (scale == Math.abs(value_max) || scale == Math.abs(value_min))) {\n\t\t\t\tscale = scale / 5.0;\n\t\t\t\tvalue_min = scale * Math.floor(v_min / scale);\n\t\t\t\tvalue_max = scale * Math.ceil(v_max / scale);\n\t\t\t}\n\n\t\t\tdouble[] arr = new double[3];\n\t\t\tarr[0] = scale;\n\t\t\tarr[1] = value_min;\n\t\t\tarr[2] = value_max;\n\n\t\t\tdouble zz_max = Math.max(Math.abs(arr[1]), Math.abs(arr[2]));\n\t\t\tint nV = (int) (Math.floor(1.0001 * Math.log(zz_max) / Math.log(10.0)));\n\t\t\tif (nV >= 0) {\n\t\t\t\tnV += 1;\n\t\t\t} else {\n\t\t\t\tnV -= 1;\n\t\t\t}\n\n\t\t\tzz_max = zz_max / Math.abs(arr[0]);\n\t\t\tint nD = (int) (Math.floor(1.0001 * Math.log(zz_max) / Math.log(10.0)));\n\t\t\tif (nD >= 0) {\n\t\t\t\tnD += 1;\n\t\t\t}\n\n\t\t\t//This is for zoom, so we want to increase number of significant digits\n\t\t\tnD = nD + 1;\n\n\t\t\tif (nV >= 4) {\n\t\t\t\tint n = Math.min(4, Math.abs(nD));\n\t\t\t\tfmt_result = scientificFormats[n];\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (nV > 0 && nV < 4) {\n\t\t\t\tif (nV >= nD) {\n\t\t\t\t\tfmt_result = simpleFormats[0];\n\t\t\t\t\treturn;\n\t\t\t\t} else {\n\t\t\t\t\tint n = Math.min(4, Math.abs(nV - nD));\n\t\t\t\t\tfmt_result = simpleFormats[n];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (nV < 0 && nV > -4) {\n\t\t\t\tint n = Math.abs(nV) + Math.abs(nD) - 2;\n\t\t\t\tif (n <= 4) {\n\t\t\t\t\tfmt_result = simpleFormats[n];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "@Override\n public double between(double min, double max) {\n return super.between(min, max);\n }", "public void update() {\n\t\tif (max == null || max.length < info.size())\r\n\t\t\tmax = info.stream().mapToInt(i -> Math.max(1, i[1])).toArray();\r\n\r\n\t\tfull = improve(max);\r\n\t}", "public void setMin(BigDecimal min, boolean inclusive) {\n this.min = min;\n this.inclusive = inclusive;\n }" ]
[ "0.6952908", "0.68906945", "0.6396023", "0.63850325", "0.6336517", "0.6283576", "0.61833507", "0.6177118", "0.6127154", "0.6113699", "0.60949516", "0.60894495", "0.60524", "0.60460246", "0.60120934", "0.595256", "0.58817106", "0.5874262", "0.58429116", "0.58297294", "0.58184505", "0.58165383", "0.5810776", "0.5765722", "0.57621837", "0.5744928", "0.57091534", "0.5705939", "0.56593615", "0.56520903", "0.5641683", "0.5634714", "0.55995625", "0.5577289", "0.5568208", "0.55662555", "0.55452335", "0.55447704", "0.5537176", "0.5518641", "0.55167556", "0.55132776", "0.55001324", "0.54994994", "0.5487586", "0.5475866", "0.5470059", "0.5467212", "0.5464367", "0.5457111", "0.5454501", "0.5440225", "0.54299355", "0.5418121", "0.54163384", "0.54139894", "0.5411561", "0.54037035", "0.54009056", "0.5397761", "0.53847456", "0.53743404", "0.5371086", "0.5366352", "0.53648823", "0.5354627", "0.5322139", "0.5313185", "0.5307696", "0.52944994", "0.529205", "0.5288935", "0.5286844", "0.5276573", "0.5271395", "0.5269213", "0.52668065", "0.5262578", "0.52564347", "0.52527493", "0.52375776", "0.5222404", "0.52203095", "0.5219705", "0.5217817", "0.52172315", "0.52166563", "0.52099866", "0.5209035", "0.5188676", "0.518309", "0.5180201", "0.5179686", "0.51653594", "0.5164517", "0.5159522", "0.5152368", "0.5147825", "0.51392794", "0.5134662", "0.511993" ]
0.0
-1
Created by sahba on 3/31/17.
public interface JungleDataKeeper { void keepData(String identifier, int iteration, double biomass); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "public final void mo51373a() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tprotected void interr() {\n\t}", "private void m50366E() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "private void poetries() {\n\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "public void mo4359a() {\n }", "private void init() {\n\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "private void kk12() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n public void init() {\n }", "@Override\r\n\tpublic void init() {}", "@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 init() {\n }", "public void method_4270() {}", "@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 gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n public void init() {}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n void init() {\n }", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tpublic void init() {\n\t}", "@Override\n\tpublic void init()\n\t{\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\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "public abstract void mo70713b();", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n public int describeContents() { return 0; }", "private void strin() {\n\n\t}", "public void m23075a() {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "public void mo12628c() {\n }", "public void mo21877s() {\n }", "@Override\n protected void initialize() \n {\n \n }", "@Override\n public int retroceder() {\n return 0;\n }", "private void init() {\n\n\n\n }", "public void mo6081a() {\n }", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "public void mo12930a() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void getExras() {\n }", "private void m50367F() {\n }", "protected void mo6255a() {\n }", "public void mo21779D() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\r\n\tpublic final void init() {\r\n\r\n\t}" ]
[ "0.59402525", "0.58495206", "0.58425164", "0.5834695", "0.5829644", "0.581616", "0.5717658", "0.5717658", "0.5685874", "0.5668224", "0.56674016", "0.5663686", "0.56597126", "0.56597126", "0.56597126", "0.56597126", "0.56597126", "0.5645615", "0.56447905", "0.56443274", "0.56292313", "0.56263596", "0.5625424", "0.5598279", "0.55839056", "0.558306", "0.55801404", "0.5560172", "0.5559316", "0.5551142", "0.554763", "0.5543144", "0.5541051", "0.5535567", "0.55214524", "0.55214524", "0.55186063", "0.54932487", "0.54874146", "0.54874146", "0.54874146", "0.5487258", "0.54870284", "0.54861844", "0.54861844", "0.54861844", "0.5483868", "0.5483868", "0.5483868", "0.5475544", "0.54736185", "0.5468205", "0.5465199", "0.5463839", "0.54605", "0.54582334", "0.5440772", "0.5440214", "0.5436349", "0.5436349", "0.54362744", "0.5426944", "0.54067475", "0.5406655", "0.5406655", "0.5406655", "0.5406655", "0.5406655", "0.5406655", "0.5406655", "0.5404933", "0.5401942", "0.5401942", "0.5401942", "0.5401942", "0.5401942", "0.5401942", "0.540179", "0.5400199", "0.5399711", "0.5395878", "0.5395405", "0.53745127", "0.53689903", "0.5367518", "0.5350546", "0.5350033", "0.53472775", "0.53443944", "0.53442603", "0.5339363", "0.5331197", "0.5326052", "0.5324495", "0.5320808", "0.5315594", "0.53137046", "0.5312912", "0.5307868", "0.5302263", "0.5301383" ]
0.0
-1
now Implement the firebase search
private void firebaseSearch(String searchtext) { String query = searchtext.toUpperCase() ; Query firebaseSearchQuery = mRef.orderByChild("title").startAt(query).endAt(query + "\uf8ff"); options = new FirebaseRecyclerOptions.Builder<Model>().setQuery(firebaseSearchQuery , Model.class) .build() ; firebaseRecyclerAdapter = new FirebaseRecyclerAdapter<Model, viewHolder_cse>(options) { @Override protected void onBindViewHolder(@NonNull final viewHolder_cse holder, final int position, @NonNull Model model) { holder.SetDeatils(getApplicationContext() , model.getTitle() , model.getWriter() , model.getLink()); Handler handler = new Handler() ; handler.postDelayed(new Runnable() { @Override public void run() { cse_bar.setVisibility(View.GONE); } },3000); } @NonNull @Override public viewHolder_cse onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) { //INflate the row Context context; View itemVIew = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.row_for_cse_pdf, viewGroup, false); viewHolder_cse viewHolder = new viewHolder_cse(itemVIew); viewHolder_cse.setOnClickListener(new viewHolder_cse.ClickListener() { @Override public void onItemClick(View view, int position) { // data from views String mlink = getItem(position).getLink() ; // sending those data to new Activity Intent intent = new Intent(view.getContext() , pdfViewer.class); intent.putExtra("LINK", mlink); // put title startActivity(intent); } @Override public void onItemLongClick(View view, int position) { } }); return viewHolder; } }; mrecyclerView.setLayoutManager(mLayoutManager); firebaseRecyclerAdapter.startListening(); //setting adapter mrecyclerView.setAdapter(firebaseRecyclerAdapter); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void firebaseUserSearch(String searchText) {\n AllClubsList.clear();\n Query firebaseSearchQuery = mUserDatabase2.orderByChild(\"item_name\").startAt(searchText).endAt(searchText + \"\\uf8ff\");\n firebaseSearchQuery.addListenerForSingleValueEvent(valueEventListener);\n }", "private void querySearch(JSONArray data) throws JSONException {\n //\n String strURL = String.format(\"https://%s.firebaseio.com\", appName);\n JSONObject queryInfo;\n\n QSearchType typeofSearch = QSearchType.QSearchAt_EQUAL;\n Object searchValue = null;\n String strSearchKey = \"\";\n QOrderType typeofOrder = QOrderType.QOrderBy_NOT;\n String strOrderValue = \"\";\n QLimitType typeofLimit = QLimitType.QLimitedTo_NOT;\n Integer numLimited = 0;\n\n // String temp;\n if ( data.length() >= 2 )\n {\n strURL = data.getString(0);\n queryInfo = data.getJSONObject(1);\n {\n if (!queryInfo.has(\"search\")){\n// typeofSearch = QSearchType.QSearchAt_STARTING;\n// searchValue = \"\";\n// strSearchKey = \"\";\n }\n else {\n if (queryInfo.getJSONObject(\"search\").getString(\"type\").compareTo(\"starting\") == 0)\n typeofSearch = QSearchType.QSearchAt_STARTING;\n else if (queryInfo.getJSONObject(\"search\").getString(\"type\").compareTo(\"ending\") == 0)\n typeofSearch = QSearchType.QSearchAt_ENDING;\n else //\"equal\" or nil\n typeofSearch = QSearchType.QSearchAt_EQUAL;\n searchValue = queryInfo.getJSONObject(\"search\").get(\"value\");\n if (searchValue == null)\n searchValue = \"\";\n\n strSearchKey = queryInfo.getJSONObject(\"search\").getString(\"child\");\n if (strSearchKey == null)\n strSearchKey = \"\";\n }\n\n if (!queryInfo.has(\"order\")){\n// typeofOrder = QOrderType.QOrderBy_NOT;\n// strOrderValue = \"\";\n }\n else {\n if (queryInfo.getJSONObject(\"order\").getString(\"by\").compareTo(\"key\") == 0)\n typeofOrder = QOrderType.QOrderBy_CHILDKEY;\n else if (queryInfo.getJSONObject(\"order\").getString(\"by\").compareTo(\"value\") == 0)\n typeofOrder = QOrderType.QOrderBy_CHILDVALUE;\n else\n typeofOrder = QOrderType.QOrderBy_NOT;\n\n strOrderValue = queryInfo.getJSONObject(\"order\").getString(\"field\");\n if (strOrderValue == null)\n strOrderValue = \"\";\n }\n\n if (!queryInfo.has(\"limit\")) {\n// typeofLimit = QLimitType.QLimitedTo_NOT;\n// numLimited = 0;\n }\n else{\n if (queryInfo.getJSONObject(\"limit\").getString(\"at\").compareTo(\"first\") == 0)\n typeofLimit = QLimitType.QLimitedTo_FIRST;\n else if (queryInfo.getJSONObject(\"limit\").getString(\"at\").compareTo(\"last\") == 0)\n typeofLimit = QLimitType.QLimitedTo_LAST;\n else\n typeofLimit = QLimitType.QLimitedTo_NOT;\n\n if (queryInfo.getJSONObject(\"limit\").isNull(\"num\"))\n numLimited = 0;\n else\n numLimited = queryInfo.getJSONObject(\"limit\").getInt(\"num\");\n }\n }\n }\n\n Firebase urlRef = new Firebase(strURL);\n Query queryOrder = null;\n\n switch (typeofOrder) {\n case QOrderBy_NOT:\n default:\n case QOrderBy_CHILDKEY:\n queryOrder = urlRef.orderByKey();\n break;\n\n case QOrderBy_CHILDVALUE:\n queryOrder = urlRef.orderByChild(strOrderValue);\n break;\n }\n\n Query queryObj = null;\n\n switch (typeofSearch) {\n case QSearchAt_EQUAL:\n if(strSearchKey == null | strSearchKey.length() == 0){\n if( searchValue.getClass() == Double.class )\n \tqueryObj = queryOrder.equalTo(((Double)searchValue).doubleValue());\n else if(searchValue.getClass() == Boolean.class )\n \tqueryObj = queryOrder.equalTo(((Boolean)searchValue).booleanValue());\n else if( searchValue.getClass() == String.class )\n \tqueryObj = queryOrder.equalTo((String)searchValue);\n else\n \tqueryObj = queryOrder.equalTo(searchValue.toString());\n }\n else{\n \tif( searchValue.getClass() == Double.class )\n \tqueryObj = queryOrder.equalTo(((Double)searchValue).doubleValue(), strSearchKey);\n else if(searchValue.getClass() == Boolean.class )\n \tqueryObj = queryOrder.equalTo(((Boolean)searchValue).booleanValue(), strSearchKey);\n else if( searchValue.getClass() == String.class )\n \tqueryObj = queryOrder.equalTo((String)searchValue, strSearchKey);\n else\n \tqueryObj = queryOrder.equalTo(searchValue.toString(), strSearchKey);\n }\n break;\n\n case QSearchAt_STARTING:\n if(strSearchKey == null | strSearchKey.length() == 0){\n \tif( searchValue.getClass() == Double.class )\n \tqueryObj = queryOrder.startAt(((Double)searchValue).doubleValue());\n else if(searchValue.getClass() == Boolean.class )\n \tqueryObj = queryOrder.startAt(((Boolean)searchValue).booleanValue());\n else if( searchValue.getClass() == String.class )\n \tqueryObj = queryOrder.startAt((String)searchValue);\n else\n \tqueryObj = queryOrder.startAt(searchValue.toString());\n }\n else{\n \tif( searchValue.getClass() == Double.class )\n \tqueryObj = queryOrder.startAt(((Double)searchValue).doubleValue(), strSearchKey);\n else if(searchValue.getClass() == Boolean.class )\n \tqueryObj = queryOrder.startAt(((Boolean)searchValue).booleanValue(), strSearchKey);\n else if( searchValue.getClass() == String.class )\n \tqueryObj = queryOrder.startAt((String)searchValue, strSearchKey);\n else\n \tqueryObj = queryOrder.startAt(searchValue.toString(), strSearchKey);\n }\n break;\n\n case QSearchAt_ENDING:\n if(strSearchKey == null | strSearchKey.length() == 0){\n \tif( searchValue.getClass() == Double.class )\n \tqueryObj = queryOrder.endAt(((Double)searchValue).doubleValue());\n else if(searchValue.getClass() == Boolean.class )\n \tqueryObj = queryOrder.endAt(((Boolean)searchValue).booleanValue());\n else if( searchValue.getClass() == String.class )\n \tqueryObj = queryOrder.endAt((String)searchValue);\n else\n \tqueryObj = queryOrder.endAt(searchValue.toString());\n }\n else{\n \tif( searchValue.getClass() == Double.class )\n \tqueryObj = queryOrder.endAt(((Double)searchValue).doubleValue(), strSearchKey);\n else if(searchValue.getClass() == Boolean.class )\n \tqueryObj = queryOrder.endAt(((Boolean)searchValue).booleanValue(), strSearchKey);\n else if( searchValue.getClass() == String.class )\n \tqueryObj = queryOrder.endAt((String)searchValue, strSearchKey);\n else\n \tqueryObj = queryOrder.endAt(searchValue.toString(), strSearchKey);\n }\n break;\n\n default:\n \tqueryObj = queryOrder.startAt();//queryObj = [queryOrder queryStartingAtValue:nil];\n break;\n }\n Query queryLimit = null;\n switch (typeofLimit) {\n case QLimitedTo_NOT:\n default:\n queryLimit = queryObj;\n break;\n case QLimitedTo_FIRST:\n queryLimit = queryObj.limitToFirst(numLimited);\n break;\n case QLimitedTo_LAST:\n queryLimit = queryObj.limitToLast(numLimited);\n break;\n }\n queryLimit.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot snapshot) {\n JSONObject resultObj;\n\t\t\t\ttry {\n HashMap result = snapshot.getValue(HashMap.class);\n if (result == null)\n resultObj = new JSONObject();\n else\n resultObj = new JSONObject(result);\n\t PluginResult pluginResult = new PluginResult(Status.OK, resultObj);\n\t //pluginResult.setKeepCallback(true);\n\t mCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tPluginResult pluginResult = new PluginResult(Status.ERROR, e.getMessage());\n\t\t\t\t\tmCallbackContext.sendPluginResult(pluginResult);\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n }\n\n @Override\n public void onCancelled(FirebaseError firebaseError) {\n System.out.println(\"The querySearch(addListenerForSingleValueEvent) failed: \" + firebaseError.getMessage());\n PluginResult pluginResult = new PluginResult(Status.ERROR, \"The querySearch failded: \" + firebaseError.getMessage());\n mCallbackContext.sendPluginResult(pluginResult);\n }\n });\n }", "public void search() {\r\n \t\r\n }", "@Override\r\n\tpublic void search() {\n\r\n\t}", "abstract public void search();", "@Override\n\tpublic void search() {\n\t}", "private void searchFunction() {\n\t\t\r\n\t}", "private void startSearch(CharSequence text) {\n Query searchByname = productList.orderByChild(\"name\").equalTo(text.toString());\n //Create Options with Query\n FirebaseRecyclerOptions<Product> productOptions = new FirebaseRecyclerOptions.Builder<Product>()\n .setQuery(searchByname,Product.class)\n .build();\n\n\n searchAdapter = new FirebaseRecyclerAdapter<Product, ProductViewHolder>(productOptions) {\n @Override\n protected void onBindViewHolder(@NonNull ProductViewHolder holder, int position, @NonNull Product model) {\n\n holder.txtProductName.setText(model.getName());\n Picasso.with(getBaseContext()).load(model.getImage())\n .into(holder.imgProduct);\n\n final Product local = model;\n holder.setItemClickListener(new ItemClickListener() {\n @Override\n public void onClick(View view, int position, boolean isLongClick) {\n //Start New Activity\n Intent detail = new Intent(ProductList.this,ProductDetail.class);\n detail.putExtra(\"ProductId\",searchAdapter.getRef(position).getKey());\n startActivity(detail);\n }\n });\n\n }\n\n @NonNull\n @Override\n public ProductViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {\n View itemView = LayoutInflater.from(viewGroup.getContext())\n .inflate(R.layout.product_item,viewGroup,false);\n return new ProductViewHolder(itemView);\n }\n };\n searchAdapter.startListening();\n recyclerView.setAdapter(searchAdapter);\n\n }", "public void search() {\n }", "void search();", "void search();", "Search getSearch();", "private void searchLeisure(String searchQuery) {\n DatabaseReference ref = FirebaseDatabase.getInstance().getReference(\"Leisure\");\n //get all data from this ref\n ref.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n postList.clear();\n for (DataSnapshot ds : dataSnapshot.getChildren()) {\n LeisureModel leisureModel = ds.getValue(LeisureModel.class);\n if (leisureModel.getName().toLowerCase().contains(searchQuery.toLowerCase())) {\n postList.add(leisureModel);\n }\n //adapter\n postAdapter = new LeisureAdapter(SearchAllLeisure.this, postList);\n //set adapter to recyclerview\n rvLeisureCategory.setAdapter(postAdapter);\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n //in case of error\n Toast.makeText(SearchAllLeisure.this, \"\" + databaseError.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n }", "List<SearchResult> search(SearchQuery searchQuery);", "@In String search();", "public void search(String searchQuery) {\n if (!searchQuery.trim().equals(\"\")) {\n DBref.orderByChild(\"username\").startAt(searchQuery).endAt(searchQuery + \"\\uf8ff\").addValueEventListener(userEventListener);\n } // if searching input is not empty\n }", "@ActionTrigger(action=\"KEY-ENTQRY\", function=KeyFunction.SEARCH)\n\t\tpublic void spriden_Search()\n\t\t{\n\t\t\t\n\t\t\t\texecuteAction(\"QUERY\");\n\t\t\t\tgetTask().getGoqrpls().gCheckFailure();\n\t\t\t}", "public void search() {\n String q = this.query.getText();\n String cat = this.category.getValue();\n if(cat.equals(\"Book\")) {\n searchBook(q);\n } else {\n searchCharacter(q);\n }\n }", "private void startSearch(CharSequence text) {\n Query searchByName = product.orderByChild(\"productName\").equalTo(text.toString().trim());\n\n FirebaseRecyclerOptions<Product> productOptions = new FirebaseRecyclerOptions.Builder<Product>()\n .setQuery(searchByName, Product.class)\n .build();\n\n searchAdapter = new FirebaseRecyclerAdapter<Product, ProductViewHolder>(productOptions) {\n @Override\n protected void onBindViewHolder(@NonNull ProductViewHolder viewHolder, int position, @NonNull Product model) {\n\n viewHolder.product_name.setText(model.getProductName());\n\n Picasso.with(getBaseContext()).load(model.getProductImage())\n .into(viewHolder.product_image);\n\n final Product local = model;\n\n viewHolder.setItemClickListener(new ItemClickListener() {\n @Override\n public void onClick(View view, int position, boolean isLongClick) {\n\n Intent product_detail = new Intent(ProductListActivity.this, ProductDetailActivity.class);\n product_detail.putExtra(\"productId\", searchAdapter.getRef(position).getKey());\n startActivity(product_detail);\n }\n });\n }\n\n @NonNull\n @Override\n public ProductViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {\n\n View itemView = LayoutInflater.from(viewGroup.getContext())\n .inflate(R.layout.item_products, viewGroup, false);\n return new ProductViewHolder(itemView);\n }\n };\n searchAdapter.startListening();\n recycler_product.setAdapter(searchAdapter);\n }", "public void searchFunction() {\n textField_Search.textProperty().addListener(new ChangeListener<String>() {\n @Override\n public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {\n tableView.setPredicate(new Predicate<TreeItem<EntryProperty>>() {\n @Override\n public boolean test(TreeItem<EntryProperty> entryTreeItem) {\n Boolean flag = entryTreeItem.getValue().titleProperty().getValue().toLowerCase().contains(newValue.toLowerCase()) ||\n entryTreeItem.getValue().usernameProperty().getValue().toLowerCase().contains(newValue.toLowerCase());\n return flag;\n }\n });\n }\n });\n }", "private void firebaseSearch(String searchtext) {\n String query = searchtext.toLowerCase();\n Query firebaseQuery = reference.orderByChild(\"title\").startAt(query).endAt(query + \"\\uf8ff\");\n FirebaseRecyclerOptions<UploadMember> options =\n new FirebaseRecyclerOptions.Builder<UploadMember>()\n .setQuery(firebaseQuery, UploadMember.class) //Here i remove FirebaseDatabase.getInstance.getReference().child(\"videos\")\n .build(); //Instead i put firebaseQuery for search the video on the recycler view\n\n FirebaseRecyclerAdapter<UploadMember, VideoHolder> firebaseRecyclerAdapter =\n new FirebaseRecyclerAdapter<UploadMember, VideoHolder>(options) {\n\n @NonNull\n @Override\n public VideoHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {\n View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.row, parent, false);\n return new VideoHolder(view);\n }\n\n @Override\n protected void onBindViewHolder(@NonNull VideoHolder videoHolder, int i, @NonNull UploadMember uploadMember) {\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n String currentUserId = user.getUid();\n final String postkey = getRef(i).getKey(); //It will currently get the key of the post\n\n Log.d(\"Message\", uploadMember.getUrl());\n videoHolder.setOnClickListener(new VideoHolder.Clicklistener() {\n @Override\n public void onItemClick(View view, int position) {\n //\n }\n @Override\n public void onItemLongClick(View view, int position) {\n title = getItem(position).getTitle();\n showDeleteDialogName(uploadMember.title);\n }\n });\n videoHolder.setVideo(requireActivity().getApplication(), uploadMember, i);\n String videoId = this.getRef(i).getKey();\n\n videoHolder.initui(getActivity(), uploadMember, i, videoId, getChildFragmentManager());\n\n videoHolder.setLikesButtonStatus(postkey);\n videoHolder.likeButton.setOnClickListener(v -> {\n likeChecker = true;\n likesreference.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n if (likeChecker.equals(true)) {\n if (snapshot.child(postkey).hasChild(currentUserId)) {\n likesreference.child(postkey).child(currentUserId).removeValue(); //this is for that user could not like the same video again and again\n\n likeChecker = false;\n } else {\n likesreference.child(postkey).child(currentUserId).setValue(true);\n dislikesreference.child(postkey).child(currentUserId).removeValue();\n likeChecker = false;\n }\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n Snackbar.make(bind.getRoot(), \"Something went wrong\", BaseTransientBottomBar.LENGTH_LONG).show();\n }\n });\n });\n videoHolder.setDislikeButtonStatus(postkey);\n videoHolder.dislikeButton.setOnClickListener(v -> {\n dislikeChecker = true;\n dislikesreference.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n if (dislikeChecker.equals(true)) {\n if (snapshot.child(postkey).hasChild(currentUserId)) {\n dislikesreference.child(postkey).child(currentUserId).removeValue(); //User already gives the dislike so they could not again yani user dislike wapas le rha hai\n\n dislikeChecker = false;\n } else {\n dislikesreference.child(postkey).child(currentUserId).setValue(true);//User dislike the trainer video\n likesreference.child(postkey).child(currentUserId).removeValue();\n dislikeChecker = false;\n }\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n Snackbar.make(bind.getRoot(), \"Something went wrong\", BaseTransientBottomBar.LENGTH_LONG).show();\n }\n });\n });\n videoHolder.setFollowButtonStatus(postkey);\n videoHolder.followButton.setOnClickListener(v -> {\n followChecker = true;\n followsreference.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n if (followChecker.equals(true)) {\n reference.child(postkey).get().addOnSuccessListener(dataSnapshot -> {\n UploadMember model = dataSnapshot.getValue(UploadMember.class);\n if (snapshot.child(model.uploaderId).hasChild(currentUserId)) {\n followsreference.child(model.uploaderId).child(currentUserId).removeValue(); //User already follows the trainer so they could not again\n followChecker = false;\n } else {\n followsreference.child(model.uploaderId).child(currentUserId).setValue(true); //user follows a particular trainer only at once\n followChecker = false;\n }\n });\n\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n Snackbar.make(bind.getRoot(), \"Something went wrong\", BaseTransientBottomBar.LENGTH_LONG).show();\n }\n });\n });\n videoHolder.comment.setOnClickListener(v -> {\n\n HomeFragmentDirections.ActionHomeFragmentToCommentFragment dir = HomeFragmentDirections.actionHomeFragmentToCommentFragment(postkey);\n NavHostFragment.findNavController(HomeFragment.this).navigate(dir);\n\n });\n }\n };\n firebaseRecyclerAdapter.startListening();\n bind.recyclerviewVideo.setAdapter(firebaseRecyclerAdapter);\n }", "@Override\n public void search(Uri uri) {\n }", "private void search() {\n \t\tString searchString = m_searchEditText.getText().toString();\n \n \t\t// Remove the refresh if it's scheduled\n \t\tm_handler.removeCallbacks(m_refreshRunnable);\n \t\t\n\t\tif ((searchString != null) && (!searchString.equals(\"\"))) {\n \t\t\tLog.d(TAG, \"Searching string: \\\"\" + searchString + \"\\\"\");\n \n \t\t\t// Save the search string\n \t\t\tm_lastSearch = searchString;\n \n \t\t\t// Disable the Go button to show that the search is in progress\n \t\t\tm_goButton.setEnabled(false);\n \n \t\t\t// Remove the keyboard to better show results\n \t\t\t((InputMethodManager) this\n \t\t\t\t\t.getSystemService(Service.INPUT_METHOD_SERVICE))\n \t\t\t\t\t.hideSoftInputFromWindow(m_searchEditText.getWindowToken(),\n \t\t\t\t\t\t\t0);\n \n \t\t\t// Start the search task\n \t\t\tnew HTTPTask().execute(searchString);\n \t\t\t\n \t\t\t// Schedule the refresh\n \t\t\tm_handler.postDelayed(m_refreshRunnable, REFRESH_DELAY);\n \t\t} else {\n \t\t\tLog.d(TAG, \"Ignoring null or empty search string.\");\n \t\t}\n \t}", "private Search() {}", "@Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n search(searchIput.getText().toString()); // search user\n }", "public abstract S getSearch();", "public void searchFunction1() {\n textField_Search.textProperty().addListener(new ChangeListener<String>() {\n @Override\n public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {\n tableView_recylce.setPredicate(new Predicate<TreeItem<EntryProperty>>() {\n @Override\n public boolean test(TreeItem<EntryProperty> entryTreeItem) {\n Boolean flag = entryTreeItem.getValue().titleProperty().getValue().toLowerCase().contains(newValue.toLowerCase()) ||\n entryTreeItem.getValue().usernameProperty().getValue().toLowerCase().contains(newValue.toLowerCase());\n return flag;\n }\n });\n }\n });\n }", "private void search(String product) {\n // ..\n }", "@Override\n\tpublic ArrayList<SearchItem> search(String key) {\n\t\treturn null;\n\t}", "abstract public boolean performSearch();", "public MagicSearch createMagicSearch();", "@Override\r\n\t\t\tpublic List<ScoredDocument> search(Query query) {\n\t\t\t\treturn null;\r\n\t\t\t}", "List<Card> search(String searchString, long userId) throws PersistenceCoreException;", "@Override\n public Data3DPlastic search() {\n return super.search();\n }", "List<DataTerm> search(String searchTerm);", "void searchProbed (Search search);", "List<Corretor> search(String query);", "List<Card> search(String searchString) throws PersistenceCoreException;", "List<Codebadge> search(String query);", "public void onSearchSubmit(String queryTerm);", "public static void search() {\n int userSelected = selectFromList(crudParamOptions);\n switch (userSelected){\n case 1:\n searchFirstName();\n break;\n case 2:\n searchLastName();\n break;\n case 3:\n searchPhone();\n break;\n case 4:\n searchEmail();\n break;\n default:\n break;\n }\n }", "private void search(String[] searchItem)\n {\n }", "public List<Product> search(String searchString);", "private void setSVListener() {\n svUsers.setOnQueryTextListener(new SearchView.OnQueryTextListener() {\n @Override\n public boolean onQueryTextSubmit(String query) {\n users.clear();\n app.mFirebaseRef.child(\"users\").addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n for (DataSnapshot dsUser : dataSnapshot.getChildren()) {\n if ((dsUser.child(\"name\").getValue(String.class).toLowerCase().contains(svUsers.getQuery().toString().toLowerCase())\n || dsUser.child(\"email\").getValue(String.class).toLowerCase().contains(svUsers.getQuery().toString().toLowerCase()))\n && !app.user.getEmail().equals(dsUser.child(\"email\").getValue(String.class))){\n Map<String, String> user = new HashMap<String,String>();\n user.put(\"ID\", dsUser.getKey());\n user.put(\"name\", (String) dsUser.child(\"name\").getValue());\n user.put(\"email\", (String) dsUser.child(\"email\").getValue());\n user.put(\"photoURL\", (String) dsUser.child(\"photoURL\").getValue());\n users.add(user);\n }\n }\n populateUserList();\n }\n\n @Override\n public void onCancelled(FirebaseError firebaseError) {\n Log.e(\"FIREBASE ERROR\", firebaseError.getMessage());\n populateUserList();\n }\n });\n return false;\n }\n\n @Override\n public boolean onQueryTextChange(String newText) {\n if (newText.isEmpty()) {\n users.clear();\n populateUserList();\n }\n return false;\n }\n });\n }", "@Override\n public boolean onQueryTextSubmit(String query) {\n if (AfterLoginActivity.this.latestBookList != null) {\n searchBookList = new ArrayList<>();\n\n for (Book book : AfterLoginActivity.this.latestBookList) {\n //str1.toLowerCase().contains(str2.toLowerCase())\n if (book.getName().toLowerCase().contains(query.toLowerCase())) {\n //add to search book list\n searchBookList.add(book);\n }\n }\n //set books to book list view\n AfterLoginActivity.this.bookListFragment.setBooks(searchBookList);\n }\n return true;\n }", "public void GeneralSearch()\n {\n mainQuery = new ChildEventListener() {\n @Override\n public void onChildAdded(@NonNull DataSnapshot snapshot, @Nullable String previousChildName) {\n //get the snapshot value as a boulder problem\n BoulderProblem bp = snapshot.getValue(BoulderProblem.class);\n\n //create listener to get the setter display name\n ValueEventListener setterListener = new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n //display name is the value of the snapshot\n bp.SetSetter(snapshot.getValue().toString());\n //add the boulder problem to list of boulder problems\n bps.add(bp);\n //call method to display correct list\n BPSearch();\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n\n }\n };\n //call method to attach listener for getting setter display name\n AttachSetterListener(bp.GetSetterId(), setterListener);\n }\n\n @Override\n public void onChildChanged(@NonNull DataSnapshot snapshot, @Nullable String previousChildName) {\n\n }\n\n @Override\n public void onChildRemoved(@NonNull DataSnapshot snapshot) {\n //listens for boulder problems removed from the database\n\n //get the snapshot value as a boulder problem object\n BoulderProblem bp = snapshot.getValue(BoulderProblem.class);\n //loop through list of boulder problems to check if it is in the list and if so remove it and re display the list on screen\n for(int i = 0; i < bps.size(); i++)\n {\n if(bps.get(i).GetName().equals(bp.GetName()))\n {\n bps.remove(i);\n BPSearch();\n break;\n }\n }\n }\n\n @Override\n public void onChildMoved(@NonNull DataSnapshot snapshot, @Nullable String previousChildName) {\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n\n }\n };\n bpRef.child(\"UserCreated\").orderByChild(sortOption).addChildEventListener(mainQuery);\n }", "private void searchQuery() {\n edit_search.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n if (paletteComposition.getVisibility() == View.VISIBLE){\n paletteComposition.setVisibility(View.GONE);\n setComposer.setVisibility(View.VISIBLE);\n }\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n setContactThatNameContains(s.toString().trim());\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n\n }\n });\n }", "@Override\n\tprotected void executeSearch(String term) {\n\t\t\n\t}", "public void search() {\n try {\n for(int i = 0; i < this.queries.size(); i++){\n search(i);\n // in case of error stop\n if(!this.searchOK(i)){\n System.out.println(\"\\t\" + new Date().toString() + \" \" + db + \" Search for rest queries cancelled, because failed for query \" + i + \" : \" + this.queries.get(i));\n break;\n }\n }\n } catch (UnsupportedEncodingException ex) {\n Logger.getLogger(EntrezSearcher.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "List<Cemetery> search(String query);", "public search() {\n }", "public List<User> searchUser(String searchValue);", "private void searchByTitle(String title){\n Query query = null;\n if(mTipoCuenta.equals(\"ADMINISTRADOR\")){\n query = mPostProvider.getPostByTitle(title);\n }else{\n query = mPostProvider.getPostByTitleTipocuenta(mTipoCuenta,title);\n }\n FirestoreRecyclerOptions<Post> options = new FirestoreRecyclerOptions.Builder<Post>()\n .setQuery(query, Post.class)\n .build();\n mPostAdapterSearch = new PostsAdapter(options, getContext());\n mPostAdapter.notifyDataSetChanged();\n mRecycleView.setAdapter(mPostAdapterSearch);\n mPostAdapterSearch.startListening();\n }", "SearchResult<TimelineMeta> search(SearchQuery searchQuery);", "public void onSearchStarted();", "public abstract Search defaultSearch(StringBuilder sb);", "ReagentSearch getReagentSearch();", "private void search(Object value)\r\n\t\t{\n\r\n\t\t}", "public void search() {\n listTbagendamentos\n = agendamentoLogic.findAllTbagendamentoByDataAndPacienteAndFuncionario(dataSearch, tbcliente, tbfuncionario);\n }", "CampusSearchQuery generateQuery();", "void loadSearch(UserSearch search);", "public void doSearch(String query)\n \t{\n \t\tlistener.onQueryTextSubmit(query);\n \t}", "List<Revenue> search(String query);", "@Override\n\tpublic List<Contact> search(String str) {\n\t\treturn null;\n\t}", "@Override\n\tpublic void searchMembers(String keyword) {\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n getMenuInflater().inflate(R.menu.search_bar_menu , menu );\n MenuItem item = menu.findItem(R.id.action_search);\n SearchView searchView = (SearchView) MenuItemCompat.getActionView(item);\n\n searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {\n @Override\n public boolean onQueryTextSubmit(String query) {\n firebaseSearch(query);\n return false;\n }\n\n @Override\n public boolean onQueryTextChange(String newText) {\n firebaseSearch(newText); //filtering as we Type\n return false;\n }\n });\n\n\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onSearchConfirmed(CharSequence text) {\n startSearch(text);\n\n }", "public void setUpTextWatcher(EditText searchFriendText) {\n searchFriendText.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {\n Log.i(TAG,\"beforeTextChanged\");\n }\n\n @Override\n public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {\n Log.i(TAG,\"onTextCHanged\");\n Log.i(TAG,charSequence.toString());\n if (charSequence.length() == 0) {\n searchRecyclerview.setVisibility(View.INVISIBLE);\n } else {\n searchRecyclerview.setVisibility(View.VISIBLE);\n }\n Query query = databaseReference.orderByChild(\"UserData/displayname\")\n .startAt(charSequence.toString())\n .endAt(charSequence.toString() + \"\\uf8ff\");\n query.addValueEventListener(valueEventListener);\n }\n\n @Override\n public void afterTextChanged(Editable editable) {\n Log.i(TAG,\"afterTextChanged\");\n }\n });\n }", "@Override\n public void onSearchTermChanged() {\n }", "private void search(){\n solo.waitForView(R.id.search_action_button);\n solo.clickOnView(solo.getView(R.id.search_action_button));\n\n //Click on search bar\n SearchView searchBar = (SearchView) solo.getView(R.id.search_experiment_query);\n solo.clickOnView(searchBar);\n solo.sleep(500);\n\n //Type in a word from the description\n solo.clearEditText(0);\n solo.typeText(0, searchTerm);\n }", "@Override\n public void onClick(View v) {\n EditText searchBar = (EditText) findViewById(R.id.searchBar);\n String searchTerms = searchBar.getText().toString();\n\n //Perform the search\n new SearchStationsAsync(getBaseContext(), searchTerms).execute();\n }", "void searchDatabase(String userInput)\n {\n List<Recipe> result = this.database.getRecipes(userInput);\n\n recipeListAdapter.updateRecipeList(result);\n }", "private void searchList() {\n String keyword = search_bar.getText().toString();\n try {\n if (!TextUtils.isEmpty(keyword)) {\n RemoteMongoCollection<Document> plants = mongoDbSetup.getCollection(\"plants\");\n RemoteMongoIterable<Document> plantIterator = plants.find();\n\n docsToUse.clear();\n listOfPlants.clear();\n mRecyclerView.removeAllViews();\n\n final ArrayList<Document> docs = new ArrayList<>();\n\n plantIterator\n .forEach(document -> {\n plant_name = document.getString(\"plant_name\");\n picture_url = document.getString(\"picture_url\");\n description = document.getString(\"description\");\n\n if (plant_name.toLowerCase().contains(keyword.toLowerCase())) {\n\n docs.add(document);\n setPlantList(docs);\n listOfPlants.add(new RecyclerViewPlantItem(picture_url, plant_name, description));\n\n }\n })\n\n .addOnCompleteListener(task -> {\n if (listOfPlants.size() == 0) {\n search_bar.requestFocus();\n search_bar.setError(\"No match found\");\n\n listOfPlants.clear();\n }\n mRecyclerView.setHasFixedSize(true);\n mLayoutManager = new LinearLayoutManager(getActivity());\n mAdapter = new RecyclerViewAdapter(listOfPlants, getActivity());\n mAdapter.notifyDataSetChanged();\n\n mRecyclerView.setLayoutManager(mLayoutManager);\n mRecyclerView.setAdapter(mAdapter);\n })\n .addOnFailureListener(e -> Log.e(TAG, \"error \" + e.getMessage()));\n\n } else if (searchButton.isPressed() && TextUtils.isEmpty(keyword)) {\n search_bar.setError(\"Please type a keyword\");\n listOfPlants.clear();\n findPlantsList();\n }\n } catch (Throwable e) {\n Log.e(TAG, \"NullPointerException: \" + e.getMessage());\n }\n }", "public void doSearch(String searchText){\n }", "SearchResponse search(SearchRequest searchRequest) throws IOException;", "private void SearchMemberWithName(final String name) {\n MemberRecycle.setVisibility(View.VISIBLE);\n RootRef.child(\"Users\").child(CurrentUserID).child(\"group\").addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n if (snapshot.exists()) {\n final String GID = snapshot.getValue().toString();\n\n Query SearchQuery = RootRef.child(\"Users\").orderByChild(\"first_name\").startAt(name).endAt(name + \"\\uf8ff\");\n FirebaseRecyclerOptions options = new FirebaseRecyclerOptions.Builder<User>().setQuery(SearchQuery, User.class).build();\n FirebaseRecyclerAdapter<User, ViewHolder> adapter = new FirebaseRecyclerAdapter<User, ViewHolder>(options) {\n @Override\n protected void onBindViewHolder(@NonNull ViewHolder holder, int position, @NonNull final User model) {\n if (!GID.equals(model.getGroup())) {\n holder.InfoView.setVisibility(View.GONE);\n }\n\n Picasso.get().load(model.getImage()).placeholder(R.drawable.user).into(holder.InfoImage);\n holder.InfoTitle.setText(model.getFirst_name() + \" \" + model.getLast_name());\n holder.InfoMessage.setText(model.getEmail());\n\n holder.InfoView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n MemberRecycle.setVisibility(View.GONE);\n MemberName.setText(model.getFirst_name() + \" \" + model.getLast_name());\n MemberID = model.getId();\n }\n });\n }\n\n @NonNull\n @Override\n public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {\n View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.info_view, parent, false);\n ViewHolder viewHolder = new ViewHolder(view);\n return viewHolder;\n }\n };\n\n MemberRecycle.setAdapter(adapter);\n adapter.startListening();\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n\n }\n });\n }", "private void searchforResults() {\n\n List<String> queryList = new SavePreferences(this).getStringSetPref();\n if(queryList != null && queryList.size() > 0){\n Log.i(TAG, \"Searching for results \" + queryList.get(0));\n Intent searchIntent = new Intent(Intent.ACTION_WEB_SEARCH);\n searchIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n searchIntent.putExtra(SearchManager.QUERY, queryList.get(0));\n this.startActivity(searchIntent);\n }\n }", "private void seachHispost(final String searchQuery){\n //linearlayout for recycleview\n LinearLayoutManager layoutManager=new LinearLayoutManager(this);\n layoutManager.setStackFromEnd(true);\n layoutManager.setReverseLayout(true);\n //set this layout to rycleview\n postRecycleview.setLayoutManager(layoutManager);\n //init post list\n DatabaseReference reference=FirebaseDatabase.getInstance().getReference(\"Posts\");\n //query to load photo\n Query query=reference.orderByChild(\"uid\").equalTo(uid);\n //get all data from this referece\n query.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n postList.clear();\n for(DataSnapshot ds:dataSnapshot.getChildren()){\n ModelPost modelPost=ds.getValue(ModelPost.class);\n //search\n if(modelPost.getPtitle().toLowerCase().contains(searchQuery.toLowerCase())\n ||modelPost.getPdescr().toLowerCase().contains(searchQuery.toLowerCase())){\n // add to list\n postList.add(modelPost);\n }\n\n //adapter\n adapterPosts=new AdapterPosts(ThereProfileActivity.this,postList);\n //set this to recycleview\n postRecycleview.setAdapter(adapterPosts);\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n Toast.makeText(ThereProfileActivity.this, \"\"+databaseError.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n }", "private void performSearch() {\n try {\n final String searchVal = mSearchField.getText().toString().trim();\n\n if (searchVal.trim().equals(\"\")) {\n showNoStocksFoundDialog();\n }\n else {\n showProgressDialog();\n sendSearchResultIntent(searchVal);\n }\n }\n catch (final Exception e) {\n showSearchErrorDialog();\n logError(e);\n }\n }", "protected final void searchForText() {\n Logger.debug(\" - search for text\");\n final String searchText = theSearchEdit.getText().toString();\n\n MultiDaoSearchTask task = new MultiDaoSearchTask() {\n @Override\n protected void onSearchCompleted(List<Object> results) {\n adapter.setData(results);\n }\n\n @Override\n protected int getMinSearchTextLength() {\n return 0;\n }\n };\n task.readDaos.add(crDao);\n task.readDaos.add(monsterDao);\n task.readDaos.add(customMonsterDao);\n task.execute(searchText.toUpperCase());\n }", "@Override\n public void onSearchConfirmed(CharSequence text) {\n startSearch(text);\n }", "private void search(String query) {\n final List<Artist> foundartists = new ArrayList<Artist>();\n final String usrquery = query;\n\n spotifysvc.searchArtists(query, new Callback<ArtistsPager>() {\n @Override\n public void success(ArtistsPager artists, Response response) {\n List<Artist> artistlist = artists.artists.items;\n Log.d(LOG_TAG_API, \"found artists [\" + artistlist.size() + \"]: \" + artistlist.toString());\n datalist.clear();\n\n if (artistlist.size() > 0) {\n setListdata(artistlist);\n } else {\n Toast.makeText(getActivity(), \"no artists found by the name: \" + usrquery, Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void failure(RetrofitError error) {\n Log.e(LOG_TAG_API, \"failed to retrieve artists:\\n\" + error.toString());\n Toast.makeText(getActivity(), \"failed to retrieve artists. Possible network issues?: \", Toast.LENGTH_SHORT).show();\n }\n });\n }", "private void handleSearchOnPost(String result) {\n ConnectionsFragment frag = (ConnectionsFragment) getSupportFragmentManager()\n .findFragmentByTag(getString(R.string.keys_fragment_connections));\n\n boolean inContacts;\n boolean inRequests;\n boolean inPending;\n\n ArrayList<String> newPeople = new ArrayList<String>();\n ArrayList<String> contactList = new ArrayList<String>();\n ArrayList<String> requestList = new ArrayList<String>();\n ArrayList<String> pendingList = new ArrayList<String>();\n\n try {\n JSONObject resultsJSON = new JSONObject(result);\n boolean success = resultsJSON.getBoolean(\"success\");\n\n if (success) {\n if (resultsJSON.has(getString(R.string.keys_json_results))) {\n try {\n JSONArray jRes = resultsJSON\n .getJSONArray(getString(R.string.keys_json_results));\n if (jRes.length() == 0) {\n frag.handleEmptySearch();\n return;\n } else {\n for (int i = 0; i < jRes.length(); i++) {\n JSONObject res = jRes.getJSONObject(i);\n String username = res.getString(getString(R.string.keys_json_username));\n String firstname = res.getString(getString(R.string.keys_json_requests_firstname));\n String lastname = res.getString(getString(R.string.keys_json_requests_lastname));\n String str = username + \" (\" + lastname + \", \" + firstname + \")\";\n\n inContacts = searchName(username, mContacts);\n inRequests = searchName(username, mRequests);\n inPending = searchName(username, mPending);\n\n if (!username.equals(mUsername)) {\n\n if (inContacts) {\n contactList.add(str);\n } else if (inRequests) {\n requestList.add(str);\n } else if (inPending) {\n Toast.makeText(this, \"inPending\", Toast.LENGTH_LONG);\n pendingList.add(str);\n } else {\n newPeople.add(str);\n }\n }\n\n }\n\n if (contactList.isEmpty() && requestList.isEmpty() &&\n pendingList.isEmpty() && newPeople.isEmpty()) {\n frag.handleSearchForSelf();\n return;\n }\n\n frag.handleSearchOnPost();\n\n Bundle extras = new Bundle();\n extras.putStringArrayList(\"contacts\", contactList);\n extras.putStringArrayList(\"requests\", requestList);\n extras.putStringArrayList(\"pending\", pendingList);\n extras.putStringArrayList(\"newPeople\", newPeople);\n\n SearchContactsFragment fragment = new SearchContactsFragment();\n fragment.setArguments(extras);\n\n getSupportFragmentManager().beginTransaction()\n .setCustomAnimations(R.anim.enter, R.anim.exit,\n R.anim.pop_enter, R.anim.pop_exit)\n .replace(R.id.homeFragmentContainer, fragment,\n getString(R.string.keys_fragment_searchConnections))\n .addToBackStack(null).commit();\n getSupportFragmentManager().executePendingTransactions();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n frag.handleErrorsInTask(e.toString());\n frag.setError(e.toString());\n }\n }\n }\n } catch (JSONException e) {\n frag.setError(\"Something strange happened\");\n frag.handleOnError(e.toString());\n }\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View searchOfferView = inflater.inflate(R.layout.fragment_search_student, container, false);\n\n\n toolbar = searchOfferView.findViewById(R.id.toolbar);\n ((AppCompatActivity)getActivity()).setSupportActionBar(toolbar);\n setHasOptionsMenu(true);\n\n spinnerFilter = searchOfferView.findViewById(R.id.filterSpinner);\n ref = FirebaseDatabase.getInstance().getReference().child(\"Tutors\");\n\n ArrayAdapter<CharSequence> adapterFilter = ArrayAdapter.createFromResource(getContext(), R.array.filter_tutor,R.layout.spinner_text);\n adapterFilter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spinnerFilter.setAdapter(adapterFilter);\n\n\n recyclerView = searchOfferView.findViewById(R.id.recyclerview_offer_search);\n\n\n /* EditText searchBar = (EditText) searchOfferView.findViewById(R.id.search_bar);\n final String searchText = searchBar.getText().toString().trim();*/\n\n ref = FirebaseDatabase.getInstance().getReference().child(\"Offers\");\n refUid = FirebaseDatabase.getInstance().getReference().child(\"Users\").child(FirebaseAuth.getInstance().getCurrentUser().getUid());\n refTutor = FirebaseDatabase.getInstance().getReference().child(\"Tutors\");\n /*Button btnSearch = searchOfferView.findViewById(R.id.btn_search);*/\n\n\n\n recyclerView.setHasFixedSize(true);\n /*adapter = new OfferRecyclerViewAdapter(getActivity(), offerList);*/\n LinearLayoutManager linearLayout = new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL,false);\n linearLayout.setReverseLayout(true);\n linearLayout.setStackFromEnd(true);\n recyclerView.setLayoutManager(linearLayout);\n\n ref.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n int value = (int) snapshot.getChildrenCount();\n\n Log.d(\"countOffer\", String.valueOf(value));\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n\n }\n });\n\n options = new FirebaseRecyclerOptions.Builder<Offer>().setQuery(ref, Offer.class).build();\n adapter = new FirebaseRecyclerAdapter<Offer, OfferRecyclerViewAdapter.MyViewHolder>(options) {\n @Override\n protected void onBindViewHolder(@NonNull final OfferRecyclerViewAdapter.MyViewHolder myViewHolder, int i, @NonNull final Offer Offer) {\n ref.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n if(snapshot.child(Offer.getOid()).child(\"Requests\").hasChild(FirebaseAuth.getInstance().getCurrentUser().getUid())){\n myViewHolder.imgBtnRequestOff.setVisibility(View.GONE);\n myViewHolder.imgBtnRequestOn.setVisibility(View.VISIBLE);\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n\n }\n });\n myViewHolder.etTitle.setText(\"\" + Offer.getTitle());\n myViewHolder.etDescription.setText(\"\" + Offer.getDescription());\n myViewHolder.etLocation.setText(\"\" + Offer.getLocationCity() + \", \" + Offer.getLocationState());\n myViewHolder.etGender.setText(\"\" + Offer.getGender());\n myViewHolder.etSubject.setText(\"\" + Offer.getSubject());\n\n getComments(Offer.getOid(), myViewHolder.tvCommment);\n\n myViewHolder.imgBtnComment.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent = new Intent(getActivity(), activity_comment_offer.class);\n intent.putExtra(\"offerid\", Offer.getOid());\n intent.putExtra(\"userid\", Offer.getUid());\n startActivity(intent);\n }\n });\n myViewHolder.tvCommment.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent = new Intent(getActivity(), activity_comment_offer.class);\n intent.putExtra(\"offerid\", Offer.getOid());\n intent.putExtra(\"userid\", Offer.getUid());\n startActivity(intent);\n }\n });\n\n myViewHolder.imgBtnRequestOff.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n OfferRequest offerRequest = new OfferRequest(FirebaseAuth.getInstance().getCurrentUser().getUid());\n ref.child(Offer.getOid()).child(\"Requests\").child(FirebaseAuth.getInstance().getCurrentUser().getUid()).setValue(offerRequest);\n refTutor.child(FirebaseAuth.getInstance().getCurrentUser().getUid()).child(\"Offer\").child(Offer.getOid()).child(\"status\").setValue(true);\n myViewHolder.imgBtnRequestOff.setVisibility(View.GONE);\n myViewHolder.imgBtnRequestOn.setVisibility(View.VISIBLE);\n Toast.makeText(getActivity(), \"You requested this offer\", Toast.LENGTH_SHORT).show();\n }\n });\n\n myViewHolder.imgBtnRequestOn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n ref.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n ref.child(Offer.getOid()).child(\"Requests\").child(FirebaseAuth.getInstance().getCurrentUser().getUid()).removeValue();\n refTutor.child(FirebaseAuth.getInstance().getCurrentUser().getUid()).child(\"Offer\").child(Offer.getOid()).removeValue();\n myViewHolder.imgBtnRequestOn.setVisibility(View.GONE);\n myViewHolder.imgBtnRequestOff.setVisibility(View.VISIBLE);\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n\n }\n });\n\n\n }\n });\n\n DatabaseReference refOffer = FirebaseDatabase.getInstance().getReference().child(\"Offers\").child(Offer.getOid());\n refOffer.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n if (snapshot.child(\"date\").exists())\n myViewHolder.etDate.setText(\"Posted on \" + snapshot.child(\"date\").getValue());\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n\n }\n });\n DatabaseReference refOwner = FirebaseDatabase.getInstance().getReference().child(\"Users\").child(Offer.getUid());\n refOwner.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n String user_name = snapshot.child(\"fullname\").getValue().toString();\n myViewHolder.etName.setText(user_name);\n if (snapshot.child(\"image\").exists()){\n String user_image = snapshot.child(\"image\").getValue().toString();\n Picasso.get().load(user_image).into(myViewHolder.img_view_profile);\n }else{\n Picasso.get().load(R.drawable.profile_icon).into(myViewHolder.img_view_profile);\n }\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n\n }\n });\n }\n\n @NonNull\n @Override\n public OfferRecyclerViewAdapter.MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {\n View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.cardview_offer,parent, false);\n return new OfferRecyclerViewAdapter.MyViewHolder(v);\n\n }\n };\n adapter.startListening();\n /*recyclerView.setLayoutManager(new GridLayoutManager(getActivity(),1));*/\n recyclerView.setAdapter(adapter);\n\n /*btnSearch.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n *//*Log.d(\"myText\", searchText);\n searchStudent(searchText);*//*\n\n }\n });*/\n return searchOfferView;\n }", "public void searchFor(View view) {\n // Get a handle for the editable text view holding the user's search text\n EditText userInput = findViewById(R.id.user_input_edit_text);\n // Get the characters from the {@link EditText} view and convert it to string value\n String input = userInput.getText().toString();\n\n // Search filter for search text matching book titles\n RadioButton mTitleChecked = findViewById(R.id.title_radio);\n // Search filter for search text matching authors\n RadioButton mAuthorChecked = findViewById(R.id.author_radio);\n // Search filter for search text matching ISBN numbers\n RadioButton mIsbnChecked = findViewById(R.id.isbn_radio);\n\n if (!input.isEmpty()) {\n // On click display list of books matching search criteria\n // Build intent to go to the {@link QueryResultsActivity} activity\n Intent results = new Intent(MainActivity.this, QueryListOfBookActivity.class);\n\n // Get the user search text to {@link QueryResultsActivity}\n // to be used while creating the url\n results.putExtra(\"topic\", mUserSearch.getText().toString().toLowerCase());\n\n // Pass search filter, if any\n if (mTitleChecked.isChecked()) {\n // User is searching for book titles that match the search text\n results.putExtra(\"title\", \"intitle=\");\n } else if (mAuthorChecked.isChecked()) {\n // User is searching for authors that match the search text\n results.putExtra(\"author\", \"inauthor=\");\n } else if (mIsbnChecked.isChecked()) {\n // User is specifically looking for the book with the provided isbn number\n results.putExtra(\"isbn\", \"isbn=\");\n }\n\n // Pass on the control to the new activity and start the activity\n startActivity(results);\n\n } else {\n // User has not entered any search text\n // Notify user to enter text via toast\n\n Toast.makeText(\n MainActivity.this,\n getString(R.string.enter_text),\n Toast.LENGTH_SHORT)\n .show();\n }\n }", "public void onSearchCompleted(String searchString, List<Photo> photos);", "public void search() throws SQLException;", "@GET(\"w/api.php?action=opensearch&format=json&suggest&redirects=resolve\")\n Call<JsonElement> getSuggestionsFromSearch(@Query(\"search\") String search);", "@Override\n public boolean onQueryTextSubmit(String s) {\n Intent intent = new Intent(getApplicationContext(), SearchActivity.class);\n intent.putExtra(\"idBeca\", s);\n startActivity(intent);\n return true;\n }", "void searchUI();", "@Override\n public void onSearchConfirmed(CharSequence text) {\n startSearch(text);\n\n }", "@Override\n public void onSearchConfirmed(CharSequence text) {\n startSearch(text);\n\n }", "@Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n String text = searchBar.getText().toString().toLowerCase();\n // voer displayArray uit\n filteredUsers.clear();\n int length = users.size();\n for (int i = 0; i < length; i++) {\n final String name = users.get(i).first.toLowerCase();\n if (name.startsWith(text)) {\n filteredUsers.add(users.get(i));\n }\n }\n displayArray(filteredUsers);\n //Log.d(TAG, \"text changed\");\n }", "public void search(String text){\n filteredList.clear();\n\n if(TextUtils.isEmpty(text)){\n filteredList.addAll(filteredListForSearch);\n }\n\n else{\n String query = text.toLowerCase();\n for(SensorResponse item : filteredListForSearch){\n if(item.getSensor_Type().toLowerCase().contains(query) || Long.toString(item.getBattery()).toLowerCase().contains(query)\n || Long.toString(item.getDate_Time()).toLowerCase().contains(query) || Double.toString(item.getLat()).toLowerCase().contains(query)\n || Double.toString(item.getLong()).toLowerCase().contains(query) || item.getSensorHealth().toLowerCase().contains(query)\n || Long.toString(item.getSensor_ID()).toLowerCase().contains(query) || Double.toString(item.getSensor_Val()).toLowerCase().contains(query)){\n filteredList.add(item);\n }\n }\n }\n removeDuplicates();\n notifyDataSetChanged();\n }", "@Override\r\n public boolean onQueryTextSubmit(String query) {\n searchAdapter.setSearchResults(DataCache.getInstance().getSearchResults(query));\r\n return false;\r\n }", "public String getSearchString() {\r\n return super.getSearchString();\r\n \r\n// String searchStr = \"\";\r\n// //put exact phrase at the very beginning\r\n// if(exactphrase != null && exactphrase.length() > 0)\r\n// {\r\n// searchStr += \"\\\"\" + exactphrase + \"\\\"\";\r\n// }\r\n//\r\n// String allwordsSearchStr = \"\";\r\n// if(allwords != null && allwords.length() > 0)\r\n// {\r\n// String [] words = allwords.split(\" \");\r\n// if(words.length > 0)\r\n// {\r\n// for(int i=0; i<words.length; i++)\r\n// {\r\n// allwordsSearchStr += \"+\" + words[i];\r\n// }\r\n// }\r\n// }\r\n//\r\n// String withoutwordsSearchStr = \"\";\r\n// if(withoutwords != null && withoutwords.length() > 0)\r\n// {\r\n// String [] words = withoutwords.split(\" \");\r\n// if(words.length > 0)\r\n// {\r\n// for(int i=0; i<words.length; i++)\r\n// {\r\n// withoutwordsSearchStr += \"+-\" + words[i];\r\n// }\r\n// }\r\n// }\r\n//\r\n// searchStr += allwordsSearchStr + withoutwordsSearchStr; //need to add other string\r\n// \r\n// String oneofwordsSearchStr = \"\";\r\n// if(oneofwords != null && oneofwords.length() > 0)\r\n// {\r\n// String [] words = oneofwords.split(\" \");\r\n// if(words.length > 0)\r\n// {\r\n// oneofwordsSearchStr = \"(\";\r\n// for(int i=0; i<words.length; i++)\r\n// {\r\n// oneofwordsSearchStr += words[i] + \" \";\r\n// }\r\n// oneofwordsSearchStr = oneofwordsSearchStr.trim();\r\n// oneofwordsSearchStr += \")\";\r\n// }\r\n// }\r\n// if(oneofwordsSearchStr.length() > 0)\r\n// {\r\n// searchStr += \"+\" + oneofwordsSearchStr;\r\n// }\r\n//\r\n// return searchStr;\r\n }", "public void searchFlights();", "@Override\n public void search(SearchQuery searchQuery) throws VanilaException {\n\n setKeepQuite(false);\n\n String query = searchQuery.query;\n SearchOptions options = searchQuery.options;\n\n if (isCacheHavingResults(query)) {\n searchComplete(query, mRecentSearchResultsMap.get(query), null);\n }\n else {\n if (mIsBusyInSearch) {\n mMostRecentAwaitingQuery = searchQuery;\n }\n else {\n\n mMostRecentAwaitingQuery = null;\n mIsBusyInSearch = true;\n\n FSRequestDTO request = mFSContext.buildVenueRequest(query, options);\n\n FSVenueSearchGateway gateway = mMobilePlatformFactory.getSyncAdapter()\n .getSyncGateway(FSVenueSearchGateway.CLASS_NAME);\n gateway.fireReadVenueListRequest(request);\n }\n }\n }", "void search( RealLocalizable reference );", "private void search() {\n if (isConnected()) {\r\n query = searchField.getText().toString();\r\n mLoader.setVisibility(View.VISIBLE);\r\n emptyStateTextView.setText(\"\");\r\n //restart the loader with the new data\r\n loaderManager.restartLoader(1, null, this);\r\n } else {\r\n String message = getString(R.string.no_internet);\r\n new AlertDialog.Builder(this).setMessage(message).show();\r\n }\r\n }" ]
[ "0.74205655", "0.7252328", "0.71719676", "0.7036888", "0.7017614", "0.7002992", "0.69728607", "0.6949877", "0.6923805", "0.6897451", "0.6897451", "0.6831573", "0.6821828", "0.680348", "0.6784979", "0.6754089", "0.6599951", "0.6554992", "0.6533463", "0.65307003", "0.6499723", "0.64964235", "0.64468765", "0.63962287", "0.638191", "0.6358378", "0.63282794", "0.63264406", "0.63111746", "0.63005507", "0.6287155", "0.62846655", "0.6276574", "0.6270512", "0.62622124", "0.62574947", "0.6239659", "0.6237959", "0.6223655", "0.6206973", "0.61975837", "0.61970496", "0.618814", "0.61855733", "0.6180993", "0.6176341", "0.6158546", "0.61489433", "0.61397266", "0.61360687", "0.6132156", "0.6128459", "0.6117586", "0.61150366", "0.6087078", "0.6079281", "0.6065696", "0.6041041", "0.60399437", "0.60349876", "0.6031169", "0.6021313", "0.60120755", "0.6010058", "0.60022604", "0.59948206", "0.5994622", "0.5979332", "0.5973714", "0.5966956", "0.59664553", "0.59640634", "0.5962297", "0.5962157", "0.5958433", "0.5941808", "0.5933353", "0.5927274", "0.5927259", "0.5922191", "0.5914535", "0.5906728", "0.5897004", "0.58919376", "0.58919233", "0.5889406", "0.5878474", "0.58621734", "0.5860114", "0.5858609", "0.5852582", "0.5852582", "0.5851839", "0.5851266", "0.5848155", "0.5848077", "0.5847297", "0.5841331", "0.5836389", "0.5831083" ]
0.70700526
3
creating a function which will load data to Recylceview via OnStart Override method
@Override protected void onStart() { super.onStart(); /* FirebaseRecyclerAdapter <Model , viewHolder_cse> firebaseRecyclerAdapter = new FirebaseRecyclerAdapter<Model, viewHolder_cse>( Model.class , R.layout.row_for_cse_pdf, viewHolder_cse.class, mRef ) { @Override protected void populateViewHolder(viewHolder_cse viewHolder, Model model, int position) { viewHolder.SetDeatils(getApplicationContext() , model.getTitle() , model.getWriter() , model.getLink()); Handler handler = new Handler() ; handler.postDelayed(new Runnable() { @Override public void run() { cse_bar.setVisibility(View.GONE); } },3000); } @Override public viewHolder_cse onCreateViewHolder(ViewGroup parent, int viewType) { viewHolder_cse viewHolder_cse = super.onCreateViewHolder(parent,viewType) ; viewHolder_cse.setOnClickListener(new viewHolder_cse.ClickListener() { @Override public void onItemClick(View view, int position) { // data from views String mlink = getItem(position).getLink() ; // sending those data to new Activity Intent intent = new Intent(view.getContext() , pdfViewer.class); intent.putExtra("LINK", mlink); // put title startActivity(intent); } @Override public void onItemLongClick(View view, int position) { } }); return viewHolder_cse ; } }; //set adapter to recyclerview mrecyclerView.setAdapter(firebaseRecyclerAdapter); */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void onResume() {\n super.onResume();\n loadData();\n }", "@Override\n protected void onResume() {\n super.onResume();\n loadData();\n }", "@Override\n public void onResume() {\n super.onResume();\n initViewData();\n initdata();\n }", "@Override\n protected void onResume() {\n super.onResume();\n // loading dispositius via AsyncTask\n new LoadDispositiusTask().execute();\n }", "@Override\n protected void onStartLoading() {\n forceLoad();\n\n }", "private void loadData() {\n Log.d(LOG_TAG, \"loadData()\");\n /* If the device does not have an internet connection, then... */\n if (!NetworkUtils.hasInternetConnection(this)){\n showErrorMessage(true);\n return;\n }\n /* Make the View for the data visible and hide the error message */\n showDataView();\n\n /* Fetch the data from the web asynchronous using Retrofit */\n TMDBApi the_movie_database_api = new TMDBApi(new FetchDataTaskCompleteListener());\n /* Start the network transactions */\n the_movie_database_api.start(sortOrderCurrent);\n\n /* Display the loading indicator */\n displayLoadingIndicator(true);\n }", "@Override\n protected void onStartLoading() {\n Utils.postToMainLoop(new Runnable() {\n @Override\n public void run() {\n if (mResult != null) // If we currently have a result available, deliver it immediately.\n deliverResult(mResult);\n\n if (isReload() || mResult == null)\n forceLoad();\n }\n });\n }", "@Override\n protected void onStartLoading() {\n if (mTaskData != null) {\n // Delivers any previously loaded data immediately\n deliverResult(mTaskData);\n } else {\n // Force a new load\n forceLoad();\n }\n }", "@Override\n protected void onStartLoading() {\n if (mTaskData != null) {\n // Delivers any previously loaded data immediately\n deliverResult(mTaskData);\n } else {\n // Force a new load\n forceLoad();\n }\n }", "@Override\n\tprotected void onStartLoading() {\n\t\tif (mData != null) {\n\t\t\tdeliverResult(mData);\n\t\t}\n\t\t// Now we're in start state so we need to monitor for data changes.\n\t\t// To do that we start to observer the data\n\t\t// Register for changes which is Loader dependent\n\t\tregisterObserver();\n\t\t// Now if we're in the started state and content is changes we have\n\t\t// a flag that we can check with the method takeContentChanged()\n\t\t// and force the load\t\t\t\t\t\n\t\tif (takeContentChanged() || mData == null) {\n\t\t\tforceLoad();\n\t\t}\n\t}", "protected void onCreate(Bundle savedInstanceState) {\n\tsuper.onCreate(savedInstanceState);\nsetContentView(R.layout.tixian_appliction);\ninitview();\nString url1 = Url.user()+\"getContact/\";\nLoadData(url1\t,null,\"loading\");\n}", "@Override\n protected void onStartLoading() {\n\n forceLoad();\n }", "@Override\r\n public void onResume() {\r\n super.onResume();\r\n refreshData();\r\n }", "protected void loadData() {\n refreshview.setRefreshing(true);\n //小区ID\\t帐号\\t消息类型ID\\t开始时间\\t结束时间\n // ZganLoginService.toGetServerData(26, 0, 2, String.format(\"%s\\t%s\\t%s\\t%s\\t%d\", PreferenceUtil.getUserName(), msgtype, \"2015-01-01\", nowdate, pageindex), handler);\n //ZganCommunityService.toGetServerData(26, 0, 2, String.format(\"%s\\t%s\\t%s\\t%s\\t%d\", PreferenceUtil.getUserName(), msgtype, \"2015-01-01\", nowdate, pageindex), handler);\n ZganCommunityService.toGetServerData(40, String.format(\"%s\\t%s\\t%s\\t%s\", PreferenceUtil.getUserName(), funcPage.gettype_id(), String.format(\"@id=22,@page_id=%s,@page=%s\",funcPage.getpage_id(),pageindex), \"22\"), handler);\n }", "@Override\r\n public void onStart() {\r\n \tsuper.onStart();\r\n \tif (UserInfo.isOffline()) offlineLoad();\r\n \telse {\r\n \t\tgetData();\r\n \t\tgetComments();\r\n \t}\r\n }", "@Override\n protected void onStartLoading() {\n if (mData != null) {\n // If we currently have a result available, deliver it\n // immediately.\n deliverResult(mData);\n }\n registerObserver();\n if (takeContentChanged() || mData == null || isConfigChanged()) {\n // If the data has changed since the last time it was loaded\n // or is not currently available, start a load.\n forceLoad();\n }\n }", "protected void onStartLoading() { forceLoad();}", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\r\n\t\tqueryData();\r\n\t}", "@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}", "private void startViewData() {\n startActivity(new Intent(this, ViewDataActivity.class));\n }", "@Override\r\n\t\tpublic void onLoadingStarted(String arg0, View arg1) {\n\t\t\t\r\n\t\t}", "@Override\n\t\t\t\t\tpublic void onLoadingStarted(String arg0, View arg1) {\n\n\t\t\t\t\t}", "@Override\n public void onLoadingStarted(String arg0, View arg1) {\n }", "@Override\r\n\t\t\t\t\tpublic void onLoadingStarted(String arg0, View arg1) {\n\t\t\t\t\t}", "@Override\n protected void loadData() {\n setUpLoadingViewVisibility(true);\n callImageList = RetrofitGenerator.createService(ApiService.class)\n .getAllPubImage();\n callImageList.enqueue(callbackImageList);\n }", "@Override\n public void onResume()\n {\n super.onResume();\n empty = true;\n loadData();\n initializeUI();\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tquerytonlistdata();\n\t}", "protected void loadData()\n {\n }", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tinitView();\r\n\t\tgetListDataFromLocal();\r\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t}", "@Override\n public void onResume() {\n super.onResume();\n refreshContent();\n }", "@Override\n\t\t\t\t\t\tpublic void onLoadingStarted(String arg0, View arg1) {\n\t\t\t\t\t\t}", "@Override\n protected void onStartLoading() {\n if (mMovieData != null) {\n deliverResult(mMovieData);\n } else {\n mLoadingIndicator.setVisibility(View.VISIBLE);\n forceLoad();\n }\n\n }", "@Override\n\tpublic void onLoad() {\n\t\trequestTime++;\n\t\trefreshFromServer(ListViewCompat.LOAD);\n\t}", "@Override\n public void onStart()\n {\n super.onStart();\n getListView();\n }", "@Override\n protected void onStartLoading() {\n if (lecturers != null) {\n // If we currently have a result available, deliver it\n // immediately.\n deliverResult(lecturers);\n }\n\n if (takeContentChanged() || lecturers == null) {\n // If the data has changed since the last time it was loaded\n // or is not currently available, start a load.\n forceLoad();\n }\n }", "@Override\n public void onRefresh() {\n load_remote_data();\n }", "@Override\n protected void onStartLoading() {\n if (idlingResource != null) {\n idlingResource.setIdleState(false);\n }\n\n if (recepts != null) {\n deliverResult(recepts);\n } else {\n mLoadingIndicator.setVisibility(View.VISIBLE);\n forceLoad();\n }\n }", "@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\n protected void onStartLoading() {\n if(mOrderData != null){\n deliverResult(mOrderData);//if there was already data loaded(in the event that the activity was navigated away from while loading), load it\n } else {\n forceLoad();//starts a load command\n }\n }", "@Override\n protected void onStart(){\n taskCollectors = getLocallyStoredData(storeRetrieveData);\n int size = taskCollectors.size();\n if (size<3){\n switch (size){\n case 0:\n taskCollectors.add(new TaskCollector(\"today\",new ArrayList<Task>()));\n case 1:\n taskCollectors.add(new TaskCollector(\"collection\",new ArrayList<Task>()));\n case 2:\n taskCollectors.add(new TaskCollector(\"courses\",new ArrayList<Task>()));\n default:\n break;\n }\n }\n if (taskCollectors.size()>0&&index<taskCollectors.size()){\n tasks = taskCollectors.get(index).getTasks();\n switch (index){\n case 0:\n taskCollectors.get(0).setName(\"today\");\n case 1:\n taskCollectors.get(1).setName(\"collection\");\n case 2:\n taskCollectors.get(2).setName(\"courses\");\n default:\n break;\n }\n mFloatingNavView.setImageBitmap(textAsBitmap(taskCollectors.get(index).getName(), 40, Color.parseColor(\"#515151\")));\n }\n //闹钟操作\n installAlarms(getApplicationContext(),taskCollectors);\n super.onStart();\n }", "@Override\n public void onLoadingStarted(String paramString, View paramView) {\n\n }", "void onFetchDataStarted();", "private void LoadComponents() {\n MenuBaseAdapter adapter = new MenuBaseAdapter(this.getActivity(), DataApp.LISTDATA);\n // list.setAdapter(adapter);\n this.event.OnLodCompleteDataResult();\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\trefreshListView();\n\t}", "@Override\n public void onRefresh() {\n loadData();\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tLog.d(\"tag\", \"-------onResume-------\");\n\t\trefreshList();// 刷新listview\n\t\tinitComponent();\n\t}", "@Override\n\tprotected void onResume() {\n\t\t\n\t\tinit();\n\t\tsuper.onResume();\n\n\t}", "@Override\r\n\tprotected void onResume() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tsuper.onResume();\r\n\t\t\r\n\t\trefresh();\r\n\t}", "@Override\n protected void onResume() {\n // Log.d(TAG, \"onResume: starts...\");\n super.onResume();\n GetDotaJSONData getDotaJSONData = new GetDotaJSONData(this, \"https://api.opendota.com/api/heroStats\", \"en-us\", true);\n getDotaJSONData.execute(\"\");\n }", "private void startLoad() {\n\t\tif (getIntent().getFlags()==8)\n\t\t{\n\t\t\ttitleTv.setText(R.string.WXYT);\n\t\tmWebView.loadUrl(UrlLib.CLI);\n\t\t}\n\t\telse if (getIntent().getFlags()==5)\n\t\t{\n\t\t\ttitleTv.setText(R.string.reservior); \n\t\t\tmWebView.loadUrl(UrlLib.CLI5);\t\n\t\t}\t\n\t\t\n\t\tmWebView.setWebViewClient(new WebViewClient() {\n\n\t\t\t/*\n\t\t\t * (non-Javadoc)\n\t\t\t * \n\t\t\t * @see\n\t\t\t * android.webkit.WebViewClient#shouldOverrideUrlLoading(android\n\t\t\t * .webkit.WebView, java.lang.String)\n\t\t\t */\n\n\t\t\t@Override\n\t\t\tpublic boolean shouldOverrideUrlLoading(WebView view, String url) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tview.loadUrl(url);\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * (non-Javadoc)\n\t\t\t * \n\t\t\t * @see\n\t\t\t * android.webkit.WebViewClient#onPageFinished(android.webkit.WebView\n\t\t\t * , java.lang.String)\n\t\t\t */\n\t\t\t@Override\n\t\t\tpublic void onPageFinished(WebView view, String url) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tsuper.onPageFinished(view, url);\n\t\t\t}\n\t\t});\n\n\t\tmWebView.setWebChromeClient(new WebChromeClient() {\n\t\t\t@Override\n\t\t\tpublic void onProgressChanged(WebView view, int newProgress) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tsuper.onProgressChanged(view, newProgress);\n\t\t\t\tprogressBar.setProgress(newProgress);\n\t\t\t\tprogressBar.postInvalidate();\n\t\t\t\tif(newProgress==100)\n\t\t\t\t\tprogressBar.setVisibility(View.GONE);\n\n\t\t\t}\n\t\t});\n\n\t}", "@Override\n public void onCreate() {\n initData();\n }", "public void onStartLoading() {\n if (this.mCursor != null) {\n deliverResult(this.mCursor);\n }\n if (takeContentChanged() || this.mCursor == null) {\n forceLoad();\n }\n }", "public void onStartLoading() {\n if (this.mCursor != null) {\n deliverResult(this.mCursor);\n }\n if (takeContentChanged() || this.mCursor == null) {\n forceLoad();\n }\n }", "private void loadDataOnFirst(){\n updateDateTimeText();\n\n mPbLoading.setVisibility(View.VISIBLE);\n mCalendarListView.setVisibility(View.GONE);\n\n // Call API to get the schedules\n mPresenter.loadAllExaminationSchedulesForSpecificDate(mMyDate.generateDateString(AppConstants.DATE_FORMAT_YYYY_MM_DD));\n }", "private void loadDataFromDatabase() {\n mSwipeRefreshLayout.setRefreshing(true);\n mPresenter.loadDataFromDatabase();\n }", "@Override\n\t\t\tpublic void onRefresh() {\n\t\t\t\t new GetDataTask().execute();\n\t\t\t}", "private void addDataForListView() {\n \t\n \tif(loadable)\n \t{\t\n \tloadable = false;\n \tdirection = BACKWARD;\n \tstrUrl = Url.composeHotPageUrl(type_id, class_id, last_id);\n \trequestData();\n \t}\n\t}", "public void onStartLoading() {\n Cursor cursor = this.mCursor;\n if (cursor != null) {\n deliverResult(cursor);\n }\n if (takeContentChanged() || this.mCursor == null) {\n forceLoad();\n }\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\texecutor.execute(new Task(ReadingDataModel.Event.INIT_LOAD));\n\t\tinitBookNote();\n\t}", "@Override\n protected void onResume() {\n super.onResume();\n\n // re-queries for all drugs\n getSupportLoaderManager().restartLoader(TASK_LOADER_ID, null, this);\n }", "@Override\n public void onResume()\n {\n super.onResume();\n //Refresh your stuff here\n }", "@Override\n\tprotected void onCreate(Bundle arg0) {\n\t\tsuper.onCreate(arg0);\n\t\tthis.setContentView(R.layout.realtimedataactivity);\n\t\tinitview();\n\t\tloadData();\n\t}", "public void onResume() {\n\t\tsuper.onResume();\n\t\tthis.getDataFromSql(ID);\n\t}", "@Override\n\tprotected void onStart() {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onStart();\n\t\tthis.loadFromFile();\n\t}", "@Override\n protected void onStartLoading() {\n if (mCursor != null) {\n // Deliver any previously loaded data immediately.\n deliverResult(mCursor);\n }\n if (takeContentChanged() || mCursor == null) {\n // When the observer detects a change, it should call onContentChanged()\n // on the Loader, which will cause the next call to takeContentChanged()\n // to return true. If this is ever the case (or if the current data is\n // null), we force a new load.\n forceLoad();\n }\n }", "@Override\n protected void onStartLoading() {\n super.onStartLoading();\n\n mLoadingIndicator.setVisibility(View.VISIBLE);\n\n forceLoad();\n }", "@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tif (listitem != null || listitem.size() > 0) {\n\t\t\t\t\tlistitem.clear();\n\t\t\t\t}\n\t\t\t\tnew AsyncTask<Void, Void, Void>() {\n\t\t\t\t\tprotected Void doInBackground(Void... params) {\n\t\t\t\t\t\tgetdata(1);\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tprotected void onPostExecute(Void result) {\n\t\t\t\t\t\tif (count >= 19) {\n\t\t\t\t\t\t\txlistview.startLoadMore();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\txlistview.stopLoadMore();\n\t\t\t\t\t\t}\n\t\t\t\t\t\txlistview.setRefreshSuccess();\n\t\t\t\t\t\tadapter.notifyDataSetChanged();\n\t\t\t\t\t\tLog.d(TAG, \"jieshu\");\n\t\t\t\t\t}\n\t\t\t\t}.execute(null, null, null);\n\t\t\t}", "private void initiateLoader() {\n ConnectivityManager connMgr = (ConnectivityManager)\n getSystemService(Context.CONNECTIVITY_SERVICE);\n\n // Get details on the currently active default data network\n NetworkInfo networkInfo = null;\n if (connMgr != null) {\n networkInfo = connMgr.getActiveNetworkInfo();\n }\n\n // If there is a network connection, fetch data\n if (networkInfo != null && networkInfo.isConnected()) {\n // Get a reference to the LoaderManager, in order to interact with loaders.\n avi.show();\n loadingIndicator.setVisibility(View.VISIBLE);\n errorContainer.setVisibility(View.GONE);\n LoaderManager loaderManager = getSupportLoaderManager();\n String url = BASE_URL + \"&from=\" + fromDate;\n url += \"&to=\" + toDate;\n url += \"&page=\" + currentPageNo;\n url += \"&sortBy=\" + sortPreference;\n if (queryText != null) {\n url += \"&q=\" + queryText;\n }\n\n Bundle args = new Bundle();\n args.putString(URL_KEY, url);\n if (forceLoad) {\n loaderManager.restartLoader(LAST_LOADER_ID, args, this);\n forceLoad = false;\n } else {\n LAST_LOADER_ID = NEWS_LOADER_ID;\n }\n if (!loaderInitiated) {\n loaderManager.initLoader(NEWS_LOADER_ID, args, this);\n loaderInitiated = true;\n } else {\n loaderManager.restartLoader(NEWS_LOADER_ID, args, this);\n }\n } else {\n avi.hide();\n loadingIndicator.setVisibility(View.GONE);\n ((TextView) errorContainer.findViewById(R.id.tvErrorDesc)).setText(R.string.no_conn_error_message);\n errorContainer.setVisibility(View.VISIBLE);\n }\n }", "@Override\n protected void onStart(){\n super.onStart();\n loadFromFile();\n adapter= new CustomAdapter(countbookList,getApplicationContext());\n listView.setAdapter(adapter);\n }", "@Override\n protected void onStart() {\n super.onStart();\n ReadTask task = new ReadTask();\n //task.execute(\"http://10.0.2.2:61902/api/GetTicket/GetComments/?ticketId=\" + ticket.getTicketId());\n task.execute(\"http://ticketapp.shiftbook.dk/api/GetTicket/GetComments/?ticketId=\" + flightTickets.getTicketId());\n }", "@Override\n public void run() {\n ArticleHeaders.loadData(getApplicationContext());\n CustomerHeaders.loadData(getApplicationContext());\n OrderReasons.loadData(getApplicationContext());\n }", "@Override\n\tpublic void onResume() {\n\t\tsuper.onResume();\n\t\tif(Vars.onAdd){\n\t\t\t//createJsonRefresh(shared.getSharedValue(\"mLASTTIMESTAMP\").toString());\n\t\t\tif(shared.getSharedValue(\"mLASTTIMESTAMP\").toString().equalsIgnoreCase(\"N/A\")){\n\t\t\t\tif (comman.isNetworkAvailable(context)) {\n\t\t\t\t\tcreateJsonRefresh(timeStamp);\n\n\t\t\t\t}else{\n\t\t\t\t\tonLoad();\n\t\t\t\t}\n\n\t\t\t}else{\n\t\t\t\tif (comman.isNetworkAvailable(context)) {\n\t\t\t\t\tcreateJsonRefresh(shared.getSharedValue(\"mLASTTIMESTAMP\").toString());\n\t\t\t\t}else{\n\t\t\t\t\tonLoad();\n\t\t\t\t}\n\t\t\t}\n\t\t\tVars.onAdd= false;\n\t\t}\n\t}", "@Override\n public void onStart() {\n super.onStart();\n getWidgets(getView());\n loadAnimation();\n }", "@Override\n\tpublic void load() {\n\t\thandler.postDelayed(new Runnable() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\trefreshListView.stopLoad();\n\t\t\t}\n\t\t}, 2000);\n\t}", "@Override \n\t protected void onStartLoading() {\n\t if (mChildList != null) {\n\t // If we currently have a result available, deliver it\n\t // immediately.\n\t deliverResult(mChildList);\n\t }\n\n\t if (takeContentChanged() || mChildList == null) {\n\t // If the data has changed since the last time it was loaded\n\t // or is not currently available, start a load.\n\t forceLoad();\n\t }\n\t }", "@Override \n\t protected void onStartLoading() {\n\t if (mChildList != null) {\n\t // If we currently have a result available, deliver it\n\t // immediately.\n\t deliverResult(mChildList);\n\t }\n\n\t if (takeContentChanged() || mChildList == null) {\n\t // If the data has changed since the last time it was loaded\n\t // or is not currently available, start a load.\n\t forceLoad();\n\t }\n\t }", "private void loadRecyclerViewData() {\n mSwipeRefreshLayout.setRefreshing(true);\n GetDataFirebase();\n mSwipeRefreshLayout.setRefreshing(false);\n }", "@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tLog.d(TAG, \"点击了读取更多 \");\n\t\t\t\tnumber++;\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tnew AsyncTask<Void, Void, Void>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tprotected Void doInBackground(Void... params) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tgetdata(number);\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tprotected void onPostExecute(Void result) {\n\t\t\t\t\t\txlistview.setLoadMoreSuccess();\n\t\t\t\t\t\tadapter.notifyDataSetChanged();\n\t\t\t\t\t\tLog.d(TAG, \"jieshu\");\n\t\t\t\t\t}\n\t\t\t\t}.execute(null, null, null);\n\t\t\t}", "@Override\r\n\tprotected void onStart() {\n\t\tsuper.onStart();\r\n\t\tprocessAsync();\t\t\r\n\t}", "@Override\n protected void initData() {\n mPullRefreshListView.setOnRefreshListener(new PullToRefreshBase.OnRefreshListener2<ListView>() {\n /**\n * 下拉刷新\n * @param refreshView\n */\n @Override\n public void onPullDownToRefresh(PullToRefreshBase<ListView> refreshView) {\n //得到当前刷新的时间\n String label = DateUtils.formatDateTime(getGlobalApplication(), System.currentTimeMillis(),\n DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_ABBREV_ALL);\n // Update the LastUpdatedLabel\n //设置更新时间\n refreshView.getLoadingLayoutProxy().setLastUpdatedLabel(label);\n// Toast.makeText(mContext, \"下拉刷新\", Toast.LENGTH_SHORT).show();\n new GetDataTask().execute();\n }\n\n /**\n * 上拉刷新\n * @param refreshView\n */\n @Override\n public void onPullUpToRefresh(PullToRefreshBase<ListView> refreshView) {\n //得到当前刷新的时间\n String label = DateUtils.formatDateTime(getGlobalApplication(), System.currentTimeMillis(),\n DateUtils.FORMAT_SHOW_TIME | DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_ABBREV_ALL);\n // Update the LastUpdatedLabel\n //设置更新时间\n refreshView.getLoadingLayoutProxy().setLastUpdatedLabel(label);\n// Toast.makeText(mContext, \"上拉刷新!\", Toast.LENGTH_SHORT).show();\n new GetDataTask().execute();\n }\n\n });\n\n // Add an end-of-list listener\n //设置监听最后一条\n mPullRefreshListView.setOnLastItemVisibleListener(new PullToRefreshBase.OnLastItemVisibleListener() {\n @Override\n public void onLastItemVisible() {\n Toast.makeText(mContext, \"滑动到最后一条了!\", Toast.LENGTH_SHORT).show();\n }\n });\n\n //从服务器获取数据\n //得到ListView\n listview = mPullRefreshListView.getRefreshableView();\n articlesList = new ArrayList<>();\n\n// Article art;//new Article(\"希望大家说都开开学习\",\"http://img.zcool.cn/community/01b72057a7e0790000018c1bf4fce0.png\",\"https://zhidao.baidu.com/question/1885817326500180748.html\",\"0\",\"0\");\n// for (int i = 0; i < 10; i++) {\n// art = new Article(\"希望大家说都开开学习\", \"http://img.zcool.cn/community/01b72057a7e0790000018c1bf4fce0.png\", \"https://zhidao.baidu.com/question/1885817326500180748.html\", \"\" + i, \"\" + i, \"\" + i);\n// articlesList.add(art);\n// }\n\n\n OkGo.post(Urls.URL_LOADART)\n .params(\"typeName\", title)\n .execute(new StringCallback() {\n @Override\n public void onSuccess(String s, Call call, Response response) {\n //获得\n articlesList = (ArrayList<Article>) JSON.parseArray(s, Article.class);\n mAdapter = new ArticleAdapter(mContext, articlesList, R.layout.item_article);\n //设置ListView的适配器\n listview.setAdapter(mAdapter);\n }\n });\n\n// mAdapter = new ArticleAdapter(mContext, articlesList, R.layout.item_article);\n// //设置ListView的适配器\n// listview.setAdapter(mAdapter);\n// /**\n// * Add Sound Event Listener\n// * 添加刷新事件并且发出声音\n// */\n// SoundPullEventListener<ListView> soundListener = new SoundPullEventListener<ListView>(this);\n// soundListener.addSoundEvent(State.PULL_TO_REFRESH, R.raw.pull_event);\n// soundListener.addSoundEvent(State.RESET, R.raw.reset_sound);\n// soundListener.addSoundEvent(State.REFRESHING, R.raw.refreshing_sound);\n// mPullRefreshListView.setOnPullEventListener(soundListener);\n//\n// // You can also just use setListAdapter(mAdapter) or\n// // mPullRefreshListView.setAdapter(mAdapter)\n //设置适配器\n// listview.setAdapter(mAdapter);\n\n //设置上拉刷新或者下拉刷新\n// mPullRefreshListView.setMode(PullToRefreshBase.Mode.PULL_FROM_END);\n mPullRefreshListView.setMode(PullToRefreshBase.Mode.PULL_FROM_START);\n\n }", "@Override\n public void onResume() {\n super.onResume();\n if (!mSwipeRefreshLayout.isRefreshing())\n loadDataFromDatabase();\n }", "@Override\n public void onRefresh() {\n\n GetFirstData();\n }", "private void initControls() {\n Log.e(\"sha1\",sHA1(this));\n\n// back.setOnClickListener(this);\n load_view.setOnRetryListener(new LoadingView.OnRetryListener() {\n @Override\n public void OnRetry() {\n requestCarBrandData();\n }\n });\n }", "private void loadData(){\n updateDateTimeText();\n\n mLoadingDialog = DialogUtil.createLoadingDialog(getActivity(), getString(R.string.loading_dialog_in_progress));\n mLoadingDialog.show();\n // Call API to get the schedules\n mPresenter.loadAllExaminationSchedulesForSpecificDate(mMyDate.generateDateString(AppConstants.DATE_FORMAT_YYYY_MM_DD));\n }", "private void LoadContent()\n {\n \n }", "private void loadData(){\n Dh.refresh();\n }", "@Override\n public void initData() {\n super.initData();\n\n RetrofitService.getInstance()\n .getApiCacheRetryService()\n .getDetail(appContext.getWenDang(Const.Detail, wendangid))\n .enqueue(new SimpleCallBack<WenDangMode>() {\n @Override\n public void onSuccess(Call<WenDangMode> call, Response<WenDangMode> response) {\n if (response.body() == null) return;\n WenDangMode data = response.body();\n title_text.setText(data.getPost().getPost_title());\n String s = data.getPost().getPost_excerpt();\n excerpt_text.setText(s.replaceAll(\"[&hellip;]\", \"\"));\n wendang_text.setText(stripHtml(data.getPost().getPost_content()));\n url = data.getPost().getDownload_page();\n list.clear();\n\n list = quChu(getImgStr(data.getPost().getPost_content()));\n\n adapter.bindData(true, list);\n//\t\t\t\t\t\trecyclerView.notifyMoreFinish(true);\n rootAdapter.notifyDataSetChanged();\n beautifulRefreshLayout.finishRefreshing();\n }\n });\n }", "protected void onStart() {\n super.onStart();\n Log.i(\"LifeCycle --->\", \"onStart is called\");\n loadFromFile();\n\n adapter = new SubArrayAdapter(this, R.layout.two_item_list_view, subList);\n oldSubs.setAdapter(adapter);\n setTitle();\n }", "@Override\n public void onResume()\n {\n super.onResume();\n //Refresh your stuff here\n\n }", "protected void onResume() {\n super.onResume();\n startServices();\n }", "@Override\n protected void onPreExecute() {\n super.onPreExecute();\n gD.callload(context, nScreenHeight);\n\n\n\n }", "@Override\n protected void onResume() {\n\n super.onResume();\n getdatatext();\n if( MapActivity.activityPaused()==true){\n loadImageFromStorage();\n\n }\n }", "@Override\n public void onCreate() {\n super.onCreate();\n initData();\n }", "@Override\n \tprotected void onResume() {\n \t\tsuper.onResume();\n \t}", "@Override\n \tprotected void onResume() {\n \t\tsuper.onResume();\n \t}", "@Override\n protected void onResume() {\n super.onResume();\n mapView.onResume();\n }", "@Override\n protected void initView(View view) {\n LinearLayoutManager layoutManager = new LinearLayoutManager(getContext());\n layoutManager.setOrientation(LinearLayoutManager.VERTICAL);\n recyclerView.addItemDecoration(new DividerItemDecoration(getContext(), DividerItemDecoration.VERTICAL));\n recyclerView.setLayoutManager(layoutManager);\n recyclerView.setPullRefreshEnabled(true);//下拉刷新\n //是否开启上拉加载功能\n recyclerView.setLoadingMoreEnabled(true);\n //开启刷新回调\n recyclerView.displayLastRefreshTime(true);\n //停止刷新\n recyclerView.setPullToRefreshListener(new PullToRefreshListener() {\n @Override\n public void onRefresh() {\n recyclerView.postDelayed(new Runnable() {\n @Override\n public void run() {\n recyclerView.setRefreshComplete();\n mList.clear();\n loadData();\n\n }\n }, 2000);\n }\n\n @Override\n public void onLoadMore() {\n recyclerView.postDelayed(new Runnable() {\n @Override\n public void run() {\n recyclerView.setLoadMoreComplete();\n Index++;\n loadData();\n\n }\n }, 2000);\n }\n });\n\n\n\n }", "private void loadInitialProducts(){\n final Intent intent = new Intent(this, MainActivity.class);\n\n ProductServiceProvider.getInstance().setServiceListener(new ProductServiceProvider.ServiceListener() {\n @Override\n public void onResultsSuccess(Response<SearchResult> response) {\n if(response.body().getResults() != null){\n AppDataModel.getAppDataModel().setInitialData(response.body().getResults());\n intent.putExtra(EXTRA_INITIAL_PRODUCTS, true);\n }\n\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run() {\n startActivity(intent);\n finish();\n }\n }, 1000);\n }\n\n @Override\n public void onProductsSuccess(Response<Products> response) {\n\n }\n\n @Override\n public void onFailure(String message) {\n intent.putExtra(EXTRA_INITIAL_PRODUCTS, false);\n new Handler().postDelayed(new Runnable() {\n\n @Override\n public void run() {\n startActivity(intent);\n finish();\n }\n }, 1000);\n }\n });\n\n ProductServiceProvider.getInstance().searchProducts(\"\");\n }", "@Override\r\n protected void onResume() {\n super.onResume();\r\n mapView.onResume();\r\n }", "@Override\n\t\tprotected void onResume() {\n\t\t\tsuper.onResume();\n\t\t}", "private void initView() {\n // set layout for recycle view\n //hasFixedSize true if adapter changes cannot affect the size of the RecyclerView\n recyclerView.setHasFixedSize(true);\n // this layout can be vertical or horizontal by change the second param\n // of LinearLayoutManager, and display up to down by set the third param false\n LinearLayoutManager layoutManager = new LinearLayoutManager(this,\n LinearLayoutManager.VERTICAL, false);\n\n recyclerView.setLayoutManager(layoutManager);\n importData();\n // set adapter for recycle view\n recyclerView.setAdapter(alarmAdapter);\n }" ]
[ "0.7385911", "0.7385911", "0.7200196", "0.6986785", "0.67728275", "0.6758672", "0.67582965", "0.6753372", "0.6753372", "0.6746499", "0.6743902", "0.67148274", "0.670158", "0.66810477", "0.66608584", "0.66528803", "0.66433305", "0.65913504", "0.65896106", "0.6587526", "0.6572566", "0.65654016", "0.65575355", "0.655636", "0.6546179", "0.6539264", "0.65335834", "0.65266556", "0.6524025", "0.6505917", "0.64999735", "0.6498339", "0.64706874", "0.6469", "0.6463187", "0.6427458", "0.6421118", "0.64205766", "0.64107585", "0.6408053", "0.64060766", "0.640244", "0.6393395", "0.63892055", "0.63879806", "0.6370302", "0.6366907", "0.6366534", "0.63615614", "0.635523", "0.6354729", "0.6351519", "0.6351519", "0.6349916", "0.6344733", "0.6338078", "0.6334411", "0.630574", "0.63056356", "0.6303403", "0.63011456", "0.6299974", "0.6295906", "0.62939906", "0.629005", "0.62498844", "0.6243427", "0.62421036", "0.6240925", "0.6238138", "0.6231598", "0.6227328", "0.6222487", "0.6209736", "0.6198326", "0.6198326", "0.61798716", "0.6173905", "0.6168241", "0.6159155", "0.61585724", "0.615675", "0.6147566", "0.6146434", "0.61407536", "0.6138686", "0.6134171", "0.6118834", "0.61117375", "0.611066", "0.6108835", "0.61018324", "0.61007947", "0.6098545", "0.6098545", "0.60962975", "0.60940075", "0.6091359", "0.6089479", "0.6088846", "0.6087581" ]
0.0
-1
inflate the menu ; this adds items to the actionBar
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.search_bar_menu , menu ); MenuItem item = menu.findItem(R.id.action_search); SearchView searchView = (SearchView) MenuItemCompat.getActionView(item); searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() { @Override public boolean onQueryTextSubmit(String query) { firebaseSearch(query); return false; } @Override public boolean onQueryTextChange(String newText) { firebaseSearch(newText); //filtering as we Type return false; } }); return super.onCreateOptionsMenu(menu); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.cartab, menu);\r\n //getMenuInflater().inflate(R.menu.menu_main, menu);\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n\n\n\n\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.popmovies_menu, menu);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.order_list_actions,menu);\n if(isFinalized){\n MenuItem item = menu.findItem(R.id.action_finalized);\n item.setVisible(false);\n //this.invalidateOptionsMenu();\n }\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.aufgabe, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) \n{\n\tgetMenuInflater().inflate(R.menu.update_entry, menu);\n\treturn true;\n}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\ngetMenuInflater().inflate(R.menu.main, menu);\nreturn true;\n}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.song_action_bar, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\tsuper.onCreateOptionsMenu(menu, inflater);\n\tinflater.inflate(R.menu.menu_main, menu);\n\tmenu.findItem(R.id.action_edit).setVisible(false);\n\tmenu.findItem(R.id.action_share).setVisible(false);\n\tmenu.findItem(R.id.action_settings).setVisible(true);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\tinflater=this.getActivity().getMenuInflater();\n\tSupportMenu menu_=(SupportMenu) menu;\n\tsuper.onCreateOptionsMenu(menu_, inflater);\n\tinflater.inflate(R.menu.event_adding, menu_);\n\t\t\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n\t\t public boolean onCreateOptionsMenu(Menu menu) {\n\t\t getMenuInflater().inflate(R.menu.level, menu);\n\t\t return true;\n\t\t }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_act1, menu);\r\n return true;\r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.childloco_menu, menu);\n //getMenuInflater().inflate(R.menu.childloco_menu, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n //getMenuInflater().inflate(R.menu.activity_main, menu);\n \tsuper.onCreateOptionsMenu(menu);\n getSupportMenuInflater().inflate(R.menu.actionbar, menu);\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n BatteryIcon = (MenuItem)menu.findItem(R.id.acb_battery);\n setActBarBatteryIcon(Callbacksplit.getsavedBatteryStateIcon());\n ConnectIcon = (MenuItem)menu.findItem(R.id.acb_connect);\n setActBarConnectIcon();\n \n ((MenuItem)menu.findItem(R.id.acb_m_5)).setVisible(false);\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu2, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n getMenuInflater().inflate(R.menu.main, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.stock_picking_options, menu);\n }", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.menu_principal, menu);\n \t//Fin del menu\n \treturn true;\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu)\n {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n getMenuInflater().inflate(R.menu.action_menu, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(final Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(android.view.Menu menu) {\n super.onCreateOptionsMenu(menu);\n MenuInflater blowUp = getMenuInflater();\n blowUp.inflate(R.menu.menu_start, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_principal, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.my_notes_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.acty_b, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_action_category, menu);\n return true;\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_view_shelf, menu);\n return true;\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_archery_scorer, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_swipe_plot, menu);\n menuItem1 = menu.findItem(R.id.action_settings);\n menuItem2 = menu.findItem(R.id.action_myinfo);\n menuItem3 = menu.findItem(R.id.action_myschedule);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_menu, menu);\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\r\n\r\n\t\t\r\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n //HOME = menu.findItem(android.R.id.home);\n //HOME.setIcon(new BitmapDrawable(toolBox.myPhoto));\n card = menu.getItem(0);\n star = menu.getItem(1);\n sett = menu.getItem(2);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.activity_imp, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\r\n\t\tMenuInflater inflate = getMenuInflater();\r\n\t\tinflate.inflate(R.menu.mymenu4, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n menu.removeItem(R.id.action_search);\n MenuItem item = menu.add(\"Add New Address\");\n item.setIcon(R.drawable.add_plus_button);\n MenuItemCompat.setShowAsAction(item, MenuItemCompat.SHOW_AS_ACTION_ALWAYS);\n\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(com.wep.common.app.R.menu.menu_main, menu);\r\n for (int j = 0; j < menu.size(); j++) {\r\n MenuItem item = menu.getItem(j);\r\n item.setShowAsActionFlags(MenuItem.SHOW_AS_ACTION_ALWAYS);\r\n }\r\n return true;\r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}" ]
[ "0.7233094", "0.7198471", "0.7197825", "0.7186825", "0.7132008", "0.71122175", "0.70609015", "0.7001368", "0.69981784", "0.6973873", "0.69597805", "0.6954558", "0.694699", "0.69016796", "0.6882247", "0.68608356", "0.6850127", "0.68493557", "0.6849167", "0.6844791", "0.68435377", "0.6842952", "0.68178636", "0.68152636", "0.68105763", "0.6807023", "0.68053204", "0.68017864", "0.6797303", "0.67890954", "0.6789021", "0.6789021", "0.67736214", "0.677335", "0.6766971", "0.6765337", "0.6757599", "0.6755421", "0.67545784", "0.67518634", "0.67513686", "0.67508084", "0.67493075", "0.67444575", "0.6722876", "0.67188954", "0.67087257", "0.67087257", "0.6708222", "0.67019707", "0.6701015", "0.6700886", "0.66944045", "0.6693894", "0.6687168", "0.6686451", "0.66848695", "0.66819614", "0.66819614", "0.667717", "0.66734344", "0.6670723", "0.66667235", "0.6662249", "0.6661734", "0.66605765", "0.666022", "0.66574895", "0.66574895", "0.66574895", "0.6654652", "0.6654241", "0.6652989", "0.6651447", "0.6644524", "0.66416115", "0.6640999", "0.6639557", "0.66395384", "0.6634506", "0.66340363", "0.6633812", "0.6628705", "0.66280025", "0.66278404", "0.6627563", "0.66241723", "0.6621381", "0.6621381", "0.66209215", "0.6615424", "0.6611279", "0.6610394", "0.66097945", "0.6609064", "0.66085887", "0.66078764", "0.6607408", "0.66058004", "0.66038215", "0.66038215" ]
0.0
-1
getting the customer from principle
@Transactional public ResponseEntity<String> orderProductsFromCart(String email) { User user = userRepository.findByEmail(email); Customer customer = customerRepository.findCustomerById(user.getId()); // getting all ids for production variation from customer's cart List<Long> productVariationIds = cartRepository.getListOfProductVariationIdForCustomerId(customer.getId()); // list of production variation from customer's cart List<ProductVariation> productVariationList = new ArrayList<>(); for (Long variationId: productVariationIds) { ProductVariation productVariation = productVariationRepository.findProductVariationById(variationId); // checking if product variation is deleted if(productVariation == null) { return new ResponseEntity("Product variation with id : "+variationId +" not found at time of ordering.",HttpStatus.NOT_FOUND); } // checking if product variation is active if(!productVariation.isActive()) { return new ResponseEntity("Product variation with id: "+productVariation.getId()+" is inactive." ,HttpStatus.BAD_REQUEST); } productVariationList.add(productVariation); } // creating new instance of orders Orders order = new Orders(); order.setCustomer(customer); order.setDateCreated(new Date()); // by default assigning the method as COD order.setPaymentMethod("COD"); // getting customer's address by default getting home label address Address customerAddress = addressRepository.findAddressByUserIdAndLabel(customer.getId(), "home"); order.setCustomerAddressAddressLine(customerAddress.getAddressLine()); order.setCustomerAddressCity(customerAddress.getCity()); order.setCustomerAddressCountry(customerAddress.getCountry()); order.setCustomerAddressState(customerAddress.getState()); order.setCustomerAddressZipCode(customerAddress.getZipCode()); order.setCustomerAddressLabel(customerAddress.getLabel()); // setting total amount for the order order.setAmountPaid(returnOrderTotalAmount(productVariationList, customer.getId())); // saving the order ordersRepository.save(order); for (ProductVariation productVariation: productVariationList) { // getting quantity from cart for each customer product variation int quantityFromCart = cartRepository.getQuantityForCustomerIdAndVariationId(customer.getId() , productVariation.getId()); // creating instance of order status to persist data in OrderProduct and OrderStatus // since OrderStatus is inheriting OrderProduct, so using the instance of OrderStatus // to also set the OrderProduct entity OrderStatus orderProductStatus = new OrderStatus(); orderProductStatus.setOrders(order); orderProductStatus.setProductVariation(productVariation); // checking if product is out of stock after adding product to cart if(productVariation.getQuantityAvailable() == 0) { return new ResponseEntity("Product variation with id : "+productVariation.getId() +" is out of stock.",HttpStatus.BAD_REQUEST); } // checking if the product have sufficient quantity available to fulfill the order if(productVariation.getQuantityAvailable()<quantityFromCart) { return new ResponseEntity("Only "+productVariation.getQuantityAvailable() +" is left for the product variation id : "+productVariation.getId(),HttpStatus.BAD_REQUEST); } orderProductStatus.setQuantity(quantityFromCart); orderProductStatus.setPrice(productVariation.getPrice()*orderProductStatus.getQuantity()); orderProductStatus.setProductVariationMetadata(productVariation.getMetadata()); // setting order status from null bcoz order is just created and didn't had a state before creation orderProductStatus.setFromStatus(null); orderProductStatus.setToStatus(ORDER_PLACED); // updating the product variation quantity after the customers orders certain quantity productVariation.setQuantityAvailable(productVariation.getQuantityAvailable()-orderProductStatus.getQuantity()); productVariationRepository.save(productVariation); orderProductRepository.save(orderProductStatus); // bcoz OrderStatus inherits OrderProduct. } // empting the cart after order creation cartService.emptyCart(customer.getEmail()); return new ResponseEntity<>("Order placed successfully with order id : "+order.getId(),HttpStatus.CREATED); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Customer getCustomer();", "io.opencannabis.schema.commerce.OrderCustomer.Customer getCustomer();", "public ReturnCustomer getCustomer() {\n return (ReturnCustomer) get(\"customer\");\n }", "com.google.ads.googleads.v6.resources.Customer getCustomer();", "public Customer getCustomer() {\r\n return customer;\r\n }", "public Customer getCustomer()\n {\n return customer;\n }", "public CustomerProfile getCustomerProfile();", "public Customer getCustomer()\n {\n return customer;\n }", "Customer getCustomer() {\n\t\treturn customer;\n\t}", "Customer getCustomerById(int customerId);", "public Customer getCustomer() {\n return customer;\n }", "public Customer getCustomer()\n {\n return this.customer;\n }", "public String getCustomer(String custId);", "public Customer getCustomer() {\n return this.customer;\n }", "public String getCustomer() {\n return customer;\n }", "private Role getCustomerRole() {\n\t\tRole role = roleRepo.findByName(\"CUSTOMER\");\n\t\treturn role;\n\t}", "static customer getCustomer(String uid) {\n return null;\n }", "public Customer getCustomerByName(String customerName);", "public Customer getCustomer() {\r\n\t\treturn customer;\r\n\t}", "public Customer getCustomer() {\r\n\t\treturn customer;\r\n\t}", "public Customer getCustomer() {\r\n\t\treturn this.customer;\r\n\t}", "public org.tempuri.Customers getCustomer() {\r\n return customer;\r\n }", "CustomerDTO getUserForProof(String name,CustomerDTO customerDTO) throws EOTException;", "Customer createCustomer();", "Customer createCustomer();", "Customer createCustomer();", "Customer createCustomer();", "public Customer getCustomer() {\n\t\treturn customer;\n\t}", "protected Optional<Customer> getCustomer() {\n return customer.getOptional();\n }", "@Override\n public String getCustomer() {\n return this.customerName;\n }", "public de.htwg_konstanz.ebus.framework.wholesaler.vo.Customer getCustomer () {\r\n\t\treturn customer;\r\n\t}", "CustomerDTO getCustomerDetails(Long customerId,String userName) throws EOTException;", "@Override\n public Customer getCustomer(Long userId) {\n Optional<Customer> customer = customerDao.getCustomer(userId);\n if (!customer.isPresent()) {\n logger.error(\"Customer with this id {} doesn't exist\", userId);\n }\n return customer.orElseThrow(ResourceNotFoundException::new);\n }", "public String getName()\n {\n return customer;\n }", "@Override\n public CustomerDetails viewAccount(String user) {\n CustomerDetails details=customerRepository.findById(user).get(); \n log.debug(user);\n return details; \n\n }", "public Integer getCustomer() {\n return customer;\n }", "Customer getCustomerById(final Long id);", "public Customer getCustomerDetails() throws Exception {\n\t\treturn customersDBDAO.getOneCustomer(customerId);\n\t}", "public Customer fetchProfileDetails(Long userId) {\n\t\tCustomer cust = null;\n\t\ttry (Connection con = DBUtil.getInstance().getDbConnection()) {\n\t\t\t//Create object of Customer DAO & call respective method\n\t\t\tCustomerDAO customerDAO = new CustomerDAO(con); \n\t\t\tcust=customerDAO.getCustomerById(userId);\n\t\t} catch (SQLException e) {\n\t\t\tthrow new ServiceException(\"Internal Server issue to validate CRM User, Please contact admin\");\n\t\t}\n\t\treturn cust;\n\t}", "public String getCustomerName() \n {\n return customerName;\n }", "public CustomerEntity getCustomer(String accessToken) throws AuthorizationFailedException {\n CustomerAuthEntity customerAuthEntity = customerAuthDao.getCustomerAuthByAccessToken(accessToken);\n\n if (customerAuthEntity == null) {\n throw new AuthorizationFailedException(\"ATHR-001\", \"Customer is not Logged in.\");\n }\n if (customerAuthEntity.getLogoutAt() != null) {\n throw new AuthorizationFailedException(\"ATHR-002\", \"Customer is logged out. Log in again to access this endpoint.\");\n }\n\n final ZonedDateTime now = ZonedDateTime.now();\n\n if (customerAuthEntity.getExpiresAt().compareTo(now) <= 0) {\n throw new AuthorizationFailedException(\"ATHR-003\", \"Your session is expired. Log in again to access this endpoint.\");\n }\n return customerAuthEntity.getCustomer();\n }", "String getCustomerID();", "public Principal getPrincipal();", "java.lang.String getCustomerId();", "java.lang.String getCustomerId();", "public Customer getCustomer() {\n String __key = this.customerId;\n if (customer__resolvedKey == null || customer__resolvedKey != __key) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n CustomerDao targetDao = daoSession.getCustomerDao();\n Customer customerNew = targetDao.load(__key);\n synchronized (this) {\n customer = customerNew;\n \tcustomer__resolvedKey = __key;\n }\n }\n return customer;\n }", "public String getCustomerName(){\n return customerName;\n }", "public java.lang.String getOrgCustomer() {\n\treturn orgCustomer;\n}", "public static Person getARandonCustomer(){\n Person person = RandomPerson.get().next();\n return person;\n }", "public String getCustomerName()\n {\n return customerName;\n }", "public CustomerTO getCustomerDetails(CustomerTO customerTo) throws Exception\r\n\t{\r\n\t\treturn new CustomerService().getCustomerDetails(customerTo);\r\n\t}", "public int getCustomerId() \n {\n return customerId;\n }", "public Customer getCustomer(int phone)\n\t{\n\t\treturn CustomerContainer.getInstance().getCustomer(phone);\n\t}", "public Customer getCustomer(int userId) {\n\t\tIterator i = customers.iterator();\n\t\twhile (i.hasNext()) {\n\t\t\tCustomer customer = (Customer) i.next();\n\t\t\tif (userId == customer.getUserId()) {\n\t\t\t\treturn customer;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public com.huawei.www.bme.cbsinterface.cbs.businessmgr.IndividualCustomer getCustomer() {\r\n return customer;\r\n }", "Customer authenticateCustomer(LoginRequestDto loginRequestDto) throws UserNotFoundException;", "public au.gov.asic.types.AccountIdentifierType getCustomer()\n {\n synchronized (monitor())\n {\n check_orphaned();\n au.gov.asic.types.AccountIdentifierType target = null;\n target = (au.gov.asic.types.AccountIdentifierType)get_store().find_element_user(CUSTOMER$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public interface CustomerService {\n \n\n public void createCustomer(CustomerDto customerDto);\n \n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\") \n public CustomerDto getCustomer(Long id) throws DataAccessException;\n\n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\") \n public void updateCustomer(CustomerDto customer) throws DataAccessException;\n\n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\") \n public void removeCustomer(CustomerDto customer) throws DataAccessException;\n\n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\") \n public Collection<CustomerDto> findAllCustomer() throws DataAccessException;\n\n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\") \n public Collection<CustomerDto> searchCustomer(String name) throws DataAccessException;\n\n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\")\n public CustomerDto findByUsername(String username);\n}", "public CustomerEOImpl getCustomerEO() {\r\n return (CustomerEOImpl) getEntity(2);\r\n }", "@Override\r\n\tpublic Customer getCustomer(int customerID) {\n\t\treturn null;\r\n\t}", "public io.opencannabis.schema.commerce.OrderCustomer.Customer getCustomer() {\n return customer_ == null ? io.opencannabis.schema.commerce.OrderCustomer.Customer.getDefaultInstance() : customer_;\n }", "public Customer createCustomer() {\n return new Customer(nameNested, surNameNested, ageNested, streetNested);\n }", "public ICustomer getCustomer(final Customer customer) {\n ICustomer iCustomer = null;\n if(CustomerType.REGULAR.equals(customer.getCustomerType())) {\n iCustomer = new RegularCustomer();\n }\n return iCustomer;\n }", "@GetMapping(value = { \"/charCustomer\" })\n public String initCharCustomer(Principal principal, Model model) {\n model.addAttribute(\"employee\", new CustomUserDetails());\n LogUtils.getLogger().info(\"Inside doLogin!\");\n UserDetails loginedUser = (UserDetails) ((Authentication) principal)\n .getPrincipal();\n LogUtils.getLogger().info(loginedUser);\n model.addAttribute(\"userName\", loginedUser.getUsername());\n return \"ChartCustomer\";\n }", "public Customer createCustomer() {\r\n\t\ttry {\r\n\t\t\treturn manager.createCustomer();\t\t\t\r\n\t\t}catch(SQLException e) {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"The manager was unable to create a new customer\");\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "Account getAccount();", "private Customer storeCustomer(Customer customer){\n customerRestService.createCustomer(customer);\n return customer;\n }", "public io.opencannabis.schema.commerce.OrderCustomer.Customer getCustomer() {\n if (customerBuilder_ == null) {\n return customer_ == null ? io.opencannabis.schema.commerce.OrderCustomer.Customer.getDefaultInstance() : customer_;\n } else {\n return customerBuilder_.getMessage();\n }\n }", "String getCustomerNameById(int customerId);", "public ResponseEntity<?> createCustomer(customer.controller.Customer customer);", "@Override\r\n\tpublic Customer getCustomer(String custId) {\r\n\t\tOptional<Customer> optionalCustomer = null;\r\n\t\tCustomer customer = null;\r\n\t\toptionalCustomer = customerRepository.findById(custId);\r\n\t\tif (optionalCustomer.isPresent()) {\r\n\t\t\tcustomer = optionalCustomer.get();\r\n\t\t\treturn customer;\r\n\t\t} else {\r\n\t\t\tthrow new EntityNotFoundException(\"Customer With Id \" + custId + \" does Not Exist.\");\r\n\t\t}\r\n\r\n\t}", "public String getCustomerName() {\r\n return name.getName();\r\n }", "public Customer displayCustomer(int cid);", "public Customer getCustomer(int ma) {\n\t\tCustomer cus = new Customer();\n\t\ttry {\n\t\t\tPreparedStatement stm = conn.prepareStatement(Queries.GET_CUSTOMER_BY_ID);\n\t\t\tstm.setInt(1, ma);\n\t\t\tResultSet rs = stm.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tcus = CustomerConverter.convert(rs);\n\t\t\t\t\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn cus;\n\t}", "org.beangle.security.session.protobuf.Model.Account getPrincipal();", "Customer getCustomerByMobileNumber(String mobileNumber) throws EOTException;", "public static void CreateCustomer() \r\n\t{\n\t\t\r\n\t}", "Customer findById(Long id);", "public String getCustomerName() {\n return customerName;\n }", "public String getCustomerName() {\n return customerName;\n }", "public Account getCoor() {\r\n return coor;\r\n }", "@Override\n\tpublic Customer getCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t//now retrieve/read from database using the primary key or id..\n\t\tCustomer theCustomer = currentSession.get(Customer.class,theId);\n\n\t\treturn theCustomer;\n\t}", "@Override\n\tpublic Customer getCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t// now retrieve/read from database using the primary key\n\t\tCustomer theCustomer = currentSession.get(Customer.class, theId);\n\t\t\n\t\treturn theCustomer;\n\t}", "@Nullable\n public DelegatedAdminCustomer get() throws ClientException {\n return send(HttpMethod.GET, null);\n }", "@Override\n\tpublic Customer getCustomer(int customerId) {\n\t\tSession session=sessionFactory.getCurrentSession();\n\t\ttry {\n\t\t\t\n\t\t\tCustomer customer =session.get(Customer.class, customerId);\n\t\t return customer;\t\t\t\n\t\t}\n\t\tcatch(HibernateException exception){\n\t\t\texception.printStackTrace();\n\t\t}\n\t\treturn null;\n\t\t\n\t}", "public int getCustomerId() {\n return customerId;\n }", "public int getCustomerId() {\n return customerId;\n }", "Customers createCustomers();", "public interface CustomerService {\n List<Customer> findPubsea();\n\n List<Customer> findCustomer();\n\n void update(Customer customer);\n\n /**\n * 公海客户认领\n * @param customerId\n * @param loginUser\n */\n void claim(Long customerId, LoginUser loginUser);\n}", "@Test\n public void testCustomerFactoryGetCustomer() {\n CustomerController customerController = customerFactory.getCustomerController();\n customerController.addCustomer(CUSTOMER_NAME, CUSTOMER_CONTACT, false);\n assertEquals(CUSTOMER_NAME, customerController.getCustomer(1).getName());\n }", "@Override\n\tpublic String getName(){\n\t\treturn customer.getName();\n\t}", "public int getCustId(){\n return this.custId;\r\n }", "public static Customer getCustomer(int _customerID) throws SQLException{\n ResultSet rs = ConnectionManager.selectAllColumns(\"Tbl_Customer_GroupNo\", \"CustomerID= \"+_customerID);\n if(rs.next()){\n Customer cus = new Customer(rs.getInt(\"CustomerId\"), rs.getString(\"FirstName\"), rs.getString(\"LastName\"), rs.getString(\"Address\"), rs.getString(\"Email\"), rs.getString(\"Phone\"));\n return cus;\n }else{\n return null;\n }\n }", "@Override\n\tpublic Customer getCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// now retrieve/read from database using the primary key\n\t\tCustomer theCustomer = currentSession.get(Customer.class, theId);\n\n\t\treturn theCustomer;\n\t}", "String getName() {\n\t\treturn customer.getName();\n\t}", "public String getCustomer_Name() {\n return customer_Name;\n }", "public String getCustomerName()\n\t{\n\t\treturn name;\n\t}", "public SalerCustomer getSalerCustomer(int uid) {\n\t\treturn this.salerCustomerMapper.getSalerCustomer(uid);\n\t}", "public Integer getCustomerId()\n {\n return customerId;\n }", "@Override\n public CustomerEntity getCustomerData(Long id) {\n return customerPersistencePort.getUser(id);\n }", "@Override\n\tpublic CustomerData getCustomer(Long custId) {\n\t \n\t\tOptional<CustomerData> optionalCust = customerRepository.findById(custId);\n\t\t//Optional object use for check if a customer id is existing or not\n if(optionalCust.isPresent()) {\n return optionalCust.get(); //if customer id is exist then return a value\n }\n\t\treturn null;\n\t\t\n\t}" ]
[ "0.8003456", "0.75431615", "0.7328253", "0.71085393", "0.7101368", "0.7090473", "0.7033036", "0.7021769", "0.7014882", "0.70148224", "0.70111394", "0.70000917", "0.69925106", "0.6986287", "0.69807863", "0.69325", "0.6932492", "0.69123465", "0.6886823", "0.6886823", "0.6843476", "0.6823288", "0.68011177", "0.6739394", "0.6739394", "0.6739394", "0.6739394", "0.6737366", "0.66997576", "0.66680616", "0.6640347", "0.6633794", "0.66298914", "0.65607846", "0.65142274", "0.6513207", "0.6511922", "0.65014386", "0.64672107", "0.6445162", "0.6437674", "0.6422763", "0.64130193", "0.63887554", "0.63887554", "0.63634336", "0.6353161", "0.632914", "0.63028914", "0.62961054", "0.6295555", "0.6293945", "0.6292958", "0.62555665", "0.6234105", "0.61979043", "0.61672884", "0.6159584", "0.6157589", "0.61556774", "0.6144498", "0.61394966", "0.6125178", "0.61250085", "0.6123927", "0.6119074", "0.611402", "0.6112355", "0.6108464", "0.61070246", "0.6097973", "0.6088701", "0.6078211", "0.60716695", "0.6066555", "0.6063704", "0.6055667", "0.6053765", "0.60463715", "0.60463715", "0.60443765", "0.6040995", "0.6040052", "0.6039113", "0.6034504", "0.60340387", "0.60340387", "0.6032508", "0.6031486", "0.60276043", "0.6019495", "0.60152066", "0.6012952", "0.60125214", "0.60118926", "0.6009041", "0.59975135", "0.59849226", "0.59841895", "0.59806716", "0.597543" ]
0.0
-1
getting the customer from principle
public ResponseEntity<String> orderPartialProductsFromCart(List<Long> productVariationIds, String email) { User user = userRepository.findByEmail(email); Customer customer = customerRepository.findCustomerById(user.getId()); // getting all ids for production variation from customer's cart List<Long> productVariationIdsFromCart = cartRepository.getListOfProductVariationIdForCustomerId(customer.getId()); // list for production variation from customer's cart List<ProductVariation> productVariationList = new ArrayList<>(); for (Long variationId: productVariationIds) { // checking if passed product variation id exist in cart if(!productVariationIdsFromCart.contains(variationId)) { return new ResponseEntity("Product variation with id: "+variationId+" does not exist in your cart" , HttpStatus.NOT_FOUND); } } for (Long variationId: productVariationIds) { ProductVariation productVariation = productVariationRepository.findProductVariationById(variationId); // checking if product variation is deleted if(productVariation == null) { return new ResponseEntity("Product variation with id : "+variationId +" not found at time of ordering.",HttpStatus.NOT_FOUND); } // checking if product variation is active if(!productVariation.isActive()) { return new ResponseEntity("Product variation with id: "+productVariation.getId()+" is inactive." ,HttpStatus.BAD_REQUEST); } productVariationList.add(productVariation); } // creating new instance of orders Orders order = new Orders(); order.setCustomer(customer); order.setDateCreated(new Date()); // by default assigning the method as COD order.setPaymentMethod("COD"); // getting customer's address by default getting home label address Address customerAddress = addressRepository.findAddressByUserIdAndLabel(customer.getId(), "home"); order.setCustomerAddressAddressLine(customerAddress.getAddressLine()); order.setCustomerAddressCity(customerAddress.getCity()); order.setCustomerAddressCountry(customerAddress.getCountry()); order.setCustomerAddressState(customerAddress.getState()); order.setCustomerAddressZipCode(customerAddress.getZipCode()); order.setCustomerAddressLabel(customerAddress.getLabel()); // setting total amount for the order order.setAmountPaid(returnOrderTotalAmount(productVariationList, customer.getId())); // saving the order ordersRepository.save(order); for (ProductVariation productVariation: productVariationList) { // getting quantity from cart for each customer product variation int quantityFromCart = cartRepository.getQuantityForCustomerIdAndVariationId(customer.getId() , productVariation.getId()); // creating instance of order status to persist data in OrderProduct and OrderStatus // since OrderStatus is inheriting OrderProduct, so using the instance of OrderStatus // to also set the OrderProduct entity OrderStatus orderProductStatus = new OrderStatus(); orderProductStatus.setOrders(order); orderProductStatus.setProductVariation(productVariation); // checking if product is out of stock after adding product to cart if(productVariation.getQuantityAvailable() == 0) { return new ResponseEntity("Product variation with id : "+productVariation.getId() +" is out of stock.",HttpStatus.BAD_REQUEST); } // checking if the product have sufficient quantity available to fulfill the order if(productVariation.getQuantityAvailable()<quantityFromCart) { return new ResponseEntity("Only "+productVariation.getQuantityAvailable() +" is left for the product variation id : "+productVariation.getId(),HttpStatus.BAD_REQUEST); } orderProductStatus.setQuantity(quantityFromCart); orderProductStatus.setPrice(productVariation.getPrice()*orderProductStatus.getQuantity()); orderProductStatus.setProductVariationMetadata(productVariation.getMetadata()); // setting order status from null bcoz order is just created and didn't had a state before creation orderProductStatus.setFromStatus(null); orderProductStatus.setToStatus(ORDER_PLACED); // updating the product variation quantity after the customers orders certain quantity productVariation.setQuantityAvailable(productVariation.getQuantityAvailable()-orderProductStatus.getQuantity()); productVariationRepository.save(productVariation); orderProductRepository.save(orderProductStatus); // bcoz OrderStatus inherits OrderProduct. } // deleting the ordered item from the cart after order creation for (Long variationId: productVariationIds) { Cart cartItem = cartRepository.getItemFromCartForCompositeKeyCombination(customer.getId(), variationId); cartRepository.delete(cartItem); } return new ResponseEntity<>("Order placed successfully with order id : "+order.getId(),HttpStatus.CREATED); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Customer getCustomer();", "io.opencannabis.schema.commerce.OrderCustomer.Customer getCustomer();", "public ReturnCustomer getCustomer() {\n return (ReturnCustomer) get(\"customer\");\n }", "com.google.ads.googleads.v6.resources.Customer getCustomer();", "public Customer getCustomer() {\r\n return customer;\r\n }", "public Customer getCustomer()\n {\n return customer;\n }", "public CustomerProfile getCustomerProfile();", "public Customer getCustomer()\n {\n return customer;\n }", "Customer getCustomer() {\n\t\treturn customer;\n\t}", "Customer getCustomerById(int customerId);", "public Customer getCustomer() {\n return customer;\n }", "public Customer getCustomer()\n {\n return this.customer;\n }", "public String getCustomer(String custId);", "public Customer getCustomer() {\n return this.customer;\n }", "public String getCustomer() {\n return customer;\n }", "private Role getCustomerRole() {\n\t\tRole role = roleRepo.findByName(\"CUSTOMER\");\n\t\treturn role;\n\t}", "static customer getCustomer(String uid) {\n return null;\n }", "public Customer getCustomerByName(String customerName);", "public Customer getCustomer() {\r\n\t\treturn customer;\r\n\t}", "public Customer getCustomer() {\r\n\t\treturn customer;\r\n\t}", "public Customer getCustomer() {\r\n\t\treturn this.customer;\r\n\t}", "public org.tempuri.Customers getCustomer() {\r\n return customer;\r\n }", "CustomerDTO getUserForProof(String name,CustomerDTO customerDTO) throws EOTException;", "Customer createCustomer();", "Customer createCustomer();", "Customer createCustomer();", "Customer createCustomer();", "public Customer getCustomer() {\n\t\treturn customer;\n\t}", "protected Optional<Customer> getCustomer() {\n return customer.getOptional();\n }", "@Override\n public String getCustomer() {\n return this.customerName;\n }", "public de.htwg_konstanz.ebus.framework.wholesaler.vo.Customer getCustomer () {\r\n\t\treturn customer;\r\n\t}", "CustomerDTO getCustomerDetails(Long customerId,String userName) throws EOTException;", "@Override\n public Customer getCustomer(Long userId) {\n Optional<Customer> customer = customerDao.getCustomer(userId);\n if (!customer.isPresent()) {\n logger.error(\"Customer with this id {} doesn't exist\", userId);\n }\n return customer.orElseThrow(ResourceNotFoundException::new);\n }", "public String getName()\n {\n return customer;\n }", "@Override\n public CustomerDetails viewAccount(String user) {\n CustomerDetails details=customerRepository.findById(user).get(); \n log.debug(user);\n return details; \n\n }", "public Integer getCustomer() {\n return customer;\n }", "Customer getCustomerById(final Long id);", "public Customer getCustomerDetails() throws Exception {\n\t\treturn customersDBDAO.getOneCustomer(customerId);\n\t}", "public Customer fetchProfileDetails(Long userId) {\n\t\tCustomer cust = null;\n\t\ttry (Connection con = DBUtil.getInstance().getDbConnection()) {\n\t\t\t//Create object of Customer DAO & call respective method\n\t\t\tCustomerDAO customerDAO = new CustomerDAO(con); \n\t\t\tcust=customerDAO.getCustomerById(userId);\n\t\t} catch (SQLException e) {\n\t\t\tthrow new ServiceException(\"Internal Server issue to validate CRM User, Please contact admin\");\n\t\t}\n\t\treturn cust;\n\t}", "public String getCustomerName() \n {\n return customerName;\n }", "public CustomerEntity getCustomer(String accessToken) throws AuthorizationFailedException {\n CustomerAuthEntity customerAuthEntity = customerAuthDao.getCustomerAuthByAccessToken(accessToken);\n\n if (customerAuthEntity == null) {\n throw new AuthorizationFailedException(\"ATHR-001\", \"Customer is not Logged in.\");\n }\n if (customerAuthEntity.getLogoutAt() != null) {\n throw new AuthorizationFailedException(\"ATHR-002\", \"Customer is logged out. Log in again to access this endpoint.\");\n }\n\n final ZonedDateTime now = ZonedDateTime.now();\n\n if (customerAuthEntity.getExpiresAt().compareTo(now) <= 0) {\n throw new AuthorizationFailedException(\"ATHR-003\", \"Your session is expired. Log in again to access this endpoint.\");\n }\n return customerAuthEntity.getCustomer();\n }", "String getCustomerID();", "public Principal getPrincipal();", "java.lang.String getCustomerId();", "java.lang.String getCustomerId();", "public Customer getCustomer() {\n String __key = this.customerId;\n if (customer__resolvedKey == null || customer__resolvedKey != __key) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n CustomerDao targetDao = daoSession.getCustomerDao();\n Customer customerNew = targetDao.load(__key);\n synchronized (this) {\n customer = customerNew;\n \tcustomer__resolvedKey = __key;\n }\n }\n return customer;\n }", "public String getCustomerName(){\n return customerName;\n }", "public java.lang.String getOrgCustomer() {\n\treturn orgCustomer;\n}", "public static Person getARandonCustomer(){\n Person person = RandomPerson.get().next();\n return person;\n }", "public String getCustomerName()\n {\n return customerName;\n }", "public CustomerTO getCustomerDetails(CustomerTO customerTo) throws Exception\r\n\t{\r\n\t\treturn new CustomerService().getCustomerDetails(customerTo);\r\n\t}", "public int getCustomerId() \n {\n return customerId;\n }", "public Customer getCustomer(int phone)\n\t{\n\t\treturn CustomerContainer.getInstance().getCustomer(phone);\n\t}", "public Customer getCustomer(int userId) {\n\t\tIterator i = customers.iterator();\n\t\twhile (i.hasNext()) {\n\t\t\tCustomer customer = (Customer) i.next();\n\t\t\tif (userId == customer.getUserId()) {\n\t\t\t\treturn customer;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public com.huawei.www.bme.cbsinterface.cbs.businessmgr.IndividualCustomer getCustomer() {\r\n return customer;\r\n }", "Customer authenticateCustomer(LoginRequestDto loginRequestDto) throws UserNotFoundException;", "public au.gov.asic.types.AccountIdentifierType getCustomer()\n {\n synchronized (monitor())\n {\n check_orphaned();\n au.gov.asic.types.AccountIdentifierType target = null;\n target = (au.gov.asic.types.AccountIdentifierType)get_store().find_element_user(CUSTOMER$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public interface CustomerService {\n \n\n public void createCustomer(CustomerDto customerDto);\n \n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\") \n public CustomerDto getCustomer(Long id) throws DataAccessException;\n\n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\") \n public void updateCustomer(CustomerDto customer) throws DataAccessException;\n\n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\") \n public void removeCustomer(CustomerDto customer) throws DataAccessException;\n\n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\") \n public Collection<CustomerDto> findAllCustomer() throws DataAccessException;\n\n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\") \n public Collection<CustomerDto> searchCustomer(String name) throws DataAccessException;\n\n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\")\n public CustomerDto findByUsername(String username);\n}", "public CustomerEOImpl getCustomerEO() {\r\n return (CustomerEOImpl) getEntity(2);\r\n }", "@Override\r\n\tpublic Customer getCustomer(int customerID) {\n\t\treturn null;\r\n\t}", "public io.opencannabis.schema.commerce.OrderCustomer.Customer getCustomer() {\n return customer_ == null ? io.opencannabis.schema.commerce.OrderCustomer.Customer.getDefaultInstance() : customer_;\n }", "public Customer createCustomer() {\n return new Customer(nameNested, surNameNested, ageNested, streetNested);\n }", "public ICustomer getCustomer(final Customer customer) {\n ICustomer iCustomer = null;\n if(CustomerType.REGULAR.equals(customer.getCustomerType())) {\n iCustomer = new RegularCustomer();\n }\n return iCustomer;\n }", "@GetMapping(value = { \"/charCustomer\" })\n public String initCharCustomer(Principal principal, Model model) {\n model.addAttribute(\"employee\", new CustomUserDetails());\n LogUtils.getLogger().info(\"Inside doLogin!\");\n UserDetails loginedUser = (UserDetails) ((Authentication) principal)\n .getPrincipal();\n LogUtils.getLogger().info(loginedUser);\n model.addAttribute(\"userName\", loginedUser.getUsername());\n return \"ChartCustomer\";\n }", "public Customer createCustomer() {\r\n\t\ttry {\r\n\t\t\treturn manager.createCustomer();\t\t\t\r\n\t\t}catch(SQLException e) {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"The manager was unable to create a new customer\");\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "Account getAccount();", "private Customer storeCustomer(Customer customer){\n customerRestService.createCustomer(customer);\n return customer;\n }", "public io.opencannabis.schema.commerce.OrderCustomer.Customer getCustomer() {\n if (customerBuilder_ == null) {\n return customer_ == null ? io.opencannabis.schema.commerce.OrderCustomer.Customer.getDefaultInstance() : customer_;\n } else {\n return customerBuilder_.getMessage();\n }\n }", "String getCustomerNameById(int customerId);", "public ResponseEntity<?> createCustomer(customer.controller.Customer customer);", "@Override\r\n\tpublic Customer getCustomer(String custId) {\r\n\t\tOptional<Customer> optionalCustomer = null;\r\n\t\tCustomer customer = null;\r\n\t\toptionalCustomer = customerRepository.findById(custId);\r\n\t\tif (optionalCustomer.isPresent()) {\r\n\t\t\tcustomer = optionalCustomer.get();\r\n\t\t\treturn customer;\r\n\t\t} else {\r\n\t\t\tthrow new EntityNotFoundException(\"Customer With Id \" + custId + \" does Not Exist.\");\r\n\t\t}\r\n\r\n\t}", "public String getCustomerName() {\r\n return name.getName();\r\n }", "public Customer displayCustomer(int cid);", "public Customer getCustomer(int ma) {\n\t\tCustomer cus = new Customer();\n\t\ttry {\n\t\t\tPreparedStatement stm = conn.prepareStatement(Queries.GET_CUSTOMER_BY_ID);\n\t\t\tstm.setInt(1, ma);\n\t\t\tResultSet rs = stm.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tcus = CustomerConverter.convert(rs);\n\t\t\t\t\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn cus;\n\t}", "org.beangle.security.session.protobuf.Model.Account getPrincipal();", "Customer getCustomerByMobileNumber(String mobileNumber) throws EOTException;", "public static void CreateCustomer() \r\n\t{\n\t\t\r\n\t}", "Customer findById(Long id);", "public String getCustomerName() {\n return customerName;\n }", "public String getCustomerName() {\n return customerName;\n }", "public Account getCoor() {\r\n return coor;\r\n }", "@Override\n\tpublic Customer getCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t//now retrieve/read from database using the primary key or id..\n\t\tCustomer theCustomer = currentSession.get(Customer.class,theId);\n\n\t\treturn theCustomer;\n\t}", "@Override\n\tpublic Customer getCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t// now retrieve/read from database using the primary key\n\t\tCustomer theCustomer = currentSession.get(Customer.class, theId);\n\t\t\n\t\treturn theCustomer;\n\t}", "@Nullable\n public DelegatedAdminCustomer get() throws ClientException {\n return send(HttpMethod.GET, null);\n }", "@Override\n\tpublic Customer getCustomer(int customerId) {\n\t\tSession session=sessionFactory.getCurrentSession();\n\t\ttry {\n\t\t\t\n\t\t\tCustomer customer =session.get(Customer.class, customerId);\n\t\t return customer;\t\t\t\n\t\t}\n\t\tcatch(HibernateException exception){\n\t\t\texception.printStackTrace();\n\t\t}\n\t\treturn null;\n\t\t\n\t}", "public int getCustomerId() {\n return customerId;\n }", "public int getCustomerId() {\n return customerId;\n }", "Customers createCustomers();", "public interface CustomerService {\n List<Customer> findPubsea();\n\n List<Customer> findCustomer();\n\n void update(Customer customer);\n\n /**\n * 公海客户认领\n * @param customerId\n * @param loginUser\n */\n void claim(Long customerId, LoginUser loginUser);\n}", "@Test\n public void testCustomerFactoryGetCustomer() {\n CustomerController customerController = customerFactory.getCustomerController();\n customerController.addCustomer(CUSTOMER_NAME, CUSTOMER_CONTACT, false);\n assertEquals(CUSTOMER_NAME, customerController.getCustomer(1).getName());\n }", "@Override\n\tpublic String getName(){\n\t\treturn customer.getName();\n\t}", "public int getCustId(){\n return this.custId;\r\n }", "public static Customer getCustomer(int _customerID) throws SQLException{\n ResultSet rs = ConnectionManager.selectAllColumns(\"Tbl_Customer_GroupNo\", \"CustomerID= \"+_customerID);\n if(rs.next()){\n Customer cus = new Customer(rs.getInt(\"CustomerId\"), rs.getString(\"FirstName\"), rs.getString(\"LastName\"), rs.getString(\"Address\"), rs.getString(\"Email\"), rs.getString(\"Phone\"));\n return cus;\n }else{\n return null;\n }\n }", "@Override\n\tpublic Customer getCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// now retrieve/read from database using the primary key\n\t\tCustomer theCustomer = currentSession.get(Customer.class, theId);\n\n\t\treturn theCustomer;\n\t}", "String getName() {\n\t\treturn customer.getName();\n\t}", "public String getCustomer_Name() {\n return customer_Name;\n }", "public String getCustomerName()\n\t{\n\t\treturn name;\n\t}", "public SalerCustomer getSalerCustomer(int uid) {\n\t\treturn this.salerCustomerMapper.getSalerCustomer(uid);\n\t}", "public Integer getCustomerId()\n {\n return customerId;\n }", "@Override\n public CustomerEntity getCustomerData(Long id) {\n return customerPersistencePort.getUser(id);\n }", "@Override\n\tpublic CustomerData getCustomer(Long custId) {\n\t \n\t\tOptional<CustomerData> optionalCust = customerRepository.findById(custId);\n\t\t//Optional object use for check if a customer id is existing or not\n if(optionalCust.isPresent()) {\n return optionalCust.get(); //if customer id is exist then return a value\n }\n\t\treturn null;\n\t\t\n\t}" ]
[ "0.8002897", "0.7542574", "0.7327766", "0.7107928", "0.71012694", "0.7090339", "0.70326364", "0.7021637", "0.70147586", "0.70140785", "0.7011035", "0.699999", "0.69917166", "0.69861996", "0.69805604", "0.69321936", "0.6932157", "0.69117844", "0.6886742", "0.6886742", "0.6843398", "0.68229795", "0.6800915", "0.67390233", "0.67390233", "0.67390233", "0.67390233", "0.6737286", "0.6699568", "0.6667957", "0.6640194", "0.6633316", "0.66292644", "0.65606964", "0.65139085", "0.65128356", "0.65110993", "0.65009344", "0.64667165", "0.6445018", "0.6437229", "0.64220834", "0.6412888", "0.63879985", "0.63879985", "0.6363108", "0.63530284", "0.6329038", "0.63024217", "0.6295958", "0.6295096", "0.6293473", "0.62925565", "0.6255127", "0.62340266", "0.6197608", "0.61669207", "0.61592036", "0.6157428", "0.615543", "0.6144185", "0.61391395", "0.6125051", "0.6124801", "0.6123755", "0.6118576", "0.61139596", "0.61120516", "0.61077684", "0.61068624", "0.60973155", "0.60885155", "0.60779256", "0.60712636", "0.6066244", "0.6063181", "0.6055637", "0.60530174", "0.6046237", "0.6046237", "0.60444295", "0.6040481", "0.6039559", "0.60387677", "0.60340005", "0.6033564", "0.6033564", "0.60322094", "0.6031172", "0.60276055", "0.60195035", "0.6014837", "0.6012609", "0.60120296", "0.60118264", "0.60090107", "0.5997372", "0.5984708", "0.59836966", "0.5980115", "0.5974743" ]
0.0
-1
getting the customer from principle
public ResponseEntity<String> directOrderProduct(Long productVariationId, Integer quantity, String email) { User user = userRepository.findByEmail(email); Customer customer = customerRepository.findCustomerById(user.getId()); ProductVariation productVariation = productVariationRepository.findProductVariationById(productVariationId); if(productVariation == null) { return new ResponseEntity("Invalid product variation id",HttpStatus.NOT_FOUND); } // checking if product variation is active if(!productVariation.isActive()) { return new ResponseEntity("Product variation with id: "+productVariation.getId()+" is inactive." ,HttpStatus.BAD_REQUEST); } if(quantity<=0) { return new ResponseEntity("Quantity should be greater than 0.",HttpStatus.BAD_REQUEST); } if(productVariation.getQuantityAvailable() == 0) { return new ResponseEntity("Product variation is out of stock.",HttpStatus.BAD_REQUEST); } if(productVariation.getQuantityAvailable() < quantity) { return new ResponseEntity("Only "+ productVariation.getQuantityAvailable() +" stocks available for the product variations.",HttpStatus.BAD_REQUEST); } // creating new instance of orders Orders order = new Orders(); order.setCustomer(customer); order.setDateCreated(new Date()); // by default assigning the method as COD order.setPaymentMethod("COD"); // getting customer's address by default getting home label address Address customerAddress = addressRepository.findAddressByUserIdAndLabel(customer.getId(), "home"); order.setCustomerAddressAddressLine(customerAddress.getAddressLine()); order.setCustomerAddressCity(customerAddress.getCity()); order.setCustomerAddressCountry(customerAddress.getCountry()); order.setCustomerAddressState(customerAddress.getState()); order.setCustomerAddressZipCode(customerAddress.getZipCode()); order.setCustomerAddressLabel(customerAddress.getLabel()); // setting total amount for the order order.setAmountPaid(productVariation.getPrice()*quantity); // saving the order ordersRepository.save(order); // creating instance of order status to persist data in OrderProduct and OrderStatus // since OrderStatus is inheriting OrderProduct, so using the instance of OrderStatus // to also set the OrderProduct entity OrderStatus orderProductStatus = new OrderStatus(); orderProductStatus.setOrders(order); orderProductStatus.setProductVariation(productVariation); orderProductStatus.setQuantity(quantity); orderProductStatus.setPrice(productVariation.getPrice()*orderProductStatus.getQuantity()); orderProductStatus.setProductVariationMetadata(productVariation.getMetadata()); // setting order status from null bcoz order is just created and didn't had a state before creation orderProductStatus.setFromStatus(null); orderProductStatus.setToStatus(ORDER_PLACED); // updating the product variation quantity after the customers orders certain quantity productVariation.setQuantityAvailable(productVariation.getQuantityAvailable()-orderProductStatus.getQuantity()); productVariationRepository.save(productVariation); orderProductRepository.save(orderProductStatus); return new ResponseEntity<>("Order placed successfully with order id : "+order.getId(),HttpStatus.CREATED); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Customer getCustomer();", "io.opencannabis.schema.commerce.OrderCustomer.Customer getCustomer();", "public ReturnCustomer getCustomer() {\n return (ReturnCustomer) get(\"customer\");\n }", "com.google.ads.googleads.v6.resources.Customer getCustomer();", "public Customer getCustomer() {\r\n return customer;\r\n }", "public Customer getCustomer()\n {\n return customer;\n }", "public CustomerProfile getCustomerProfile();", "public Customer getCustomer()\n {\n return customer;\n }", "Customer getCustomer() {\n\t\treturn customer;\n\t}", "Customer getCustomerById(int customerId);", "public Customer getCustomer() {\n return customer;\n }", "public Customer getCustomer()\n {\n return this.customer;\n }", "public String getCustomer(String custId);", "public Customer getCustomer() {\n return this.customer;\n }", "public String getCustomer() {\n return customer;\n }", "private Role getCustomerRole() {\n\t\tRole role = roleRepo.findByName(\"CUSTOMER\");\n\t\treturn role;\n\t}", "static customer getCustomer(String uid) {\n return null;\n }", "public Customer getCustomerByName(String customerName);", "public Customer getCustomer() {\r\n\t\treturn customer;\r\n\t}", "public Customer getCustomer() {\r\n\t\treturn customer;\r\n\t}", "public Customer getCustomer() {\r\n\t\treturn this.customer;\r\n\t}", "public org.tempuri.Customers getCustomer() {\r\n return customer;\r\n }", "CustomerDTO getUserForProof(String name,CustomerDTO customerDTO) throws EOTException;", "Customer createCustomer();", "Customer createCustomer();", "Customer createCustomer();", "Customer createCustomer();", "public Customer getCustomer() {\n\t\treturn customer;\n\t}", "protected Optional<Customer> getCustomer() {\n return customer.getOptional();\n }", "@Override\n public String getCustomer() {\n return this.customerName;\n }", "public de.htwg_konstanz.ebus.framework.wholesaler.vo.Customer getCustomer () {\r\n\t\treturn customer;\r\n\t}", "CustomerDTO getCustomerDetails(Long customerId,String userName) throws EOTException;", "@Override\n public Customer getCustomer(Long userId) {\n Optional<Customer> customer = customerDao.getCustomer(userId);\n if (!customer.isPresent()) {\n logger.error(\"Customer with this id {} doesn't exist\", userId);\n }\n return customer.orElseThrow(ResourceNotFoundException::new);\n }", "public String getName()\n {\n return customer;\n }", "@Override\n public CustomerDetails viewAccount(String user) {\n CustomerDetails details=customerRepository.findById(user).get(); \n log.debug(user);\n return details; \n\n }", "public Integer getCustomer() {\n return customer;\n }", "Customer getCustomerById(final Long id);", "public Customer getCustomerDetails() throws Exception {\n\t\treturn customersDBDAO.getOneCustomer(customerId);\n\t}", "public Customer fetchProfileDetails(Long userId) {\n\t\tCustomer cust = null;\n\t\ttry (Connection con = DBUtil.getInstance().getDbConnection()) {\n\t\t\t//Create object of Customer DAO & call respective method\n\t\t\tCustomerDAO customerDAO = new CustomerDAO(con); \n\t\t\tcust=customerDAO.getCustomerById(userId);\n\t\t} catch (SQLException e) {\n\t\t\tthrow new ServiceException(\"Internal Server issue to validate CRM User, Please contact admin\");\n\t\t}\n\t\treturn cust;\n\t}", "public String getCustomerName() \n {\n return customerName;\n }", "public CustomerEntity getCustomer(String accessToken) throws AuthorizationFailedException {\n CustomerAuthEntity customerAuthEntity = customerAuthDao.getCustomerAuthByAccessToken(accessToken);\n\n if (customerAuthEntity == null) {\n throw new AuthorizationFailedException(\"ATHR-001\", \"Customer is not Logged in.\");\n }\n if (customerAuthEntity.getLogoutAt() != null) {\n throw new AuthorizationFailedException(\"ATHR-002\", \"Customer is logged out. Log in again to access this endpoint.\");\n }\n\n final ZonedDateTime now = ZonedDateTime.now();\n\n if (customerAuthEntity.getExpiresAt().compareTo(now) <= 0) {\n throw new AuthorizationFailedException(\"ATHR-003\", \"Your session is expired. Log in again to access this endpoint.\");\n }\n return customerAuthEntity.getCustomer();\n }", "String getCustomerID();", "public Principal getPrincipal();", "java.lang.String getCustomerId();", "java.lang.String getCustomerId();", "public Customer getCustomer() {\n String __key = this.customerId;\n if (customer__resolvedKey == null || customer__resolvedKey != __key) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n CustomerDao targetDao = daoSession.getCustomerDao();\n Customer customerNew = targetDao.load(__key);\n synchronized (this) {\n customer = customerNew;\n \tcustomer__resolvedKey = __key;\n }\n }\n return customer;\n }", "public String getCustomerName(){\n return customerName;\n }", "public java.lang.String getOrgCustomer() {\n\treturn orgCustomer;\n}", "public static Person getARandonCustomer(){\n Person person = RandomPerson.get().next();\n return person;\n }", "public String getCustomerName()\n {\n return customerName;\n }", "public CustomerTO getCustomerDetails(CustomerTO customerTo) throws Exception\r\n\t{\r\n\t\treturn new CustomerService().getCustomerDetails(customerTo);\r\n\t}", "public int getCustomerId() \n {\n return customerId;\n }", "public Customer getCustomer(int phone)\n\t{\n\t\treturn CustomerContainer.getInstance().getCustomer(phone);\n\t}", "public Customer getCustomer(int userId) {\n\t\tIterator i = customers.iterator();\n\t\twhile (i.hasNext()) {\n\t\t\tCustomer customer = (Customer) i.next();\n\t\t\tif (userId == customer.getUserId()) {\n\t\t\t\treturn customer;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public com.huawei.www.bme.cbsinterface.cbs.businessmgr.IndividualCustomer getCustomer() {\r\n return customer;\r\n }", "Customer authenticateCustomer(LoginRequestDto loginRequestDto) throws UserNotFoundException;", "public au.gov.asic.types.AccountIdentifierType getCustomer()\n {\n synchronized (monitor())\n {\n check_orphaned();\n au.gov.asic.types.AccountIdentifierType target = null;\n target = (au.gov.asic.types.AccountIdentifierType)get_store().find_element_user(CUSTOMER$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public interface CustomerService {\n \n\n public void createCustomer(CustomerDto customerDto);\n \n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\") \n public CustomerDto getCustomer(Long id) throws DataAccessException;\n\n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\") \n public void updateCustomer(CustomerDto customer) throws DataAccessException;\n\n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\") \n public void removeCustomer(CustomerDto customer) throws DataAccessException;\n\n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\") \n public Collection<CustomerDto> findAllCustomer() throws DataAccessException;\n\n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\") \n public Collection<CustomerDto> searchCustomer(String name) throws DataAccessException;\n\n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\")\n public CustomerDto findByUsername(String username);\n}", "public CustomerEOImpl getCustomerEO() {\r\n return (CustomerEOImpl) getEntity(2);\r\n }", "@Override\r\n\tpublic Customer getCustomer(int customerID) {\n\t\treturn null;\r\n\t}", "public io.opencannabis.schema.commerce.OrderCustomer.Customer getCustomer() {\n return customer_ == null ? io.opencannabis.schema.commerce.OrderCustomer.Customer.getDefaultInstance() : customer_;\n }", "public Customer createCustomer() {\n return new Customer(nameNested, surNameNested, ageNested, streetNested);\n }", "public ICustomer getCustomer(final Customer customer) {\n ICustomer iCustomer = null;\n if(CustomerType.REGULAR.equals(customer.getCustomerType())) {\n iCustomer = new RegularCustomer();\n }\n return iCustomer;\n }", "@GetMapping(value = { \"/charCustomer\" })\n public String initCharCustomer(Principal principal, Model model) {\n model.addAttribute(\"employee\", new CustomUserDetails());\n LogUtils.getLogger().info(\"Inside doLogin!\");\n UserDetails loginedUser = (UserDetails) ((Authentication) principal)\n .getPrincipal();\n LogUtils.getLogger().info(loginedUser);\n model.addAttribute(\"userName\", loginedUser.getUsername());\n return \"ChartCustomer\";\n }", "public Customer createCustomer() {\r\n\t\ttry {\r\n\t\t\treturn manager.createCustomer();\t\t\t\r\n\t\t}catch(SQLException e) {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"The manager was unable to create a new customer\");\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "Account getAccount();", "private Customer storeCustomer(Customer customer){\n customerRestService.createCustomer(customer);\n return customer;\n }", "public io.opencannabis.schema.commerce.OrderCustomer.Customer getCustomer() {\n if (customerBuilder_ == null) {\n return customer_ == null ? io.opencannabis.schema.commerce.OrderCustomer.Customer.getDefaultInstance() : customer_;\n } else {\n return customerBuilder_.getMessage();\n }\n }", "String getCustomerNameById(int customerId);", "public ResponseEntity<?> createCustomer(customer.controller.Customer customer);", "@Override\r\n\tpublic Customer getCustomer(String custId) {\r\n\t\tOptional<Customer> optionalCustomer = null;\r\n\t\tCustomer customer = null;\r\n\t\toptionalCustomer = customerRepository.findById(custId);\r\n\t\tif (optionalCustomer.isPresent()) {\r\n\t\t\tcustomer = optionalCustomer.get();\r\n\t\t\treturn customer;\r\n\t\t} else {\r\n\t\t\tthrow new EntityNotFoundException(\"Customer With Id \" + custId + \" does Not Exist.\");\r\n\t\t}\r\n\r\n\t}", "public String getCustomerName() {\r\n return name.getName();\r\n }", "public Customer displayCustomer(int cid);", "public Customer getCustomer(int ma) {\n\t\tCustomer cus = new Customer();\n\t\ttry {\n\t\t\tPreparedStatement stm = conn.prepareStatement(Queries.GET_CUSTOMER_BY_ID);\n\t\t\tstm.setInt(1, ma);\n\t\t\tResultSet rs = stm.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tcus = CustomerConverter.convert(rs);\n\t\t\t\t\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn cus;\n\t}", "org.beangle.security.session.protobuf.Model.Account getPrincipal();", "Customer getCustomerByMobileNumber(String mobileNumber) throws EOTException;", "public static void CreateCustomer() \r\n\t{\n\t\t\r\n\t}", "Customer findById(Long id);", "public String getCustomerName() {\n return customerName;\n }", "public String getCustomerName() {\n return customerName;\n }", "public Account getCoor() {\r\n return coor;\r\n }", "@Override\n\tpublic Customer getCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t//now retrieve/read from database using the primary key or id..\n\t\tCustomer theCustomer = currentSession.get(Customer.class,theId);\n\n\t\treturn theCustomer;\n\t}", "@Override\n\tpublic Customer getCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t// now retrieve/read from database using the primary key\n\t\tCustomer theCustomer = currentSession.get(Customer.class, theId);\n\t\t\n\t\treturn theCustomer;\n\t}", "@Nullable\n public DelegatedAdminCustomer get() throws ClientException {\n return send(HttpMethod.GET, null);\n }", "@Override\n\tpublic Customer getCustomer(int customerId) {\n\t\tSession session=sessionFactory.getCurrentSession();\n\t\ttry {\n\t\t\t\n\t\t\tCustomer customer =session.get(Customer.class, customerId);\n\t\t return customer;\t\t\t\n\t\t}\n\t\tcatch(HibernateException exception){\n\t\t\texception.printStackTrace();\n\t\t}\n\t\treturn null;\n\t\t\n\t}", "public int getCustomerId() {\n return customerId;\n }", "public int getCustomerId() {\n return customerId;\n }", "Customers createCustomers();", "public interface CustomerService {\n List<Customer> findPubsea();\n\n List<Customer> findCustomer();\n\n void update(Customer customer);\n\n /**\n * 公海客户认领\n * @param customerId\n * @param loginUser\n */\n void claim(Long customerId, LoginUser loginUser);\n}", "@Test\n public void testCustomerFactoryGetCustomer() {\n CustomerController customerController = customerFactory.getCustomerController();\n customerController.addCustomer(CUSTOMER_NAME, CUSTOMER_CONTACT, false);\n assertEquals(CUSTOMER_NAME, customerController.getCustomer(1).getName());\n }", "@Override\n\tpublic String getName(){\n\t\treturn customer.getName();\n\t}", "public int getCustId(){\n return this.custId;\r\n }", "public static Customer getCustomer(int _customerID) throws SQLException{\n ResultSet rs = ConnectionManager.selectAllColumns(\"Tbl_Customer_GroupNo\", \"CustomerID= \"+_customerID);\n if(rs.next()){\n Customer cus = new Customer(rs.getInt(\"CustomerId\"), rs.getString(\"FirstName\"), rs.getString(\"LastName\"), rs.getString(\"Address\"), rs.getString(\"Email\"), rs.getString(\"Phone\"));\n return cus;\n }else{\n return null;\n }\n }", "@Override\n\tpublic Customer getCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// now retrieve/read from database using the primary key\n\t\tCustomer theCustomer = currentSession.get(Customer.class, theId);\n\n\t\treturn theCustomer;\n\t}", "String getName() {\n\t\treturn customer.getName();\n\t}", "public String getCustomer_Name() {\n return customer_Name;\n }", "public String getCustomerName()\n\t{\n\t\treturn name;\n\t}", "public SalerCustomer getSalerCustomer(int uid) {\n\t\treturn this.salerCustomerMapper.getSalerCustomer(uid);\n\t}", "public Integer getCustomerId()\n {\n return customerId;\n }", "@Override\n public CustomerEntity getCustomerData(Long id) {\n return customerPersistencePort.getUser(id);\n }", "@Override\n\tpublic CustomerData getCustomer(Long custId) {\n\t \n\t\tOptional<CustomerData> optionalCust = customerRepository.findById(custId);\n\t\t//Optional object use for check if a customer id is existing or not\n if(optionalCust.isPresent()) {\n return optionalCust.get(); //if customer id is exist then return a value\n }\n\t\treturn null;\n\t\t\n\t}" ]
[ "0.8003456", "0.75431615", "0.7328253", "0.71085393", "0.7101368", "0.7090473", "0.7033036", "0.7021769", "0.7014882", "0.70148224", "0.70111394", "0.70000917", "0.69925106", "0.6986287", "0.69807863", "0.69325", "0.6932492", "0.69123465", "0.6886823", "0.6886823", "0.6843476", "0.6823288", "0.68011177", "0.6739394", "0.6739394", "0.6739394", "0.6739394", "0.6737366", "0.66997576", "0.66680616", "0.6640347", "0.6633794", "0.66298914", "0.65607846", "0.65142274", "0.6513207", "0.6511922", "0.65014386", "0.64672107", "0.6445162", "0.6437674", "0.6422763", "0.64130193", "0.63887554", "0.63887554", "0.63634336", "0.6353161", "0.632914", "0.63028914", "0.62961054", "0.6295555", "0.6293945", "0.6292958", "0.62555665", "0.6234105", "0.61979043", "0.61672884", "0.6159584", "0.6157589", "0.61556774", "0.6144498", "0.61394966", "0.6125178", "0.61250085", "0.6123927", "0.6119074", "0.611402", "0.6112355", "0.6108464", "0.61070246", "0.6097973", "0.6088701", "0.6078211", "0.60716695", "0.6066555", "0.6063704", "0.6055667", "0.6053765", "0.60463715", "0.60463715", "0.60443765", "0.6040995", "0.6040052", "0.6039113", "0.6034504", "0.60340387", "0.60340387", "0.6032508", "0.6031486", "0.60276043", "0.6019495", "0.60152066", "0.6012952", "0.60125214", "0.60118926", "0.6009041", "0.59975135", "0.59849226", "0.59841895", "0.59806716", "0.597543" ]
0.0
-1
getting the customer from principle
public ResponseEntity<String> cancelOrder(String email, long orderProductId) { User user = userRepository.findByEmail(email); Customer customer = customerRepository.findCustomerById(user.getId()); OrderProduct orderProduct = orderProductRepository.findById(orderProductId); if(orderProduct == null) { return new ResponseEntity("Invalid orderProduct id",HttpStatus.NOT_FOUND); } long orderIdForOrderProductId = orderProductRepository.getOrderIdForOrderProductId(orderProduct.getId()); Orders orders = ordersRepository.findById(orderIdForOrderProductId); if(customer.getId() != orders.getCustomer().getId()) { return new ResponseEntity("You don't have any product with specific orderProduct id." ,HttpStatus.NOT_FOUND); } OrderStatus orderStatus = orderStatusRepository.findById(orderProduct.getId()); if(!orderStatus.getToStatus().equals(ORDER_PLACED)) { return new ResponseEntity("Cannot cancel order. Order is in "+orderStatus.getToStatus()+" state." ,HttpStatus.BAD_REQUEST); } orderStatus.setFromStatus(orderStatus.getToStatus()); orderStatus.setToStatus(CANCELLED); orderStatus.setTransitionNotesComments("Order cancelled by customer."); orderStatusRepository.save(orderStatus); return new ResponseEntity("Your order is now cancelled.",HttpStatus.ACCEPTED); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Customer getCustomer();", "io.opencannabis.schema.commerce.OrderCustomer.Customer getCustomer();", "public ReturnCustomer getCustomer() {\n return (ReturnCustomer) get(\"customer\");\n }", "com.google.ads.googleads.v6.resources.Customer getCustomer();", "public Customer getCustomer() {\r\n return customer;\r\n }", "public Customer getCustomer()\n {\n return customer;\n }", "public CustomerProfile getCustomerProfile();", "public Customer getCustomer()\n {\n return customer;\n }", "Customer getCustomer() {\n\t\treturn customer;\n\t}", "Customer getCustomerById(int customerId);", "public Customer getCustomer() {\n return customer;\n }", "public Customer getCustomer()\n {\n return this.customer;\n }", "public String getCustomer(String custId);", "public Customer getCustomer() {\n return this.customer;\n }", "public String getCustomer() {\n return customer;\n }", "private Role getCustomerRole() {\n\t\tRole role = roleRepo.findByName(\"CUSTOMER\");\n\t\treturn role;\n\t}", "static customer getCustomer(String uid) {\n return null;\n }", "public Customer getCustomerByName(String customerName);", "public Customer getCustomer() {\r\n\t\treturn customer;\r\n\t}", "public Customer getCustomer() {\r\n\t\treturn customer;\r\n\t}", "public Customer getCustomer() {\r\n\t\treturn this.customer;\r\n\t}", "public org.tempuri.Customers getCustomer() {\r\n return customer;\r\n }", "CustomerDTO getUserForProof(String name,CustomerDTO customerDTO) throws EOTException;", "Customer createCustomer();", "Customer createCustomer();", "Customer createCustomer();", "Customer createCustomer();", "public Customer getCustomer() {\n\t\treturn customer;\n\t}", "protected Optional<Customer> getCustomer() {\n return customer.getOptional();\n }", "@Override\n public String getCustomer() {\n return this.customerName;\n }", "public de.htwg_konstanz.ebus.framework.wholesaler.vo.Customer getCustomer () {\r\n\t\treturn customer;\r\n\t}", "CustomerDTO getCustomerDetails(Long customerId,String userName) throws EOTException;", "@Override\n public Customer getCustomer(Long userId) {\n Optional<Customer> customer = customerDao.getCustomer(userId);\n if (!customer.isPresent()) {\n logger.error(\"Customer with this id {} doesn't exist\", userId);\n }\n return customer.orElseThrow(ResourceNotFoundException::new);\n }", "public String getName()\n {\n return customer;\n }", "@Override\n public CustomerDetails viewAccount(String user) {\n CustomerDetails details=customerRepository.findById(user).get(); \n log.debug(user);\n return details; \n\n }", "public Integer getCustomer() {\n return customer;\n }", "Customer getCustomerById(final Long id);", "public Customer getCustomerDetails() throws Exception {\n\t\treturn customersDBDAO.getOneCustomer(customerId);\n\t}", "public Customer fetchProfileDetails(Long userId) {\n\t\tCustomer cust = null;\n\t\ttry (Connection con = DBUtil.getInstance().getDbConnection()) {\n\t\t\t//Create object of Customer DAO & call respective method\n\t\t\tCustomerDAO customerDAO = new CustomerDAO(con); \n\t\t\tcust=customerDAO.getCustomerById(userId);\n\t\t} catch (SQLException e) {\n\t\t\tthrow new ServiceException(\"Internal Server issue to validate CRM User, Please contact admin\");\n\t\t}\n\t\treturn cust;\n\t}", "public String getCustomerName() \n {\n return customerName;\n }", "public CustomerEntity getCustomer(String accessToken) throws AuthorizationFailedException {\n CustomerAuthEntity customerAuthEntity = customerAuthDao.getCustomerAuthByAccessToken(accessToken);\n\n if (customerAuthEntity == null) {\n throw new AuthorizationFailedException(\"ATHR-001\", \"Customer is not Logged in.\");\n }\n if (customerAuthEntity.getLogoutAt() != null) {\n throw new AuthorizationFailedException(\"ATHR-002\", \"Customer is logged out. Log in again to access this endpoint.\");\n }\n\n final ZonedDateTime now = ZonedDateTime.now();\n\n if (customerAuthEntity.getExpiresAt().compareTo(now) <= 0) {\n throw new AuthorizationFailedException(\"ATHR-003\", \"Your session is expired. Log in again to access this endpoint.\");\n }\n return customerAuthEntity.getCustomer();\n }", "String getCustomerID();", "public Principal getPrincipal();", "java.lang.String getCustomerId();", "java.lang.String getCustomerId();", "public Customer getCustomer() {\n String __key = this.customerId;\n if (customer__resolvedKey == null || customer__resolvedKey != __key) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n CustomerDao targetDao = daoSession.getCustomerDao();\n Customer customerNew = targetDao.load(__key);\n synchronized (this) {\n customer = customerNew;\n \tcustomer__resolvedKey = __key;\n }\n }\n return customer;\n }", "public String getCustomerName(){\n return customerName;\n }", "public java.lang.String getOrgCustomer() {\n\treturn orgCustomer;\n}", "public static Person getARandonCustomer(){\n Person person = RandomPerson.get().next();\n return person;\n }", "public String getCustomerName()\n {\n return customerName;\n }", "public CustomerTO getCustomerDetails(CustomerTO customerTo) throws Exception\r\n\t{\r\n\t\treturn new CustomerService().getCustomerDetails(customerTo);\r\n\t}", "public int getCustomerId() \n {\n return customerId;\n }", "public Customer getCustomer(int phone)\n\t{\n\t\treturn CustomerContainer.getInstance().getCustomer(phone);\n\t}", "public Customer getCustomer(int userId) {\n\t\tIterator i = customers.iterator();\n\t\twhile (i.hasNext()) {\n\t\t\tCustomer customer = (Customer) i.next();\n\t\t\tif (userId == customer.getUserId()) {\n\t\t\t\treturn customer;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public com.huawei.www.bme.cbsinterface.cbs.businessmgr.IndividualCustomer getCustomer() {\r\n return customer;\r\n }", "Customer authenticateCustomer(LoginRequestDto loginRequestDto) throws UserNotFoundException;", "public au.gov.asic.types.AccountIdentifierType getCustomer()\n {\n synchronized (monitor())\n {\n check_orphaned();\n au.gov.asic.types.AccountIdentifierType target = null;\n target = (au.gov.asic.types.AccountIdentifierType)get_store().find_element_user(CUSTOMER$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public interface CustomerService {\n \n\n public void createCustomer(CustomerDto customerDto);\n \n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\") \n public CustomerDto getCustomer(Long id) throws DataAccessException;\n\n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\") \n public void updateCustomer(CustomerDto customer) throws DataAccessException;\n\n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\") \n public void removeCustomer(CustomerDto customer) throws DataAccessException;\n\n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\") \n public Collection<CustomerDto> findAllCustomer() throws DataAccessException;\n\n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\") \n public Collection<CustomerDto> searchCustomer(String name) throws DataAccessException;\n\n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\")\n public CustomerDto findByUsername(String username);\n}", "public CustomerEOImpl getCustomerEO() {\r\n return (CustomerEOImpl) getEntity(2);\r\n }", "@Override\r\n\tpublic Customer getCustomer(int customerID) {\n\t\treturn null;\r\n\t}", "public io.opencannabis.schema.commerce.OrderCustomer.Customer getCustomer() {\n return customer_ == null ? io.opencannabis.schema.commerce.OrderCustomer.Customer.getDefaultInstance() : customer_;\n }", "public Customer createCustomer() {\n return new Customer(nameNested, surNameNested, ageNested, streetNested);\n }", "public ICustomer getCustomer(final Customer customer) {\n ICustomer iCustomer = null;\n if(CustomerType.REGULAR.equals(customer.getCustomerType())) {\n iCustomer = new RegularCustomer();\n }\n return iCustomer;\n }", "@GetMapping(value = { \"/charCustomer\" })\n public String initCharCustomer(Principal principal, Model model) {\n model.addAttribute(\"employee\", new CustomUserDetails());\n LogUtils.getLogger().info(\"Inside doLogin!\");\n UserDetails loginedUser = (UserDetails) ((Authentication) principal)\n .getPrincipal();\n LogUtils.getLogger().info(loginedUser);\n model.addAttribute(\"userName\", loginedUser.getUsername());\n return \"ChartCustomer\";\n }", "public Customer createCustomer() {\r\n\t\ttry {\r\n\t\t\treturn manager.createCustomer();\t\t\t\r\n\t\t}catch(SQLException e) {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"The manager was unable to create a new customer\");\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "Account getAccount();", "private Customer storeCustomer(Customer customer){\n customerRestService.createCustomer(customer);\n return customer;\n }", "public io.opencannabis.schema.commerce.OrderCustomer.Customer getCustomer() {\n if (customerBuilder_ == null) {\n return customer_ == null ? io.opencannabis.schema.commerce.OrderCustomer.Customer.getDefaultInstance() : customer_;\n } else {\n return customerBuilder_.getMessage();\n }\n }", "String getCustomerNameById(int customerId);", "public ResponseEntity<?> createCustomer(customer.controller.Customer customer);", "@Override\r\n\tpublic Customer getCustomer(String custId) {\r\n\t\tOptional<Customer> optionalCustomer = null;\r\n\t\tCustomer customer = null;\r\n\t\toptionalCustomer = customerRepository.findById(custId);\r\n\t\tif (optionalCustomer.isPresent()) {\r\n\t\t\tcustomer = optionalCustomer.get();\r\n\t\t\treturn customer;\r\n\t\t} else {\r\n\t\t\tthrow new EntityNotFoundException(\"Customer With Id \" + custId + \" does Not Exist.\");\r\n\t\t}\r\n\r\n\t}", "public String getCustomerName() {\r\n return name.getName();\r\n }", "public Customer displayCustomer(int cid);", "public Customer getCustomer(int ma) {\n\t\tCustomer cus = new Customer();\n\t\ttry {\n\t\t\tPreparedStatement stm = conn.prepareStatement(Queries.GET_CUSTOMER_BY_ID);\n\t\t\tstm.setInt(1, ma);\n\t\t\tResultSet rs = stm.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tcus = CustomerConverter.convert(rs);\n\t\t\t\t\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn cus;\n\t}", "org.beangle.security.session.protobuf.Model.Account getPrincipal();", "Customer getCustomerByMobileNumber(String mobileNumber) throws EOTException;", "public static void CreateCustomer() \r\n\t{\n\t\t\r\n\t}", "Customer findById(Long id);", "public String getCustomerName() {\n return customerName;\n }", "public String getCustomerName() {\n return customerName;\n }", "public Account getCoor() {\r\n return coor;\r\n }", "@Override\n\tpublic Customer getCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t//now retrieve/read from database using the primary key or id..\n\t\tCustomer theCustomer = currentSession.get(Customer.class,theId);\n\n\t\treturn theCustomer;\n\t}", "@Override\n\tpublic Customer getCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t// now retrieve/read from database using the primary key\n\t\tCustomer theCustomer = currentSession.get(Customer.class, theId);\n\t\t\n\t\treturn theCustomer;\n\t}", "@Nullable\n public DelegatedAdminCustomer get() throws ClientException {\n return send(HttpMethod.GET, null);\n }", "@Override\n\tpublic Customer getCustomer(int customerId) {\n\t\tSession session=sessionFactory.getCurrentSession();\n\t\ttry {\n\t\t\t\n\t\t\tCustomer customer =session.get(Customer.class, customerId);\n\t\t return customer;\t\t\t\n\t\t}\n\t\tcatch(HibernateException exception){\n\t\t\texception.printStackTrace();\n\t\t}\n\t\treturn null;\n\t\t\n\t}", "public int getCustomerId() {\n return customerId;\n }", "public int getCustomerId() {\n return customerId;\n }", "Customers createCustomers();", "public interface CustomerService {\n List<Customer> findPubsea();\n\n List<Customer> findCustomer();\n\n void update(Customer customer);\n\n /**\n * 公海客户认领\n * @param customerId\n * @param loginUser\n */\n void claim(Long customerId, LoginUser loginUser);\n}", "@Test\n public void testCustomerFactoryGetCustomer() {\n CustomerController customerController = customerFactory.getCustomerController();\n customerController.addCustomer(CUSTOMER_NAME, CUSTOMER_CONTACT, false);\n assertEquals(CUSTOMER_NAME, customerController.getCustomer(1).getName());\n }", "@Override\n\tpublic String getName(){\n\t\treturn customer.getName();\n\t}", "public int getCustId(){\n return this.custId;\r\n }", "public static Customer getCustomer(int _customerID) throws SQLException{\n ResultSet rs = ConnectionManager.selectAllColumns(\"Tbl_Customer_GroupNo\", \"CustomerID= \"+_customerID);\n if(rs.next()){\n Customer cus = new Customer(rs.getInt(\"CustomerId\"), rs.getString(\"FirstName\"), rs.getString(\"LastName\"), rs.getString(\"Address\"), rs.getString(\"Email\"), rs.getString(\"Phone\"));\n return cus;\n }else{\n return null;\n }\n }", "@Override\n\tpublic Customer getCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// now retrieve/read from database using the primary key\n\t\tCustomer theCustomer = currentSession.get(Customer.class, theId);\n\n\t\treturn theCustomer;\n\t}", "String getName() {\n\t\treturn customer.getName();\n\t}", "public String getCustomer_Name() {\n return customer_Name;\n }", "public String getCustomerName()\n\t{\n\t\treturn name;\n\t}", "public SalerCustomer getSalerCustomer(int uid) {\n\t\treturn this.salerCustomerMapper.getSalerCustomer(uid);\n\t}", "public Integer getCustomerId()\n {\n return customerId;\n }", "@Override\n public CustomerEntity getCustomerData(Long id) {\n return customerPersistencePort.getUser(id);\n }", "@Override\n\tpublic CustomerData getCustomer(Long custId) {\n\t \n\t\tOptional<CustomerData> optionalCust = customerRepository.findById(custId);\n\t\t//Optional object use for check if a customer id is existing or not\n if(optionalCust.isPresent()) {\n return optionalCust.get(); //if customer id is exist then return a value\n }\n\t\treturn null;\n\t\t\n\t}" ]
[ "0.8003456", "0.75431615", "0.7328253", "0.71085393", "0.7101368", "0.7090473", "0.7033036", "0.7021769", "0.7014882", "0.70148224", "0.70111394", "0.70000917", "0.69925106", "0.6986287", "0.69807863", "0.69325", "0.6932492", "0.69123465", "0.6886823", "0.6886823", "0.6843476", "0.6823288", "0.68011177", "0.6739394", "0.6739394", "0.6739394", "0.6739394", "0.6737366", "0.66997576", "0.66680616", "0.6640347", "0.6633794", "0.66298914", "0.65607846", "0.65142274", "0.6513207", "0.6511922", "0.65014386", "0.64672107", "0.6445162", "0.6437674", "0.6422763", "0.64130193", "0.63887554", "0.63887554", "0.63634336", "0.6353161", "0.632914", "0.63028914", "0.62961054", "0.6295555", "0.6293945", "0.6292958", "0.62555665", "0.6234105", "0.61979043", "0.61672884", "0.6159584", "0.6157589", "0.61556774", "0.6144498", "0.61394966", "0.6125178", "0.61250085", "0.6123927", "0.6119074", "0.611402", "0.6112355", "0.6108464", "0.61070246", "0.6097973", "0.6088701", "0.6078211", "0.60716695", "0.6066555", "0.6063704", "0.6055667", "0.6053765", "0.60463715", "0.60463715", "0.60443765", "0.6040995", "0.6040052", "0.6039113", "0.6034504", "0.60340387", "0.60340387", "0.6032508", "0.6031486", "0.60276043", "0.6019495", "0.60152066", "0.6012952", "0.60125214", "0.60118926", "0.6009041", "0.59975135", "0.59849226", "0.59841895", "0.59806716", "0.597543" ]
0.0
-1
getting the customer from principle
public ResponseEntity<String> returnOrder(String email, long orderProductId) { User user = userRepository.findByEmail(email); Customer customer = customerRepository.findCustomerById(user.getId()); OrderProduct orderProduct = orderProductRepository.findById(orderProductId); if(orderProduct == null) { return new ResponseEntity("Invalid orderProduct id",HttpStatus.NOT_FOUND); } long orderIdForOrderProductId = orderProductRepository.getOrderIdForOrderProductId(orderProduct.getId()); Orders orders = ordersRepository.findById(orderIdForOrderProductId); if(customer.getId() != orders.getCustomer().getId()) { return new ResponseEntity("You don't have any product with specific orderProduct id." ,HttpStatus.NOT_FOUND); } OrderStatus orderStatus = orderStatusRepository.findById(orderProduct.getId()); if(!orderStatus.getToStatus().equals(DELIVERED)) { return new ResponseEntity("Cannot place return request for order. Order is in " +orderStatus.getToStatus()+" state.",HttpStatus.BAD_REQUEST); } orderStatus.setFromStatus(orderStatus.getToStatus()); orderStatus.setToStatus(RETURN_REQUESTED); orderStatus.setTransitionNotesComments("Return requested by customer."); orderStatusRepository.save(orderStatus); return new ResponseEntity("Return request placed successfully.",HttpStatus.ACCEPTED); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Customer getCustomer();", "io.opencannabis.schema.commerce.OrderCustomer.Customer getCustomer();", "public ReturnCustomer getCustomer() {\n return (ReturnCustomer) get(\"customer\");\n }", "com.google.ads.googleads.v6.resources.Customer getCustomer();", "public Customer getCustomer() {\r\n return customer;\r\n }", "public Customer getCustomer()\n {\n return customer;\n }", "public CustomerProfile getCustomerProfile();", "public Customer getCustomer()\n {\n return customer;\n }", "Customer getCustomer() {\n\t\treturn customer;\n\t}", "Customer getCustomerById(int customerId);", "public Customer getCustomer() {\n return customer;\n }", "public Customer getCustomer()\n {\n return this.customer;\n }", "public String getCustomer(String custId);", "public Customer getCustomer() {\n return this.customer;\n }", "public String getCustomer() {\n return customer;\n }", "private Role getCustomerRole() {\n\t\tRole role = roleRepo.findByName(\"CUSTOMER\");\n\t\treturn role;\n\t}", "static customer getCustomer(String uid) {\n return null;\n }", "public Customer getCustomerByName(String customerName);", "public Customer getCustomer() {\r\n\t\treturn customer;\r\n\t}", "public Customer getCustomer() {\r\n\t\treturn customer;\r\n\t}", "public Customer getCustomer() {\r\n\t\treturn this.customer;\r\n\t}", "public org.tempuri.Customers getCustomer() {\r\n return customer;\r\n }", "CustomerDTO getUserForProof(String name,CustomerDTO customerDTO) throws EOTException;", "Customer createCustomer();", "Customer createCustomer();", "Customer createCustomer();", "Customer createCustomer();", "public Customer getCustomer() {\n\t\treturn customer;\n\t}", "protected Optional<Customer> getCustomer() {\n return customer.getOptional();\n }", "@Override\n public String getCustomer() {\n return this.customerName;\n }", "public de.htwg_konstanz.ebus.framework.wholesaler.vo.Customer getCustomer () {\r\n\t\treturn customer;\r\n\t}", "CustomerDTO getCustomerDetails(Long customerId,String userName) throws EOTException;", "@Override\n public Customer getCustomer(Long userId) {\n Optional<Customer> customer = customerDao.getCustomer(userId);\n if (!customer.isPresent()) {\n logger.error(\"Customer with this id {} doesn't exist\", userId);\n }\n return customer.orElseThrow(ResourceNotFoundException::new);\n }", "public String getName()\n {\n return customer;\n }", "@Override\n public CustomerDetails viewAccount(String user) {\n CustomerDetails details=customerRepository.findById(user).get(); \n log.debug(user);\n return details; \n\n }", "public Integer getCustomer() {\n return customer;\n }", "Customer getCustomerById(final Long id);", "public Customer getCustomerDetails() throws Exception {\n\t\treturn customersDBDAO.getOneCustomer(customerId);\n\t}", "public Customer fetchProfileDetails(Long userId) {\n\t\tCustomer cust = null;\n\t\ttry (Connection con = DBUtil.getInstance().getDbConnection()) {\n\t\t\t//Create object of Customer DAO & call respective method\n\t\t\tCustomerDAO customerDAO = new CustomerDAO(con); \n\t\t\tcust=customerDAO.getCustomerById(userId);\n\t\t} catch (SQLException e) {\n\t\t\tthrow new ServiceException(\"Internal Server issue to validate CRM User, Please contact admin\");\n\t\t}\n\t\treturn cust;\n\t}", "public String getCustomerName() \n {\n return customerName;\n }", "public CustomerEntity getCustomer(String accessToken) throws AuthorizationFailedException {\n CustomerAuthEntity customerAuthEntity = customerAuthDao.getCustomerAuthByAccessToken(accessToken);\n\n if (customerAuthEntity == null) {\n throw new AuthorizationFailedException(\"ATHR-001\", \"Customer is not Logged in.\");\n }\n if (customerAuthEntity.getLogoutAt() != null) {\n throw new AuthorizationFailedException(\"ATHR-002\", \"Customer is logged out. Log in again to access this endpoint.\");\n }\n\n final ZonedDateTime now = ZonedDateTime.now();\n\n if (customerAuthEntity.getExpiresAt().compareTo(now) <= 0) {\n throw new AuthorizationFailedException(\"ATHR-003\", \"Your session is expired. Log in again to access this endpoint.\");\n }\n return customerAuthEntity.getCustomer();\n }", "String getCustomerID();", "public Principal getPrincipal();", "java.lang.String getCustomerId();", "java.lang.String getCustomerId();", "public Customer getCustomer() {\n String __key = this.customerId;\n if (customer__resolvedKey == null || customer__resolvedKey != __key) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n CustomerDao targetDao = daoSession.getCustomerDao();\n Customer customerNew = targetDao.load(__key);\n synchronized (this) {\n customer = customerNew;\n \tcustomer__resolvedKey = __key;\n }\n }\n return customer;\n }", "public String getCustomerName(){\n return customerName;\n }", "public java.lang.String getOrgCustomer() {\n\treturn orgCustomer;\n}", "public static Person getARandonCustomer(){\n Person person = RandomPerson.get().next();\n return person;\n }", "public String getCustomerName()\n {\n return customerName;\n }", "public CustomerTO getCustomerDetails(CustomerTO customerTo) throws Exception\r\n\t{\r\n\t\treturn new CustomerService().getCustomerDetails(customerTo);\r\n\t}", "public int getCustomerId() \n {\n return customerId;\n }", "public Customer getCustomer(int phone)\n\t{\n\t\treturn CustomerContainer.getInstance().getCustomer(phone);\n\t}", "public Customer getCustomer(int userId) {\n\t\tIterator i = customers.iterator();\n\t\twhile (i.hasNext()) {\n\t\t\tCustomer customer = (Customer) i.next();\n\t\t\tif (userId == customer.getUserId()) {\n\t\t\t\treturn customer;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public com.huawei.www.bme.cbsinterface.cbs.businessmgr.IndividualCustomer getCustomer() {\r\n return customer;\r\n }", "Customer authenticateCustomer(LoginRequestDto loginRequestDto) throws UserNotFoundException;", "public au.gov.asic.types.AccountIdentifierType getCustomer()\n {\n synchronized (monitor())\n {\n check_orphaned();\n au.gov.asic.types.AccountIdentifierType target = null;\n target = (au.gov.asic.types.AccountIdentifierType)get_store().find_element_user(CUSTOMER$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public interface CustomerService {\n \n\n public void createCustomer(CustomerDto customerDto);\n \n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\") \n public CustomerDto getCustomer(Long id) throws DataAccessException;\n\n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\") \n public void updateCustomer(CustomerDto customer) throws DataAccessException;\n\n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\") \n public void removeCustomer(CustomerDto customer) throws DataAccessException;\n\n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\") \n public Collection<CustomerDto> findAllCustomer() throws DataAccessException;\n\n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\") \n public Collection<CustomerDto> searchCustomer(String name) throws DataAccessException;\n\n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\")\n public CustomerDto findByUsername(String username);\n}", "public CustomerEOImpl getCustomerEO() {\r\n return (CustomerEOImpl) getEntity(2);\r\n }", "@Override\r\n\tpublic Customer getCustomer(int customerID) {\n\t\treturn null;\r\n\t}", "public io.opencannabis.schema.commerce.OrderCustomer.Customer getCustomer() {\n return customer_ == null ? io.opencannabis.schema.commerce.OrderCustomer.Customer.getDefaultInstance() : customer_;\n }", "public Customer createCustomer() {\n return new Customer(nameNested, surNameNested, ageNested, streetNested);\n }", "public ICustomer getCustomer(final Customer customer) {\n ICustomer iCustomer = null;\n if(CustomerType.REGULAR.equals(customer.getCustomerType())) {\n iCustomer = new RegularCustomer();\n }\n return iCustomer;\n }", "@GetMapping(value = { \"/charCustomer\" })\n public String initCharCustomer(Principal principal, Model model) {\n model.addAttribute(\"employee\", new CustomUserDetails());\n LogUtils.getLogger().info(\"Inside doLogin!\");\n UserDetails loginedUser = (UserDetails) ((Authentication) principal)\n .getPrincipal();\n LogUtils.getLogger().info(loginedUser);\n model.addAttribute(\"userName\", loginedUser.getUsername());\n return \"ChartCustomer\";\n }", "public Customer createCustomer() {\r\n\t\ttry {\r\n\t\t\treturn manager.createCustomer();\t\t\t\r\n\t\t}catch(SQLException e) {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"The manager was unable to create a new customer\");\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "Account getAccount();", "private Customer storeCustomer(Customer customer){\n customerRestService.createCustomer(customer);\n return customer;\n }", "public io.opencannabis.schema.commerce.OrderCustomer.Customer getCustomer() {\n if (customerBuilder_ == null) {\n return customer_ == null ? io.opencannabis.schema.commerce.OrderCustomer.Customer.getDefaultInstance() : customer_;\n } else {\n return customerBuilder_.getMessage();\n }\n }", "String getCustomerNameById(int customerId);", "public ResponseEntity<?> createCustomer(customer.controller.Customer customer);", "@Override\r\n\tpublic Customer getCustomer(String custId) {\r\n\t\tOptional<Customer> optionalCustomer = null;\r\n\t\tCustomer customer = null;\r\n\t\toptionalCustomer = customerRepository.findById(custId);\r\n\t\tif (optionalCustomer.isPresent()) {\r\n\t\t\tcustomer = optionalCustomer.get();\r\n\t\t\treturn customer;\r\n\t\t} else {\r\n\t\t\tthrow new EntityNotFoundException(\"Customer With Id \" + custId + \" does Not Exist.\");\r\n\t\t}\r\n\r\n\t}", "public String getCustomerName() {\r\n return name.getName();\r\n }", "public Customer displayCustomer(int cid);", "public Customer getCustomer(int ma) {\n\t\tCustomer cus = new Customer();\n\t\ttry {\n\t\t\tPreparedStatement stm = conn.prepareStatement(Queries.GET_CUSTOMER_BY_ID);\n\t\t\tstm.setInt(1, ma);\n\t\t\tResultSet rs = stm.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tcus = CustomerConverter.convert(rs);\n\t\t\t\t\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn cus;\n\t}", "org.beangle.security.session.protobuf.Model.Account getPrincipal();", "Customer getCustomerByMobileNumber(String mobileNumber) throws EOTException;", "public static void CreateCustomer() \r\n\t{\n\t\t\r\n\t}", "Customer findById(Long id);", "public String getCustomerName() {\n return customerName;\n }", "public String getCustomerName() {\n return customerName;\n }", "public Account getCoor() {\r\n return coor;\r\n }", "@Override\n\tpublic Customer getCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t//now retrieve/read from database using the primary key or id..\n\t\tCustomer theCustomer = currentSession.get(Customer.class,theId);\n\n\t\treturn theCustomer;\n\t}", "@Override\n\tpublic Customer getCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t// now retrieve/read from database using the primary key\n\t\tCustomer theCustomer = currentSession.get(Customer.class, theId);\n\t\t\n\t\treturn theCustomer;\n\t}", "@Nullable\n public DelegatedAdminCustomer get() throws ClientException {\n return send(HttpMethod.GET, null);\n }", "@Override\n\tpublic Customer getCustomer(int customerId) {\n\t\tSession session=sessionFactory.getCurrentSession();\n\t\ttry {\n\t\t\t\n\t\t\tCustomer customer =session.get(Customer.class, customerId);\n\t\t return customer;\t\t\t\n\t\t}\n\t\tcatch(HibernateException exception){\n\t\t\texception.printStackTrace();\n\t\t}\n\t\treturn null;\n\t\t\n\t}", "public int getCustomerId() {\n return customerId;\n }", "public int getCustomerId() {\n return customerId;\n }", "Customers createCustomers();", "public interface CustomerService {\n List<Customer> findPubsea();\n\n List<Customer> findCustomer();\n\n void update(Customer customer);\n\n /**\n * 公海客户认领\n * @param customerId\n * @param loginUser\n */\n void claim(Long customerId, LoginUser loginUser);\n}", "@Test\n public void testCustomerFactoryGetCustomer() {\n CustomerController customerController = customerFactory.getCustomerController();\n customerController.addCustomer(CUSTOMER_NAME, CUSTOMER_CONTACT, false);\n assertEquals(CUSTOMER_NAME, customerController.getCustomer(1).getName());\n }", "@Override\n\tpublic String getName(){\n\t\treturn customer.getName();\n\t}", "public int getCustId(){\n return this.custId;\r\n }", "public static Customer getCustomer(int _customerID) throws SQLException{\n ResultSet rs = ConnectionManager.selectAllColumns(\"Tbl_Customer_GroupNo\", \"CustomerID= \"+_customerID);\n if(rs.next()){\n Customer cus = new Customer(rs.getInt(\"CustomerId\"), rs.getString(\"FirstName\"), rs.getString(\"LastName\"), rs.getString(\"Address\"), rs.getString(\"Email\"), rs.getString(\"Phone\"));\n return cus;\n }else{\n return null;\n }\n }", "@Override\n\tpublic Customer getCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// now retrieve/read from database using the primary key\n\t\tCustomer theCustomer = currentSession.get(Customer.class, theId);\n\n\t\treturn theCustomer;\n\t}", "String getName() {\n\t\treturn customer.getName();\n\t}", "public String getCustomer_Name() {\n return customer_Name;\n }", "public String getCustomerName()\n\t{\n\t\treturn name;\n\t}", "public SalerCustomer getSalerCustomer(int uid) {\n\t\treturn this.salerCustomerMapper.getSalerCustomer(uid);\n\t}", "public Integer getCustomerId()\n {\n return customerId;\n }", "@Override\n public CustomerEntity getCustomerData(Long id) {\n return customerPersistencePort.getUser(id);\n }", "@Override\n\tpublic CustomerData getCustomer(Long custId) {\n\t \n\t\tOptional<CustomerData> optionalCust = customerRepository.findById(custId);\n\t\t//Optional object use for check if a customer id is existing or not\n if(optionalCust.isPresent()) {\n return optionalCust.get(); //if customer id is exist then return a value\n }\n\t\treturn null;\n\t\t\n\t}" ]
[ "0.8003456", "0.75431615", "0.7328253", "0.71085393", "0.7101368", "0.7090473", "0.7033036", "0.7021769", "0.7014882", "0.70148224", "0.70111394", "0.70000917", "0.69925106", "0.6986287", "0.69807863", "0.69325", "0.6932492", "0.69123465", "0.6886823", "0.6886823", "0.6843476", "0.6823288", "0.68011177", "0.6739394", "0.6739394", "0.6739394", "0.6739394", "0.6737366", "0.66997576", "0.66680616", "0.6640347", "0.6633794", "0.66298914", "0.65607846", "0.65142274", "0.6513207", "0.6511922", "0.65014386", "0.64672107", "0.6445162", "0.6437674", "0.6422763", "0.64130193", "0.63887554", "0.63887554", "0.63634336", "0.6353161", "0.632914", "0.63028914", "0.62961054", "0.6295555", "0.6293945", "0.6292958", "0.62555665", "0.6234105", "0.61979043", "0.61672884", "0.6159584", "0.6157589", "0.61556774", "0.6144498", "0.61394966", "0.6125178", "0.61250085", "0.6123927", "0.6119074", "0.611402", "0.6112355", "0.6108464", "0.61070246", "0.6097973", "0.6088701", "0.6078211", "0.60716695", "0.6066555", "0.6063704", "0.6055667", "0.6053765", "0.60463715", "0.60463715", "0.60443765", "0.6040995", "0.6040052", "0.6039113", "0.6034504", "0.60340387", "0.60340387", "0.6032508", "0.6031486", "0.60276043", "0.6019495", "0.60152066", "0.6012952", "0.60125214", "0.60118926", "0.6009041", "0.59975135", "0.59849226", "0.59841895", "0.59806716", "0.597543" ]
0.0
-1
getting the customer from principle
public DisplayOrderDto viewOrder(String email, long orderId) { User user = userRepository.findByEmail(email); Customer customer = customerRepository.findCustomerById(user.getId()); DisplayOrderDto displayOrderDto = new DisplayOrderDto(); // getting order from order id Orders orders = ordersRepository.findById(orderId); // checking for valid order id if (orders == null) { throw new OrderNotFoundException("Invalid Order id."); } // checking if order belong to currently logged in customer if(customer.getId() != orders.getCustomer().getId()) { throw new OrderNotFoundException("No order found in your order list with id: "+orderId); } // setting dto values displayOrderDto.setOrderId(orders.getId()); displayOrderDto.setCreationDate(orders.getDateCreated()); displayOrderDto.setPaymentMethod(orders.getPaymentMethod()); displayOrderDto.setTotalAmount(orders.getAmountPaid()); Address customerAddress = new Address(); customerAddress.setAddressLine(orders.getCustomerAddressAddressLine()); customerAddress.setCity(orders.getCustomerAddressCity()); customerAddress.setCountry(orders.getCustomerAddressCountry()); customerAddress.setLabel(orders.getCustomerAddressLabel()); customerAddress.setState(orders.getCustomerAddressState()); customerAddress.setZipCode(orders.getCustomerAddressZipCode()); displayOrderDto.setAddress(customerAddress); // list to be passed in displayOrderDto List<OrderProductWithStatusDto> orderProductWithStatusDtoList = new ArrayList<>(); // getting all order products for the order List<OrderProduct> orderProductList = orderProductRepository.findOrderProductForOrderId(orders.getId()); for (OrderProduct orderProduct: orderProductList) { // getting product variation for particular orderProduct Product product = productRepository .findById(productVariationRepository .getProductIdForVariationId(orderProduct.getProductVariation() .getId())); // getting the status of particular order product OrderStatus orderStatus = orderStatusRepository.findById(orderProduct.getId()); OrderProductWithStatusDto orderProductWithStatusDto = new OrderProductWithStatusDto(); orderProductWithStatusDto.setStatus(orderStatus.getToStatus().toString()); orderProductWithStatusDto.setMetadata(orderProduct.getProductVariationMetadata()); orderProductWithStatusDto.setPrice(orderProduct.getPrice()); orderProductWithStatusDto.setQuantity(orderProduct.getQuantity()); orderProductWithStatusDto.setVariationId(orderProduct.getProductVariation().getId()); orderProductWithStatusDto.setName(product.getName()); // adding to the list of orderProductWithStatusDto that will be passed in displayOrderDto orderProductWithStatusDtoList.add(orderProductWithStatusDto); } // setting the orderProductWithStatusDtoList to displayOrderDto displayOrderDto.setProducts(orderProductWithStatusDtoList); return displayOrderDto; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Customer getCustomer();", "io.opencannabis.schema.commerce.OrderCustomer.Customer getCustomer();", "public ReturnCustomer getCustomer() {\n return (ReturnCustomer) get(\"customer\");\n }", "com.google.ads.googleads.v6.resources.Customer getCustomer();", "public Customer getCustomer() {\r\n return customer;\r\n }", "public Customer getCustomer()\n {\n return customer;\n }", "public CustomerProfile getCustomerProfile();", "public Customer getCustomer()\n {\n return customer;\n }", "Customer getCustomer() {\n\t\treturn customer;\n\t}", "Customer getCustomerById(int customerId);", "public Customer getCustomer() {\n return customer;\n }", "public Customer getCustomer()\n {\n return this.customer;\n }", "public String getCustomer(String custId);", "public Customer getCustomer() {\n return this.customer;\n }", "public String getCustomer() {\n return customer;\n }", "private Role getCustomerRole() {\n\t\tRole role = roleRepo.findByName(\"CUSTOMER\");\n\t\treturn role;\n\t}", "static customer getCustomer(String uid) {\n return null;\n }", "public Customer getCustomerByName(String customerName);", "public Customer getCustomer() {\r\n\t\treturn customer;\r\n\t}", "public Customer getCustomer() {\r\n\t\treturn customer;\r\n\t}", "public Customer getCustomer() {\r\n\t\treturn this.customer;\r\n\t}", "public org.tempuri.Customers getCustomer() {\r\n return customer;\r\n }", "CustomerDTO getUserForProof(String name,CustomerDTO customerDTO) throws EOTException;", "Customer createCustomer();", "Customer createCustomer();", "Customer createCustomer();", "Customer createCustomer();", "public Customer getCustomer() {\n\t\treturn customer;\n\t}", "protected Optional<Customer> getCustomer() {\n return customer.getOptional();\n }", "@Override\n public String getCustomer() {\n return this.customerName;\n }", "public de.htwg_konstanz.ebus.framework.wholesaler.vo.Customer getCustomer () {\r\n\t\treturn customer;\r\n\t}", "CustomerDTO getCustomerDetails(Long customerId,String userName) throws EOTException;", "@Override\n public Customer getCustomer(Long userId) {\n Optional<Customer> customer = customerDao.getCustomer(userId);\n if (!customer.isPresent()) {\n logger.error(\"Customer with this id {} doesn't exist\", userId);\n }\n return customer.orElseThrow(ResourceNotFoundException::new);\n }", "public String getName()\n {\n return customer;\n }", "@Override\n public CustomerDetails viewAccount(String user) {\n CustomerDetails details=customerRepository.findById(user).get(); \n log.debug(user);\n return details; \n\n }", "public Integer getCustomer() {\n return customer;\n }", "Customer getCustomerById(final Long id);", "public Customer getCustomerDetails() throws Exception {\n\t\treturn customersDBDAO.getOneCustomer(customerId);\n\t}", "public Customer fetchProfileDetails(Long userId) {\n\t\tCustomer cust = null;\n\t\ttry (Connection con = DBUtil.getInstance().getDbConnection()) {\n\t\t\t//Create object of Customer DAO & call respective method\n\t\t\tCustomerDAO customerDAO = new CustomerDAO(con); \n\t\t\tcust=customerDAO.getCustomerById(userId);\n\t\t} catch (SQLException e) {\n\t\t\tthrow new ServiceException(\"Internal Server issue to validate CRM User, Please contact admin\");\n\t\t}\n\t\treturn cust;\n\t}", "public String getCustomerName() \n {\n return customerName;\n }", "public CustomerEntity getCustomer(String accessToken) throws AuthorizationFailedException {\n CustomerAuthEntity customerAuthEntity = customerAuthDao.getCustomerAuthByAccessToken(accessToken);\n\n if (customerAuthEntity == null) {\n throw new AuthorizationFailedException(\"ATHR-001\", \"Customer is not Logged in.\");\n }\n if (customerAuthEntity.getLogoutAt() != null) {\n throw new AuthorizationFailedException(\"ATHR-002\", \"Customer is logged out. Log in again to access this endpoint.\");\n }\n\n final ZonedDateTime now = ZonedDateTime.now();\n\n if (customerAuthEntity.getExpiresAt().compareTo(now) <= 0) {\n throw new AuthorizationFailedException(\"ATHR-003\", \"Your session is expired. Log in again to access this endpoint.\");\n }\n return customerAuthEntity.getCustomer();\n }", "String getCustomerID();", "public Principal getPrincipal();", "java.lang.String getCustomerId();", "java.lang.String getCustomerId();", "public Customer getCustomer() {\n String __key = this.customerId;\n if (customer__resolvedKey == null || customer__resolvedKey != __key) {\n if (daoSession == null) {\n throw new DaoException(\"Entity is detached from DAO context\");\n }\n CustomerDao targetDao = daoSession.getCustomerDao();\n Customer customerNew = targetDao.load(__key);\n synchronized (this) {\n customer = customerNew;\n \tcustomer__resolvedKey = __key;\n }\n }\n return customer;\n }", "public String getCustomerName(){\n return customerName;\n }", "public java.lang.String getOrgCustomer() {\n\treturn orgCustomer;\n}", "public static Person getARandonCustomer(){\n Person person = RandomPerson.get().next();\n return person;\n }", "public String getCustomerName()\n {\n return customerName;\n }", "public CustomerTO getCustomerDetails(CustomerTO customerTo) throws Exception\r\n\t{\r\n\t\treturn new CustomerService().getCustomerDetails(customerTo);\r\n\t}", "public int getCustomerId() \n {\n return customerId;\n }", "public Customer getCustomer(int phone)\n\t{\n\t\treturn CustomerContainer.getInstance().getCustomer(phone);\n\t}", "public Customer getCustomer(int userId) {\n\t\tIterator i = customers.iterator();\n\t\twhile (i.hasNext()) {\n\t\t\tCustomer customer = (Customer) i.next();\n\t\t\tif (userId == customer.getUserId()) {\n\t\t\t\treturn customer;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public com.huawei.www.bme.cbsinterface.cbs.businessmgr.IndividualCustomer getCustomer() {\r\n return customer;\r\n }", "Customer authenticateCustomer(LoginRequestDto loginRequestDto) throws UserNotFoundException;", "public au.gov.asic.types.AccountIdentifierType getCustomer()\n {\n synchronized (monitor())\n {\n check_orphaned();\n au.gov.asic.types.AccountIdentifierType target = null;\n target = (au.gov.asic.types.AccountIdentifierType)get_store().find_element_user(CUSTOMER$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public interface CustomerService {\n \n\n public void createCustomer(CustomerDto customerDto);\n \n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\") \n public CustomerDto getCustomer(Long id) throws DataAccessException;\n\n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\") \n public void updateCustomer(CustomerDto customer) throws DataAccessException;\n\n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\") \n public void removeCustomer(CustomerDto customer) throws DataAccessException;\n\n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\") \n public Collection<CustomerDto> findAllCustomer() throws DataAccessException;\n\n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\") \n public Collection<CustomerDto> searchCustomer(String name) throws DataAccessException;\n\n //@PreAuthorize(\"hasRole('ROLE_USER') or hasRole('ROLE_ADMIN')\")\n public CustomerDto findByUsername(String username);\n}", "public CustomerEOImpl getCustomerEO() {\r\n return (CustomerEOImpl) getEntity(2);\r\n }", "@Override\r\n\tpublic Customer getCustomer(int customerID) {\n\t\treturn null;\r\n\t}", "public io.opencannabis.schema.commerce.OrderCustomer.Customer getCustomer() {\n return customer_ == null ? io.opencannabis.schema.commerce.OrderCustomer.Customer.getDefaultInstance() : customer_;\n }", "public Customer createCustomer() {\n return new Customer(nameNested, surNameNested, ageNested, streetNested);\n }", "public ICustomer getCustomer(final Customer customer) {\n ICustomer iCustomer = null;\n if(CustomerType.REGULAR.equals(customer.getCustomerType())) {\n iCustomer = new RegularCustomer();\n }\n return iCustomer;\n }", "@GetMapping(value = { \"/charCustomer\" })\n public String initCharCustomer(Principal principal, Model model) {\n model.addAttribute(\"employee\", new CustomUserDetails());\n LogUtils.getLogger().info(\"Inside doLogin!\");\n UserDetails loginedUser = (UserDetails) ((Authentication) principal)\n .getPrincipal();\n LogUtils.getLogger().info(loginedUser);\n model.addAttribute(\"userName\", loginedUser.getUsername());\n return \"ChartCustomer\";\n }", "public Customer createCustomer() {\r\n\t\ttry {\r\n\t\t\treturn manager.createCustomer();\t\t\t\r\n\t\t}catch(SQLException e) {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"The manager was unable to create a new customer\");\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "Account getAccount();", "private Customer storeCustomer(Customer customer){\n customerRestService.createCustomer(customer);\n return customer;\n }", "public io.opencannabis.schema.commerce.OrderCustomer.Customer getCustomer() {\n if (customerBuilder_ == null) {\n return customer_ == null ? io.opencannabis.schema.commerce.OrderCustomer.Customer.getDefaultInstance() : customer_;\n } else {\n return customerBuilder_.getMessage();\n }\n }", "String getCustomerNameById(int customerId);", "public ResponseEntity<?> createCustomer(customer.controller.Customer customer);", "@Override\r\n\tpublic Customer getCustomer(String custId) {\r\n\t\tOptional<Customer> optionalCustomer = null;\r\n\t\tCustomer customer = null;\r\n\t\toptionalCustomer = customerRepository.findById(custId);\r\n\t\tif (optionalCustomer.isPresent()) {\r\n\t\t\tcustomer = optionalCustomer.get();\r\n\t\t\treturn customer;\r\n\t\t} else {\r\n\t\t\tthrow new EntityNotFoundException(\"Customer With Id \" + custId + \" does Not Exist.\");\r\n\t\t}\r\n\r\n\t}", "public String getCustomerName() {\r\n return name.getName();\r\n }", "public Customer displayCustomer(int cid);", "public Customer getCustomer(int ma) {\n\t\tCustomer cus = new Customer();\n\t\ttry {\n\t\t\tPreparedStatement stm = conn.prepareStatement(Queries.GET_CUSTOMER_BY_ID);\n\t\t\tstm.setInt(1, ma);\n\t\t\tResultSet rs = stm.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tcus = CustomerConverter.convert(rs);\n\t\t\t\t\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn cus;\n\t}", "org.beangle.security.session.protobuf.Model.Account getPrincipal();", "Customer getCustomerByMobileNumber(String mobileNumber) throws EOTException;", "public static void CreateCustomer() \r\n\t{\n\t\t\r\n\t}", "Customer findById(Long id);", "public String getCustomerName() {\n return customerName;\n }", "public String getCustomerName() {\n return customerName;\n }", "public Account getCoor() {\r\n return coor;\r\n }", "@Override\n\tpublic Customer getCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t//now retrieve/read from database using the primary key or id..\n\t\tCustomer theCustomer = currentSession.get(Customer.class,theId);\n\n\t\treturn theCustomer;\n\t}", "@Override\n\tpublic Customer getCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t// now retrieve/read from database using the primary key\n\t\tCustomer theCustomer = currentSession.get(Customer.class, theId);\n\t\t\n\t\treturn theCustomer;\n\t}", "@Nullable\n public DelegatedAdminCustomer get() throws ClientException {\n return send(HttpMethod.GET, null);\n }", "@Override\n\tpublic Customer getCustomer(int customerId) {\n\t\tSession session=sessionFactory.getCurrentSession();\n\t\ttry {\n\t\t\t\n\t\t\tCustomer customer =session.get(Customer.class, customerId);\n\t\t return customer;\t\t\t\n\t\t}\n\t\tcatch(HibernateException exception){\n\t\t\texception.printStackTrace();\n\t\t}\n\t\treturn null;\n\t\t\n\t}", "public int getCustomerId() {\n return customerId;\n }", "public int getCustomerId() {\n return customerId;\n }", "Customers createCustomers();", "public interface CustomerService {\n List<Customer> findPubsea();\n\n List<Customer> findCustomer();\n\n void update(Customer customer);\n\n /**\n * 公海客户认领\n * @param customerId\n * @param loginUser\n */\n void claim(Long customerId, LoginUser loginUser);\n}", "@Test\n public void testCustomerFactoryGetCustomer() {\n CustomerController customerController = customerFactory.getCustomerController();\n customerController.addCustomer(CUSTOMER_NAME, CUSTOMER_CONTACT, false);\n assertEquals(CUSTOMER_NAME, customerController.getCustomer(1).getName());\n }", "@Override\n\tpublic String getName(){\n\t\treturn customer.getName();\n\t}", "public int getCustId(){\n return this.custId;\r\n }", "public static Customer getCustomer(int _customerID) throws SQLException{\n ResultSet rs = ConnectionManager.selectAllColumns(\"Tbl_Customer_GroupNo\", \"CustomerID= \"+_customerID);\n if(rs.next()){\n Customer cus = new Customer(rs.getInt(\"CustomerId\"), rs.getString(\"FirstName\"), rs.getString(\"LastName\"), rs.getString(\"Address\"), rs.getString(\"Email\"), rs.getString(\"Phone\"));\n return cus;\n }else{\n return null;\n }\n }", "@Override\n\tpublic Customer getCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// now retrieve/read from database using the primary key\n\t\tCustomer theCustomer = currentSession.get(Customer.class, theId);\n\n\t\treturn theCustomer;\n\t}", "String getName() {\n\t\treturn customer.getName();\n\t}", "public String getCustomer_Name() {\n return customer_Name;\n }", "public String getCustomerName()\n\t{\n\t\treturn name;\n\t}", "public SalerCustomer getSalerCustomer(int uid) {\n\t\treturn this.salerCustomerMapper.getSalerCustomer(uid);\n\t}", "public Integer getCustomerId()\n {\n return customerId;\n }", "@Override\n public CustomerEntity getCustomerData(Long id) {\n return customerPersistencePort.getUser(id);\n }", "@Override\n\tpublic CustomerData getCustomer(Long custId) {\n\t \n\t\tOptional<CustomerData> optionalCust = customerRepository.findById(custId);\n\t\t//Optional object use for check if a customer id is existing or not\n if(optionalCust.isPresent()) {\n return optionalCust.get(); //if customer id is exist then return a value\n }\n\t\treturn null;\n\t\t\n\t}" ]
[ "0.8002897", "0.7542574", "0.7327766", "0.7107928", "0.71012694", "0.7090339", "0.70326364", "0.7021637", "0.70147586", "0.70140785", "0.7011035", "0.699999", "0.69917166", "0.69861996", "0.69805604", "0.69321936", "0.6932157", "0.69117844", "0.6886742", "0.6886742", "0.6843398", "0.68229795", "0.6800915", "0.67390233", "0.67390233", "0.67390233", "0.67390233", "0.6737286", "0.6699568", "0.6667957", "0.6640194", "0.6633316", "0.66292644", "0.65606964", "0.65139085", "0.65128356", "0.65110993", "0.65009344", "0.64667165", "0.6445018", "0.6437229", "0.64220834", "0.6412888", "0.63879985", "0.63879985", "0.6363108", "0.63530284", "0.6329038", "0.63024217", "0.6295958", "0.6295096", "0.6293473", "0.62925565", "0.6255127", "0.62340266", "0.6197608", "0.61669207", "0.61592036", "0.6157428", "0.615543", "0.6144185", "0.61391395", "0.6125051", "0.6124801", "0.6123755", "0.6118576", "0.61139596", "0.61120516", "0.61077684", "0.61068624", "0.60973155", "0.60885155", "0.60779256", "0.60712636", "0.6066244", "0.6063181", "0.6055637", "0.60530174", "0.6046237", "0.6046237", "0.60444295", "0.6040481", "0.6039559", "0.60387677", "0.60340005", "0.6033564", "0.6033564", "0.60322094", "0.6031172", "0.60276055", "0.60195035", "0.6014837", "0.6012609", "0.60120296", "0.60118264", "0.60090107", "0.5997372", "0.5984708", "0.59836966", "0.5980115", "0.5974743" ]
0.0
-1
finding user by email getting from principal
public ResponseEntity<String> changeOrderStatusForSeller(String email, long orderProductId , OrderStatus.Status fromStatus, OrderStatus.Status toStatus) { User user = userRepository.findByEmail(email); // finding the seller from user id we got from email Seller seller = sellerRepository.findSellerByUserId(user.getId()); List<DisplayOrderDto> displayOrderDtoList = new ArrayList<>(); List<Long> sellerProductIds = productRepository.getAllProductIdsForSellerId(seller.getId()); List<Long> productVariationIds = productVariationRepository .getAllVariationIdsForListOfProductId(sellerProductIds); List<Long> orderProductsIds = orderProductRepository.getOrderProductIdsForVariationIdList(productVariationIds); if(!orderProductsIds.contains(orderProductId)) { return new ResponseEntity("You are not owner of this product.",HttpStatus.BAD_REQUEST); } if(!checkTransition(fromStatus,toStatus)) { return new ResponseEntity("Invalid status transition",HttpStatus.BAD_REQUEST); } System.out.println(">>>>>>>>>>>>>>>>>>>>>>"+checkTransition(fromStatus,toStatus)); // getting the status of particular order product OrderStatus orderStatus = orderStatusRepository.findById(orderProductId); orderStatus.setFromStatus(fromStatus); orderStatus.setToStatus(toStatus); orderProductRepository.save(orderStatus); return new ResponseEntity("Status changed successfully.",HttpStatus.ACCEPTED); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "User getUserByEmail(final String email);", "User getUserByEmail(String email);", "public User getUserByEmail(String email);", "public User getUserByEmail(String email);", "public User retrieveUserByEmail(String email) throws ApplicationException;", "public static User findUserByEmail(String email) {\n\n User user = null;\n User targetUser = new User();\n IdentityMap<User> userIdentityMap = IdentityMap.getInstance(targetUser);\n\n String findUserByEmail = \"SELECT * FROM public.member \"\n + \"WHERE email = '\" + email + \"'\";\n\n PreparedStatement stmt = DBConnection.prepare(findUserByEmail);\n\n try {\n ResultSet rs = stmt.executeQuery();\n while(rs.next()) {\n user = load(rs);\n }\n DBConnection.close(stmt);\n rs.close();\n\n } catch (SQLException e) {\n System.out.println(\"Exception!\");\n e.printStackTrace();\n }\n if(user != null) {\n targetUser = userIdentityMap.get(user.getId());\n if(targetUser == null) {\n userIdentityMap.put(user.getId(), user);\n return user;\n }\n else\n return targetUser;\n }\n return user;\n }", "User findUserByEmail(String email) throws Exception;", "ServiceUserEntity getUserByEmail(String email);", "public User getUser(String emailId);", "public User getUser(String email);", "@Override\n\tpublic ERSUser getUserByEmail(String email) {\n\t\treturn userDao.selectUserByEmail(email);\n\t}", "public User findUserByEmail(final String email);", "User find(String email);", "public User getUser(String email) {\r\n\t\tOptional<User> optionalUser = null;\r\n\t\tUser user = null;\r\n\t\ttry {\r\n\t\t\toptionalUser = userList().stream().filter(u -> u.getUserEmail().equals(email)).findFirst();\r\n\t\t\tif (optionalUser.isPresent()) {\r\n\t\t\t\tuser = optionalUser.get();\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"error find user : \" + email + \" \" + e);\r\n\t\t\t\r\n\t\t}\r\n\t\treturn user;\r\n\t}", "public User getUser(String email) {\n for (User user : list) {\n if (user.getEmail().equals(email))\n return user; // user found. Return this user.\n }\n return null; // user not found. Return null.\n }", "@Override\n public User getUserByEmail(final String email){\n Query query = sessionFactory.getCurrentSession().createQuery(\"from User where email = :email\");\n query.setParameter(\"email\", email);\n return (User) query.uniqueResult();\n }", "@Override\n\tpublic User getUser(String email){\n\t\tif (userExists(email) == true)\n\t\t\treturn users[searchIndex(email)];\n\t\telse\n\t\t\treturn null;\n\t}", "@Override\n public OpenScienceFrameworkUser findOneUserByEmail(final String email) {\n final OpenScienceFrameworkUser user = findOneUserByUsername(email);\n if (user != null) {\n return user;\n }\n\n // check emails\n try {\n // JPA Hibernate does not support postgres query array operations, use postgres native queries\n // `query.setParameter()` does not work, use string concatenation instead\n final Query query= entityManager.createNativeQuery(\n \"select u.* from osf_osfuser u where u.emails @> '{\" + email + \"}'\\\\:\\\\:varchar[]\",\n OpenScienceFrameworkUser.class\n );\n return (OpenScienceFrameworkUser) query.getSingleResult();\n } catch (final PersistenceException e) {\n LOGGER.error(e.toString());\n return null;\n }\n }", "@Override\r\n\tpublic User getByMail(String eMail) {\n\r\n\t\treturn userDao.get(eMail);\r\n\t}", "public User get(String emailID);", "public synchronized User getUser(String email) {\r\n return (email == null) ? null : email2user.get(email);\r\n }", "public User getUser(String email) {\n\n Query query = new Query(\"User\")\n .setFilter(new Query.FilterPredicate(\"email\", FilterOperator.EQUAL, email));\n PreparedQuery results = datastore.prepare(query);\n Entity userEntity = results.asSingleEntity();\n if(userEntity == null) {return null; }\n String aboutMe = (String) userEntity.getProperty(\"aboutMe\");\n //ArrayList<String> advisees = new ArrayList<String>(Arrays.asList(((String) userEntity.getProperty(\"advisees\")).split(\" \")));\n //ArrayList<String> advisors = new ArrayList<String>(Arrays.asList(((String) userEntity.getProperty(\"advisors\")).split(\" \")));\n String fn = (String) userEntity.getProperty(\"firstName\");\n String ln = (String) userEntity.getProperty(\"lastName\");\n User user = new User(email, fn, ln, aboutMe);\n return user;\n\n }", "@Override\n\tpublic User getUser(String email) {\n\t\treturn userDatabase.get(email);\n\t}", "User findUserByEmail(String userEmail);", "@Override\n public TechGalleryUser getUserByEmail(final String email) throws NotFoundException {\n TechGalleryUser tgUser = userDao.findByEmail(email);\n// TechGalleryUser tgUser = userDao.findByEmail(\"example@example.com\");\n if (tgUser == null) {\n throw new NotFoundException(ValidationMessageEnums.USER_NOT_EXIST.message());\n } else {\n return tgUser;\n }\n }", "@Override\n public User getByEmail(String email) {\n List<JdbcUser> jdbcUserList = jdbcTemplate.query(\"SELECT * FROM users WHERE email=?\", ROW_MAPPER, email);\n JdbcUser jdbcUser = DataAccessUtils.singleResult(jdbcUserList);\n if (jdbcUser == null) {\n return null;\n }\n return convertToUser(jdbcUser);\n }", "@Override\n public final CustomerUser getCustomerUserByEmail(final String email) {\n\treturn (CustomerUser) getEntityManager()\t\n\t\t.createQuery(\"select customer from \"\n\t\t\t+ CustomerUser.class.getName()\n\t\t\t+ \" as customer where customer.email =:email\")\n\t\t.setParameter(\"email\", email)\n\t\t.getSingleResult();\n }", "Optional<JUser> readByEmail(String email);", "public User getUserByEmail(String email)throws EntityNotFoundException\n\t{\n\t\treturn userDao.getById(email);\n\t}", "public User findByEmail(String email);", "public User findByEmail(String email);", "public User findByEmail(String email);", "User findByEmail(String email);", "User findByEmail(String email);", "User findByEmail(String email);", "User findByEmail(String email);", "User findByEmail(String email);", "User findByEmail(String email);", "@SuppressWarnings(\"unchecked\")\n\tpublic User getUserByEmail(String email, User user) {\n\t\tSession session = sessionFactory.openSession();\n\t\tList<User> userList = new ArrayList<>();\n\t\tuserList = (List<User>) session.createQuery(\"from User\");\n\t\tfor (User tempUser : userList) {\n\t\t\tif (tempUser.getEmail().equalsIgnoreCase(email)) {\n\t\t\t\tuser = tempUser;\n\t\t\t\tSystem.out.println(\"get uswer by email: \" + user);\n\t\t\t\treturn user;\n\t\t\t}\n\t\t}\n\t\treturn user;\n\t}", "public User readByEmail(String email) throws DaoException;", "public static UserEntity search(String email) {\n\t\tDatastoreService datastore = DatastoreServiceFactory\n\t\t\t\t.getDatastoreService();\n\n\t\tQuery gaeQuery = new Query(\"users\");\n\t\tPreparedQuery pq = datastore.prepare(gaeQuery);\n\t\t\n\t\tfor (Entity entity : pq.asIterable()) {\n\t\t\t \n\t\t\tif (entity.getProperty(\"email\").toString().equals(email)) {\n\t\t\t\tUserEntity returnedUser = new UserEntity(entity.getProperty(\n\t\t\t\t\t\t\"name\").toString(), entity.getProperty(\"email\")\n\t\t\t\t\t\t.toString());\n\t\t\t\treturnedUser.setId(entity.getKey().getId());\n\t\t\t\treturn returnedUser;\n\t\t\t }\nelse{\n\t\t\t\t\n }\n\t\t}\n\n\t\treturn null;\n\t}", "public Users findBYEmailId(String email) {\r\n Query query = em.createNamedQuery(\"findUserByEmailId\");\r\n query.setParameter(\"uemail\", email);\r\n if (!query.getResultList().isEmpty()) {\r\n Users registeredUser = (Users) query.getSingleResult();\r\n return registeredUser;\r\n }\r\n return null;\r\n }", "public AppUser findByEmail(String email);", "public User getUser(String email) {\n\n Query query = new Query(\"User\").setFilter(new Query.FilterPredicate(\"email\", FilterOperator.EQUAL, email));\n PreparedQuery results = datastore.prepare(query);\n Entity userEntity = results.asSingleEntity();\n if (userEntity == null) {\n return null;\n }\n\n String aboutMe = (String) userEntity.getProperty(\"aboutMe\");\n User user = new User(email, aboutMe);\n\n return user;\n }", "@Transactional\r\n\tpublic User getUserByEmail(String email) {\n\t\treturn cuser.getUserByEmail(email);\r\n\t}", "public User getUserByEmail(String email) {\r\n\t\treturn usersPersistence.getUserByEmail(email);\r\n\t}", "public User getUser(String email) {\n\t\tLog.i(TAG, \"return a specific user with email.\");\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tString getcurrentUser = \"select * from \" + TABLE_USER\n\t\t\t\t+ \" where email='\" + email + \"'\";\n\t\tCursor cursor = db.rawQuery(getcurrentUser, null);\n\t\tcursor.moveToFirst();\n\t\tif (cursor.isAfterLast()) return null;\n\t\tUser user = new User(cursor.getInt(0), cursor.getString(1), cursor.getString(2));\n\t\treturn user;\n\t}", "public static Utente findByEmail(String email) {\n \t\n\t\tSession session = DatabaseManager.getSession();\n Transaction tx = null;\n Utente user = null;\n \n \n try {\n tx = session.getTransaction();\n tx.begin();\n \n CriteriaBuilder builder = session.getCriteriaBuilder();\n CriteriaQuery<Utente> criteria = builder.createQuery(Utente.class);\n Root<Utente> root = criteria.from(Utente.class);\n \n criteria.select(root).where(builder.equal(root.get(Utente_.email), email));\n\n user = session.createQuery(criteria).getSingleResult();\n \n tx.commit();\n \n } catch (Exception e) {\n if (tx != null) {\n tx.rollback();\n \n }\n e.printStackTrace();\n } finally {\n session.close();\n }\n \n return user;\n \n \n }", "private User getUserFromUsersBy(String email, String password){\n \tUser user=null;\n \tfor(User u : users ){\n \t\tif(u.getEmail().equals(email)&&u.getPassword().equals(password)){\n \t\t\tuser = u;\n \t\t}\n \t}\n \treturn user;\n }", "public User getUserFromDetails(String email, String username) {\r\n // Gets the collection of users and creates a query\r\n MongoCollection<Document> users = mongoDB.getCollection(\"Users\");\r\n Document query = new Document(\"email\", email);\r\n query.append(\"username\", username);\r\n\r\n // Loops over users found matching the details, returning the first one\r\n for (User user : users.find(query, User.class)) {\r\n return user;\r\n }\r\n\r\n // Returns null if none are found\r\n return null;\r\n }", "@Override\n\tpublic Users findUserByEmail(String email) {\n\t\treturn iUserDao.findUserByEmail(email);\n\t}", "public User getUserByEmail(final String email) {\n return em.find(User.class, email.toLowerCase());\n }", "public User findByEmail(String email){\n return userRepository.findByEmail(email);\n }", "User findOneByMail(String mail);", "UserDTO findUserByEmail(String email);", "public User getUserByEmail(String email){\n\t\tif(email == null)\n\t\t\treturn null;\n\t\tSessionFactory sf = HibernateUtil.getSessionFactory();\n\t\tSession session = sf.openSession();\n\t\tTransaction tx = session.beginTransaction();\n\t\ttry{\n\t\t\tCriteria criteria = session.createCriteria(User.class);\n\t\t\tObject obj = criteria.add(Restrictions.eq(\"email\", email)).uniqueResult();\n\t\t\tif(obj == null)\n\t\t\t\treturn null;\n\t\t\tUser user = (User)obj;\n\t\t\ttx.commit();\n\t\t\treturn user;\t\t\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t}", "@Override\n\tpublic User findByEmail(String email)\n\t{\n\t\tif (email == null) return null;\n\t\n\t\tString property = User.PROP_EMAIL;\n\t\tLabel label = RoostNodeType.USER;\n\t\tUser user = findByUniqueProperty(label, property, email);\n\t\t\n\t\treturn user;\n\t}", "public User findEmail(String email){\n\t\t\n boolean found = false;\t\t\t\t\t\t\t\t\t\t/* ====> Boolean controls while loop */\n User correct = new User();\t\t\t\t\t\t\t\t\t/* ====> Create instance of the correct user*/\n User marker = new User();\t\t\t\t\t\t\t\t\t/* ====> Create a marker */\n marker = this.head;\t\t\t\t\t\t\t\t\t\t\t/* ====> Set the marker at the beginning of the list */\n \n // Loop keeps on going until the correct User is not found or until the next User is null\n while(!found){ \n \tif (marker.getEmail().equals(email)){\t\t\t\t\t/* ====> If the marker found the right user based on its email */ \n \t\tfound = true;\t\t\t\t\t\t\t\t\t\t/* ====> Set found true, end loop */\n \t\tcorrect = marker;\t\t\t\t\t\t\t\t\t/* ====> Make correct point to the same User as marker */\n \t}\n \n else if (marker.getNext() == null){\t\t\t\t\t\t/* ====> If the marker reaches end of the list */ \n \tfound = true;\t\t\t\t\t\t\t\t\t\t/* ====> Set found true, end loop */\n \tcorrect = head;\t\t\t\t\t\t\t\t\t\t/* ====> Make correct point to the head */\n }\n \n else {\n \tmarker = marker.getNext();\t\t\t\t\t\t\t/* ====> Move marker to the next element of the list */\n }\n }\n \n return correct;\t\t\t\t\t\t\t\t\t\t\t\t/* ====> Return correct User */ \n \n\t}", "public UserTO getByEmail(String email) {\n\t\treturn getDao().getByEmail(email);\n\t}", "UserEntity findByEmail(String email);", "public VendorUser findVuserBYEmailId(String email) {\r\n Query query = em.createNamedQuery(\"findUserByEmailId\");\r\n query.setParameter(\"uemail\", email);\r\n if (!query.getResultList().isEmpty()) {\r\n VendorUser registeredUser = (VendorUser) query.getSingleResult();\r\n return registeredUser;\r\n }\r\n return null;\r\n }", "public Utente retriveByEmail(String email) {\n\t\t\n\t\tTypedQuery<Utente> query = em.createNamedQuery(Utente.FIND_BY_Email, Utente.class);\n query.setParameter(\"email\", email); //parameters by name \n return query.getSingleResult();\n\t}", "public User getUserFromEmail(final String email) {\n LOG.info(\"Getting user with email {}\", email);\n return userRepo.getUserByEmail(email);\n }", "public User_info search_User_info(String email) {\n\t\t\t\tSystem.out.println(user_loginDao.searchId(email));\r\n\t\t\t\treturn user_infoDao.search_User(user_loginDao.findUserByEmail(email).getId());\r\n\t}", "@Override\n\tpublic IUserAccount getByEMail(String eMail) {\n\t\treturn null;\n\t}", "public User getUserByEmail(String email, String apikey) throws UserNotFoundException, APIKeyNotFoundException{\n if (authenticateApiKey(apikey)){\n return userMapper.getUserByEmail(email);\n }else throw new UserNotFoundException(\"User not found\");\n }", "@Override\n\tpublic UserVO searchEmail(String email) throws Exception {\n\t\treturn dao.searchEmail(email);\n\t}", "public User getUserByEmail(String email) throws SQLException {\n\t\ttry {\n\n\t\t\tthis.TryConnect();\n\n\t\t\tthis.m_objData.SetStoreName(\"sys_user_getByEmail(?)\");\n\t\t\tthis.m_objData.Parameters.setString(1, email);\n\n\t\t\tResultSetMapper util = new ResultSetMapper<User>();\n\n\t\t\tResultSet lstResult = this.m_objData.ExecToResultSet();\n\n\t\t\tList<User> lstUser = util.mapRersultSetToObject(lstResult,\n\t\t\t\t\tUser.class);\n\n\t\t\tif (lstUser == null)\n\t\t\t\treturn null;\n\n\t\t\tif (lstUser.size() > 0)\n\t\t\t\treturn lstUser.get(0);\n\t\t\treturn null;\n\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\n\t\t\tthis.TryDisconnect();\n\t\t}\n\n\t\treturn null;\n\t}", "private static void lookupAccount(String email) {\n\t\t\n\t}", "@Override\n\t@Transactional\n\tpublic UserDetails loadUserByUsername(String email) throws UsernameNotFoundException {\n\t\tUserDetails user = null;\n\t\ttry {\n\t\t\t\n\t\t\tuser = searchUser(email);\n\t\t\treturn user;\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tthrow new RuntimeException(e);\t\t\n\t\t}\n\t}", "public User getUserByEmail(String email) throws Exception {\n\t\tSession session = null;\n\t\tTransaction tx = null;\n\t\ttry{\n\t\t\tsession = getSessionFactory().openSession();\n\t\t\tif(session != null) {\n\t\t\t\ttx = session.beginTransaction();\n\t\t\t\tQuery query = session.createQuery(\"FROM User u where u.email =:email\");\n\t\t\t\tquery.setParameter(\"email\", email);\n\t\t\t\tList list = query.list();\n\t\t\t\tif(list != null && list.size() >0) {\n\t\t\t\t\treturn (User)list.get(0);\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t} catch (Throwable e) {\n\t\t\tthrow new Exception(e);\n\t\t} finally{\n\t\t\tif(tx != null) {\n\t\t\t\ttx.commit();\n\t\t\t}\n\t\t\tif(session != null) {\n\t\t\t\tsession.close();\n\t\t\t}\n\t\t}\n\t}", "public static User getUserByEmail(String email) {\n\t\t// getting user by email\n\t\treturn dao.getUserByEmail(email);\n\t}", "Optional<User> findByEmail(String email);", "Optional<User> findByEmail(String email);", "java.lang.String getUserEmail();", "@Override\n\t@Transactional\n\tpublic UserDetails searchUser(String email) {\n\t\ttry {\t\n\t\t\t\n\t\t\tQuery qUser = manager.createQuery(\"from Usuario where email = :email and ativo = :ativo\")\n\t\t\t\t\t.setParameter(\"email\", email)\n\t\t\t\t\t.setParameter(\"ativo\", true);\n\t\t\tList<Usuario> usuarios = qUser.getResultList();\n\t\t\t\n\t\t\t\n\t\t\tQuery qAcess = manager.createQuery(\"from Acesso where usuario.id = :id and acesso = :acesso\")\n\t\t\t\t\t.setParameter(\"id\", usuarios.get(0).getId())\n\t\t\t\t\t.setParameter(\"acesso\", true);\n\t\t\tList<Acesso> acessos = qAcess.getResultList();\n\t\t\n\t\t\t/*\n\t\t\tAcesso acesso = new Acesso();\n\t\t\tUsuario usuario = new Usuario();\n\t\t\t\n\t\t\tusuario.setNome(\"Daniel\");\n\t\t\tusuario.setEmail(\"\");\n\t\t\tacesso.setSenha(\"$2a$10$jdQpiR35ZZVdrFQYUW7q/evtl1Xr6ED3y.pIzukdgzvF0PIBtrmzS\");\n\t\t\tacesso.setAcesso(true);\n\t\t\tacesso.setUsuario(usuario);\n\t\t\t\t\t\n\t\t\treturn new UsuarioDetails(acesso.getUsuario().getNome(), acesso.getUsuario().getEmail(), acesso.getSenha(), acesso.isAcesso());\n\t\t\t*/\n\t\t\treturn new UsuarioDetails(acessos.get(0).getUsuario().getNome(), acessos.get(0).getUsuario().getEmail(), acessos.get(0).getSenha(), acessos.get(0).isAcesso());\n\t\n\t\t}catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tthrow new RuntimeException(e);\t\t\n\t\t} finally {\n\t\t\t// TODO: handle finally clause\n\t\t\tmanager.close();\n\t\t}\n\t}", "public UserDTO findByEmail(String email) throws ApplicationException {\n\n\t\tlog.debug(\"Model findByLogin Started\");\n\t\tConnection conn = null;\n\t\tUserDTO dto = null;\n\n\t\tStringBuffer sql = new StringBuffer(\"Select * from st_user where email=?\");\n\n\t\ttry {\n\t\t\tconn = JDBCDataSource.getConnection();\n\t\t\tPreparedStatement stmt = conn.prepareStatement(sql.toString());\n\t\t\tstmt.setString(1, email);\n\t\t\tResultSet rs = stmt.executeQuery();\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tdto = new UserDTO();\n\t\t\t\tdto.setId(rs.getLong(1));\n\t\t\t\tdto.setFirstName(rs.getString(2));\n\t\t\t\tdto.setLastName(rs.getString(3));\n\t\t\t\tdto.setEmail(rs.getString(4));\n\t\t\t\tdto.setPassword(rs.getString(5));\n\t\t\t\tdto.setDob(rs.getDate(6));\n\t\t\t\tdto.setMobileNo(rs.getString(7));\n\t\t\t\tdto.setRoleId(rs.getLong(8));\n\t\t\t\tdto.setGender(rs.getString(9));\n\t\t\t\tdto.setCreatedBy(rs.getString(10));\n\t\t\t\tdto.setModifiedBy(rs.getString(11));\n\t\t\t\tdto.setCreatedDatetime(rs.getTimestamp(12));\n\t\t\t\tdto.setModifiedDatetime(rs.getTimestamp(13));\n\n\t\t\t}\n\t\t\trs.close();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlog.error(\"Database Exception\", e);\n\t\t\tthrow new ApplicationException(\"Exception:Exception in getting User by login\");\n\n\t\t} finally {\n\t\t\tJDBCDataSource.closeConnection(conn);\n\t\t}\n\t\tlog.debug(\"Model findByLogin End\");\n\t\treturn dto;\n\t}", "public User existsProfile(String email) {\n StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();\n StrictMode.setThreadPolicy(policy);\n\n SuperBooleanBuilder query = new SuperBooleanBuilder();\n query.put(\"email\", email);\n Search search = new Search.Builder(query.toString())\n .addIndex(INDEX_NAME)\n .addType(User.class.toString())\n .build();\n\n User result = null;\n try {\n result = client.execute(search).getSourceAsObject(User.class);\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n return result;\n }", "public UsersModel getUserById(String userEmail);", "public User getUserByEmail(String email_) {\n User user = new User();\n \n return user;\n }", "public static User getUser(String email){\n Connection connect = null;\n ResultSet set = null;\n String getUserSQL = \"SELECT * FROM users WHERE email =?\";\n User user = null;\n\n // Get User Details Try Block:\n try {\n // Set Connection:\n connect = DBConfig.getConnection();\n // Prepare SQL Statement:\n PreparedStatement statement = connect.prepareStatement(getUserSQL);\n // Set Attributes / Parameters:\n statement.setString(1, email);\n // Execute Statement:\n set = statement.executeQuery();\n // Check For Results:\n while (set.next()){\n user = new User();\n // Set User Details / Information\n user.setFirst_name(set.getString(\"first_name\"));\n user.setLast_name(set.getString(\"last_name\"));\n user.setEmail(set.getString(\"email\"));\n user.setUser_type(set.getString(\"user_type\"));\n user.setCreated_at(set.getDate(\"created_at\"));\n }\n // End Of Check For Results:.\n }catch (Exception e){\n e.printStackTrace();\n }\n return user;\n }", "@Override\n\tpublic UserDetails loadUserByUsername(String email) throws UsernameNotFoundException {\n\n\t\t Optional<com.java.redactrix.entity.User> user = userService.findUserByEmail(email);\n\t\t if(user.isPresent()) {\n\t\t\t System.out.println(\"User Found\");\n\t\t\t com.java.redactrix.entity.User getUser = user.get();\n\t\t\t String password = getUser.getPassword();\n\t\t\t return new org.springframework.security.core.userdetails.User(email, password, new ArrayList<>());\n\t\t }\n\t\t else {\n\t\t\t return null;\n\t\t }\n\t}", "@Override\n\tpublic UserDetails loadUserByUsername(String email) throws UsernameNotFoundException {\n\t\t// ako se ne radi nasledjivanje, paziti gde sve treba da se proveri email\n\t\tKorisnik user = korisnikService.pronadjiPoMejlu(email);\n\t\t\n\t\tif (user == null) {\n\t\t\tthrow new UsernameNotFoundException(String.format(\"No user found with username '%s'.\", email)); \n\t\t} else {\n\t\t\treturn user;\n\t\t}\n\t}", "public User findByEmail(String email) {\n\t\tCriteria crit = createEntityCriteria();\r\n\t\tcrit.add(Restrictions.eq(\"email\", email));\r\n\t\tUser user = (User) crit.uniqueResult();\r\n\t\tif(user != null) {\r\n\t\t\tHibernate.initialize(user.getUserProfiles());\r\n\t\t}\r\n\t\treturn user;\r\n\t}", "public Usuario buscar(String email) {\n Usuario Usuario=null;\n //percorre toda a lista e checa se o Usuario existe\n for(Usuario u:listaUse){\n if (u.getEmail().equals(email) ){\n Usuario = u;\n return Usuario;\n }\n }\n return Usuario;\n }", "Account findByEmail(String email);", "public User findByEmail(String email) {\n return userRepository.findByEmail(email);\n }", "public User findByEmail(String email) {\n return userRepository.findByEmail(email);\n }", "public HashMap<String, String> getUserByMail(String mail) {\n HashMap<String, String> member = new HashMap<String, String>();\n member.put(\"P_CommunityMembers.email_address\", mail );\n HashMap<String, String> details = dbController.getUserByParameter(member);\n return details;\n }", "public User usuario() {\r\n Authentication auth = SecurityContextHolder.getContext().getAuthentication();\r\n User user = userService.findUserByEmail(auth.getName());\r\n return user;\r\n }", "public User usuario() {\r\n Authentication auth = SecurityContextHolder.getContext().getAuthentication();\r\n User user = userService.findUserByEmail(auth.getName());\r\n return user;\r\n }", "@Transactional\r\n\t\t\t@Override\r\n\t\t\tpublic UserDetails loadUserByUsername(String email) throws UsernameNotFoundException {\r\n\t\t\t\tco.simplon.users.User account = service.findByEmail(email);\r\n\t\t\t\tif(account != null) {\r\n\t\t\t\t\treturn new User2(account.getEmail(), account.getPassword(), true, true, true, true,\r\n\t\t\t\t\t\t\tgetAuthorities(account.getRole()));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow new UsernameNotFoundException (\"Impossible de trouver le compte :\"+ email +\".\");\n\t\t\t\t}\r\n\t\t\t}", "@Nullable\n public User getUserFromDatabase(String email) {\n User userAccount = null;\n try {\n SQLiteDatabase db = getReadableDatabase();\n\n Cursor userAccountCursor = db.query(\n TABLE_USERS,\n new String[]{KEY_USER_NAME, KEY_USER_EMAIL, KEY_USER_PASS, KEY_USER_PROFILE_PICTURE_URL, KEY_USER_HAS_POST_TABLE},\n KEY_USER_EMAIL + \" = ?\",\n new String[]{email},\n null,\n null,\n null\n );\n\n if (userAccountCursor != null && userAccountCursor.getCount() > 0 && userAccountCursor.moveToFirst()) {\n userAccount = new User(\n userAccountCursor.getString(0),\n userAccountCursor.getString(1),\n userAccountCursor.getString(2),\n userAccountCursor.getInt(3),\n userAccountCursor.getInt(4)\n );\n }\n\n if (userAccountCursor != null) {\n userAccountCursor.close();\n }\n\n } catch (SQLiteException e) {\n Log.d(TAG, \"Can get user account\");\n }\n\n return userAccount;\n }", "public Owner getUserByEmailAndPassword(String email, String password) {\r\n Owner user = null;\r\n\r\n try {\r\n\r\n String query = \"select * from Owner where email =? and password=?\";\r\n PreparedStatement pstmt = con.prepareStatement(query);\r\n pstmt.setString(1, email);\r\n pstmt.setString(2, password);\r\n\r\n ResultSet set = pstmt.executeQuery();\r\n\r\n if (set.next()) {\r\n user = new Owner();\r\n\r\n// data from db\r\n String name = set.getString(\"name\");\r\n// set to user object\r\n user.setName(name);\r\n\r\n user.setId(set.getInt(\"id\"));\r\n user.setEmail(set.getString(\"email\"));\r\n user.setPassword(set.getString(\"password\"));\r\n \r\n }\r\n\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n\r\n return user;\r\n }", "public Customer retrieveCustomerByEmail(String email) throws CustomerNotFoundException;", "public User getUser(String email) {\n\t\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\t\t\n\t\t\tCursor cursor = db.query(TABLE_USERS, new String[] { KEY_USER_ID, \n\t\t\t\t\tKEY_PASSWORD, KEY_EMAIL }, KEY_EMAIL + \" = ?\",\n\t\t\t\t\tnew String[] { String.valueOf(email) }, null, null, null, null);\n\t\t\tif (cursor != null)\n\t\t\t\tcursor.moveToFirst();\n\t\t\t\n\t\t\tUser user = new User(\n\t\t\t\t\tcursor.getString(cursor.getColumnIndex(KEY_PASSWORD)),\n\t\t\t\t\tcursor.getString(cursor.getColumnIndex(KEY_EMAIL)),\n\t\t\t\t\tInteger.parseInt(cursor.getString(0)) );\n\t\t\t// return user\n\t\t\treturn user;\n\t\t\t}", "@Override\n\tpublic UserVO getUserIdToEmail(String email, String pw) {\n\t\treturn mapper.getUserIdToEmail(email, pw);\n\t}", "public static User authenticate(String email, String password) \n {\n \tAccountDetails temp = AccountDetails.authenticate(email, password);\n \t\n if (temp != null)\n return find.ref(temp.userId);\n else\n return null;\n }", "@Query(value = \"SELECT user FROM User user WHERE user.active = 1 AND user.email = :email\")\n User findByEmailId(@Param(\"email\") String email);", "Optional<User> findOneByEmail(String email);", "public User findByEmail(String email) {\n\t\treturn repo.findByEmail(email);\r\n\t}" ]
[ "0.7927186", "0.79241735", "0.77675116", "0.77675116", "0.7666949", "0.76375085", "0.7621739", "0.76173204", "0.76086617", "0.7604376", "0.75719357", "0.75663316", "0.75501525", "0.75432014", "0.7532579", "0.7504978", "0.7484767", "0.74465615", "0.74051344", "0.73695385", "0.7349202", "0.7332523", "0.7285249", "0.7274269", "0.72645676", "0.7236686", "0.7234902", "0.71989465", "0.7189619", "0.7188941", "0.7188941", "0.7188941", "0.718051", "0.718051", "0.718051", "0.718051", "0.718051", "0.718051", "0.7180209", "0.7176953", "0.7158321", "0.7145427", "0.71408176", "0.71237344", "0.7105531", "0.7099534", "0.7094007", "0.7084921", "0.7068632", "0.70513207", "0.7048299", "0.70297915", "0.70252126", "0.7014837", "0.7000763", "0.69858676", "0.698183", "0.6980377", "0.69782037", "0.6954621", "0.6950901", "0.69145393", "0.6896754", "0.6888556", "0.6881828", "0.68499315", "0.6836616", "0.6827512", "0.6827414", "0.6809617", "0.6800491", "0.6786472", "0.678483", "0.678483", "0.67673993", "0.6765558", "0.67443436", "0.6737713", "0.67297274", "0.66999435", "0.66928905", "0.667212", "0.6669143", "0.66663706", "0.665274", "0.664507", "0.6631475", "0.6631475", "0.66019255", "0.6599279", "0.6599279", "0.6584535", "0.6573926", "0.65731084", "0.65679765", "0.65422153", "0.6538001", "0.65229017", "0.6517948", "0.6514479", "0.6503245" ]
0.0
-1
returns total amount for the order
private double returnOrderTotalAmount(List<ProductVariation> productVariationList, long customerId) { double totalAmount = 0; for (ProductVariation productVariation: productVariationList) { int quantityFromCart = cartRepository.getQuantityForCustomerIdAndVariationId(customerId , productVariation.getId()); totalAmount+=(productVariation.getPrice()*quantityFromCart); } return totalAmount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private double getOrderTotal() {\n double d = 0;\n\n for (Pizza p : pizzas) {\n d += p.calcTotalCost();\n }\n\n return d;\n }", "private double calculateTotal(){\r\n double total = 0;\r\n for(int i = 0; i < orderList.size(); i++){\r\n total += orderList.getOrder(i).calculatePrice();\r\n }\r\n return total;\r\n }", "@Transient\n public Double getTotalOrderPrice() {\n double sum = 0;\n for (OrderItem oi : getOrderItems()) {\n sum += oi.getTotalPrice();\n }\n return sum;\n }", "BigDecimal calculateTotalPrice(Order order);", "public double sumMoney(){\n\t\tdouble result = 0;\n\t\tfor(DetailOrder detail : m_DetailOrder){\n\t\t\tresult += detail.calMoney();\n\t\t}\n\t\tif(exportOrder == true){\n\t\t\tresult = result * 1.1;\n\t\t}\n\t\treturn result;\n\t}", "public double getTotal() {\n double total = 0.0;\n for (OrderItem i : getOrderItems()) {\n total += i.getOrderQuantity() * i.getPrice();\n }\n return total;\n }", "public float calcOrderTotal()\r\n\t{\r\n\t\tOrderItem temp;\r\n\t\tfloat total = 0;\r\n\t\t\r\n\t\t//iterate through list and get quantity and unit price of each item\r\n\t\t//then multiply together and add to running total\r\n\t\tfor (int x = 0; x < orderItemList.size(); x++)\r\n\t\t{\r\n\t\t\ttemp = orderItemList.get(x);\r\n\t\t\ttotal = total + (temp.getProductQuant() * temp.getProductPrice());\r\n\t\t}\r\n\t\t\r\n\t\treturn total;\r\n\t}", "@Override\n\tpublic Double getAmount(OrderDetails orderDetails) throws NotEnoguhQuantityException, CartNotEditable {\n\t\treturn orderDetails.getCart().getCartTotal();\n\t}", "int getTotal(){\n\t\treturn this.orderTotal;\n\t}", "public BigDecimal getOrderTotal()\r\n\t{\r\n\t\tSystem.out.println(\"Order Total is: \" + subtotal);\r\n\t\treturn subtotal;\r\n\t}", "public double calTotalAmount(){\n\t\tdouble result=0;\n\t\tfor (int i = 0; i < this.cd.size(); i++) {\n\t\t\tresult += this.cd.get(i).getPrice();\n\t\t}\n\t\treturn result;\n\t}", "public BigDecimal calculateTotal() {\r\n BigDecimal orderTotal = BigDecimal.ZERO;\r\n \r\n final Iterator<Item> iterator = myShoppingCart.keySet().iterator();\r\n \r\n while (iterator.hasNext()) {\r\n final BigDecimal currentOrderPrice = myShoppingCart.get(iterator.next());\r\n \r\n orderTotal = orderTotal.add(currentOrderPrice);\r\n }\r\n \r\n //if membership take %10 off the total cost\r\n if (myMembership) {\r\n if (orderTotal.compareTo(new BigDecimal(\"25.00\")) == 1) { //myOrderTotal > $25\r\n final BigDecimal discount = DISCOUNT_RATE.multiply(orderTotal); \r\n orderTotal = orderTotal.subtract(discount);\r\n }\r\n }\r\n \r\n return orderTotal.setScale(2, RoundingMode.HALF_EVEN);\r\n }", "public BigDecimal getTotalAmount() {\n return totalAmount;\n }", "public double getTotalCostOfOrder() {\n double total = 0;\n for (AbstractProduct item :\n this.itemsReceived) {\n total += item.getPrice();\n }\n return total;\n }", "TotalInvoiceAmountType getTotalInvoiceAmount();", "public float calculateTotalPrice(ArrayList<Food> totalOrder) {\n totalPrice = 0.0f;\n for (Food itemOfFood : totalOrder) {\n totalPrice = totalPrice + itemOfFood.getPrice();\n }\n return totalPrice;\n }", "public int getTotalAmount();", "public int getTotal() {\r\n\r\n\t\treturn getAmount() + getPrice();\r\n\r\n\t}", "private double calculateTotalPrice(Order order) {\n int nights = (int)(order.getVaucher().getDateTo().getTime() - order.getVaucher().getDateFrom().getTime())/(24 * 60 * 60 * 1000);\n double totalPrice = (nights * order.getVaucher().getHotel().getPricePerDay() + order.getVaucher().getTour().getPrice()) * (100 - order.getUser().getDiscount())/100;\n return totalPrice;\n }", "public float getTotalAmount() {\n float amt = 0.0f;\n for (Item e : cart) {\n amt += e.getQuantity() * getPrice(e.getName());\n }\n return amt;\n }", "public double getTotal() {\n double amount = 0;\n amount = (this.getQuantity() * product.getPrice().doubleValue());\n return amount;\n }", "public synchronized double getTotal(){\n double totalPrice=0;\n \n for(ShoppingCartItem item : getItems()){\n totalPrice += item.getTotal();\n }\n \n return totalPrice;\n }", "public Integer getOrderItemAmount() {\n return orderItemAmount;\n }", "public double getOrderTotalWithoutDiscount(String[] order) {\n\t\t//TODO\n\t\t\n\t\tdouble all=0.0;\n\t\tfor(String item:order) {\n\t\t\t\n\t\t\tall+=findItemPrice(item);\n\t\t}return all;\n\t\t\t\n\t\t\t\n\t\t}", "public BigDecimal getTotal() {\n return total;\n }", "public BigDecimal getTotal() {\n return total;\n }", "public BigDecimal total() {\n return executor.calculateTotal(basket);\n }", "@Override \r\n public double getPaymentAmount() \r\n { \r\n return getQuantity() * getPricePerItem(); // calculate total cost\r\n }", "public BigDecimal countTotalOrderPrice(Order order) {\n BigDecimal totalSum = new BigDecimal(0);\n\n\n // iterate through all products and count total price of them -\n // TODO: can be speeded up by adding the order_total_price parameter to the order object/table\n if (order != null && order.getOrderProducts().size() > 0) {\n Set<Product> orderProducts = order.getOrderProducts();\n for (Product product : orderProducts) {\n totalSum = totalSum.add(product.getProduct_price());\n }\n\n }\n return totalSum;\n }", "public Amount getAmountTotal() {\n return this.amountTotal;\n }", "public double getInvoiceAmount(){\n\t\t// declare a local variable of type double to store the invoice's total price\n\t\tdouble totalPrice;\n\t\t// the total price is given my multiplying the price per unit with the quantity\n\t\ttotalPrice = price * quantity;\t\t\n\t\t// return the value stored in the local variable totalPrice\n\t\treturn totalPrice;\n\t}", "public BigDecimal getTotalAmt() {\n\t\treturn totalAmt;\n\t}", "public BigDecimal getOrderMoney() {\n return orderMoney;\n }", "public double calculate(Map<String, Order> orders) {\n\n\t\t// This is the fix to avoid null pointer exception if Cart has null\n\t\t// orders\n\t\tif (orders == null) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"Orders are invalid. Input is null\");\n\t\t}\n\t\t// GrandTotal is initialized outside the loop to have the grand total\n\t\tdouble grandTotal = 0;\n\n\t\t// Iterate through the orders\n\t\tfor (Map.Entry<String, Order> entry : orders.entrySet()) {\n\t\t\tSystem.out.println(\"*******\" + entry.getKey() + \"*******\");\n\t\t\tOrder order = entry.getValue();\n\t\t\tdouble totalTax = 0;\n\t\t\tdouble total = 0;\n\n\t\t\t// Iterate through the items in the order\n\t\t\t/*\n\t\t\t * In lists indexes starts with 0 and ends with its size-1. We\n\t\t\t * should not include indexes which are not exist,it will leads to\n\t\t\t * ArrayIndexOutofBoundException. Hence logical operator = is\n\t\t\t * removed\n\t\t\t */\n\t\t\tfor (int i = 0; i < order.size(); i++) {\n\n\t\t\t\t// Calculate the taxes\n\t\t\t\tdouble tax = 0;\n\n\t\t\t\tItem item = order.get(i).getItem();\n\n\t\t\t\ttax = calculateTax(item);\n\n\t\t\t\t// Calculate the total price\n\t\t\t\tdouble totalPrice = item.getPrice() + tax;\n\n\t\t\t\t// Print out the item's total price\n\t\t\t\t// Wrong way of rounding off here it is fixed with the help of\n\t\t\t\t// BigDecimal\n\t\t\t\tSystem.out.println(item.getDescription() + \": \"\n\t\t\t\t\t\t+ roundToTwoDecimal(totalPrice));\n\n\t\t\t\t// Keep a running total\n\t\t\t\ttotalTax += tax;\n\t\t\t\ttotal += item.getPrice();\n\t\t\t}\n\n\t\t\t// Print out the total taxes\n\t\t\t// Wrong way of rounding off here it is fixed with the help of\n\t\t\t// BigDecimal\n\t\t\tSystem.out\n\t\t\t\t\t.println(\"Sales Tax: \" + roundToTwoDecimal(totalTax) /*\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * Math.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * floor\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * totalTax\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t */);\n\n\t\t\t// Fix to Total. Total should not include Tax\n\t\t\t// total = total + totalTax;\n\n\t\t\t// Print out the total amount\n\t\t\t// Wrong way of rounding off here it is fixed with the help of\n\t\t\t// BigDecimal\n\t\t\tSystem.out.println(\"Total: \" + roundToTwoDecimal(total) /*\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * Math.floor\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * (total *\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * 100) /\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * 100\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t */);\n\t\t\tgrandTotal += total;\n\t\t}\n\n\t\t// grandtotal = Math.floor(grandtotal * 100) / 100;\n\t\t// Bug Fix: 10 (Wrong way of rounding. To meet the requirements, we\n\t\t// should be using BigDecimal.)\n\t\tSystem.out.println(\"Sum of orders: \" + roundToTwoDecimal(grandTotal));\n\n\t\treturn grandTotal;\n\t}", "public float valorTotalItem()\r\n {\r\n float total = (produto.getValor() - (produto.getValor() * desconto)) * quantidade;\r\n return total;\r\n }", "public float totalCost() {\r\n float total = 0;\r\n for (int i=0; i<numItems; i++) {\r\n total += cart[i].getPrice();\r\n }\r\n return total;\r\n }", "public void calculateOrderTotals() {\n NumberFormat formatter = NumberFormat.getCurrencyInstance();\n\n //order number increases for each order\n orderNo++;\n System.out.println(\"- \" + \"OrderNo: \" + orderNo + \" -\");\n\n //cycle through the items in the order and add to the totals\n for(Item i : items) {\n\n incrementOrderTotal(i.getNumOfItems() * i.getPriceWithTax());\n incrementOrderSalesTax(i.getNumOfItems() * i.getTaxOnItem());\n\n System.out.println(i.getDescrip() + formatter.format(i.getPriceWithTax()));\n }\n\n //print out totals\n System.out.println(\"Sales taxes: \" + formatter.format(Math.round(getOrderSalesTax() * 100.0) / 100.0));\n System.out.println(\"Order total: \" + formatter.format(Math.round(getOrderTotal() * 100.0) / 100.0));\n System.out.println(\"\\n\");\n }", "@Override\n\tpublic int getAmount() {\n\t\treturn totalAmount;\n\t}", "public BigDecimal getTotalCashPayment() {\n return totalCashPayment;\n }", "@Override\n\tpublic double sumMoney() {\n\t\treturn ob.sumMoney();\n\t}", "public double getTotal() {\r\n\r\n return getSubtotal() + getTax();\r\n }", "public int totalAllocatedOrders();", "BigDecimal getTotal();", "BigDecimal getTotal();", "public BigDecimal getTotal() {\n BigDecimal total = new BigDecimal(0);\n for (Item item : items){\n int quantity = item.getQuantity();\n BigDecimal subtotal = item.getPrice().multiply(new BigDecimal(quantity));\n total = total.add(subtotal);\n }\n return total;\n }", "public void calculateOrderCost(){\n int tmpCost=0;\n for (Vehicle v : vehicleList){\n tmpCost+=v.getCost();\n }\n totalCost=tmpCost;\n }", "public BigDecimal getTotalPrice() {\n\t\t// the current total cost which the customer owes in the transaction\n\t\tBigDecimal total = new BigDecimal(0);\n\n\t\tArrayList<Item> currentPurchases = purchaseList.getCurrentPurchases(); \n\n\t\tfor (Item item : currentPurchases) {\n\t\t\ttotal = total.add(this.getItemPrice(item));\n\t\t}\n\n\t\treturn total;\n\t}", "public String getWalletTotal() {\n return \"$\" + wallet.getMoney();\n }", "public BigDecimal getValorTotal() {\r\n \treturn valorUnitario.setScale(5, BigDecimal.ROUND_HALF_EVEN).multiply(quantidade.setScale(3, BigDecimal.ROUND_HALF_EVEN)).setScale(3, BigDecimal.ROUND_DOWN).subtract(valorDesconto).setScale(3, BigDecimal.ROUND_HALF_EVEN);\r\n }", "public double getTotal(){\n\t\tdouble Total = 0;\n\t\t\n\t\tfor(LineItem lineItem : lineItems){\n\t\t\tTotal += lineItem.getTotal();\t\n\t\t}\n\t\treturn Total;\n\t}", "public BigDecimal countTotalOrderPriceDiscount(Order order) {\n\n return order.getTotalOrderPrice().multiply(\n new BigDecimal(order.getOrder_discount())).divide(new BigDecimal(100));\n }", "void calculateTotalPrice(){\n totalPrice = 0;\n cartContents.forEach(Product-> this.totalPrice = totalPrice + Product.getSellPrice());\n }", "public double getBillTotal(){\n\t\treturn user_cart.getBillTotal();\n\t}", "public double getTotal(){\n\t\tBigDecimal total =BigDecimal.valueOf(0);\n\t\tfor(CartItem cartItem : map.values()){\n\t\t\ttotal = total.add(BigDecimal.valueOf(cartItem.getSubtotal())) ;\n\t\t}\t\t\n\t\treturn total.doubleValue();\n\t}", "public double calculateOrderTotalWithDiscountsAndShipping(String[] order, boolean isMember){\n\t\t//TODO\n\t\t\n\t\tint a=discountByItemPrice(order,isMember);\n\t\tint b=discountByItemCount(order,isMember);\n\t\tdouble price=getOrderTotalWithoutDiscount(order);\n\t\t\n\t\tint discount= a>b ? a:b;\n\t\t\n\t\tif(isShippingFree(order,isMember)) {\n\t\t\t\n\t\t\tprice=price-(price*discount/100);\n\t\t}else {\n\t\t\tprice=price-(price*discount/100)+SHIPPING_CHARGE;\n\t\t}return price;\n\t\t\n\t}", "public void totalPrice(){\n int total = 0;\n\n if (list_order.isEmpty()) {\n totalHarga.setText(\"Rp. \" + 0);\n }\n else {\n for (int i = 0; i < list_order.size(); i++) {\n total += list_order.get(i).getHarga();\n }\n totalHarga.setText(\"Rp. \" + total);\n }\n }", "public BigDecimal getTotalAmountDue() {\n\t\treturn totalAmountDue;\n\t}", "public Long getTotal(Map map) {\n\t\treturn orderDAO.getTotal(map);\n\t}", "public void addTotal() {\n for (int i = 0; i < itemsInOrder.size(); i++) {\n this.dblTotal += itemsInOrder.get(i).getPrice();\n }\n }", "public BigDecimal getTradeTotal() {\n return tradeTotal;\n }", "public double totalPrice() {\n\t\tdouble result = 0.0;\n\t\tfor (ItemCart itemCart : listItemcart) {\n\t\t\tresult += itemCart.getQuantity() * itemCart.getP().getPrice();\n\t\t}\n\t\treturn result;\n\t}", "public double invoiceAmount(int orderID, int sessionID) {\r\n\t\tdouble amount = 0;\r\n\t\tfor (int i=0;i<sessions.size();i++) {\r\n\t\t\tSession s = sessions.get(i);\r\n\t\t\tif (s.getID() == sessionID && s.getUser() instanceof Shopper) {\r\n\t\t\t\tShopper sh = (Shopper)(s.getUser());\r\n\t\t\t\tInvoice inv = fm.getInvoice(orderID);\r\n\t\t\t\tif (inv != null && inv.shopperID == sh.cust.custID) {\r\n\t\t\t\t\tamount = inv.delCharge;\r\n\t\t\t\t\tfor (int proID : inv.items.keySet()) {\r\n\t\t\t\t\t\tProduct p = fm.getProduct(proID);\r\n\t\t\t\t\t\tif (p != null) {\r\n\t\t\t\t\t\t\tamount += p.price * inv.items.get(proID);\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\t\treturn amount;\r\n\t}", "public BigDecimal getValorTotal() {\n\t\treturn itens.stream()\n\t\t\t\t.map(ItemDieta::getValorTotal)\n\t\t\t\t.reduce(BigDecimal::add)\n\t\t\t\t.orElse(BigDecimal.ZERO);\n\t}", "private void calcTotalAmount(){\n\t totalAmount = 0;\n\t\tfor(FlightTicket ft : tickets)\n\t\t{\n\t\t\ttotalAmount += ft.getClassType().getFee() * getFlight().getFlightCost();\n\t\t}\n\t\tsetTotalAmount(totalAmount);\n\t}", "public double obtener_total(){\r\n double total_ventas = precio*unidades;\r\n return total_ventas;\r\n }", "public int totalprice() {\n\t\tint totalPrice=0;\r\n\t\tfor (int i=0; i<arlist.size();i++) {\r\n\t\t\t totalPrice+=arlist.get(i).price;\r\n\t\t}\r\n\t\treturn totalPrice;\r\n\t}", "public double getTotal() {\r\n\t\treturn total;\r\n\t}", "public float totalCost() {\n\t\tttCost = 0;\n\t\tfor (int i = 0; i < itemsOrdered.size(); i++) {\n\t\t\tttCost += itemsOrdered.get(i).getCost();\n\t\t}\n\t\treturn ttCost;\n\t}", "public double total(){\n\tdouble total=0;\n\tfor(Map.Entry<String, Integer> pro:proScan.getProducts().entrySet()){\n\t\tString proName=pro.getKey();\n\t\tint quantity=pro.getValue();\n\t\tProductCalculator proCal=priceRule.get(proName);\n\t\tif(proCal==null)\n\t\t\tthrow new MissingProduct(proName);\n\t\t\n\t\tProductCalculator cal=priceRule.get(proName);\n\t\tdouble subtotal=cal.getTotal(quantity);\n\t\ttotal+=subtotal;\n\t\t//System.out.println(total);\n\t}\n\t//round the total price to two digit\n\treturn round(total, 2);\n}", "public BigDecimal getTotalTransactrateMoney() {\n return totalTransactrateMoney;\n }", "public double calculate_total_sales_of_transaction() {\n char ismember = 'n';\n discounts = 1;\n String member_typ = \"null\";\n ismember = order.getIsMember();\n member_typ = order_member.getMemberType();\n\n total_sales_of_transaction = order.getBike().getPrice();\n\n if (Character.toUpperCase(ismember) == 'Y') {\n if (member_typ == \"Premium\") {\n discounts = 0.85;\n } else {\n discounts = 0.9;\n }\n }\n double price = total_sales_of_transaction * discounts;\n return price;\n }", "private double totalPrice(){\n\n double sum = 0;\n\n for (CarComponent carComponent : componentsCart) {\n sum += (carComponent.getCompPrice() * carComponent.getCompQuantity()) ;\n }\n return sum;\n }", "public double getTotal(){\n return total;\n }", "public double getPaymentAmount() {\n\t\tdouble amount = 0.0;\n\t\tString content = \"\";\n\t\t\n\t\tWebElement temp = (new WebDriverWait(driver, waitTime))\n\t\t\t\t.until(ExpectedConditions.presenceOfElementLocated(By.id(\"totalAmt\")));\t\t\n\t\tcontent = temp.findElement(By.xpath(\"span[2]\")).getAttribute(\"innerHTML\");\n\t\tamount = Double.parseDouble(content);\n\t\treturn amount;\n\t}", "public Long total() {\n return this.total;\n }", "@Override\n public double getTotal() {\n return total;\n }", "public double totalprice()\n {\n \tthis.caltotalprice();\n \tdouble res = Math.round(mTotalPrice);\n \t return res;\n }", "public int total() {\n return _total;\n }", "public int totalOrdersTaken();", "public double getTotal() {\n\t\treturn total;\n\t}", "public float getTotalPrice(){\n return price * amount;\n }", "@Override\r\n\tpublic int getTotalPrice() {\n\t\treturn totalPrice;\r\n\t}", "private double prixTotal() \r\n\t{\r\n\t\tdouble pt = getPrix() ; \r\n\t\t\r\n\t\tfor(Option o : option) \r\n\t\t\tpt += o.getPrix();\t\r\n\t\treturn pt;\r\n\t}", "public String getTotalPayment() {\n return totalPayment;\n }", "public Double getTotal() {\n return total;\n }", "public Double getTotal() {\n return total;\n }", "public Double getTotal() {\n return total;\n }", "public BigDecimal getAMOUNT() {\r\n return AMOUNT;\r\n }", "BigDecimal getAmount();", "@ApiModelProperty(value = \"The total price of staying in this room from the given check-in date to the given check-out date\")\n public Amount getTotalAmount() {\n return totalAmount;\n }", "public double getTotal (){ \r\n return total;\r\n }", "public Integer getTotalprice() {\n return totalprice;\n }", "public int total() {\n return this.total;\n }", "public int getTotal () {\n return total;\n }", "public BigDecimal\tgetOrderFee();", "public Integer total() {\n return this.total;\n }", "public double getTotalSales() {\n\t\tdouble total = 0;\n\n\t\tfor (Order o : orders) {\n\t\t\ttotal += o.totalPrice();\n\t\t}\n\n\t\treturn total;\n\t}", "private BigDecimal calculateTotalAmount(Product product, int quantity) throws ScriptException {\n return eval(Expressions.EXPRESSION_TOTAL, product, quantity);\n }", "public double getTotalValue(){\r\n return this.quantity * this.price;\r\n }", "public double getTotal() {\n return Total;\n }" ]
[ "0.79520917", "0.7885921", "0.7788985", "0.7620186", "0.75797695", "0.7569575", "0.7526042", "0.74275887", "0.74009234", "0.7359632", "0.73379666", "0.73012984", "0.72810674", "0.7201939", "0.71583563", "0.71049595", "0.70816034", "0.70813173", "0.70576143", "0.70340836", "0.6996159", "0.6937506", "0.6900278", "0.68977547", "0.6890078", "0.6890078", "0.68636525", "0.6862216", "0.68480366", "0.68408495", "0.6822844", "0.677079", "0.67597574", "0.6721228", "0.67135364", "0.66999125", "0.6692868", "0.66841453", "0.66745716", "0.666275", "0.66626203", "0.6658353", "0.6646275", "0.6646275", "0.66340345", "0.6622559", "0.6600715", "0.65951496", "0.6583614", "0.656547", "0.6562256", "0.65514344", "0.65470046", "0.6541614", "0.6536052", "0.6534647", "0.65288264", "0.65237945", "0.65151685", "0.64951485", "0.64839137", "0.6477988", "0.6475529", "0.6467525", "0.64619815", "0.64366025", "0.64297855", "0.64277095", "0.6427165", "0.6421193", "0.6418112", "0.6413031", "0.64026946", "0.6399599", "0.63951355", "0.6394434", "0.63922393", "0.6389783", "0.63842505", "0.6382001", "0.6381983", "0.638088", "0.63784343", "0.6375182", "0.63657653", "0.63657653", "0.63657653", "0.6362894", "0.63579917", "0.6356559", "0.6346193", "0.63425505", "0.63384515", "0.63232726", "0.6310073", "0.6304779", "0.6298853", "0.6295386", "0.6294219", "0.6293172" ]
0.6548257
52
Get the screen display title.
public String getTitle() { return "Booking Line Items"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getCurrentWindowTitle(){\n buffer = new char[MAX_TITLE_LENGTH * 2];\n GetWindowTextW(GetForegroundWindow(), buffer, MAX_TITLE_LENGTH);\n return Native.toString(buffer);\n }", "public static String getTitle() {\r\n\t\tString titleStr = null;\r\n\t\ttry {\r\n\t\t\ttitleStr = driver.getTitle();\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Unable to open the WebSite: \" + e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn titleStr;\r\n\t}", "public String getScreenName() {\n\t\treturn restClient.getScreenName();\n\t}", "public String getTitle() {\n\t\treturn getDriver().getTitle().trim();\n\t}", "public IMobileSMTitle getTitle();", "String title();", "String title();", "public String getScreenName()\n {\n return SCREEN_NAME;\n }", "@Override\n\tpublic java.lang.String getTitle() {\n\t\treturn _scienceApp.getTitle();\n\t}", "IDisplayString getTitle();", "public String getTitle() {\n\t\t\n\t\tStringBuilder titleBuilder = new StringBuilder();\n\t\ttitleBuilder.append(CorrelatorConfig.AppName);\n\t\ttitleBuilder.append(\" \");\n\n\t\tif (m_activeMap != null) {\n\t\t\ttitleBuilder.append(\"(\" + m_activeMap.getName() + \")\");\t\t\n\t\t}\n\t\t\n\t\t// Stage is where visual parts of JavaFX application are displayed.\n return titleBuilder.toString();\n\t}", "java.lang.String getTitle();", "java.lang.String getTitle();", "java.lang.String getTitle();", "java.lang.String getTitle();", "java.lang.String getTitle();", "public String getApplicationTitle() {\n return applicationTitle.get();\n }", "public static String getPageTitle() {\n\t\tLOG.info(\"Reading current page title.\");\n\t\treturn Constants.driver.getTitle();\n\n\t}", "public String getWatchListPageTitle() {\n waitForLoadingScreen();\n return findVisibleElement(otherPageTitle).getText();\n\n }", "public String getUserTitle() {\n\t\treturn StringUtils.join(userTitle, messages.getString(\"TITLE_SEPARATOR\"));\n\t}", "public java.lang.String getTitle();", "public String getActiveTitle() {\n\t\treturn getTitle(TitleBuilder.byActiveWindow());\n\t}", "public String getTitle() {\n \t\treturn getWebDriver().getTitle();\n \t}", "public String getTitle() {\n\t\t\n\treturn driver.getTitle();\n\t\n\t}", "public String getTitle()\r\n {\r\n return getSemanticObject().getProperty(swb_title);\r\n }", "public String getWindowTitle() {\r\n\t\treturn windowTitle;\r\n\t}", "public String getTitle() {\n return bufTitle;\n }", "public String homePageTitle() {\n\t\tString title=driver.getTitle();\n\t\treturn title;\n\t}", "public java.lang.String getTitle()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(TITLE$2);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public String getTitle() {\n return getString(CommandProperties.TASK_TITLE);\n }", "public final String getTitle() {\r\n return config.title;\r\n }", "public String getWindowTitle() {\n\t\treturn windowTitle;\n\t}", "public String getTitle() {\n return getProperty(Property.TITLE);\n }", "public String getTitle()\n {\n return (this.title);\n }", "public String getTitle(){\n\t\tlog.debug(\"Getting title of Cruises page\");\n\t\tString title = driver.getTitle();\n\t\tlog.info(\"Title of Cruises page is: \"+title);\n\t\treturn title;\n\t}", "public String getPageTitle()\n\t{\n\t\treturn driver.getTitle();\n\t}", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "String getTitle();", "public String getPageTitle() {\n\t\treturn driver.getTitle();\n\t}", "@ObjectSupport public final String title() {\n return title==null\n ? title = createTitle()\n : title;\n }", "public String getTitle()\n\t{\n\t\treturn title;\n\t}", "public String getTitle()\n\t{\n\t\treturn title;\n\t}", "public String getTitle() {\n \t\treturn title;\n \t}", "public String getTitle()\r\n\t{\r\n\t\treturn TITLE;\r\n\t}", "@Override\r\n\tpublic String getShowTitle() {\n\t\treturn getQymc();\r\n\t}", "public String getLoginTitle(){\n\t\treturn driver.findElement(titleText).getText();\n\t}", "public java.lang.String getTitle() {\n return title;\n }", "public String getTitle() {\r\n\t\treturn title;\r\n\t}", "public String getTitle() {\r\n\t\treturn title;\r\n\t}", "public String getTitle() {\r\n\t\treturn title;\r\n\t}", "public String getTitle() {\r\n\t\treturn title;\r\n\t}", "public String getTitle() {\r\n\t\treturn title;\r\n\t}", "public String getTitle() {\r\n\t\treturn title;\r\n\t}", "public String getTitle() {\r\n\t\treturn title;\r\n\t}", "public String getTitle() \r\n\t{\r\n\t\treturn this.title;\r\n\t}", "public String getTitle() {\n return find(by.tagName(\"h1\")).getText();\n }", "public String getTitle() {\n return titleName;\n }", "public String title()\n\t{\n\t\treturn title;\n\t}", "public java.lang.String getTitle() {\n return title;\n }", "public java.lang.String getTitle() {\n return title;\n }", "public java.lang.String getTitle() {\n return title;\n }", "public java.lang.String getTitle() {\n return title;\n }", "public String getDisplayName()\n {\n return getString(\"DisplayName\");\n }", "public String getPageTitle() {\n return driver.getTitle();\n }", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getPrintTitle();", "@Override\n\tpublic String getDisplayName()\n\t{\n\t\treturn this.getCameraActivity().getString(R.string.scene_hdr);\n\t}", "public String getTitle() {\r\n return insertMode ? \"\" : stringValue(CONTACTS_TITLE);\r\n }", "public String getLoginTitle(){\n\t return\tdriver.findElement(titleText).getText();\n\t}", "public String getTitle() {\r\n\t\treturn (String) getProperty(\"title\");\t\r\n\t}", "public String getTitle() {\n\t\treturn this.title;\n\t}", "public String getTitle() {\n\t\treturn this.title;\n\t}", "public String getTitle() {\n\t\treturn this.title;\n\t}", "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}", "public String getName()\r\n {\r\n return screenName;\r\n }", "public String getAnalyticsTitle() {\n Ensighten.evaluateEvent(this, \"getAnalyticsTitle\", null);\n return getString(C2658R.string.analytics_screen_policy_updates);\n }" ]
[ "0.7588959", "0.7228242", "0.7148108", "0.7142571", "0.70693654", "0.705524", "0.705524", "0.70406383", "0.7026585", "0.7021072", "0.7017537", "0.70150685", "0.70150685", "0.70150685", "0.70150685", "0.70150685", "0.7006777", "0.70023304", "0.6974027", "0.6967209", "0.69483924", "0.69339406", "0.6923891", "0.6922485", "0.68995345", "0.68939155", "0.6887858", "0.6873305", "0.6870097", "0.6869483", "0.6864616", "0.6858318", "0.68544304", "0.68476856", "0.6839058", "0.68375736", "0.68371373", "0.68371373", "0.68371373", "0.68371373", "0.68371373", "0.68371373", "0.68371373", "0.68371373", "0.68371373", "0.68371373", "0.68371373", "0.68371373", "0.68371373", "0.68371373", "0.68371373", "0.683174", "0.68196625", "0.6794877", "0.6794877", "0.6794052", "0.67919993", "0.678639", "0.67858565", "0.67678446", "0.6760784", "0.6760784", "0.6760784", "0.6760784", "0.6760784", "0.6760784", "0.6760784", "0.6753999", "0.67495996", "0.674949", "0.6748641", "0.67438203", "0.67438203", "0.67438203", "0.67398393", "0.67252773", "0.6715153", "0.67111737", "0.67111737", "0.67111737", "0.67111737", "0.67111737", "0.67111737", "0.67111737", "0.67111737", "0.67111737", "0.67111737", "0.67111737", "0.67111737", "0.67111737", "0.67100865", "0.6709664", "0.6699383", "0.66984624", "0.6697819", "0.66948533", "0.66948533", "0.66948533", "0.66838634", "0.6678096", "0.6668946" ]
0.0
-1
Override this to open the main file. You should pass this record owner to the new main file (ie., new MyNewTable(thisRecordOwner)).
public Record openMainRecord() { if (this.getRecord(BookingLine.BOOKING_LINE_FILE) != null) return this.getRecord(BookingLine.BOOKING_LINE_FILE); return new BookingLine(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TableEditor openTableEditor(){\n this.save();\n\t\treturn new TableEditor(this.getTitle());\n\t}", "public void openFile(File file) {\n// new FileSystem().readFile(addressBook, file);\n// addressBook.fireTableDataChanged();\n }", "public void openOtherRecords()\n {\n Booking recBooking = (Booking)this.getRecord(Booking.BOOKING_FILE);\n Tour recTour = (Tour)((ReferenceField)recBooking.getField(Booking.TOUR_ID)).getReferenceRecord(this);\n super.openOtherRecords();\n }", "public FileTableEntry open(String filename, String mode)\n\t{\n\t\tFileTableEntry ftEnt = filetable.falloc(filename, mode);\n\n\t\t//checking mode for writing\n\t\tif (ftEnt != null) {\n\t\t\tif (mode.equals(\"w\")) {\n\t\t\t\tif(!deallocAllBlocks(ftEnt)) {\n\t\t\t\t\tftEnt = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (mode.equals(\"a\")) {\n\t\t\t\tftEnt.seekPtr = ftEnt.inode.length;\n\t\t\t}\n\t\t}\n\t\treturn ftEnt;\n\t}", "private void open()\n\t\t{\n\t\t\tconfig=Db4oEmbedded.newConfiguration();\n\t\t\tconfig.common().objectClass(Census.class).cascadeOnUpdate(true);\n\t\t\ttry\n\t\t\t{\n\t\t\t\t\n\t\t\t\tDB=Db4oEmbedded.openFile(config, PATH);\n\t\t\t\tSystem.out.println(\"[DB4O]Database was open\");\n\t\t\t\t\n\t\t\t}\n\t\t\tcatch(Exception e)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"[DB4O]ERROR:Database could not be open\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}", "public EditFile() {\r\n\t\tsuper();\r\n\t}", "public NewDatabaseDialog(Main parent, boolean modal) {\n super(parent, modal);\n initComponents();\n console = parent;\n this.database = parent.getDatabase();\n this.setLocationRelativeTo(null);\n this.jLabelFilename.setText(this.database.getFilename());\n }", "private void createEventFilesTable(Composite parent, FormToolkit formToolkit,\n final String defaultEventFileName) {\n final Table table = new Table(parent, SWT.BORDER);\n table.setLinesVisible(true);\n table.setHeaderVisible(true);\n\n String[] titles = { \"File\", \"\" };\n int[] widths = { 500, 100 };\n createTableColumns(table, titles, widths);\n\n final TableItem tableItem = new TableItem(table, SWT.NONE);\n tableItem.setText(0, defaultEventFileName);\n\n TableEditor editor = new TableEditor(table);\n Button button = new Button(table, SWT.NONE);\n button.setText(Messages.OPEN_LABEL);\n button.pack();\n editor.minimumWidth = button.getSize().x;\n editor.horizontalAlignment = SWT.LEFT;\n editor.setEditor(button, tableItem, 1);\n\n button.addSelectionListener(new SelectionListener() {\n\n @Override\n public void widgetSelected(SelectionEvent arg0) {\n traceEditor.createEventTab(defaultEventFileName);\n }\n\n @Override\n public void widgetDefaultSelected(SelectionEvent arg0) {\n traceEditor.createEventTab(defaultEventFileName);\n }\n });\n\n FormData formData = new FormData();\n formData.left = new FormAttachment(0);\n formData.top = new FormAttachment(0);\n formData.right = new FormAttachment(100);\n formData.bottom = new FormAttachment(100);\n table.setLayoutData(formData);\n }", "protected void open()\n {\n }", "protected void open () {\n\t\tif (this.container==null)\n\t\t\ttry {\n\t\t\t\tmigrateOnDemand();\n\t\t\t\topenFiles();\n\t\t\t\tthis.blockSize = metaData.readInt();\n\t\t\t\tthis.size = metaData.readInt();\n\t\t\t}\n\t\t\tcatch (IOException ie) {\n\t\t\t\tthrow new WrappingRuntimeException(ie);\n\t\t\t}\n\t}", "public void open(){\n\t\tbdd = maBaseSQLite.getWritableDatabase();\n\t}", "protected synchronized void open()\n/* */ {\n/* 193 */ super.open();\n/* 194 */ if (this.currentLogFile.length() == 0L) {\n/* 195 */ this.writer.println(\"#Fields: \" + this.pattern);\n/* 196 */ this.writer.println(\"#Version: 2.0\");\n/* 197 */ this.writer.println(\"#Software: \" + ServerInfo.getServerInfo());\n/* */ }\n/* */ }", "protected void openFiles() {\n\t\tthis.container = fso.openFile(prefix+EXTENSIONS[CTR_FILE],\"rw\");\n\t\tthis.metaData = fso.openFile(prefix+EXTENSIONS[MTD_FILE], \"rw\");\n\t\tthis.reservedBitMap = fso.openFile(prefix+EXTENSIONS[RBM_FILE], \"rw\");\n\t\tthis.updatedBitMap = fso.openFile(prefix+EXTENSIONS[UBM_FILE], \"rw\");\n\t\tthis.freeList = fso.openFile(prefix+EXTENSIONS[FLT_FILE], \"rw\");\n\t}", "public EntryForm(String file) throws IOException\n {\n filename = file;\n try\n {\n db = new DBCommands(filename);\n } catch (ClassNotFoundException ex)\n {\n Logger.getLogger(EntryForm.class.getName()).log(Level.SEVERE, null, ex);\n } catch (SQLException ex)\n {\n Logger.getLogger(EntryForm.class.getName()).log(Level.SEVERE, null, ex);\n }\n initComponents(); \n }", "@Override\n\tpublic void open() {\n\t\t\n\t}", "private void openDatabase() {\n database = new DatabaseExpenses(this);\n database.open();\n }", "public void open() {\r\n\t}", "public DataBase open(){\n myDB = new MyHelper(ourContext);\n myDataBase = myDB.getWritableDatabase();\n return this;\n }", "public void open()\n {\n }", "@Override\n \t\t\t\tpublic void doOpen() {\n \n \t\t\t\t}", "public void open() {\n\t}", "@Override\n\tprotected SQLiteDatabase openReadableDb() {\n\t\treturn super.openReadableDb();\n\t}", "public void open(){\n this.db = this.typeDatabase.getWritableDatabase();\n }", "private FileManager()\n {\n bookFile.open(\"bookdata.txt\");\n hisFile.open(\"history.txt\");\n idFile.open(\"idpassword.txt\");\n createIDMap();\n createHisMap(Customer.getInstance());\n }", "@Override\n\tprotected SQLiteDatabase openWritableDb() {\n\t\treturn super.openWritableDb();\n\t}", "public void openForInput (RecordDefinition recDef) \n throws IOException {\n openForInput (recDef.getDict());\n }", "public DbRecord( String szFileName )\n throws FileNotFoundException, NullPointerException, AppException\n {\n Load( szFileName );\n }", "public void openRODB() throws SQLException {\r\n\t\tString mPath = DATABASE_PATH + DATABASE_NAME;\r\n\t\tmDataBase = SQLiteDatabase.openDatabase(mPath, null,\r\n\t\t\t\tSQLiteDatabase.OPEN_READONLY);\r\n\t}", "public abstract void open();", "public abstract void open();", "@Override\n\tpublic void open() {\n\n\t}", "@Override\n\tpublic void open() {\n\n\t}", "public static DBMaker openFile(String file){\n DBMaker m = new DBMaker();\n m.location = file;\n return m;\n }", "public FileDatabase(String filename) throws IOException {\n\t\tdatabase = new File(filename);\n\t\tread();\n\t}", "public void newFile() {\r\n \t\tcurFile = null;\r\n \t}", "public OfcRecordRecord() {\n\t\tsuper(org.openforis.collect.persistence.jooq.tables.OfcRecord.OFC_RECORD);\n\t}", "public TabbedLineReader openInput(File inFile) throws IOException {\n TabbedLineReader retVal;\n if (inFile == null) {\n log.info(\"Input will be taken from the standard input.\");\n retVal = new TabbedLineReader(System.in);\n } else if (! inFile.canRead())\n throw new FileNotFoundException(\"Input file \" + inFile + \" is not found or is unreadable.\");\n else {\n log.info(\"Input will be read from {}.\", inFile);\n retVal = new TabbedLineReader(inFile);\n }\n return retVal;\n }", "public void onOpenFile() {\n\t\t\n\t\t//if things are dirty, ask if they're sure they want to do this\n\t\tif(FormDesignerController.getIsDirty())\n\t\t{\n\t\t\t//if the use says no, then bounce\n\t\t\tif(!Window.confirm(LocaleText.get(\"newFormConfirm\")))\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tOpenFromFileDialog dlg = OpenFromFileDialog.getInstnace(controller);\n\t\tdlg.center();\n\t\t\n\t}", "@FXML\n private void openFile() {\n try {\n \tFile file = new File(filmTable.getSelectionModel().getSelectedItem().getLocation());\n desktop.open(file);\n } catch (IOException ex) {\n \tex.printStackTrace();\n }\n }", "public void openSavedFilesFrame()\n {\n //create a new load frame\n savedFilesFrame = new SavedFilesFrame(this);\n //if user saved some games and wants to see them on this frame\n if( !firstLoadGame )\n {\n savedFilesFrame.updatePanel(sideMenu.getSaved_files());\n }\n }", "private JTable getTable(String key){\n\t\tJTable table = null;\n\t\t\n\t\ttry{\n\t\t\tObjectInputStream in = new ObjectInputStream(new FileInputStream(key+\"_Details.sce\"));\n\t\t\ttable = (JTable) in.readObject();\n\t\t\tin.close();\n\t\t}catch(IOException ex){\n\t\t\tSystem.out.println(ex.getMessage());\n\t\t}catch(ClassNotFoundException ey){\n\t\t\tSystem.out.println(ey.getMessage());\n\t\t}\n\t\t\n\t\treturn table;\n\t}", "public void opened();", "private void buildTable() {\n rowData = new Object[4];\n infoTable = new JTable();\n tableModel = new DefaultTableModel();\n tableModel.setColumnIdentifiers(columnNames);\n infoTable.setModel(tableModel);\n String line;\n \n try {\n FileInputStream fin = new FileInputStream(\"ContactInfo.txt\");\n BufferedReader br = new BufferedReader(new InputStreamReader(fin)); \n \n while((line = br.readLine()) != null)\n {\n rowData[0] = line;\n for(int i = 1; i < 4; i++) {\n rowData[i] = br.readLine();\n }\n tableModel.addRow(rowData);\n } \n br.close();\n }\n catch (FileNotFoundException e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n catch (IOException e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n }", "public abstract ODatabaseInternal<?> openDatabase();", "public void openForInput (DataDictionary dict) \n throws IOException {\n \n // If this is markdown, then convert it to HTML before going any farther\n if (context.isMarkdown()) {\n if (inFile == null && inURL != null) {\n mdReader = new MetaMarkdownReader(inURL, \n MetaMarkdownReader.MARKDOWN_TYPE);\n }\n else\n if (inFile != null) {\n mdReader = new MetaMarkdownReader(inFile, \n MetaMarkdownReader.MARKDOWN_TYPE);\n }\n else\n if (textLineReader != null) {\n mdReader = new MetaMarkdownReader(textLineReader, \n MetaMarkdownReader.MARKDOWN_TYPE);\n }\n if (mdReader != null) {\n mdReader.setMetadataAsMarkdown(metadataAsMarkdown);\n mdReader.openForInput();\n inFile = null;\n inURL = null;\n textLineReader = new StringLineReader(mdReader.getHTML());\n mdReader.close();\n mdReader = null;\n }\n }\n \n if (inFile == null && inURL != null) {\n HttpURLConnection.setFollowRedirects(true);\n inConnect = inURL.openConnection();\n if (inConnect.getClass().getName().endsWith(\"HttpURLConnection\")) {\n HttpURLConnection httpConnect = (HttpURLConnection)inConnect;\n httpConnect.setInstanceFollowRedirects(true);\n httpConnect.setConnectTimeout(0);\n }\n inConnect.connect();\n inStream = inConnect.getInputStream();\n streamReader = new InputStreamReader(inStream, \"UTF-8\");\n reader = new BufferedReader(streamReader);\n Logger.getShared().recordEvent(\n LogEvent.NORMAL,\n \"HTMLFile Open for input URL \" + inURL.toString()\n + \" with encoding \" + streamReader.getEncoding(),\n false);\n } \n else\n if (inFile != null) {\n streamReader = new FileReader(inFile);\n reader = new BufferedReader(streamReader);\n }\n else\n if (textLineReader != null) {\n textLineReader.open();\n reader = null;\n }\n \n this.dict = dict;\n dataRec = new DataRecord();\n recDef = new RecordDefinition(this.dict);\n openWithRule();\n recordNumber = 0;\n atEnd = false;\n }", "public void open() {\n this.database = openHelper.getWritableDatabase();\n }", "public void open() {\n this.database = openHelper.getWritableDatabase();\n }", "public void open() {\n this.database = openHelper.getWritableDatabase();\n }", "public void open() {\n this.database = openHelper.getWritableDatabase();\n }", "public void open() {\n this.database = openHelper.getWritableDatabase();\n }", "public void openFile()\r\n {\r\n try // open file\r\n {\r\n input = new RandomAccessFile( \"clients.dat\", \"r\" );\r\n } // end try\r\n catch ( IOException ioException )\r\n {\r\n System.err.println( \"File does not exist.\" );\r\n } // end catch\r\n }", "public void open() {\r\n\t\tFile f = getOpenFile(\"Map Files\", \"tilemap\");\r\n\t\tif (f == null) return;\r\n\t\tfile = f;\r\n\t\tframe.setTitle(\"Tile Mapper - \"+file.getName());\r\n\t\tSystem.out.println(\"Opening \"+file.getAbsolutePath());\r\n\r\n\t\ttry {\r\n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\r\n\t\t\tInputStream is = this.getClass().getClassLoader().getResourceAsStream(\"tilemapper/Map.xsd\");\r\n\t\t\tfactory.setSchema(SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI).newSchema(new StreamSource(is)));\r\n\r\n\t\t\tDocument dom = factory.newDocumentBuilder().parse(file);\r\n\r\n\t\t\t// we have a valid document\r\n\t\t\t//printNode(dom, \"\");\r\n\t\t\tNode mapNode = null;\r\n\t\t\tNodeList nodes = dom.getChildNodes();\r\n\t\t\tfor (int i=0; i<nodes.getLength(); i++) {\r\n\t\t\t\tNode node = nodes.item(i);\r\n\t\t\t\tif (node.getNodeName() == \"Map\") mapNode = node;\r\n\t\t\t}\r\n\t\t\tif (mapNode == null) return;\r\n\t\t\tmapPanel.parseDOM((Element)mapNode);\r\n\r\n\t\t} catch (ParserConfigurationException e) {\r\n\t\t\tSystem.out.println(\"The underlying parser does not support the requested features.\");\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (FactoryConfigurationError e) {\r\n\t\t\tSystem.out.println(\"Error occurred obtaining Document Builder Factory.\");\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void doOpen() {\n\n if (!canChangeDocuments()) {\n return;\n }\n\n TextDocument document = fApplication.openDocument(this);\n\n if (document != null) {\n setDocument(document);\n }\n }", "public UpdateScan open() {\r\n\t\treturn new TableScan(ti, tx);\r\n\t}", "public TabbedLineReader(File inFile) throws IOException {\n this.openFile(inFile, '\\t');\n this.readHeader();\n }", "public String getTableFile() \n\t{\n\t return tableFile ;\n\t}", "public TesttabRecord() {\n\t\tsuper(org.jooq.h2.generated.tables.Testtab.TESTTAB);\n\t}", "public Table readTable(String pathName, String filename){\n File file = new File(pathName + filename);\n Table newTable = null;\n Scanner sc; \n //foreign key aspects\n Boolean hasForeignKey = false;\n ArrayList<String> FKIndex; \n String[] line; \n String primaryTableName = \"\", primaryColName = \"\", colName = \"\"; \n String name = \"\";\n\n try {\n sc = new Scanner(file);\n } catch(FileNotFoundException ex) {\n System.out.println(\"ERROR: file not found\");\n return null;\n }\n\n //get table name - always first line\n if (sc.hasNextLine()){\n name = sc.nextLine();\n }\n\n FKIndex = getForeignKeyIndex(pathName);\n //loop over all rows in FKIndex, and check if table has a foreign key\n if(!FKIndex.isEmpty()){\n for(int i = 0; i < FKIndex.size(); i++){\n line = FKIndex.get(i).split(\"\\\\s\"); \n if (line[2].equals(name)){\n hasForeignKey = true;\n primaryTableName = line[0];\n primaryColName = line[1];\n colName = line[3];\n }\n }\n }\n\n //get col names - always second line\n if (sc.hasNextLine()){\n String colNamesString = sc.nextLine();\n //split colNames into individual words as Strings based on whitespace\n String[] colNames = colNamesString.split(\"\\\\s\");\n\n //make table with column names\n if (hasForeignKey){\n newTable = new Table(name, primaryTableName, primaryColName, colName, true, colNames);\n } else {\n newTable = new Table(name, colNames);\n }\n\n //add rows from file (each line)\n while(sc.hasNextLine()){\n String newRowString = sc.nextLine();\n String[] newRow = newRowString.split(\"\\\\s\");\n newTable.addRow(newRow);\n }\n }\n\n sc.close();\n return newTable;\n }", "public BiomartAccess(String fname) \n {\n m_file = new File(fname);\n }", "public void open() {\n\t\tbanco =BancoHelper.getWritableDatabase();\n\t}", "public void openFile() {\n\t\tfc.setCurrentDirectory(new File(System.getProperty(\"user.dir\")));\n\t\tint returnVal = fc.showOpenDialog(null);\n\t\tif (returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\tFile file = fc.getSelectedFile();\n\t filename.setText(file.getName());\n\t try {\n\t\t\t\tmodel.FileContent(file);\t//read the content of the input file\n\t\t\t\tplotContent.repaint();\t//repaint the JComponent\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}", "public void open() {\n this.db = this.mSqlHelper.getWritableDatabase();\n }", "public Project(File file)\n {\n super(file);\n this.open();\n }", "public void open();", "public void open();", "public void handleOpenFile (File inFile) {\n openFile (inFile);\n }", "public WorkDataFile()\n\t{\n\t\tsuper();\n\t}", "interface DataTableFile extends TableDataSource {\n\n /**\n * Creates a new file of the given table. The table is initialised and\n * contains 0 row entries. If the table already exists in the database then\n * this will throw an exception.\n * <p>\n * On exit, the object will be initialised and loaded with the given table.\n *\n * @param def the definition of the table.\n */\n void create(DataTableDef def) throws IOException;\n\n /**\n * Updates a file of the given table. If the table does not exist, then it\n * is created. If the table already exists but is different, then the\n * existing table is modified to incorporate the new fields structure.\n * <p>\n * The DataTableFile must have previously been 'load(table_name)' before\n * this call.\n * <p>\n * Implementations of this method may choose to reorganise information that\n * the relational schemes are dependant on (the row order for example). If\n * this method returns 'true' then we must also reindex the schemes.\n * <p>\n * <strong>NOTE:</strong> If the new format has columns that are not\n * included in the new format then the columns are deleted.\n *\n * @param def the definition of the table.\n * @return true if the table topology has changed.\n */\n boolean update(DataTableDef def) throws IOException;\n\n /**\n * This is called periodically when this data table file requires some\n * maintenance. It is recommended that this method is called every\n * time the table is initialized (loaded).\n * <p>\n * The DataTableFile must have previously been 'load(table_name)' before\n * this call.\n * <p>\n * This method may change the topology of the rows (delete rows that are\n * marked as deleted), therefore if the method returns true you need to\n * re-index the schemes.\n *\n * @return true if the table topology was changed.\n */\n boolean doMaintenance() throws IOException;\n\n// /**\n// * A recovery method that returns a DataTableDef object for this data\n// * table file that was last used in a call to 'create' or 'update'. This\n// * information should be kept in a secondary table topology store but it\n// * is useful to keep this information in the data table file just incase\n// * something bad happens, or tables are moved to another database.\n// */\n// DataTableDef recoverLastDataTableDef() throws IOException;\n\n /**\n * Loads a previously created table. A table can be loaded in read only\n * mode, in which case any methods that write to the DataTableFile will\n * throw an IOException.\n *\n * @param table_name the name of the table.\n * @param read_only if true then the table file is opened as read-only.\n */\n void load(String table_name, boolean read_only) throws IOException;\n\n /**\n * Shuts down the table. This is called when the table is closed and the\n * resources it uses are to be freed back to the system. This is called\n * as part of the database shut down procedure or called when we want to\n * free the resources associated with this table.\n */\n void shutdown() throws IOException;\n\n /**\n * Deletes the data table file in the file system. This is used to clear\n * up resources after a table has been dropped. The table must be shut\n * down before this method is called.\n * <p>\n * NOTE: Use this with care. All data is lost!\n */\n void drop();\n\n /**\n * Flushes all information that may be cached in memory to disk. This\n * includes any relational data, any cached data that hasn't made it to\n * the file system yet. It will write out all persistant information\n * and leave the table in a state where it is fully represented in the\n * file system.\n */\n void updateFile() throws IOException;\n\n /**\n * Locks the data in the file to prevent the system overwritting entries\n * that have been marked as removed. This is necessary so we may still\n * safely read removed entries from the table while the table is locked.\n */\n void addRowsLock();\n\n /**\n * Unlocks the data in the file to indicate that the system may safely\n * overwrite removed entries in the file.\n */\n void removeRowsLock();\n\n /**\n * Returns true if the file currently has all of its rows locked.\n */\n boolean hasRowsLocked();\n\n// /**\n// * The number of rows that are currently stored in this table. This number\n// * does not include the rows that have been marked as removed.\n// */\n// int rowCount();\n\n /**\n * Returns true if the given row index points to a valid and available\n * row entry. Returns false if the row entry has been marked as removed,\n * or the index goes outside the bounds of the table.\n */\n boolean isRowValid(int record_index) throws IOException;\n\n /**\n * Adds a complete new row into the table. If the table is in a row locked\n * state, then this will always add a new entry to the end of the table.\n * Otherwise, new entries are added where entries were previously removed.\n * <p>\n * This will update any column indices that are set.\n *\n */\n int addRow(RowData row_data) throws IOException;\n\n /**\n * Removes a row from the table at the given index. This will only mark\n * the entry as removed, and will not actually remove the data. This is\n * because a process is allowed to read the data even after the row has been\n * marked as removed (if the rows have been locked).\n * <p>\n * This will update any column indices that are set.\n *\n * @param row_index the raw row index of the entry to be marked as removed.\n */\n void removeRow(int row_index) throws IOException;\n\n// /**\n// * Returns a DataCell object of the entry at the given column, row\n// * index in the table. This will always work provided there was once data\n// * stored at that index, even if the row has been marked as deleted.\n// */\n// DataCell getCellAt(int column, int row) throws IOException;\n\n /**\n * Returns a unique number. This is incremented each time it is accessed.\n */\n long nextUniqueKey() throws IOException;\n\n}", "public void open() {\n\n\t\t_database = _dbHelper.getWritableDatabase();\n\t}", "public EditingTable() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "public DBinterface open() throws SQLException {\r\n db = helper.getWritableDatabase();\r\n return this;\r\n }", "public void fileOpen () {\n\t\ttry {\n\t\t\tinput = new Scanner(new File(file));\n\t\t\tSystem.out.println(\"file created\");\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"file could not be created\");\n\t\t}\n\t}", "@FXML\n\tpublic void openFile() {\n\t\tFileChooser openFileChooser = new FileChooser();\n\t\topenFileChooser.setInitialDirectory(userWorkspace);\n\t\topenFileChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter(\"Text doc(*.txt)\", \"*.txt\"));\n\t\tfile = openFileChooser.showOpenDialog(ap.getScene().getWindow());\n\n\t\tuserText.clear();\n\n\t\tif (file != null) {\n\t\t\tif (file.getName().endsWith(\".txt\")) {\n\t\t\t\tfilePath = file.getAbsolutePath();\n\t\t\t\tStage primStage = (Stage) ap.getScene().getWindow();\n\t\t\t\tprimStage.setTitle(filePath);\n\t\t\t\tTab tab = tabPane.getSelectionModel().getSelectedItem();\n\t\t\t\ttab.setId(filePath);\n\t\t\t\ttab.setText(file.getName());\n\n\t\t\t\twriteToUserText();\n\t\t\t}\n\t\t}\n\t}", "public void createTableMain() {\n db.execSQL(\"create table if not exists \" + MAIN_TABLE_NAME + \" (\"\n + KEY_ROWID_MAIN + \" integer primary key autoincrement, \"\n + KEY_TABLE_NAME_MAIN + \" string not null, \"\n + KEY_MAIN_LANGUAGE_1 + \" integer not null, \"\n + KEY_MAIN_LANGUAGE_2 + \" integer not null);\");\n }", "@Override\r\n\tpublic void createFile(FacebookClient fbClient, ITable table,\r\n\t\t\tString outputFile) {\n\t}", "public void generateHibernateConfigOpening()\n {\n String outputFileName = nameToFileNameInRootGenerationDir(mappingFileName, mappingDirName);\n\n // Instantiate the template to generate from.\n ST stringTemplate = hibernateOnlineTemplates.getInstanceOf(FILE_OPEN_TEMPLATE);\n stringTemplate.add(\"catalogue\", model);\n\n fileOutputHandlerOverwrite.render(stringTemplate, outputFileName);\n }", "public void open() {\n // no-op;\n }", "public FileMenu(ChatWindow parentWindow) {\r\n\r\n super(Messages.getI18NString(\"file\").getText());\r\n\r\n this.parentWindow = parentWindow;\r\n\r\n this.setForeground(new Color(\r\n ColorProperties.getColor(\"chatMenuForeground\")));\r\n\r\n this.add(saveMenuItem);\r\n this.add(printMenuItem);\r\n\r\n this.addSeparator();\r\n\r\n this.add(closeMenuItem);\r\n\r\n this.saveMenuItem.setName(\"save\");\r\n this.printMenuItem.setName(\"print\");\r\n this.closeMenuItem.setName(\"close\");\r\n\r\n this.saveMenuItem.addActionListener(this);\r\n this.printMenuItem.addActionListener(this);\r\n this.closeMenuItem.addActionListener(this);\r\n\r\n this.setMnemonic(Messages.getI18NString(\"file\").getMnemonic());\r\n this.saveMenuItem.setMnemonic(saveString.getMnemonic());\r\n this.printMenuItem.setMnemonic(printString.getMnemonic());\r\n this.closeMenuItem.setMnemonic(closeString.getMnemonic());\r\n \r\n this.saveMenuItem.setAccelerator(\r\n KeyStroke.getKeyStroke(KeyEvent.VK_S,\r\n KeyEvent.CTRL_MASK));\r\n \r\n this.printMenuItem.setAccelerator(\r\n KeyStroke.getKeyStroke(KeyEvent.VK_R,\r\n KeyEvent.CTRL_MASK));\r\n \r\n // Disable all menu items that do nothing.\r\n this.saveMenuItem.setEnabled(false);\r\n this.printMenuItem.setEnabled(false);\r\n }", "private void openDB() {\n\t\tmyDb = new DBAdapter(this);\n\t\t// open the DB\n\t\tmyDb.open();\n\t\t\n\t\t//populate the list from the database\n\t\tpopulateListViewFromDB();\n\t}", "private static void loadTableData() {\n\n\t\tBufferedReader in = null;\n\t\ttry {\n\t\t\tin = new BufferedReader(new FileReader(dataDir + tableInfoFile));\n\n\t\t\twhile (true) {\n\n\t\t\t\t// read next line\n\t\t\t\tString line = in.readLine();\n\t\t\t\tif (line == null) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tString[] tokens = line.split(\" \");\n\t\t\t\tString tableName = tokens[0];\n\t\t\t\tString tableFileName = tokens[1];\n\n\t\t\t\ttableNameToSchema.put(tableName, new HashMap<String, Type>());\n\t\t\t\ttableNameToOrdredSchema.put(tableName,\n\t\t\t\t\t\tnew ArrayList<ColumnInfo>());\n\n\t\t\t\t// attributes data\n\t\t\t\tfor (int i = 2; i < tokens.length;) {\n\n\t\t\t\t\tString attName = tokens[i++];\n\t\t\t\t\tString attTypeName = (tokens[i++]);\n\n\t\t\t\t\tType attType = null;\n\n\t\t\t\t\t/*\n\t\t\t\t\t * Undefined, how to represent dates, crazy longs probably\n\t\t\t\t\t * won't need this for now...\n\t\t\t\t\t */\n\t\t\t\t\tif (attTypeName.equals(\"CHAR\")) {\n\t\t\t\t\t\tattType = Types.getCharType(Integer\n\t\t\t\t\t\t\t\t.valueOf(tokens[i++]));\n\t\t\t\t\t} else if (attTypeName.equals(\"DATE\")) {\n\t\t\t\t\t\tattType = Types.getDateType();\n\t\t\t\t\t} else if (attTypeName.equals(\"DOUBLE\")) {\n\t\t\t\t\t\tattType = Types.getDoubleType();\n\t\t\t\t\t} else if (attTypeName.equals(\"FLOAT\")) {\n\t\t\t\t\t\tattType = Types.getFloatType();\n\t\t\t\t\t} else if (attTypeName.equals(\"INTEGER\")) {\n\t\t\t\t\t\tattType = Types.getIntegerType();\n\t\t\t\t\t} else if (attTypeName.equals(\"LONG\")) {\n\t\t\t\t\t\tattType = Types.getLongType();\n\t\t\t\t\t} else if (attTypeName.equals(\"VARCHAR\")) {\n\t\t\t\t\t\tattType = Types.getVarcharType();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new RuntimeException(\"Invalid type: \"\n\t\t\t\t\t\t\t\t+ attTypeName);\n\t\t\t\t\t}\n\n\t\t\t\t\ttableNameToSchema.get(tableName).put(attName, attType);\n\n\t\t\t\t\tColumnInfo ci = new ColumnInfo(attName, attType);\n\t\t\t\t\ttableNameToOrdredSchema.get(tableName).add(ci);\n\n\t\t\t\t}\n\n\t\t\t\t// at this point, table info loaded.\n\n\t\t\t\t// Create table\n\t\t\t\tmyDatabase.getQueryInterface().createTable(tableName,\n\t\t\t\t\t\ttableNameToSchema.get(tableName));\n\n\t\t\t\t// Now, load data into newly created table\n\t\t\t\treadTable(tableName, tableFileName);\n\n\t\t\t}\n\n\t\t\tin.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tHelpers.print(e.getStackTrace().toString(),\n\t\t\t\t\tutil.Consts.printType.ERROR);\n\t\t}\n\n\t}", "public void open() throws SQLException {\n\t\t \n\t\t mDatabase = mDbHelper.getWritableDatabase();\n\t\t mDatabase = mDbHelper.getWritableDatabase();\n\n\t\t //refreshCompanies();\n\t }", "private void openStore()\n throws Exception {\n\n dbStore = Utils.openStore(master, Utils.DB_NAME);\n primaryIndex = \n dbStore.getPrimaryIndex(Integer.class, RepTestData.class);\n }", "public IFile getModelFile() {\r\n \t\treturn newFileCreationPage.getModelFile();\r\n \t}", "protected EclipseFile(IFile file) {\n \t\tsuper(file);\n \t}", "public void newEntry(String file, User user) {\r\n TableEntry entry = new TableEntry();\r\n entry.fileName = file;\r\n entry.userName = user.getName();\r\n entry.date = DateUtils.getISO8601Date(System.currentTimeMillis());\r\n \r\n int sz = m_entries.size();\r\n if ( (MAX_SIZE > 0) && (sz >= MAX_SIZE) ) {\r\n clear();\r\n sz = 0;\r\n }\r\n \r\n synchronized(m_entries) {\r\n m_entries.add(entry);\r\n ++sz;\r\n }\r\n fireTableRowsInserted(sz, sz);\r\n }", "public long loadTable(File fromFile)\n throws DBException\n {\n return this.loadTable(fromFile, null, \n true/*insertRecords*/, true/*overwriteExisting*/, false/*noDropWarning*/);\n }", "public void openForInput () \n throws IOException {\n this.dict = new DataDictionary();\n openForInput (dict);\n }", "public boolean openTable(String tblName)\r\n {\r\n String sql = \"Select * From \" + tblName;\r\n return querySql(sql);\r\n }", "@Override\n\t\t\tpublic TableRow<Document> call(TableView<Document> param) {\n\t\t\t\tTableRow<Document> row = new TableRow<Document>();\n\t\t\t\tMenuItem openItem = new MenuItem(\"打开\");\n\t\t\t\topenItem.setOnAction(e->{\n\t\t\t\t\tSystem.out.println(\"打开文件\");\n\t\t\t\t});\n\t\t\t\tMenuItem deleteItem = new MenuItem(\"删除\");\n\t\t\t\tMenuItem renameItem = new MenuItem(\"重命名\");\n\t\t\t\tMenuItem setmodeItem = new MenuItem(\"设置属性\");\n\t\t\t\tContextMenu menu = new ContextMenu(openItem,deleteItem,renameItem,setmodeItem);\n\t\t\t\trow.setOnMouseClicked(e->{\n\t\t\t\t\tif (e.getButton() == MouseButton.PRIMARY &&\n\t\t\t\t\t\t\t!row.isEmpty()) {\n\t\t\t\t\t\trow.setContextMenu(menu);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn row;\n\t\t\t}", "protected abstract void initTable() throws RemoteException, NotBoundException, FileNotFoundException;", "public void openRWDB() throws SQLException {\r\n\t\tString mPath = DATABASE_PATH + DATABASE_NAME;\r\n\t\tmDataBase = SQLiteDatabase.openDatabase(mPath, null,\r\n\t\t\t\tSQLiteDatabase.OPEN_READWRITE);\r\n\t}", "public void open() {\r\n if (mFailedOpen) {\r\n return;\r\n }\r\n\r\n File base = new File(mBaseFileName);\r\n if (mMaxLogSizeBytes > 0 && base.length() > (mMaxLogSizeBytes / mNumSegments - 1024)) {\r\n Log.d(LOG_TAG, \"Log file exceeds maximum size\");\r\n close();\r\n renameLogs();\r\n open();\r\n } else if (mCurrentFileStream == null) {\r\n try {\r\n mCurrentFileStream = new FileOutputStream(mBaseFileName, true);\r\n } catch (FileNotFoundException e) {\r\n Log.e(LOG_TAG, \"Could not open log file \" + e.getMessage());\r\n mFailedOpen = true;\r\n mCurrentFileStream = null;\r\n }\r\n }\r\n }", "public void open (File file, boolean suppressStyling)\n\t{\n\t\tthis.file = file;\n\t\tif (editor.open (file, suppressStyling))\n\t\t\tgetRootPane().putClientProperty (\"Window.documentFile\", file);\n\t\telse this.file = null;\n\t\teditor.grabFocus();\n\t\tmodel = null;\n\t\tupdate();\n\t}", "public void onCreate() {\r\n\t\tcreatorClass.onCreate(table);\r\n\t}", "public CommonStorage open() {\r\n ++accessNb;\r\n getDatabase(); // To trigger the possible database setup if it has not been yet done\r\n return this;\r\n }", "public void addRow(MyFile myFile) {\n\t\tint row = flexTable.getRowCount();\r\n\t\tButton filebtn = new Button(myFile.getName());\r\n\t\tfilebtn.addClickHandler(new MyfileClickHandler());\r\n\t\tif (myFile.getType() == FileType.DIR) {\r\n\t\t\tfilebtn.setStyleName(\"fileButton\");\r\n\t\t}\r\n\r\n\t\tButton modiftbtn = new Button(\"Modify\");\r\n\t\tmodiftbtn.addClickHandler(new ModifyButtonClickHandler());\r\n\t\tmodiftbtn.setTitle(myFile.getName());\r\n\t\tButton removrbtn = new Button(\"Remove\");\r\n\t\tremovrbtn.setTitle(myFile.getName());\r\n\t\tremovrbtn.addClickHandler(new RemoveButtonClickHandler());\r\n\t\tflexTable.setWidget(row, 0, filebtn);\r\n\t\tflexTable.setWidget(row, 1, new Label(myFile.getTypeName()));\r\n\t\tflexTable.setWidget(row, 2, modiftbtn);\r\n\t\tflexTable.setWidget(row, 3, removrbtn);\r\n\t}", "public void openFileInEditor(String filename) throws PartInitException{\n\t\tString path = DataManager.getCurrentPath() + slash + filename;\n\t\tajdtHandler.openFileInEditorView(path);\n\t}", "public void newFile() {\n\t\tString filename = \"untitled\";\n\t\tfilename = JOptionPane.showInputDialog(null,\n\t\t\t\t\"Enter the new file name\");\n\t\taddTab(filename+\".minl\");\n\t}", "public TempTable(Schema sch, Transaction tx) {\r\n\t\tString tblname = nextTableName();\r\n\t\tti = new TableInfo(tblname, sch);\r\n\t\tthis.tx = tx;\r\n\t\tFileHeaderFormatter fhf = new FileHeaderFormatter();\r\n\t\tBuffer buff = tx.bufferMgr().pinNew(ti.fileName(), fhf);\r\n\t\ttx.bufferMgr().unpin(buff);\r\n\t}", "private void openFile(File file){\r\n\t\ttry {\r\n\t\t\tlocal.openFile(file);\r\n\t\t\topenFile = file;\r\n\t\t\tframe.setTitle(file.getName());\r\n\t\t\tedit = false;\r\n\t\t\tBibtexPrefs.addOpenedFile(file);\r\n\t\t\tpopulateRecentMenu();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\terrorDialog(e.toString());\r\n\t\t} catch (IllegalArgumentException e){\r\n\t\t\terrorDialog(\"The bibtex file \" +file.getPath()+ \" appears to be invalid.\\n\"\r\n\t\t\t\t\t+ \"Parsing error occured because you have the following in your file:\\n\"\r\n\t\t\t\t\t+e.getMessage());\r\n\t\t}\r\n\t}" ]
[ "0.5819325", "0.58047205", "0.56758416", "0.5596158", "0.5462993", "0.5435884", "0.53259623", "0.5297748", "0.5295511", "0.52774227", "0.52561826", "0.5249491", "0.5233148", "0.51767164", "0.5175009", "0.5168099", "0.51672864", "0.51574147", "0.5156929", "0.515124", "0.514828", "0.51353073", "0.51052797", "0.5103229", "0.51022846", "0.50963926", "0.50784564", "0.5071142", "0.5066676", "0.5066676", "0.506182", "0.506182", "0.50407493", "0.50100195", "0.5000242", "0.4993854", "0.49869892", "0.4971507", "0.4931407", "0.49164364", "0.49164188", "0.49144447", "0.49029756", "0.48962453", "0.48958606", "0.48880824", "0.48880824", "0.48880824", "0.48880824", "0.48880824", "0.4875448", "0.48675627", "0.48624197", "0.48585615", "0.4855504", "0.4846577", "0.48377833", "0.48369554", "0.48303166", "0.48295242", "0.48205453", "0.4818014", "0.481049", "0.47988114", "0.47988114", "0.47913516", "0.47818184", "0.4779291", "0.4778778", "0.4775041", "0.4773755", "0.4762201", "0.4741947", "0.47388834", "0.47386298", "0.47381586", "0.4738118", "0.47358873", "0.47333154", "0.47313467", "0.4730925", "0.47244343", "0.47177812", "0.47160128", "0.47105536", "0.47083232", "0.47061095", "0.47053772", "0.47044152", "0.47021145", "0.47020853", "0.47003704", "0.46965772", "0.46942067", "0.4691056", "0.4685682", "0.46820232", "0.46772018", "0.46716493", "0.46706474" ]
0.65030044
0
Override this to open the other files in the query.
public void openOtherRecords() { Booking recBooking = (Booking)this.getRecord(Booking.BOOKING_FILE); Tour recTour = (Tour)((ReferenceField)recBooking.getField(Booking.TOUR_ID)).getReferenceRecord(this); super.openOtherRecords(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void performFileSearch() {\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n\n // Filter to only show results that can be \"opened\", such as a file (as opposed to a list\n // of contacts or timezones)\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n\n // Filter to show only images, using the image MIME data type.\n // If one wanted to search for ogg vorbis files, the type would be \"audio/ogg\".\n // To search for all documents available via installed storage providers, it would be\n // \"*/*\".\n intent.setType(\"image/*\");\n\n startActivityForResult(intent, READ_REQUEST_CODE);\n // END_INCLUDE (use_open_document_intent)\n }", "protected void openFiles() {\n\t\tthis.container = fso.openFile(prefix+EXTENSIONS[CTR_FILE],\"rw\");\n\t\tthis.metaData = fso.openFile(prefix+EXTENSIONS[MTD_FILE], \"rw\");\n\t\tthis.reservedBitMap = fso.openFile(prefix+EXTENSIONS[RBM_FILE], \"rw\");\n\t\tthis.updatedBitMap = fso.openFile(prefix+EXTENSIONS[UBM_FILE], \"rw\");\n\t\tthis.freeList = fso.openFile(prefix+EXTENSIONS[FLT_FILE], \"rw\");\n\t}", "@Override\n public void run() {\n \t\n \t\t\n \t\tSearchFile.findFile(f1);\n }", "public void performFileSearch() {\n\n // ACTION_OPEN_DOCUMENT is the intent to choose a file via the system's file browser.\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n\n // Filter to only show results that can be \"opened\", such as a\n // file (as opposed to a list of contacts or timezones)\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n\n // Filter to show only images, using the image MIME data type.\n // If one wanted to search for ogg vorbis files, the type would be \"audio/ogg\".\n // To search for all documents available via installed storage providers, it would be \"*/*\".\n intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION);\n intent.setType(\"image/*\");\n\n startActivityForResult(intent, READ_REQUEST_CODE);\n }", "public void createFileObjects() {\n List<String> externalFiles = abbreviationsPreferences.getExternalJournalLists();\n externalFiles.forEach(name -> openFile(Paths.get(name)));\n }", "public void openFiles(List<Path> filesToOpen) {\n LibraryTab toRaise = null;\n int initialCount = filesToOpen.size();\n int removed = 0;\n\n // Check if any of the files are already open:\n for (Iterator<Path> iterator = filesToOpen.iterator(); iterator.hasNext(); ) {\n Path file = iterator.next();\n for (int i = 0; i < frame.getTabbedPane().getTabs().size(); i++) {\n LibraryTab libraryTab = frame.getLibraryTabAt(i);\n if ((libraryTab.getBibDatabaseContext().getDatabasePath().isPresent())\n && libraryTab.getBibDatabaseContext().getDatabasePath().get().equals(file)) {\n iterator.remove();\n removed++;\n // See if we removed the final one. If so, we must perhaps\n // raise the LibraryTab in question:\n if (removed == initialCount) {\n toRaise = libraryTab;\n }\n // no more LibraryTabs to check, we found a matching one\n break;\n }\n }\n }\n\n // Run the actual open in a thread to prevent the program\n // locking until the file is loaded.\n if (!filesToOpen.isEmpty()) {\n FileHistoryMenu fileHistory = frame.getFileHistory();\n filesToOpen.forEach(theFile -> {\n // This method will execute the concrete file opening and loading in a background thread\n openTheFile(theFile);\n fileHistory.newFile(theFile);\n });\n } else if (toRaise != null) {\n // If no files are remaining to open, this could mean that a file was\n // already open. If so, we may have to raise the correct tab:\n frame.showLibraryTab(toRaise);\n }\n }", "public void openFile(File selectedFile) {\n System.err.println(\"selected: \" + selectedFile);\n }", "private static List<BufferedInputStream> getOpenFiles(String[] args) {\n return Stream.of(args)\n .map(Paths::get)\n .map(EntryPoint::openFile)\n .filter(Optional::isPresent)\n .map(Optional::get)\n .map(BufferedInputStream::new)\n .collect(Collectors.toList());\n }", "public void openProject(File pfile, FileOpenSelector files) { }", "@Override\n\tpublic void openDocument(String path, String name) {\n\t\t\n\t}", "@Override\n public InputStream openInternalInputFile(String pathname) throws IOException {\n return new FileInputStream(pathname);\n }", "@Override\n void execute() {\n doc.open();\n }", "protected void open()\n {\n }", "public void performSearch() throws IOException {\n configuration();\n\n File fileDir = new File(queryFilePath);\n if (fileDir.isDirectory()) {\n File[] files = fileDir.listFiles();\n Arrays.stream(files).forEach(file -> performSearchUsingFileContents(file));\n }\n }", "private void query() {\n if (mDriveServiceHelper != null) {\n Log.d(\"error\", \"Querying for files.\");\n\n mDriveServiceHelper.queryFiles()\n .addOnSuccessListener(fileList -> {\n StringBuilder builder = new StringBuilder();\n for (File file : fileList.getFiles()) {\n builder.append(file.getName()).append(\"\\n\");\n }\n String fileNames = builder.toString();\n\n// mFileTitleEditText.setText(\"File List\");\n// mDocContentEditText.setText(fileNames);\n\n setReadOnlyMode();\n })\n .addOnFailureListener(exception -> Log.e(\"error\", \"Unable to query files.\", exception));\n }\n }", "@FXML\n private void openFile() {\n try {\n \tFile file = new File(filmTable.getSelectionModel().getSelectedItem().getLocation());\n desktop.open(file);\n } catch (IOException ex) {\n \tex.printStackTrace();\n }\n }", "private void showOpenFileDialog() {\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n intent.setType(\"*/*\");\n // We accept PDF files and images (for image documents).\n intent.putExtra(Intent.EXTRA_MIME_TYPES, new String[] {\"application/pdf\", \"image/*\"});\n\n // Set of the intent for result, so we can retrieve the Uri of the selected document.\n startActivityForResult(intent, REQUEST_OPEN_DOCUMENT);\n }", "private void openFile()\r\n {\r\n int returnState = openFileChooser.showOpenDialog(frame);\r\n if (returnState == JFileChooser.APPROVE_OPTION) \r\n {\r\n File file = openFileChooser.getSelectedFile();\r\n openUriInBackground(file.toURI());\r\n } \r\n }", "public void projectOpened(File pfile, FileOpenSelector files) { }", "private InputStream openContentStream() {\n\t\tString contents =\n\t\t\t\"This is the initial file contents for *.opera file that should be word-sorted in the Preview page of the multi-page editor\";\n\t\treturn new ByteArrayInputStream(contents.getBytes());\n\t}", "@Override\n public InputStream openInputFile(String pathname) throws IOException {\n return new FileInputStream(pathname);\n }", "public void doOpen() {\n\n if (!canChangeDocuments()) {\n return;\n }\n\n TextDocument document = fApplication.openDocument(this);\n\n if (document != null) {\n setDocument(document);\n }\n }", "public static void openTextFile() {\n\t\ttry {\n\t\t\tin1 = new Scanner(new File(file1));\n\t\t\tin2 = new Scanner(new File(file2));\n\t\t} catch(FileNotFoundException ex) {\n\t\t\tSystem.err.println(\"Error opening file\" + ex);\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "protected void openExtract(File odfFile, File recordsDir) {\n\t\t\n\t\tif (closed == true) {\n\t\t\t//Directory names with spaces in them cause hassles\n\t\t\tif(outputName.length() > 0) {\n\t\t\t\tdocDir = new File(recordsDir, outputName.replace(' ', '_'));\n\t\t\t} else {\n\t\t\t\tdocDir = new File(recordsDir, odfFile.getName().replace(' ', '_'));\n\t\t\t}\n\t\t\tif (!docDir.exists()) {\n\t\t\t\tdocDir.mkdir();\n\t\t\t\tLOGGER.info(\"Created document directory:\" + docDir.getAbsolutePath());\n\t\t\t}\n\t\t\t\n\t\t\tif (extractName != null) {\n\t\t\t\textractDir = new File(docDir, extractName);\n\t\t\t\tLOGGER.info(\"Writing to extract directory: \" + extractName);\n\t\t\t} \n\t\t\telse {\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy_MM_dd_HHmmss_SSS\");\n\t\t\t\tDate date = new Date();\n\t\t\t\tString rundate = dateFormat.format(date);\n\n\t\t\t\textractDir = new File(docDir, rundate);\n\t\t\t}\n\t\t\t//Problem if two tests run in the same second\n\t\t\t// we lose one.\n\t\t\tif (!extractDir.exists()) {\n\t\t\t\textractDir.mkdir();\n\t\t\t\tLOGGER.info(\"Created extract directory:\" + extractDir.getAbsolutePath());\n\t\t\t}\n\t\t\t\t\n\t\t\ttry {\n\t\t\t\tFile resultsFile = new File(extractDir, METAFILE);\n\t\t\t\tresultsXMLWriter.open(resultsFile);\n\n\t\t\t\tFile gaugesFile = new File(extractDir, GAUGES_EXT);\n\t\t\t\tgaugesWriter.open(gaugesFile);\n\t\t\t\tFile gaugesXMLFile = new File(extractDir, \"gauges.xml\");\n\t\t\t\tgaugesXMLWriter.open(gaugesXMLFile);\n\n\t\t\t\t// keep styles info in a separate file?\n\t\t\t\tFile stylesFile = new File(extractDir, \"odfestyles.json\");\n\t\t\t\tstylesWriter.open(stylesFile);\n\t\t\t\tFile stylesXMLFile = new File(extractDir, \"styles.xml\");\n\t\t\t\tstylesXMLWriter.open(stylesXMLFile);\n\t\t\t\t\n\t\t\t\tFile xPathFile = new File(extractDir, \"xpath.json\");\n\t\t\t\txPathWriter.open(xPathFile);\n\t\t\t\tFile xPathXMLFile = new File(extractDir, PATHSXMLFILE);\n\t\t\t\txPathXMLWriter.open(xPathXMLFile, PATHSXSLFILE);\n\t\t\t\txPathXMLWriter.writeJson(PATHSJSONFILE);\n\t\t\t\t\n\t\t\t\tFile xPathDotFile = new File(extractDir, \"xpath.dot\");\n\t\t\t\txPathDotWriter.open(xPathDotFile);\n\t\t\t\txPathDotWriter.setOdfFilename(odfFile.getName());\n\t\t\t\txPathDotWriter.setIncludeLegend(includeLegend);\n\t\t\t} catch (XMLStreamException 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\tclosed = false;\n\t\t}\n\t}", "public static void processOneFileSelecction()\n {\n int answer = JSoundsMainWindowViewController.jfcOneFile.showOpenDialog(JSoundsMainWindowViewController.jSoundsMainWindow);\n \n if (answer == JFileChooser.APPROVE_OPTION)\n {\n File actualDirectory = JSoundsMainWindowViewController.jfcOneFile.getCurrentDirectory();\n String directory = actualDirectory.getAbsolutePath() + \"/\" + JSoundsMainWindowViewController.jfcOneFile.getSelectedFile().getName();\n UtilFunctions.listOneFile(JSoundsMainWindowViewController.jfcOneFile.getSelectedFile());\n JSoundsMainWindowViewController.orderBy(true, false, false); \n }\n }", "public void openFile() {\n\t\tfc.setCurrentDirectory(new File(System.getProperty(\"user.dir\")));\n\t\tint returnVal = fc.showOpenDialog(null);\n\t\tif (returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\tFile file = fc.getSelectedFile();\n\t filename.setText(file.getName());\n\t try {\n\t\t\t\tmodel.FileContent(file);\t//read the content of the input file\n\t\t\t\tplotContent.repaint();\t//repaint the JComponent\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}", "@Override\n\t\tpublic void open() {\n\t\t\tRange range = positionRangeTo.getRanges().get(0);\n\t\t\tUIHelper.selectAndReveal(new File(range.getFile()), range.getFrom(), range.getTo() - range.getFrom());\n\t\t}", "public void separateFileToQueries(Indexer indexer, CityIndexer cityIndexer, Ranker ranker, File queriesFile, boolean withSemantic, ArrayList<String> chosenCities, ObservableList<String> citiesByTag, boolean withStemming, String saveInPath) {\n try {\n String allQueries = new String(Files.readAllBytes(Paths.get(queriesFile.getAbsolutePath())), Charset.defaultCharset());\n String[] allQueriesArr = allQueries.split(\"<top>\");\n\n for (String query : allQueriesArr) {\n if(query.equals(\"\")){\n continue;\n }\n String queryId = \"\", queryText = \"\", queryDescription = \"\";\n String[] lines = query.toString().split(\"\\n\");\n for (int i = 0; i < lines.length; i++){\n if(lines[i].contains(\"<num>\")){\n queryId = lines[i].substring(lines[i].indexOf(\":\") + 2);\n }\n else if(lines[i].contains(\"<title>\")){\n queryText = lines[i].substring(8);\n }\n else if(lines[i].contains(\"<desc>\")){\n i++;\n while(i < lines.length && !lines[i].equals(\"\")){\n queryDescription += lines[i];\n i++;\n }\n }\n }\n search(indexer, cityIndexer, ranker, queryText, withSemantic, chosenCities, citiesByTag, withStemming, saveInPath, queryId, queryDescription);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void open()\n {\n try\n {\n // Found how to append to a file here \n //http://stackoverflow.com/questions/1625234/how-to-append-text-to-an-existing-file-in-java\n r = new PrintWriter( new BufferedWriter(new FileWriter(filePath, true)));\n }\n catch( IOException e )\n {\n r = null;\n UI.println(\"An error occored when operning stream to the log file.\\n This game wont be logged\");\n Trace.println(e);\n }\n }", "private void cmdOpen(String line) {\n boolean doEcho = true;\n StringTokenizer st = new StringTokenizer(line);\n\n // if there is no filename and option\n if (!st.hasMoreTokens()) {\n Log.error(\"Unknown command `open \" + line + \"'. \" + \"Try `help'.\");\n return;\n }\n\n String token = st.nextToken();\n // option quiet\n if (token.equals(\"-q\")) {\n doEcho = false;\n\n // if there is no filename\n if (!st.hasMoreTokens()) {\n Log.error(\"Unknown command `open \" + line + \"'. \"\n + \"Try `help'.\");\n return;\n }\n token = st.nextToken();\n }\n\n // to find out what command will be needed\n try {\n \t// if quoted add remaining tokens\n \tif (token.startsWith(\"\\\"\")) {\n \t\twhile (st.hasMoreTokens()) {\n \t\t\ttoken += \" \" + st.nextToken();\n \t\t}\n \t}\n \t\n \tString filename = getFilenameToOpen(token);\n String firstWord = getFirstWordOfFile(filename);\n setFileClosed();\n \n // if getFirstWordOfFile returned with error code, than\n // end this method.\n if (firstWord != null && firstWord.equals(\"ERROR: -1\")) {\n return;\n }\n if (firstWord == null) {\n Log.println(\"Nothing to do, because file `\" + line + \"' \"\n + \"contains no data!\");\n // Necessary if USE is started with a cmd-file and option -q or\n // -qv. This call provides the readline stack with the one\n // readline object and no EmptyStackException will be thrown.\n if (Options.cmdFilename != null) {\n cmdRead(Options.cmdFilename, false);\n }\n return;\n }\n if (firstWord.startsWith(\"model\")) {\n cmdOpenUseFile(token);\n } else if (firstWord.startsWith(\"context\")) {\n cmdGenLoadInvariants(token, system(), doEcho);\n } else if (firstWord.startsWith(\"testsuite\")) {\n \tcmdRunTestSuite(token);\n } else {\n cmdRead(token, doEcho);\n }\n \n if (this.openFiles.size() <= 1) {\n \tString opened;\n \t\n \tif (this.openFiles.size() == 0)\n \t\topened = filename;\n \telse\n \t\topened = this.openFiles.peek().toString();\n \t\n \t\tif (Options.getRecentFiles().contains(opened)) {\n \t\t\tOptions.getRecentFiles().remove(opened);\n \t\t}\n \t\t \t\t\t\n \t\tOptions.getRecentFiles().push(opened);\n \t}\n } catch (NoSystemException e) {\n Log.error(\"No System available. Please load a model before \"\n + \"executing this command.\");\n }\n }", "public void handleOpenFile (File inFile) {\n openFile (inFile);\n }", "void open(String fileName);", "@Override\n \t\t\t\tpublic void doOpen() {\n \n \t\t\t\t}", "public abstract void open();", "public abstract void open();", "public void open() {\r\n\t}", "public void open() throws DbException, NoSuchElementException, TransactionAbortedException {\n\t\tchildOperator.open();\n\t\tsuper.open();\n\n\t}", "public void open() {\n\t}", "public String openFile() {\n\t\t\n\t\tString chosenFile = \"\";\n\t\treturn chosenFile;\n\t\t\n\t}", "public void openFileDialog() {\n\tswitch(buttonAction) {\n\t case SELECT_FILES:\n openFileDialog(fileUpload, true);\n break;\n\t case SELECT_FILE:\n default:\n openFileDialog(fileUpload, false);\n break;\n\t}\n }", "void open() {\n \tJFileChooser fileopen = new JFileChooser();\n int ret = fileopen.showDialog(null, \"Open file\");\n\n if (ret == JFileChooser.APPROVE_OPTION) {\n document.setFile(fileopen.getSelectedFile());\n textArea.setText(document.getContent());\n }\n }", "public void run() throws IOException {\n\t\tMultiQuery multi = new MultiQuery(dos, dis);\n\t\tmulti.add(this);\n\t\tmulti.run();\n\t}", "public void open(){\n\t\ttry {\n\t\t\tdocFactory = DocumentBuilderFactory.newInstance();\n\t\t\tdocBuilder = docFactory.newDocumentBuilder();\n\t\t\tdoc = docBuilder.parse(ManipXML.class.getResourceAsStream(path));\n\t\t\t\n\t\t} catch (ParserConfigurationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SAXException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void openForInput (DataDictionary dict) \n throws IOException {\n \n // If this is markdown, then convert it to HTML before going any farther\n if (context.isMarkdown()) {\n if (inFile == null && inURL != null) {\n mdReader = new MetaMarkdownReader(inURL, \n MetaMarkdownReader.MARKDOWN_TYPE);\n }\n else\n if (inFile != null) {\n mdReader = new MetaMarkdownReader(inFile, \n MetaMarkdownReader.MARKDOWN_TYPE);\n }\n else\n if (textLineReader != null) {\n mdReader = new MetaMarkdownReader(textLineReader, \n MetaMarkdownReader.MARKDOWN_TYPE);\n }\n if (mdReader != null) {\n mdReader.setMetadataAsMarkdown(metadataAsMarkdown);\n mdReader.openForInput();\n inFile = null;\n inURL = null;\n textLineReader = new StringLineReader(mdReader.getHTML());\n mdReader.close();\n mdReader = null;\n }\n }\n \n if (inFile == null && inURL != null) {\n HttpURLConnection.setFollowRedirects(true);\n inConnect = inURL.openConnection();\n if (inConnect.getClass().getName().endsWith(\"HttpURLConnection\")) {\n HttpURLConnection httpConnect = (HttpURLConnection)inConnect;\n httpConnect.setInstanceFollowRedirects(true);\n httpConnect.setConnectTimeout(0);\n }\n inConnect.connect();\n inStream = inConnect.getInputStream();\n streamReader = new InputStreamReader(inStream, \"UTF-8\");\n reader = new BufferedReader(streamReader);\n Logger.getShared().recordEvent(\n LogEvent.NORMAL,\n \"HTMLFile Open for input URL \" + inURL.toString()\n + \" with encoding \" + streamReader.getEncoding(),\n false);\n } \n else\n if (inFile != null) {\n streamReader = new FileReader(inFile);\n reader = new BufferedReader(streamReader);\n }\n else\n if (textLineReader != null) {\n textLineReader.open();\n reader = null;\n }\n \n this.dict = dict;\n dataRec = new DataRecord();\n recDef = new RecordDefinition(this.dict);\n openWithRule();\n recordNumber = 0;\n atEnd = false;\n }", "void open(String fileName) throws IOException, ParserConfigurationException, SAXException;", "protected void open () {\n\t\tif (this.container==null)\n\t\t\ttry {\n\t\t\t\tmigrateOnDemand();\n\t\t\t\topenFiles();\n\t\t\t\tthis.blockSize = metaData.readInt();\n\t\t\t\tthis.size = metaData.readInt();\n\t\t\t}\n\t\t\tcatch (IOException ie) {\n\t\t\t\tthrow new WrappingRuntimeException(ie);\n\t\t\t}\n\t}", "private void openFile() {\n\t\tJDialog fileDialog = new JDialog(this, \"Select File\", true);\n\t\tFileDialog filePanel = new FileDialog(this, this, false, false, false);\n\t\tfileDialog.getContentPane().add(filePanel);\n\t\tfileDialog.pack();\n\n\t\t// set the location.\n\t\tPoint p1 = this.getLocation();\n\t\tDimension d1 = this.getSize();\n\t\tDimension d2 = fileDialog.getSize();\n\t\tfileDialog.setLocation((p1.x + (d1.width / 2)) - (d2.width / 2),\n\t\t\t\t(p1.y + (d1.height / 2)) - (d2.height / 2));\n\n\t\tfilePanel.setCurrentDirectory(Config.getInstance().getBaseHarvestDir());\n\t\tfileDialog.show();\n\t}", "public void open() {\r\n if (mFailedOpen) {\r\n return;\r\n }\r\n\r\n File base = new File(mBaseFileName);\r\n if (mMaxLogSizeBytes > 0 && base.length() > (mMaxLogSizeBytes / mNumSegments - 1024)) {\r\n Log.d(LOG_TAG, \"Log file exceeds maximum size\");\r\n close();\r\n renameLogs();\r\n open();\r\n } else if (mCurrentFileStream == null) {\r\n try {\r\n mCurrentFileStream = new FileOutputStream(mBaseFileName, true);\r\n } catch (FileNotFoundException e) {\r\n Log.e(LOG_TAG, \"Could not open log file \" + e.getMessage());\r\n mFailedOpen = true;\r\n mCurrentFileStream = null;\r\n }\r\n }\r\n }", "@Override\n public InputStream openStream() throws IOException\n {\n return new FileInputStream(temp);\n }", "private void tryToOpen() {\n if (current != null) {\n if (!this.tryToClose()) return;\n }\n\n //open an existing file...\n JFileChooser chooser = new JFileChooser(new File(\".\"));\n chooser.setDialogTitle(\"Select model file\");\n chooser.setFileFilter(new FileNameExtensionFilter(\n \"Only xml files\",\"xml\"\n ));\n\n int result = chooser.showOpenDialog(this);\n if (result == JFileChooser.APPROVE_OPTION) {\n File file = chooser.getSelectedFile();\n try {\n current = new Document(file);\n this.update();\n } catch (Exception e) {\n JOptionPane.showMessageDialog(this, \"ERROR: the file '\" + file.getName() + \"' could not be opened!\", \"An Error Occured\", JOptionPane.ERROR_MESSAGE);\n// e.printStackTrace();\n }\n }\n }", "private static File openFile(String file) {\r\n \tFile currFile;\r\n\r\n \tfor (String directory : dir) {\r\n \t\tcurrFile = new File(directory.concat(file));\r\n \t\tif (currFile.exists() && !currFile.isDirectory()) {\r\n \t\t\treturn currFile;\r\n \t\t}\r\n \t}\r\n \treturn null;\r\n }", "private void openFileChoose() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(intent, PEGA_IMAGEM);\n }", "public List<File> selectByQuery(FileQuery fileQuery) {\n return fileDao.selectByQuery(fileQuery);\n }", "private void performSearchUsingFileContents(File file) {\n try {\n FileUtility.CustomFileReader customFileReader =\n new FileUtility.CustomFileReader(file.getAbsolutePath()\n .replace(\".txt\", \"\"));\n\n String queryString = null; int i = 1;\n while ((queryString = customFileReader.readLineFromFile()) != null) {\n \t\n Query q = new QueryParser(Version.LUCENE_47, \"contents\",\n analyzer).parse(QueryParser.escape(queryString));\n\n collector = TopScoreDocCollector\n .create(100, true);\n searcher.search(q, collector);\n ScoreDoc[] hits = collector.topDocs().scoreDocs;\n\n Map<String, Float> documentScoreMapper =\n new HashMap<>();\n Arrays.stream(hits).forEach(hit ->\n {\n int docId = hit.doc;\n Document d = null;\n try {\n d = searcher.doc(docId);\n documentScoreMapper.put(d.get(\"path\"), hit.score);\n } catch (IOException e) {\n e.printStackTrace();\n }\n });\n\n SearchResult searchResult =\n new SearchResult(String.valueOf(i), documentScoreMapper);\n\n FileUtility.writeToFile(searchResult, SEARCH_RESULT_DIR + File.separator + i);\n i++;\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "void openFromFileClicked() {\n\t\tif (GeoGebraJSNativeBridge.get() != null) {\n\t\t\tGeoGebraJSNativeBridge.get().openFromFileClickedNative();\n\t\t}\n\t}", "void doShowFiles()\n\t{\n\t\ttry\n\t\t{\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tIterator itr = m_fileInfo.getAllFiles();\n\n\t\t\twhile(itr.hasNext())\n\t\t\t{\n\t\t\t\tSourceFile m = (SourceFile) ((Map.Entry)itr.next()).getValue();\n\n\t\t\t\tString name = m.getName();\n\t\t\t\tint id = m.getId();\n\t\t\t\tString path = m.getFullPath();\n\n\t\t\t\tsb.append(id);\n\t\t\t\tsb.append(' ');\n\t\t\t\tsb.append(path);\n\t\t\t\tsb.append(\", \"); //$NON-NLS-1$\n\t\t\t\tsb.append(name);\n\t\t\t\tsb.append(m_newline);\n\t\t\t}\n\t\t\tout( sb.toString() );\n\t\t}\n\t\tcatch(NullPointerException npe)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"noSourceFilesFound\")); //$NON-NLS-1$\n\t\t}\n\t}", "protected void _openReader() throws IllegalActionException {\n\t\tfileOrURL.close();\n\n\t\t// Ignore if the fileOrUL is blank.\n\t\tif (fileOrURL.getExpression().trim().equals(\"\")) {\n\t\t\t_soundReader = null;\n\t\t\t_reachedEOF = true;\n\t\t} else {\n\t\t\t// Each read this many samples per channel when\n\t\t\t// _soundReader.getSamples() is called.\n\t\t\t// This value was chosen arbitrarily.\n\t\t\tint getSamplesArraySize = 64;\n\n\t\t\ttry {\n\t\t\t\t_soundReader = new SoundReader(fileOrURL.asURL(),\n\t\t\t\t\t\tgetSamplesArraySize);\n\t\t\t} catch (IOException ex) {\n\t\t\t\tString newFileOrURL = ((StringToken) fileOrURL.getToken())\n\t\t\t\t\t\t.stringValue();\n\t\t\t\tthrow new IllegalActionException(this, ex,\n\t\t\t\t\t\t\"Cannot open fileOrURL '\" + newFileOrURL + \"'.\");\n\t\t\t}\n\n\t\t\t// Get the number of audio channels.\n\t\t\t_channels = _soundReader.getChannels();\n\n\t\t\t// Begin immediately reading data so that we stay at\n\t\t\t// least one sample ahead. This is important so that\n\t\t\t// postfire() will return false when the last sample\n\t\t\t// in the file is encountered, rather than on the next\n\t\t\t// iteration.\n\t\t\ttry {\n\t\t\t\t// Read in audio data.\n\t\t\t\t_audioIn = _soundReader.getSamples();\n\t\t\t} catch (Exception ex) {\n\t\t\t\tthrow new IllegalActionException(this, ex,\n\t\t\t\t\t\t\"Unable to get samples from the file.\");\n\t\t\t}\n\n\t\t\t_sampleIndex = 0;\n\n\t\t\t// Check that the read was successful\n\t\t\tif (_audioIn != null) {\n\t\t\t\t_reachedEOF = false;\n\t\t\t} else {\n\t\t\t\t_reachedEOF = true;\n\t\t\t}\n\t\t}\n\t}", "private void performFileSearch() {\n Intent intent = new Intent();\n intent.setType(\"*/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), PICK_IMAGE_REQUEST);\n\n }", "private void openImageIntent() {\n\t\tfinal File root = new File(Environment.getExternalStorageDirectory()\n\t\t\t\t+ File.separator + \"MyDir\" + File.separator);\n\t\troot.mkdirs();\n\n\t\tfinal File sdImageMainDirectory = new File(root, getUniquePhotoName());\n\t\toutputFileUri = Uri.fromFile(sdImageMainDirectory);\n\n\t\t// Camera.\n\t\tfinal List<Intent> cameraIntents = new ArrayList<Intent>();\n\t\tfinal Intent captureIntent = new Intent(\n\t\t\t\tandroid.provider.MediaStore.ACTION_IMAGE_CAPTURE);\n\t\tfinal PackageManager packageManager = source.getPackageManager();\n\t\tfinal List<ResolveInfo> listCam = packageManager.queryIntentActivities(\n\t\t\t\tcaptureIntent, 0);\n\t\tfor (ResolveInfo res : listCam) {\n\t\t\tfinal String packageName = res.activityInfo.packageName;\n\t\t\tfinal Intent intent = new Intent(captureIntent);\n\t\t\tintent.setComponent(new ComponentName(res.activityInfo.packageName,\n\t\t\t\t\tres.activityInfo.name));\n\t\t\tintent.setPackage(packageName);\n\t\t\tintent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);\n\t\t\tcameraIntents.add(intent);\n\t\t}\n\n\t\t// Filesystem.\n\t\tfinal Intent galleryIntent = new Intent();\n\t\tgalleryIntent.setType(\"*/*\");\n\t\tgalleryIntent.setAction(Intent.ACTION_GET_CONTENT);\n\n\t\t// Chooser of filesystem options.\n\t\tIntent chooserIntent = Intent.createChooser(galleryIntent, \"Select Source\");\n\n\t\t// Add the camera options.\n\t\t//chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS,\n\t\t//\t\tcameraIntents.toArray(new Parcelable[] {}));\n\t\t\n\t\tIntent getContentIntent = FileUtils.createGetContentIntent();\n\n\t chooserIntent = Intent.createChooser(getContentIntent, \"Select a file\");\n\n\t\tsource.startActivityForResult(chooserIntent, Constants.QUIZSHOW_DATA);\n\t\t\n\t}", "public void open()\n {\n }", "private void openFile() {\n \n // Initialize local variables\n File clubRecordsFolder = null;\n File opYearFolder = null;\n File eventsFolder = null;\n ClubEventCalc newClubEventCalc = new ClubEventCalc();\n StringDate strDate = newClubEventCalc.getStringDate();\n File result = null;\n String resultName = \"\";\n XFileChooser chooser = new XFileChooser ();\n chooser.setFileSelectionMode(XFileChooser.DIRECTORIES_ONLY);\n boolean ok = true;\n int progress = 0;\n String desiredFolder = \"\";\n while (ok && progress < 3) {\n switch (progress) {\n case 0: \n desiredFolder = \"Folder Containing Club Records\";\n break;\n case 1:\n chooser.setCurrentDirectory(clubRecordsFolder);\n desiredFolder = \"Folder for Desired Operating Year\";\n break;\n case 2:\n chooser.setCurrentDirectory(opYearFolder);\n desiredFolder = \"Events Folder\";\n break;\n }\n chooser.setDialogTitle (\"Specify \" + desiredFolder);\n result = chooser.showOpenDialog (this);\n if (result != null\n && result.exists()\n && result.canRead()\n && result.isDirectory()) {\n resultName = result.getName();\n boolean folderContainsOpYear = strDate.parseOpYear(resultName);\n boolean pathContainsOpYear = newClubEventCalc.setFileName(result);\n if (folderContainsOpYear) {\n opYearFolder = result;\n progress = 2;\n }\n else\n if (pathContainsOpYear) {\n eventsFolder = result;\n progress = 3;\n }\n else\n if (progress < 1) {\n clubRecordsFolder = result;\n progress = 1;\n } else {\n ok = false;\n JOptionPane.showMessageDialog(this,\n \"A Valid Operating Year Folder was not specified\",\n \"Operating Year Folder Missing\",\n JOptionPane.WARNING_MESSAGE,\n Home.getShared().getIcon());\n }\n } else {\n ok = false;\n JOptionPane.showMessageDialog(this,\n \"A Valid \" + desiredFolder + \" was not specified\",\n \"Invalid Folder Specification\",\n JOptionPane.WARNING_MESSAGE,\n Home.getShared().getIcon());\n }\n }\n \n if (ok) {\n closeFile();\n fileSpec = recentFiles.addRecentFile (result);\n handleOpenFile(fileSpec);\n }\n currentFileModified = false;\n }", "public void opened();", "private void startFileSelection() {\n final Intent chooseFile = new Intent(Intent.ACTION_GET_CONTENT);\n chooseFile.setType(getString(R.string.file_type));\n startActivityForResult(chooseFile, PICK_FILE_RESULT_CODE);\n }", "public InputStream open(Context context, Uri uri) throws FileNotFoundException {\n Cursor cursor;\n Uri uri2;\n block5 : {\n block4 : {\n cursor = this.query.queryPath(context, uri);\n if (cursor != null) {\n try {\n Uri uri3;\n if (!cursor.moveToFirst()) break block4;\n uri2 = uri3 = this.parseThumbUri(cursor);\n break block5;\n }\n catch (Throwable var6_7) {\n if (cursor == null) throw var6_7;\n cursor.close();\n throw var6_7;\n }\n }\n }\n uri2 = null;\n }\n if (cursor != null) {\n cursor.close();\n }\n InputStream inputStream = null;\n if (uri2 == null) return inputStream;\n return context.getContentResolver().openInputStream(uri2);\n }", "public void\topen(File path) throws IOException;", "@Override\n\tpublic void open() {\n\t\t\n\t}", "public void openFile(Path file) {\n openFiles(new ArrayList<>(List.of(file)));\n }", "private Stream<File> getFileStreamFromView() {\n // Copy the values out of the UI and into a temp list, so that the UI\n // can be updated without stomping on the grabbed values.\n final List<DirectoryListItem> items = new ArrayList<>(gridView.getItems());\n\n return items.stream().map(DirectoryListItem::getFile);\n }", "private void open() {\n\t\tint state = fileChooser.showOpenDialog(this);\n\t\tswitch (state) {\n\t\tcase JFileChooser.CANCEL_OPTION:\n\t\t\tbreak;\n\t\tcase JFileChooser.APPROVE_OPTION:\r\n\t\t\tFile file = fileChooser.getSelectedFile();\r\n\t\t\t//System.out.println(\"Getting file...\");\r\n\t\t\ttry {\r\n\t\t\t\tfis = new FileInputStream(file);\r\n\t\t\t\tbyte[] b = new byte[fis.available()];\r\n\t\t\t\tif (fis.read(b) == b.length) {\r\n\t\t\t\t\t//System.out.println(\"File read: \" + file.getName());\r\n\t\t\t\t}\r\n\t\t\t\tdistributable = new Distributable(file.getName(), b);\r\n\t\t\t\tdiscoveryRelay.setDistributable(distributable);\r\n\t\t\t} \r\n\t\t\tcatch (FileNotFoundException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} \r\n\t\t\tcatch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\n\t\t\tbreak;\n\t\tcase JFileChooser.ERROR_OPTION:\n\t\t}\n\t}", "private void openImageFile(ImageActions action) {\n\t\tsetImageHolder(action, RGPTUIUtil.getImageFile(this));\r\n\t}", "public void ensureOpenFiles()\n throws DataOrderingException;", "public void openFile(ActionEvent e) {\r\n JFileChooser chooser = new JFileChooser();\r\n\r\n int returnVal = chooser.showOpenDialog(null);\r\n if (returnVal == JFileChooser.APPROVE_OPTION) {\r\n this.is_alg_started = false;\r\n this.is_already_renumbered = false;\r\n if (e.getActionCommand().equals(\"nodelist\")) {\r\n this.nodefileText.setText(chooser.getSelectedFile().getAbsolutePath());\r\n }\r\n if (e.getActionCommand().equals(\"edgelist\")) {\r\n this.edgeFileText.setText(chooser.getSelectedFile().getAbsolutePath());\r\n }\r\n }\r\n }", "public DBCursor getFileList(DBObject query) {\n\treturn getFileList(query, new BasicDBObject(\"filename\", 1));\n }", "private void onFileClick(Item o)\n {\n \tIntent intent = new Intent();\n intent.putExtra(\"GetPath\",currentDir.toString());\n intent.putExtra(\"GetFileName\",o.getName());\n setResult(RESULT_OK, intent);\n finish();\n }", "@Override\n public void run() {\n DriveId parentId = getFolderID(file, googleAPI);\n\n // This returns the id of the file itself. We don't found to do that.\n// if (parentId != null)\n// parentId = getID(parentId, fileName, fileType, googleAPI);\n\n // Let the Callback handle a 'not found' file.\n// if (parentId == null) {\n// return;\n// }\n\n Filter filter = Filters.and(\n Filters.in(SearchableField.PARENTS, parentId)\n , Filters.eq(SearchableField.TRASHED, false)\n , Filters.eq(SearchableField.TITLE, fileName));\n\n // Create a query for a specific filename in Drive.\n final Query query = new Query.Builder()\n .addFilter(filter)\n .build();\n\n Drive.DriveApi.query(googleAPI, query)\n .setResultCallback(resultOfQuery);\n }", "private void seekBy() {\n Queue<File> queue = new LinkedList<>();\n queue.offer(new File(root));\n while (!queue.isEmpty()) {\n File file = queue.poll();\n File[] list = file.listFiles();\n if (file.isDirectory() && list != null) {\n for (File tempFile : list) {\n queue.offer(tempFile);\n }\n } else {\n if (args.isFullMatch() && searchingFile.equalsIgnoreCase(file.getName())) {\n result.add(file);\n }\n if (args.isMask() && searchingFile.replaceAll(\"\\\\*\", \".*\").equalsIgnoreCase(file.getName())) {\n result.add(file);\n }\n if (args.isRegex() && file.getName().matches(args.getName())) {\n result.add(file);\n }\n }\n }\n this.writeLog(output, result);\n }", "public static List<SQLquery> updateQueryList() throws IOException {\n\n List<String> querynames = new ArrayList<String>();\n List<SQLquery> queries = new ArrayList<SQLquery>();\n File curDir = new File(\".\");\n String[] fileNames = curDir.list();\n\n for (int i = 0; i <= fileNames.length - 1; i++) {\n\n /**\n * SELECT ONLY .XYZ FILES FROM FOLDER\n */\n System.out.println(fileNames[i]);\n if (fileNames[i].contains(\".xyz\")) {\n\n querynames.add(fileNames[i]);\n\n }\n\n }\n\n /**\n * create SQLquery objects with appropriate name and query string\n */\n for ( String querypath : querynames ) {\n\n String content = new String(Files.readAllBytes(Paths.get(querypath)));\n SQLquery newquery = new SQLquery(querypath.replace(\".xyz\",\"\"),content);\n queries.add(newquery);\n\n }\n\n /**\n * return query list\n */\n return queries;\n\n }", "@Override\n public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) {\n MatrixCursor matrixCursor = new MatrixCursor(new String[]{\"key\", \"value\"});\n String filename = selection;\n String line = \"\";\n if (selection.equals(\"@\")) {\n\n Log.v(\"File input stream\", filename);\n String[] fileList = getContext().fileList();\n Log.v(\"File input stream\", Integer.toString(fileList.length));\n\n for (int i = 0; i < fileList.length; i++) {\n Log.v(\"File input stream\", fileList[i]);\n\n try {\n filename = fileList[i];\n FileInputStream in = getContext().openFileInput(filename);\n /* Log.e(TAG, \"File inputStreamReader.\");*/\n InputStreamReader inputStreamReader = new InputStreamReader(in);\n BufferedReader bufferedReader = new BufferedReader(inputStreamReader);\n StringBuilder sb = new StringBuilder();\n line = bufferedReader.readLine();\n sb.append(line);\n in.close();\n } catch (Exception e) {\n Log.e(TAG, \"File read failed...\");\n e.printStackTrace();\n }\n MatrixCursor.RowBuilder builder = matrixCursor.newRow();\n builder.add(\"key\", filename);\n builder.add(\"value\", line);\n Log.v(filename, line);\n\n }\n matrixCursor.setNotificationUri(getContext().getContentResolver(), uri);\n\n\n return matrixCursor;\n\n\n }\n else if (selection.equals(\"*\")) {\n\n try {\n int count = 0;\n sendQueryReq();\n Log.v(\"sendQueryReq\",Integer.toString(connected.length));\n\n String[] fileList = getContext().fileList();\n Log.v(\"File input stream\", Integer.toString(fileList.length));\n\n for (int i = 0; i < fileList.length; i++) {\n Log.v(\"File input stream\", fileList[i]);\n\n try {\n filename = fileList[i];\n FileInputStream in = getContext().openFileInput(filename);\n /* Log.e(TAG, \"File inputStreamReader.\");*/\n InputStreamReader inputStreamReader = new InputStreamReader(in);\n BufferedReader bufferedReader = new BufferedReader(inputStreamReader);\n StringBuilder sb = new StringBuilder();\n line = bufferedReader.readLine();\n sb.append(line);\n in.close();\n } catch (Exception e) {\n Log.e(TAG, \"File read failed...\");\n e.printStackTrace();\n }\n MatrixCursor.RowBuilder builder = matrixCursor.newRow();\n builder.add(\"key\", filename);\n builder.add(\"value\", line);\n Log.v(filename, line);\n\n }\n\n for(int i=0;i<connected.length;i++){\n if(connected[i] == true)\n count++;\n }\n Log.v(\"sendQueryReq\",Integer.toString(count));\n\n ArrayList<String[]> temp;\n\n for(int i=0;i<count-1;i++){\n temp = reqQueTotal.take();\n Log.v(\"waiting\",\"waiting completed\");\n for(String[] result : temp){\n MatrixCursor.RowBuilder builder = matrixCursor.newRow();\n builder.add(\"key\",result[0] );\n builder.add(\"value\", result[1]);\n Log.v(result[0],result[1]);\n\n }\n\n }\n\n } catch (Exception e) {\n Log.e(TAG, \"File read failed...\");\n e.printStackTrace();\n }\n matrixCursor.setNotificationUri(getContext().getContentResolver(), uri);\n\n return matrixCursor;\n\n\n //Log.v(\"query\", selection);\n } else {\n String hashedKey=\"\";\n Node responsibleNode;\n try{\n hashedKey = genHash(filename);\n }\n catch(Exception e){\n }\n responsibleNode = myNode.lookUp(hashedKey);\n if ((myNode.node_id).equals(responsibleNode.node_id)) {\n try {\n Log.v(\"File input stream\", filename);\n FileInputStream in = getContext().openFileInput(filename);\n /* Log.e(TAG, \"File inputStreamReader.\");*/\n InputStreamReader inputStreamReader = new InputStreamReader(in);\n BufferedReader bufferedReader = new BufferedReader(inputStreamReader);\n StringBuilder sb = new StringBuilder();\n line = bufferedReader.readLine();\n sb.append(line);\n in.close();\n } catch (Exception e) {\n Log.e(TAG, \"File read failed...\");\n e.printStackTrace();\n }\n\n\n MatrixCursor.RowBuilder builder = matrixCursor.newRow();\n builder.add(\"key\", selection);\n builder.add(\"value\", line);\n\n matrixCursor.setNotificationUri(getContext().getContentResolver(), uri);\n //Log.e(\"query\", line);\n return matrixCursor;\n //Log.v(\"query\", selection);\n }\n else{\n try {\n\n getResponsibleNode(myNode.succ.node_id,filename);\n MatrixCursor.RowBuilder builder = matrixCursor.newRow();\n String result[] =reqQue.take();\n Log.v(\"waiting\",\"waiting completed\");\n builder.add(\"key\",result[1] );\n builder.add(\"value\", result[2]);\n matrixCursor.setNotificationUri(getContext().getContentResolver(), uri);\n } catch (Exception e) {\n Log.e(TAG, \"File read failed...\");\n e.printStackTrace();\n }\n\n return matrixCursor;\n\n\n }\n }\n }", "@SuppressWarnings(\"resource\")\n public Scanner openFile() {\n boolean flag = false;\n Scanner input;\n\n while(!flag) {\n\t\t\tScanner scanned = new Scanner(System.in); \n\t if((scanned.next()).equals(\"game\")) {\n\t \tthis.fileName = scanned.next();\n\t try\n\t {\n\t File file = new File(\"./examples/\"+this.fileName);\n\t input = new Scanner(file);\n\t flag = true;\n\t return input;\n\t }\n\t catch (FileNotFoundException e)\n\t {\n\t \tSystem.err.println(\"File was not found, try again\");\n\t } \t\n\t }\n\t else {\n\t \tSystem.err.println(\"First command must be game, try again\");\n\t }\n }\n return null;\n }", "private void retrieveFilesFromSystemPicker(@Nullable Uri uri) {\n folderRootFolderSpinner.setSelection(0);\n if(getViewPrefs().isAllowFolderSelection() && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n retrievePermissionsForUri(uri, getViewPrefs().getSelectedUriPermissionFlags());\n return;\n }\n\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n intent.setType(\"*/*\");\n Set<String> permittedMimeTypes = getViewPrefs().getVisibleMimeTypes();\n if(permittedMimeTypes.isEmpty()) {\n permittedMimeTypes = IOUtils.getMimeTypesFromFileExts(new HashSet<>(), getViewPrefs().getVisibleFileTypes());\n }\n intent.putExtra(Intent.EXTRA_MIME_TYPES, IOUtils.getMimeTypesIncludingFolders(permittedMimeTypes));\n intent.addFlags(Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION);\n intent.addFlags(getViewPrefs().getSelectedUriPermissionFlags());\n intent.addCategory(Intent.CATEGORY_OPENABLE);\n intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);\n// intent.putExtra(Intent.EXTRA_LOCAL_ONLY, true);\n\n // special intent for Samsung file manager\n Intent sIntent = new Intent(\"com.sec.android.app.myfiles.PICK_DATA_MULTIPLE\");\n // if you want any file type, you can skip next line\n sIntent.putExtra(\"CONTENT_TYPE\", \"*/*\");\n intent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);\n sIntent.addCategory(Intent.CATEGORY_DEFAULT);\n\n Intent chooserIntent;\n if (requireContext().getPackageManager().resolveActivity(sIntent, 0) != null){\n // it is device with Samsung file manager\n chooserIntent = Intent.createChooser(sIntent, getString(R.string.open_files));\n chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, new Intent[] { intent});\n } else {\n chooserIntent = Intent.createChooser(intent, getString(R.string.open_files));\n }\n\n int eventId = TrackableRequestEvent.getNextEventId();\n try {\n getUiHelper().setTrackingRequest(eventId);\n startActivityForResult(chooserIntent, eventId);\n } catch(ActivityNotFoundException e) {\n getUiHelper().showDetailedShortMsg(R.string.alert_error, R.string.alert_error_no_app_available_to_handle_action);\n getUiHelper().isTrackingRequest(eventId); // clear the tracked id\n }\n }", "@Override\n\tpublic void open() throws IOException {\n\t\t\n\t}", "private void openPressed(){\n\t\tJFileChooser fileChooser = new JFileChooser(System.getProperty(\"user.dir\"));\n\t\tFileNameExtensionFilter extentions = new FileNameExtensionFilter(\"SuperCalcSave\", \"scalcsave\");\n\t\tfileChooser.setFileFilter(extentions);\n\t\tint retunedVal = fileChooser.showOpenDialog(this);\n\t\tFile file = null;\n\t\tif(retunedVal == JFileChooser.APPROVE_OPTION){\n\t\t\tfile = fileChooser.getSelectedFile();\n\t\t}\n\t\t//only continue if a file is selected\n\t\tif(file != null){\n\t\t\tSaveFile saveFile = null;\n\t\t\ttry {\n\t\t\t\t//read in file\n\t\t\t\tObjectInputStream input = new ObjectInputStream(new FileInputStream(file));\n\t\t\t\tsaveFile = (SaveFile) input.readObject();\n\t\t\t\tinput.close();\n\t\t\t\tVariable.setList(saveFile.getVariables());\n\t\t\t\tUserFunction.setFunctions(saveFile.getFunctions());\n\t\t\t\tmenuBar.updateFunctions();\n\t\t\t\tSystem.out.println(\"Open Success\");\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "@Override\n\tpublic void open() {\n\n\t}", "@Override\n\tpublic void open() {\n\n\t}", "@Override // kotlin.jvm.functions.Function0\n public File invoke() {\n return new File(this.a.b, this.a.c);\n }", "public getfile_args(getfile_args other) {\n }", "@Override\n public StorageInputStream open(File file) throws FileNotFoundException {\n\treturn null;\n }", "@Override public void open() throws IOException {\n }", "public Phile open( String name, int mode) throws PhileNotFoundException, TooManyOpenPhilesException {\n \tif (numberOfOpenFiles == 16) {\n \t\tthrow new TooManyOpenPhilesException(\"Max amount of files open\");\n \t}\n\t\telse if (!fileList.containsKey(name)) {\n\t\t\tthrow new PhileNotFoundException(\"File doesn't exist\");\n\t\t}\n\t\telse {\n\t\t\tPhile phile = fileList.get(name);\n\t\t\topenFiles.add(phile);\n\t\t\tnumberOfOpenFiles++;\n\t\t\treturn phile;\n\t\t}\n }", "public void open();", "public void open();", "protected final NetworkFile openStream(FileOpenParams params, FileState parent, DBDeviceContext dbCtx)\n throws IOException {\n\n // Get the file information for the parent file\n \n DBFileInfo finfo = getFileDetails(params.getPath(),dbCtx,parent);\n \n if (finfo == null)\n throw new AccessDeniedException();\n\n // Get the list of streams for the file\n \n StreamInfoList streamList = loadStreamList(parent, finfo, dbCtx, true);\n if ( streamList == null)\n throw new AccessDeniedException();\n \n // Check if the stream exists\n\n StreamInfo sInfo = streamList.findStream(params.getStreamName());\n \n if ( sInfo == null)\n throw new FileNotFoundException(\"Stream does not exist, \" + params.getFullPath());\n\n // Get, or create, a file state for the stream\n \n FileState fstate = getFileState(params.getFullPath(), dbCtx, true);\n \n // Check if the file shared access indicates exclusive file access\n \n if ( params.getSharedAccess() == SharingMode.NOSHARING && fstate.getOpenCount() > 0)\n throw new FileSharingException(\"File already open, \" + params.getPath());\n\n // Set the file information for the stream, using the stream information\n \n DBFileInfo sfinfo = new DBFileInfo(sInfo.getName(), params.getFullPath(), finfo.getFileId(), finfo.getDirectoryId());\n sfinfo.setFileSize(sInfo.getSize());\n \n fstate.addAttribute(FileState.FileInformation, sfinfo);\n \n // Create a JDBC network file and open the stream\n\n if ( Debug.EnableInfo && hasDebug())\n Debug.println(\"DB openStream() file=\" + params.getPath() + \", stream=\" + sInfo.getName());\n \n DBNetworkFile jdbcFile = (DBNetworkFile) dbCtx.getFileLoader().openFile(params, finfo.getFileId(), sInfo.getStreamId(),\n finfo.getDirectoryId(), false, false);\n\n jdbcFile.setFileState(fstate);\n jdbcFile.setFileSize(sInfo.getSize());\n\n // Open the stream file, if not a directory\n \n jdbcFile.openFile(false);\n\n // Update the file open count\n \n fstate.setFileStatus( FileStatus.FileExists);\n fstate.incrementOpenCount();\n \n // Return the network file\n \n return jdbcFile;\n }", "@Test\n public void parent() throws Throwable {\n client.setStream(\"//Ace/subDev\");\n client.update();\n client.sync(makeFileSpecList(\"//...\"), null);\n\n MergeFilesOptions opts = new MergeFilesOptions();\n opts.setStream(\"//Ace/subDev\");\n opts.setReverseMapping(true);\n opts.setParentStream(\"//Ace/main\");\n\n List<IFileSpec> merged = client.mergeFiles(null, null, opts);\n assertEquals(\"wrong number of files\", 2, merged.size());\n\n List<IFileSpec> opened = client.openedFiles(null, null);\n assertEquals(\"files should not have been opened\", 2, opened.size());\n }", "private void openContext() {\n\t\tJFileChooser fileChooser = new JFileChooser(LMPreferences\n\t\t\t\t.getLastDirectory());\n\n\t\t// Propriétés du fileChooser\n\t\tfileChooser.setApproveButtonText(GUIMessages\n\t\t\t\t.getString(\"GUI.openButton\")); //$NON-NLS-1$\n\t\tfileChooser.setDialogTitle(GUIMessages.getString(\"GUI.openAContext\")); //$NON-NLS-1$\n\t\tfileChooser.setAcceptAllFileFilterUsed(true);\n\t\tfileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);\n\n\t\t// Gere les extensions compatibles (cex, lmv, lmn, lmb)\n\t\tExampleFileFilter filterCex = new ExampleFileFilter(\n\t\t\t\t\"cex\", GUIMessages.getString(\"GUI.conceptExplorerBinaryFormat\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tfileChooser.addChoosableFileFilter(filterCex);\n\t\tExampleFileFilter filterGaliciaBinSLF = new ExampleFileFilter(\n\t\t\t\t\"slf\", GUIMessages.getString(\"GUI.galiciaSLFBinaryFormat\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tfileChooser.addChoosableFileFilter(filterGaliciaBinSLF);\n\t\tExampleFileFilter filterGaliciaBin = new ExampleFileFilter(\n\t\t\t\t\"bin.xml\", GUIMessages.getString(\"GUI.galiciaXMLBinaryFormat\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tfileChooser.addChoosableFileFilter(filterGaliciaBin);\n\t\tExampleFileFilter filterValued = new ExampleFileFilter(\n\t\t\t\t\"lmv\", GUIMessages.getString(\"GUI.LatticeMinerValuedFormat\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tfileChooser.addChoosableFileFilter(filterValued);\n\t\tExampleFileFilter filterNested = new ExampleFileFilter(\n\t\t\t\t\"lmn\", GUIMessages.getString(\"GUI.LatticeMinerNestedFormat\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tfileChooser.addChoosableFileFilter(filterNested);\n\t\tExampleFileFilter filterBinary = new ExampleFileFilter(\n\t\t\t\t\"lmb\", GUIMessages.getString(\"GUI.LatticeMinerBinaryFormat\")); //$NON-NLS-1$ //$NON-NLS-2$\n\t\tfileChooser.addChoosableFileFilter(filterBinary);\n\t\tExampleFileFilter filterLM = new ExampleFileFilter(new String[] {\n\t\t\t\t\"lmb\", \"lmn\", \"lmv\" }, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\n\t\t\t\tGUIMessages.getString(\"GUI.LatticeMinerFormats\")); //$NON-NLS-1$\n\t\tfileChooser.addChoosableFileFilter(filterLM);\n\n\t\t// La boite de dialogue\n\t\tint returnVal = fileChooser.showOpenDialog(this);\n\n\t\tif (returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\tFile contextFile = fileChooser.getSelectedFile();\n\t\t\topenContextFile(contextFile);\n\n\t\t\t// Sauvegarde le path utilisé\n\t\t\tLMPreferences.setLastDirectory(fileChooser.getCurrentDirectory()\n\t\t\t\t\t.getAbsolutePath());\n\t\t}\n\t}", "public void open() throws IOException;", "private InputStream openContentStream(String selectedTableName, String fileName, Template template) {\n\t\t\n\t\tProjectUtils projectUtils = new ProjectUtils();\n\t\tIProject proj = projectUtils.getProject(selection);\n\t\t\n\t\t\n\t\tUtils utils = new Utils();\n\t\t\n\t\tutils.getSourceFolder(proj);\n\t\t\n\t\t\n\t\t\n Map<String, Object> mapRoot = new HashMap<String, Object>();\n mapRoot.put(\"package\", \"br.pacote.kkk\");\n mapRoot.put(\"classname\", fileName);\n mapRoot.put(\"tablename\", selectedTableName.substring(0, 1).toUpperCase() + selectedTableName.substring(1).toLowerCase());\n \n \n\t\t\n\t\t\n\t\tParseTemplate parseTemplate = new ParseTemplate();\n\t\tString sourceCode = null;\n\t\ttry {\n\t\t\tsourceCode = parseTemplate.loadTemplateFromFile(utils.PluginPath()+\"/templates\", template.getTemplatefile(), mapRoot);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn new ByteArrayInputStream(sourceCode.getBytes());\n\t}", "public int openFileChooser(){\n int returnVal = fileChooser.showOpenDialog(getCanvas()); //Parent component as parameter - affects position of dialog\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\"ZIP & OSM & BIN\", \"osm\", \"zip\", \"bin\",\"OSM\",\"ZIP\",\"BIN\"); //The allowed files in the filechooser\n fileChooser.setFileFilter(filter); //sets the above filter\n return returnVal;\n }", "@FXML\r\n protected void dialogOpen() throws IOException {\r\n final FileChooser fileChooser = new FileChooser();\r\n File file = fileChooser.showOpenDialog(FracGenApplication.getInstance().stageOpenData);\r\n if (file != null) {\r\n if (file.exists()) {\r\n if (file.getAbsolutePath() != null) {\r\n tfFilename.setText(file.getAbsolutePath());\r\n }\r\n }\r\n }\r\n }", "public void openFile(){\n\t\ttry{\n\t\t\t//input = new Scanner (new File(\"input.txt\")); // creates file \"input.txt\" or will rewrite existing file\n\t\t\tFile inFile = new File(\"input.txt\");\n\t\t\tinput = new Scanner(inFile);\n\t\t\t//for (int i = 0; i < 25; i ++){\n\t\t\t\t//s = input.nextLine();\n\t\t\t\t//System.out.println(s);\n\t\t\t//}\n\t\t}catch (SecurityException securityException){ // catch errors\n\t\t\tSystem.err.println (\"You do not have the write access to this file.\");\n\t\t\tSystem.exit(1);\n\t\t}catch (FileNotFoundException fnf){// catch errors\n\t\t\tSystem.err.println (\"Trouble opening file\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "private FileManager()\n {\n bookFile.open(\"bookdata.txt\");\n hisFile.open(\"history.txt\");\n idFile.open(\"idpassword.txt\");\n createIDMap();\n createHisMap(Customer.getInstance());\n }" ]
[ "0.5835023", "0.57715946", "0.56076235", "0.55765", "0.54534227", "0.5400259", "0.5346959", "0.5335633", "0.5331362", "0.5328438", "0.5323395", "0.5252887", "0.5251681", "0.5232838", "0.52280825", "0.5222057", "0.5212328", "0.51933324", "0.5188008", "0.5180569", "0.51466596", "0.51228595", "0.5118608", "0.5113294", "0.5110571", "0.5108416", "0.51013947", "0.50960094", "0.5089346", "0.5083568", "0.50794", "0.5064322", "0.5059882", "0.5053525", "0.5053525", "0.5043732", "0.5043054", "0.5038648", "0.50065804", "0.50043434", "0.49972558", "0.49898517", "0.49856097", "0.4982343", "0.49742985", "0.49737272", "0.49675983", "0.49602675", "0.4955937", "0.49536154", "0.49477202", "0.494427", "0.49399444", "0.493142", "0.49255934", "0.4925402", "0.49230582", "0.49183437", "0.49122852", "0.49085847", "0.4905375", "0.48945975", "0.48945573", "0.48944393", "0.4882615", "0.4881789", "0.48752964", "0.4874974", "0.48749727", "0.48694298", "0.48693895", "0.4862204", "0.4860533", "0.48556468", "0.48531678", "0.484893", "0.48480257", "0.4832758", "0.48287925", "0.4815113", "0.48134378", "0.48061618", "0.47881213", "0.47881213", "0.47790268", "0.47778654", "0.4774246", "0.4771375", "0.47699696", "0.47678417", "0.47678417", "0.4766279", "0.47634378", "0.47623715", "0.47600627", "0.47536966", "0.47512737", "0.47508782", "0.4746523", "0.4741845" ]
0.5668042
2
Add all the screen listeners.
public void addListeners() { super.addListeners(); BookingLine recBookingLine = (BookingLine)this.getRecord(BookingLine.BOOKING_LINE_FILE); Booking recBooking = (Booking)this.getRecord(Booking.BOOKING_FILE); recBooking.addArDetail(null, recBookingLine, false); recBookingLine.getField(BookingLine.PRICE).addListener(new CopyDataHandler(recBookingLine.getField(BookingLine.PRICING_STATUS_ID), new Integer(PricingStatus.MANUAL), null)); recBookingLine.addListener(new BookingLineStatusHandler(null)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addListeners()\n {\n view.addListeners(new FileButtonClick(view, this), new ViewButtonClick(view, this), new ClassClick(view, this), new RelationshipClick(view, this), new RightClickListenerFactory(view, this));\n\t}", "public void addListeners() {\r\n\t\tbtnLogin.addActionListener(listener);\r\n\t\tbtnChooseFile.addActionListener(listener);\r\n\t\tbtnSendMessage.addActionListener(listener);\r\n\t\tbtnRemoveImage.addActionListener(listener);\r\n\t\tbtnUpdateMessages.addActionListener(listener);\r\n\t\tbtnUpdateUsers.addActionListener(listener);\r\n\t}", "private void addListeners() {\n \t\tfHistoryListener= new HistoryListener();\n \t\tfHistory.addOperationHistoryListener(fHistoryListener);\n \t\tlistenToTextChanges(true);\n \t}", "protected void installListeners() {\n Window topLevelWindows[] = EventQueueMonitor.getTopLevelWindows();\n if (topLevelWindows != null) {\n for (int i = 0; i < topLevelWindows.length; i++) {\n if (topLevelWindows[i] instanceof Accessible) {\n installListeners((Accessible) topLevelWindows[i]);\n }\n }\n }\n }", "void addListeners() {\n\t\t/* Get a handle to the views */\n\t\tmsgText = (TextView) findViewById(R.id.msgView); //TextView handle\n\t\tviewAgainButton = (Button) findViewById(R.id.button_viewAgain); //Button handle\n\t\t\n\t\t/* Add a click listener to the View Again button */\n\t\tviewAgainButton.setOnClickListener(this);\n\t\t\n\t\t/* Add a click listener to the Instructions button */\n\t\tButton buttonInstructions = (Button) findViewById(R.id.button_instructions2);\n\t\tbuttonInstructions.setOnClickListener(this);\n\t\t\n\t\t/* Add listeners to the ImageViews */\n\t\taddImageViewListeners();\n\t}", "void registerListeners();", "public void addListeners() {\n\t\timages[TOP].setOnClickListener(top);\t\n\t\timages[BOTTOM].setOnClickListener(bottom);\n\t\timages[TOP].setOnLongClickListener(topsave);\t\n\t\timages[BOTTOM].setOnLongClickListener(bottomsave);\n }", "protected void installListeners() {\n }", "protected void installListeners() {\n }", "protected void installListeners() {\n\t}", "private void adicionaListeners() {\r\n\t\t\taddFocusListener(this);\r\n\t\t\taddKeyListener(this);\r\n\t\t\taddMouseListener(this);\r\n\t\t}", "private void setListeners() {\n\n }", "protected void installListeners() {\n\n\t}", "protected void attachListeners() {\n\t\t\n\t}", "private void registerListeners() {\n\n\t\tline.addActionListener(new LineButtonListener());\n\t\trect.addActionListener(new RectButtonListener());\n\t\toval.addActionListener(new OvalButtonListener());\n\t\timage.addActionListener(new ImageButtonListener());\n\n\t\tMouseListener listener = new ListenToMouse();\n\t\tMouseMotionListener motionListener = new ListenToMouse();\n\n\t\tcanvas.addMouseMotionListener(motionListener);\n\t\tcanvas.addMouseListener(listener);\n\n\t}", "public void addListeners() {\n\n startButton.addActionListener(e -> {\n if (play) {\n gameFrame.startGame();\n } else {\n gameFrame.stopGame();\n }\n play = !play;\n setTextOfStartPause();\n });\n saveButton.addActionListener(e -> {\n gameFrame.saveGame();\n });\n loadButton.addActionListener(e -> {\n gameFrame.loadGame();\n });\n resetButton.addActionListener(e -> {\n gameFrame.clearBoard();\n play = true;\n setTextOfStartPause();\n });\n exitButton.addActionListener(e -> {\n gameFrame.exitGame();\n });\n }", "private void addAllActiveXListeners()\n throws ActiveXException\n {\n Enumeration e;\n Guid iid;\n \n e = listeners.keys();\n\n while(e.hasMoreElements())\n {\n iid = (Guid) e.nextElement();\n addActiveXListener1(getDispatchPointer(), iid); \n }\n }", "public void setupUIListeners() {\n\t\tsetupEditTextListeners();\n\t\tsetupSeekBarsListeners();\n\t}", "public void initListeners() {\n\t\tlogoGrabListener = new LogoGrabListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onResponse(JSONObject response) {\n\t\t\t\tLog.i(TAG, \"LogoGrab Application responded with: \" + response.toString());\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onError(String error) {\n\t\t\t\tLog.e(TAG, error);\n\t\t\t}\n\t\t};\n\t\t\n\t\t// set LogoGrabListener\n\t\tLogoGrabInterface.setLogoGrabListener(logoGrabListener);\n\t\t\n\t\t\n\t\t// init OnClickListener\n\t\tonClickListener = new OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tLogoGrabInterface.startLogoGrab(MainActivity.this);\n\t\t\t}\n\t\t};\n\t\t\n\t\t// set OnClickListener\n\t\tlogoGrabButton.setOnClickListener(onClickListener);\n\t}", "private void addListeners()\r\n {\r\n Actions act = new Actions();\r\n btnCountA.addActionListener(act);\r\n btnSearch.addActionListener(act);\r\n btnFindL.addActionListener(act);\r\n }", "private void addMenuListeners()\n\t{\n\t\texit.addActionListener (new menuListener());\n\t\treadme.addActionListener (new menuListener());\n\t\tabout.addActionListener (new menuListener());\n\t\tsettings.addActionListener (new menuListener());\n\t}", "public abstract void registerListeners();", "public void setListeners() {\n backButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n finish();\n }\n });\n\n settingButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n showEditDialog();\n }\n });\n\n cameraButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n showChoosePictureDialog();\n }\n });\n }", "private void registerEvents(){\n Bukkit.getPluginManager().registerEvents(new RegionListener(), this);\n Bukkit.getPluginManager().registerEvents(new SignListener(), this);\n Bukkit.getPluginManager().registerEvents(new PrisonerListener(), this);\n Bukkit.getPluginManager().registerEvents(new PrisonBlockListener(), this);\n Bukkit.getPluginManager().registerEvents(new MonitorListener(), this);\n Bukkit.getPluginManager().registerEvents(new PortalListener(), this);\n }", "@Override\r\n\tprotected void listeners() {\n\t\t\r\n\t}", "private void listenersInitiation() {\n ActionSelectors listener = new ActionSelectors();\n submit.addActionListener(listener);\n goBack.addActionListener(listener);\n }", "private void registerListeners() {\r\n View.OnClickListener clickListener = new ButtonListener();\r\n btnStart.setOnClickListener(clickListener);\r\n btnStop.setOnClickListener(clickListener);\r\n }", "private void initListeners() {\n appCompatButtonLogout.setOnClickListener(this);\n appCompatButtonDelete.setOnClickListener(this);\n }", "@Override\r\n\tprotected void attachListeners() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void setListeners() {\n\t\t\r\n\t}", "public void setListeners(){\n\t\t\n\t\tthis.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// chosen to add new patient\n\t\t\t\t\n\t\t\t\tArrayList<String> constructorInput = null;\n\t\t\t\tconstructorInput = NewPatientWindow.showInputdialog(true);\n\t\t\t\t\n\t\t\t\t// if cancel or close chosen on new patient window:\n\t\t\t\tif (constructorInput == null)\n\t\t\t\t\treturn; \n\t\t\t\t\n\t\t\t\t//else:\n\t\t\t\tBrainFreezeMain.patients.add(new Patient(\n\t\t\t\t\t\t(constructorInput.toArray( new String[constructorInput.size()]))));\n\t\t\t\tBrainFreezeMain.currentPatientIndex = BrainFreezeMain.patients.size()-1;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tLeftPanel.refreshPatientLabel(); // change to patient list, update label\n\t\t\t\tLeftPanel.refreshPatientData(); // change to patient, update data\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t});\n\t}", "public void addListeners() {\n\t\tsave.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t//Set the window variables\r\n\t\t\t\tEnvironmentVariables.setWidth(Float.parseFloat(width.getText()));\r\n\t\t\t\tEnvironmentVariables.setHeight(Float.parseFloat(height.getText()));\r\n\t\t\t\tEnvironmentVariables.setTitle(title.getText());\r\n\t\t\t\tupdateGameWorld();\r\n\t\t\t\t//go to save function\r\n\t\t\t\tsaveGame();\r\n\t\t\t\t\r\n\t\t\t\tWindow.getFrame().setVisible(false);\r\n\t\t\t\tWindow.getFrame().dispose();\r\n\t\t\t\t\r\n\t\t\t\tHomePage.buildHomePage();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\t\r\n\t\t//reset to empty world\r\n\t\treset.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tEnvironmentVariables.clearWorld();\r\n\t\t\t\tWindow.render();\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public void addActionListeners() {\n\t\tApp.sc.createListener(\"/\" + this.getID() + \"/action/sent\", new OSCListener() {\n\t\t\t@Override\n\t\t\tpublic void acceptMessage(Date time, OSCMessage message) {\n\t\t\t\tConnector actionOutConnector = getConnector(ConnectorType.ACTION_OUT);\n\t\t\t\tactionOutConnector.flashConnection();\n\t\t\t}\n\t\t});\n\t}", "private void setupListeners() {\n\t\tfor (int i = 0; i < _controlPoints.length; i++) {\n\t\t\taddControlPointListener(_controlPoints[i][0], i);\n\t\t\taddControlPointListener(_controlPoints[i][1], i);\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < _selectionButtons.length; i++) {\n\t\t\taddPointSelectionButtonListener(i);\n\t\t}\n\t}", "private void setEventListener() {\n mCameraView.addCameraKitListener(this);\n mCameraButton.setOnClickListener(this);\n mCameraButtonCloud.setOnClickListener(this);\n }", "void installListeners() {\n\t\t\t// Listeners on this popup's table and scroll bar\n\t\t\tproposalTable.addListener(SWT.FocusOut, this);\n\t\t\tScrollBar scrollbar = proposalTable.getVerticalBar();\n\t\t\tif (scrollbar != null) {\n\t\t\t\tscrollbar.addListener(SWT.Selection, this);\n\t\t\t}\n\n\t\t\t// Listeners on this popup's shell\n\t\t\tgetShell().addListener(SWT.Deactivate, this);\n\t\t\tgetShell().addListener(SWT.Close, this);\n\n\t\t\t// Listeners on the target control\n\t\t\tcontrol.addListener(SWT.MouseDoubleClick, this);\n\t\t\tcontrol.addListener(SWT.MouseDown, this);\n\t\t\tcontrol.addListener(SWT.Dispose, this);\n\t\t\tcontrol.addListener(SWT.FocusOut, this);\n\t\t\t// Listeners on the target control's shell\n\t\t\tShell controlShell = control.getShell();\n\t\t\tcontrolShell.addListener(SWT.Move, this);\n\t\t\tcontrolShell.addListener(SWT.Resize, this);\n\t\t}", "@Override\n public void addListener(DisplayEventListener listener) {\n listenerList.add(DisplayEventListener.class, listener);\n }", "private void registrarListeners() {\n ventanaAgregarOperador.agregarListenerBotonGuardarNuevoOperador(new VentanaAgregarOperadorBotonGuardarAL());\n ventanaEditarOperador.agregarListenerBotonGuardarDatosModificados(new VentanaEditarOperadorBotonGuardarAL());\n\n }", "private void addListeners() {\n\t\t\n\t\tresetButton.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\t \n\t\t public void handle(ActionEvent e) {\n\t\t \n\t\t \treset();\n\t\t \t\n\t\t }\n\t\t \n\t\t});\n\t\t\n\t\ttoggleGroup.selectedToggleProperty().addListener(\n\t\t\t (ObservableValue<? extends Toggle> ov, Toggle old_toggle, \n\t\t\t Toggle new_toggle) -> {\n\t\t\t \t\n\t\t\t \tif(rbCourse.isSelected()) {\n\t\t \t\t\n\t\t \t\thbox3.getChildren().set(0, CourseSelectionBox.instance());\n\t\t \t\thbox3.setDisable(false);\n\t\t \t\t\n\t\t \t}else if(rbAuthor.isSelected()) {\n\t\t \t\t\n\t\t \t\thbox3.getChildren().set(0, AuthorSelectionBox.instance());\n\t\t \t\thbox3.setDisable(false);\n\t\t \t\t\n\t\t \t}else if(rbNone.isSelected()) {\n\t\t \t\t\n\t\t \t\thbox3.setDisable(true);\n\t\t \t\t\n\t\t \t}\n\t\t\t \t\n\t\t\t});\n\t\t\n\t\tapplyButton.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\t \n\t\t public void handle(ActionEvent e) {\n\t\t \n\t\t \tfilter();\n\t\t \t\n\t\t }\n\t\t \n\t\t});\n\t\t\n\t\tsearchButton.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\t \n\t\t public void handle(ActionEvent e) {\n\t\t \n\t\t \tResult.instance().search(quizIDField.getText());\n\t\t \t\n\t\t }\n\t\t \n\t\t});\n\t\t\n\t}", "private void registerEvents(){\n\t\tPluginManager pm = getServer().getPluginManager();\r\n\t\t//PlayerListener stuff\r\n\t pm.registerEvent(Event.Type.PLAYER_CHAT, playerListener, Event.Priority.Normal, this);\r\n\t pm.registerEvent(Event.Type.PLAYER_MOVE, playerListener, Event.Priority.Normal, this);\r\n\t pm.registerEvent(Event.Type.PLAYER_QUIT, playerListener, Event.Priority.Normal, this);\r\n pm.registerEvent(Event.Type.PLAYER_INTERACT, playerListener, Event.Priority.Normal, this);\r\n\t //BlockListener stuff\r\n pm.registerEvent(Event.Type.BLOCK_PLACE, blockListener, Event.Priority.Normal, this);\r\n pm.registerEvent(Event.Type.BLOCK_DAMAGE, blockListener, Event.Priority.Normal, this);\r\n pm.registerEvent(Event.Type.BLOCK_BREAK, blockListener, Event.Priority.Normal, this);\r\n //EntityListener stuff\r\n pm.registerEvent(Event.Type.CREATURE_SPAWN, entityListener, Event.Priority.Normal, this);\r\n pm.registerEvent(Event.Type.ENTITY_DAMAGE, entityListener, Event.Priority.Normal, this);\r\n //ServerListener stuff\r\n pm.registerEvent(Event.Type.PLUGIN_ENABLE, serverListener, Event.Priority.Normal, this);\r\n pm.registerEvent(Event.Type.PLUGIN_DISABLE, serverListener, Event.Priority.Normal, this);\r\n }", "private void setListeners() {\n\t\trefreshButton.addActionListener(new refreshButtonListener());\n\n\t\tthis.list.addMouseListener(new MouseAdapter() {\n\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent event) {\n\t\t\t\tif (event.getClickCount() == 2 && list.getSelectedValue() != null && !list.getSelectedValue().equals(\"\") && tabs.getSelectedIndex() != -1) {\n\t\t\t\t\tlaunchDocument(tabs.getTitleAt(tabs.getSelectedIndex()), list.getSelectedValue());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\ttabs.addChangeListener(new ChangeListener() {\n\n\t\t\t@Override\n\t\t\tpublic void stateChanged(ChangeEvent arg0) {\n\t\t\t\tif (!tabs.getTitleAt(tabs.getSelectedIndex()).equals(\"Chat\")) {\n\t\t\t\t\tlistmodel.clear();\n\t\t\t\t\tmakeRequest();\n\t\t\t\t}\n\t\t\t}\n\n\t\t});\n\t}", "public void enableMultiTouchElementListeners() {\r\n\t\tif (itemListeners == null) {\r\n\t\t\titemListeners = new ArrayList<ItemListener>();\r\n\t\t}\r\n\t\tif (screenCursorListeners == null) {\r\n\t\t\tscreenCursorListeners = new ArrayList<ScreenCursorListener>();\r\n\t\t}\r\n\t\tif (orthoControlPointRotateTranslateScaleListeners == null) {\r\n\t\t\torthoControlPointRotateTranslateScaleListeners = new ArrayList<OrthoControlPointRotateTranslateScaleListener>();\r\n\t\t}\r\n\t\tif (bringToTopListeners == null) {\r\n\t\t\tbringToTopListeners = new ArrayList<BringToTopListener>();\r\n\t\t}\r\n\t\tif (orthoSnapListeners == null) {\r\n\t\t\torthoSnapListeners = new ArrayList<OrthoSnapListener>();\r\n\t\t}\r\n\t\tif (flickListeners == null) {\r\n\t\t\tflickListeners = new ArrayList<OrthoFlickListener>();\r\n\t\t}\r\n\t\t\r\n\t\t((IOrthoContentItemImplementation) this.contentItemImplementation)\r\n\t\t\t\t.addBringToTopListener(this);\r\n\t\t((IOrthoContentItemImplementation) this.contentItemImplementation)\r\n\t\t\t\t.addItemListener(this);\r\n\t\t((IOrthoContentItemImplementation) this.contentItemImplementation)\r\n\t\t\t\t.addOrthoControlPointRotateTranslateScaleListener(this);\r\n\t\t((IOrthoContentItemImplementation) this.contentItemImplementation)\r\n\t\t\t\t.addSnapListener(this);\r\n\t\t((IOrthoContentItemImplementation) this.contentItemImplementation)\r\n\t\t\t\t.addFlickListener(this);\r\n\t}", "private void initializeListeners() {\n llBack.setOnClickListener(this);\n btnChange.setOnClickListener(this);\n btnNext.setOnClickListener(this);\n }", "private void agregarListeners() {\n this.vista.jbAceptar.addActionListener(this);\n this.vista.jbAgregar.addActionListener(this);\n this.vista.jbCancelar.addActionListener(this);\n this.vista.jbQuitar.addActionListener(this);\n this.vista.jtPermisosDisponibles.addMouseListener(this);\n this.vista.jtPermisosSeleccionados.addMouseListener(this);\n }", "private void addListeners(){\n Conservable[] listenerFromProductTypeRelation = this.productRelation.getListener();\n this.listener[0] = listenerFromProductTypeRelation[0];\n this.listener[1] = listenerFromProductTypeRelation[1];\n this.listener[2] = this.post;\n this.listener[3] = this.productRelation;\n this.listener[4] = this;\n }", "protected void setupListeners() {\n\t\t\n\t\tloginBtn.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent click) {\n\t\t\t\tSession session = theController.validateUser(usernameField.getText(), passwordField.getText());\n\t\t\t\tif(session != null) {\n\t\t\t\t\ttheController.login();\n\t\t\t\t} else {\n\t\t\t\t\tlblInvalid.setVisible(true);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnRegister.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent click) {\n\t\t\t\ttheController.register();\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnGuide.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent click) {\n\t\t\t\ttheController.viewGuide();\n\t\t\t}\n\t\t});\n\t\t\n\t}", "private void addScreens() {\n // Adds all the screens\n Game.screens().add(new MenuView(\"Menu\"));\n Game.screens().add(new SelectionView(\"Selection\"));\n Game.screens().add(new HelpView(\"Help\"));\n Game.screens().add(new HighScoreView(\"HighScore\"));\n Game.screens().add(new DefeatView(\"Defeat\"));\n Game.screens().add(new PauseView(\"Pause\"));\n Game.screens().add(new GameView(\"Game\"));\n Game.screens().add(new GameScreen());\n }", "@Override\n\tpublic void addListener() {\n\t\t\n\t}", "private void initListeners() {\n comboBox.comboBoxListener(this::showProgramData);\n view.refreshListener(actionEvent -> scheduledUpdate());\n\n }", "private void registerEvents() {\n createRoomBTN.addActionListener(actionEvent -> {\n chatController.createRoom(roomNameIF.getText());\n roomNameIF.setText(\"\");\n });\n\n backBTN.addActionListener(actionEvent -> {\n if (chatController.getJoinedRooms().size() > 0) chatView.renderChatPanel();\n });\n }", "private void addListeners() {\n\n\t\tfinal ComponentsController serviceController = (ComponentsController) componentsService;\n\t\t/*\n\t\t * service controller listener:\n\t\t */\n\t\tfinal ChangeListener changeListener = new ChangeListener() {\n\t\t\tpublic void modelChanged(ChangeEvent ce) {\n\t\t\t\tPmsChangeEvent event = (PmsChangeEvent) ce;\n\t\t\t\tswitch (event.getType()) {\n\t\t\t\t\tcase PmsChangeEvent.UPDATE:\n\t\t\t\t\t\tonComponentUpdate((InheritedComponentInstanceSelDTO) event.getEventInfo());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase PmsChangeEvent.IMPORT:\n\t\t\t\t\t\ttryGetComponents();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault: // event not expected: nothing to do here.\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tserviceController.addChangeListener(changeListener);\n\t\t\n\t\t// remove listener from components controller when this panel is detached\n\t\taddListener(Events.Detach, new Listener<BaseEvent>() {\n\t\t\tpublic void handleEvent(BaseEvent be) {\n\t\t\t\tserviceController.removeChangeListener(changeListener);\n\t\t\t}\n\t\t});\n\n\t\t/*\n\t\t * Grid RowClick listener\n\t\t */\n\t\tgrid.addListener(Events.RowClick, new Listener<GridEvent<InheritedComponentInstanceSelModelData>>() {\n\t\t\tpublic void handleEvent(GridEvent<InheritedComponentInstanceSelModelData> ge) {\n\t\t\t\tInheritedComponentInstanceSelModelData model = grid.getSelectionModel().getSelectedItem();\n\t\t\t\tif (model != null) {\n\t\t\t\t\tenableDisableButtons(model);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "private void installListeners() {\r\n\t\tcboText.addActionListener(this);\r\n\r\n\t\tComponent c = cboText.getEditor().getEditorComponent();\r\n\t\tif (c instanceof JTextComponent) {\r\n\t\t\t((JTextComponent) c).getDocument().addDocumentListener(this);\r\n\t\t}\r\n\r\n\t\tbtnFind.addActionListener(this);\r\n\t\tbtnReplace.addActionListener(this);\r\n\t\tbtnReplaceAll.addActionListener(this);\r\n\t\tbtnReplaceFind.addActionListener(this);\r\n\r\n\t\trbAll.addActionListener(this);\r\n\t\trbSelectedLines.addActionListener(this);\r\n\r\n\t\tcbUseRegex.addItemListener(this);\r\n\t}", "public void addListener(\n IListener listener\n )\n {listeners.add(listener);}", "@Override\r\n\tpublic void initListeners() {\n\t\t\r\n\t}", "private void InitListeners() {\n craftRobot.addActionListener(e -> settler.CraftRobot());\n craftTp.addActionListener(e -> settler.CraftTeleportGate());\n placeTp.addActionListener(e -> settler.PlaceTeleporter());\n fill.addActionListener(e -> {\n if(!inventory.isSelectionEmpty()) settler.PlaceResource(inventory.getSelectedValue());\n });\n inventory.addListSelectionListener(e -> fill.setEnabled(!(inventory.isSelectionEmpty())\n && settler.GetOnAsteroid().GetResource()==null\n && settler.GetOnAsteroid().GetLayerCount()==0)\n );\n }", "public void register() {\r\n\t\tpanel.setActiveListener(this);\r\n\t\tpanel.setActiveMotionListener(this);\r\n\t}", "private void addChangeListeners() {\r\n myTetrisPanel.addPropertyChangeListener(myInfoPanel);\r\n myTetrisMenuBar.addPropertyChangeListener(myInfoPanel);\r\n myTetrisMenuBar.addPropertyChangeListener(myKeyAdapter);\r\n myTetrisMenuBar.addPropertyChangeListener(myTetrisPanel);\r\n addPropertyChangeListener(myTetrisMenuBar);\r\n myInfoPanel.addPropertyChangeListener(myTetrisMenuBar);\r\n }", "public void addActionListeners() {\n\t\tbtnReadRow.addActionListener(this);\n\t\tbtnPrintRow.addActionListener(this);\n\t\tbtnReadCol.addActionListener(this);\n\t\tbtnPrintCol.addActionListener(this);\n\t}", "public void setListeners() {\n mbt_no_realizar_comentario.setOnClickListener(this);\n mbt_realizar_comentario_propietario.setOnClickListener(this);\n }", "private void addListener(RestStateChangeListener... listener) {\n\t\tfor (RestStateChangeListener l : listener) {\n\t\t\tthis.listener.add(l);\n\t\t}\n\t}", "public void addListener(EventListener listener);", "private void initListener() {\n initPieceListener();\n initButtonsListener();\n }", "public void addListener(UIEventListener uel) {\n this.listeners.add(uel);\n }", "private void setListeners(){\n\n Button b = (Button) findViewById(R.id.newGameButton);\n b.setOnClickListener(this);\n\n LinearLayout cel1=(LinearLayout) findViewById(R.id.cel1);\n LinearLayout cel2=(LinearLayout) findViewById(R.id.cel2);\n LinearLayout cel3=(LinearLayout) findViewById(R.id.cel3);\n LinearLayout cel4=(LinearLayout) findViewById(R.id.cel4);\n LinearLayout cel5=(LinearLayout) findViewById(R.id.cel5);\n LinearLayout cel6=(LinearLayout) findViewById(R.id.cel6);\n LinearLayout cel7=(LinearLayout) findViewById(R.id.cel7);\n LinearLayout cel8=(LinearLayout) findViewById(R.id.cel8);\n LinearLayout cel9=(LinearLayout) findViewById(R.id.cel9);\n\n cel1.setOnClickListener(this);\n cel2.setOnClickListener(this);\n cel3.setOnClickListener(this);\n cel4.setOnClickListener(this);\n cel5.setOnClickListener(this);\n cel6.setOnClickListener(this);\n cel7.setOnClickListener(this);\n cel8.setOnClickListener(this);\n cel9.setOnClickListener(this);\n }", "private void setListener() {\n\t\tmSlidingLayer.setOnInteractListener(this);\r\n\t\tmMsgNotifySwitch.setOnCheckedChangeListener(this);\r\n\t\tmMsgSoundSwitch.setOnCheckedChangeListener(this);\r\n\t\tmShowHeadSwitch.setOnCheckedChangeListener(this);\r\n\t\tmAccountSetting.setOnClickListener(this);\r\n\t\tmMyProfile.setOnClickListener(this);\r\n\t\tmFaceJazzEffect.setOnClickListener(this);\r\n\t\tmAcountInfo.setOnClickListener(this);\r\n\t\tmFeedBack.setOnClickListener(this);\r\n\t\tmExitAppBtn.setOnClickListener(this);\r\n\r\n\t}", "public void setScreenListener(ScreenListener listener) {\n\t\tthis.listener = listener;\n\t}", "private void cargaListeners() {\n\t\tbtnGuardar.addActionListener(this);\n\n\t}", "private void attachListeners(){\n\t\t//Add window listener\n\t\tthis.removeWindowListener(this);\n\t\tthis.addWindowListener(this); \n\n\t\tbuttonCopyToClipboard.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\ttry {\n\t\t\t\t\tOS.copyStringToClipboard( getMessagePlainText() );\n\t\t\t\t} catch (BadLocationException e) {\n\t\t\t\t\tshowErrorMessage(e.getMessage());\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tsetMessage( translations.getMessageHasBeenCopied() );\n\t\t\t}\n\t\t});\n\t\t\n\t\tbuttonChooseDestinationDirectory.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tchooseDirectoryAction();\n\t\t\t}\n\t\t});\n\t\t\n\t\tbuttonChangeFileNames.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tchangeFileNamesAction(false);//false => real file change\n\t\t\t}\n\t\t});\n\t\t\n\t\tbuttonSimulateChangeFileNames.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tchangeFileNamesAction(true);//true => only simulation of change with log\n\t\t\t\tif(DebuggingConfig.debuggingOn){\n\t\t\t\t\tshowTextAreaHTMLInConsole();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tbuttonExample.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tsetupInitialValues();\n\t\t\t\t//if it's not debugging mode\n\t\t\t\tif(!DebuggingConfig.debuggingOn){\n\t\t\t\t\tshowPlainMessage(translations.getExampleSettingsPopup());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tbuttonClear.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\ttextArea.setText(textAreaInitialHTML);\n\t\t\t}\n\t\t});\n\t\t\n\t\tbuttonResetToDefaults.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif( deleteSavedObject() ) {\n\t\t\t\t\tsetMessage( translations.getPreviousSettingsRemovedFromFile().replace(replace, getObjectSavePath()) );\n\t\t\t\t\tsetMessage( translations.getPreviousSettingsRemoved() );\n\t\t\t\t\t//we have to delete listener, because it's gonna save settings after windowClosing, we don't want that\n\t\t\t\t\tFileOperationsFrame fileOperationsFrame = (FileOperationsFrame) getInstance();\n\t\t\t\t\tfileOperationsFrame.removeWindowListener(fileOperationsFrame);\n\t\t\t\t\tresetFields();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tshowWarningMessage( translations.getFileHasNotBeenRemoved().replace(replace, getObjectSavePath()) + BR + translations.getPreviousSettingsHasNotBeenRemoved() );\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tcomboBox.addActionListener(new ActionListener() {\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tJComboBox<String> obj = (JComboBox<String>) arg0.getSource();\n\t\t\t\tselectedLanguage = AvailableLanguages.getByName( (String)obj.getSelectedItem() ) ;\n\t\t\t\tselectLanguage(selectedLanguage);\n\t\t\t\tsetComponentTexts();\n\t\t\t};\n\t\t});\t\n\t\t\n\t\t//for debug \n\t\tif(DebuggingConfig.debuggingOn){\n\t\t\tbuttonExample.doClick();\n\t\t}\n\t\t\n\t\t\n\t}", "private void initListeners() {\n appCompatButtonLogin.setOnClickListener(this);\n }", "private void initListeners() {\n btnCadastrar.setOnClickListener(this);\n cadastrar.setOnClickListener(this);\n }", "private void registerListeners(){\n\n //!!!Sensor delay can also be expressed as an int in microseconds, and can use an extra int to give max queue time\n //sampling period is considered a suggestion, and must be in microseconds\n //IMPORTANT TO USE QUEUE. drastically reduced battery consumption\n\n sensorManager.registerListener(this,\n sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER),\n (int)Const.SENSOR_DATA_MIN_INTERVAL*1000, SENSOR_QUEUE_LATENCY );\n\n\n sensorManager.registerListener(this,\n sensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE),\n (int)Const.SENSOR_DATA_MIN_INTERVAL*1000, SENSOR_QUEUE_LATENCY);\n\n\n sensorManager.registerListener(this,\n sensorManager.getDefaultSensor(Sensor.TYPE_HEART_RATE),\n (int)Const.SENSOR_DATA_MIN_INTERVAL*1000, SENSOR_QUEUE_LATENCY);\n\n\n /* //This is for raw PPG data on Polar watches, not implemented\n sensorManager.registerListener(this,\n sensorManager.getDefaultSensor(65545),\n SensorManager.SENSOR_DELAY_NORMAL);\n */\n }", "protected void listener(Listener listener) {\n Bukkit.getServer().getPluginManager().registerEvents(listener, RedPractice.getInstance());\n }", "private void subscribeListeners(RunNotifier notifier) {\n for (Listeners ann : getAnnotationsFromClassHierarchy(suiteClass, Listeners.class)) {\n for (Class<? extends RunListener> clazz : ann.value()) {\n try {\n RunListener listener = clazz.newInstance();\n autoListeners.add(listener);\n notifier.addListener(listener);\n } catch (Throwable t) {\n throw new RuntimeException(\"Could not initialize suite class: \"\n + suiteClass.getName() + \" because its @Listener is not instantiable: \"\n + clazz.getName(), t); \n }\n }\n }\n }", "private void setListeners() {\n\t\timgBack.setOnClickListener(new View.OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\t}", "public void createListeners() {\n\n addRow.addActionListener(e -> gui.addRow());\n deleteRow.addActionListener(e -> gui.deleteRow());\n }", "private static void registerEventListener() {\r\n\r\n log.info(\"Registering event listener for Listeners\"); //$NON-NLS-1$\r\n\r\n try {\r\n ObservationManager observationManager = ContentRepository\r\n .getHierarchyManager(ContentRepository.CONFIG)\r\n .getWorkspace()\r\n .getObservationManager();\r\n\r\n observationManager.addEventListener(new EventListener() {\r\n\r\n public void onEvent(EventIterator iterator) {\r\n // reload everything\r\n reload();\r\n }\r\n }, Event.NODE_ADDED\r\n | Event.NODE_REMOVED\r\n | Event.PROPERTY_ADDED\r\n | Event.PROPERTY_CHANGED\r\n | Event.PROPERTY_REMOVED, \"/\" + CONFIG_PAGE + \"/\" + \"IPConfig\", true, null, null, false); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\r\n }\r\n catch (RepositoryException e) {\r\n log.error(\"Unable to add event listeners for Listeners\", e); //$NON-NLS-1$\r\n }\r\n }", "public void registerEvents()\n {\n \t\tfinal pchestPlayerListener playerListener = new pchestPlayerListener(this, chestManager);\n \t\tfinal pchestEntityListener entityListener = new pchestEntityListener(this, chestManager);\n \t\tfinal pchestBlockListener blockListener = new pchestBlockListener(this, chestManager);\n \t\t\n \t\t\n pm = getServer().getPluginManager();\n \n /* Entity events */\n pm.registerEvent(Type.ENTITY_EXPLODE, entityListener, Event.Priority.Normal, this);\n \n /* Player events */\n pm.registerEvent(Type.PLAYER_INTERACT, playerListener, Event.Priority.Normal, this);\n \n /* Block events */\n \t\tpm.registerEvent(Type.BLOCK_PLACE, blockListener, Event.Priority.Normal, this);\n \t\tpm.registerEvent(Type.BLOCK_BREAK, blockListener, Event.Priority.Normal, this);\n \n \t\t\n /* Spout Required events */\n \t\tif(SpoutLoaded)\n \t\t{\n \t\t\tfinal pchestInventoryListener inventoryListener = new pchestInventoryListener(this, chestManager);\n \n \t /* Inventory events */\n \t\t\tpm.registerEvent(Type.CUSTOM_EVENT, inventoryListener, Event.Priority.Normal, this);\n \t\t}\n }", "public void addListeners()\n {\n nameEdit.addTextChangedListener(new TextWatcher()\n {\n @Override\n public void afterTextChanged(Editable arg0)\n {\n boolean isEmpty = nameEdit.getText().toString().isEmpty();\n acceptButton.setEnabled(!isEmpty);\n }\n\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after){}\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {}\n });\n\n numStandsEdit.addTextChangedListener(new TextWatcher()\n {\n @Override\n public void afterTextChanged(Editable s)\n {\n acceptButton.setEnabled(checkNumber());\n }\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {}\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {}\n });\n }", "@Override\n\tpublic void setListeners() {\n\t\tet1.setOnClickListener(this);\n\t\tet2.setOnClickListener(this);\n\t\tet3.setOnClickListener(this);\n\t\tet4.setOnClickListener(this);\n\t\tet5.setOnClickListener(this);\n\t\tet6.setOnClickListener(this);\n\t\tet7.setOnClickListener(this);\n\t\tet8.setOnClickListener(this);\n\t\tet9.setOnClickListener(this);\n\t\tet10.setOnClickListener(this);\n\t\tet11.setOnClickListener(this);\n\t\tet12.setOnClickListener(this);\n\t\tet13.setOnClickListener(this);\n\t\tet14.setOnClickListener(this);\n\t}", "@Override\n\tprotected void initListeners() {\n\t\t\n\t}", "private void initEvents() {\n\t\tuser_head_img.setOnClickListener(this);\r\n\t\ttxt_zcgl.setOnClickListener(this);\r\n\t\ttxt_tzgl.setOnClickListener(this);\r\n\t\ttxt_jlcx.setOnClickListener(this);\r\n\t\ttxt_wdyhk.setOnClickListener(this);\r\n\t\ttxt_wdxx.setOnClickListener(this);\r\n\t\tlayout_zhaq.setOnClickListener(this);\r\n\t\tlayout_ssmm.setOnClickListener(this);\r\n\t\ttxt_myredpager.setOnClickListener(this);\r\n\t}", "public FluoriteListener() {\r\n\t\tidleTimer = new IdleTimer();\r\n\t\tEHEventRecorder eventRecorder = EHEventRecorder.getInstance();\r\n//\t\tEventRecorder eventRecorder = EventRecorder.getInstance();\r\n\r\n//\t\teventRecorder.addCommandExecutionListener(this);\r\n//\t\teventRecorder.addDocumentChangeListener(this);\r\n//\t\teventRecorder.addRecorderListener(this);\r\n\t\teventRecorder.addEclipseEventListener(this);\r\n\t}", "private void createListeners() {\n int qa = beanQueryAdapterManager.getRegisterCount();\n int cc = persistControllerManager.getRegisterCount();\n int pl = postLoadManager.getRegisterCount();\n int pc = postConstructManager.getRegisterCount();\n int lc = persistListenerManager.getRegisterCount();\n int fc = beanFinderManager.getRegisterCount();\n log.log(DEBUG, \"BeanPersistControllers[{0}] BeanFinders[{1}] BeanPersistListeners[{2}] BeanQueryAdapters[{3}] BeanPostLoaders[{4}] BeanPostConstructors[{5}]\", cc, fc, lc, qa, pl, pc);\n }", "private void hookDraggablePanelListeners() {\n draggablePanel.setDraggableListener(new DraggableListener() {\n @Override\n public void onMaximized() {\n //playVideo();\n }\n\n @Override\n public void onMinimized() {\n //Empty\n }\n\n @Override\n public void onClosedToLeft() {\n\n }\n\n @Override\n public void onClosedToRight() {\n\n }\n });\n }", "private void addALlListeners() {\n\n\t\t// Add phrase listener\n\t\tview.getAddButton().addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString english = view.getEnglishTextField().getText();\n\t\t\t\tString chinese = view.getChineseTextField().getText();\n\t\t\t\tif (english.equals(\"\") && chinese.equals(\"\"))\n\t\t\t\t\treturn;\n\t\t\t\tPhrase p = new Phrase(english, chinese, null);\n\t\t\t\tselectedLesson.addPhrase(p);\n\t\t\t\tview.addPhrase(p);\n\t\t\t\tview.clearEnglishChineseTextField();\n\t\t\t}\n\t\t});\n\n\t\t// Delete phrase listener\n\t\tview.getDeleteButton().addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tint index = view.getPhraseTable().getSelectedRow();\n\t\t\t\tif (index == -1)\n\t\t\t\t\treturn;\n\t\t\t\tPhrase p = selectedLesson.getPhrase(index);\n\t\t\t\tselectedLesson.deletePhrase(p);\n\t\t\t\tview.deletePhrase(index);\n\t\t\t}\n\t\t});\n\n\t\t// Test lesson listener\n\t\tview.getTestButton().addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tTestController.getTestController().setLesson(selectedLesson);\n\t\t\t\tMainController.getMainController().setVisible(false);\n\t\t\t\tselectedLesson.setNeededToRestore(true);\n\t\t\t}\n\t\t});\n\n\t\t// Learn lesson listener\n\t\tview.getLearnButton().addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew LearnController(selectedLesson);\n\t\t\t\tMainController.getMainController().setVisible(false);\n\t\t\t\tselectedLesson.setNeededToRestore(true);\n\t\t\t}\n\t\t});\n\n\t\t// Sound listener\n\t\tview.getPhraseTable().addMouseListener(new SoundAdapter());\n\n\t}", "private void registerSensorListeners(){\n\n // Get the accelerometer and gyroscope sensors if they exist\n if (mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER) != null){\n mAccelerometer = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);\n }\n if (mSensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE) != null){\n mGyroscope = mSensorManager.getDefaultSensor(Sensor.TYPE_GYROSCOPE);\n }\n\n // Acquire the wake lock to sample with the screen off\n mPowerManager = (PowerManager)getApplicationContext().getSystemService(Context.POWER_SERVICE);\n\n mWakeLock = mPowerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, TAG);\n mWakeLock.acquire();\n\n // Register sensor listener after delay to compensate for user putting phone in pocket\n\n long delay = 5;\n\n Log.d(TAG, \"Before start: \" + System.currentTimeMillis());\n\n exec.schedule(new Runnable() {\n @Override\n public void run() {\n mSensorManager.registerListener(PhoneSensorLogService.this, mAccelerometer, SAMPLE_RATE);\n mSensorManager.registerListener(PhoneSensorLogService.this, mGyroscope, SAMPLE_RATE);\n Log.d(TAG, \"Start: \" + System.currentTimeMillis());\n if (timedMode) {\n scheduleLogStop();\n }\n }\n }, delay, TimeUnit.SECONDS);\n }", "public void attachListeners(MouseListener l) {\n for (LetterTile tile : rack)\n tile.addTileListener(l);\n }", "@Override\n\tpublic void start() {\n\t\tif(Boolean.parseBoolean(this.configuration.get(ConfigurationEnum.KEYBOARD_LISTENER_ACTIVE.toString()))){\n\t\t\tthis.keyboardListener.registerNativeHook();\n\t\t\tthis.keyboardListenerIsActive = true;\n\t\t}\n\t\t//If the mouse listener is active by configuration\n\t\tif(Boolean.parseBoolean(this.configuration.get(ConfigurationEnum.MOUSE_LISTENER_ACTIVE.toString()))){\n\t\t\tthis.mouseListener.registerNativeHook();\n\t\t\tthis.mouseListenerIsActive = true;\n\t\t}\n\t\t//If the mouse motion listener is active by configuration\n\t\tif(Boolean.parseBoolean(this.configuration.get(ConfigurationEnum.MOUSE_LISTENER_ACTIVE.toString()))){\n\t\t\tthis.mouseMotionListener.registerNativeHook();\n\t\t\tthis.mouseMotionListenerIsActive = true;\n\t\t}\n\t\t//If the mouse wheel listener is active by configuration\n\t\tif(Boolean.parseBoolean(this.configuration.get(ConfigurationEnum.MOUSE_WHEEL_LISTENER_ACTIVE.toString()))){\n\t\t\tthis.mouseWheelListener.registerNativeHook();\n\t\t\tthis.mouseWheelListenerIsActive = true;\n\t\t}\n\t}", "private void addEventListener(ListenerWrapper lsnr, int[] types) {\n if (!enterBusy())\n return;\n\n try {\n for (int t : types)\n registerListener(lsnr, t);\n }\n finally {\n leaveBusy();\n }\n }", "public void setListeners() {\n buttonPanel.getAddTask().addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if (toDoList.toDoListLength() >= 6) {\n JDialog errorBox = new JDialog();\n JLabel errorMessage = new JLabel(\"You already have 6 Tasks remove one to add another\");\n errorBox.add(errorMessage);\n errorBox.setSize(450, 100);\n errorBox.setVisible(true);\n } else {\n addDialog = new AddDialog();\n addDialog.setVisible(true);\n addDialog.setSize(500, 500);\n acceptListener();\n }\n }\n });\n saveListener();\n removeListener();\n completeListener();\n editSetup();\n }", "protected void addEventListeners()\n {\n // Add them to the contents.\n InteractionFigure interactionLayer =\n view.getEditor().getInteractionFigure();\n\n // let mouseState handle delete key events\n interactionLayer.addKeyListener(mouseState);\n getShell().addShellListener(new ShellAdapter() {\n @Override\n public void shellDeactivated(ShellEvent e)\n {\n mouseState.cancelDynamicOperation();\n }\n });\n }", "private void setupListeners() {\t\t\n\n\t\tnextButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\t gameModel.generateGame();\n\t\t\t\t \n\t\t\t\t setGameModel(gameModel);\n\t\t\t\t \n\t\t\t\t //gameModel = new GameModel(gameModel.getList());\n\t\t\t\t \n\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\ttilePanel.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\tSystem.out.println(\"PRESS\");\n\t\t\t}\n\t\t\t\n\t\t\tpublic void mouseReleased(MouseEvent e) {\n\t\t\t\tSystem.out.println(\"RELEASED\");\n\t\t\t}\n\t\t});\n\t}", "private void addKeyListeners()\n\t{\n\t\tentry.addKeyListener (new keyListener());\n\t}", "private static void informListeners() {\r\n\t\tfor (ATEListener l : listeners) {\r\n\t\t\tl.classListChanged( );\r\n\t\t}\r\n\t}", "private void addEvents() {\n\t mlv.getMapNotesOverlay().addEventListener(new NoteSelectedListener()\n {\n\t \t\n\t\t\t@Override\n\t\t\tpublic void handleNoteSelectedEvent(EventObject e, Group gr) {\n\t\t\t\t//We have to go to gallery because the user has select a (groups) note\n\t\t\t\tselectedGroup = gr;\n\t\t\t\tonClick(mlv);\n\t\t\t}\n \t\n });\t\t\t\t\n\t\t\n\t}", "private void addActionListeners() {\n\t\tif(this.actionListener == null)\n\t\t\t\treturn; \n\t\t\n\t\t\n\t\t/**\n\t\t\tADD ACTION LISTENERS FOR BUTTONS HERE \n\t\t*/\n\t\tclearButton.addActionListener(this.actionListener);\n\t\tsinButton.addActionListener(this.actionListener);\n\t\tcosButton.addActionListener(this.actionListener);\n\t\ttanButton.addActionListener(this.actionListener);\n\t\tnegateButton.addActionListener(this.actionListener);\n\t\tsquareButton.addActionListener(this.actionListener);\n\t\tinverseButton.addActionListener(this.actionListener);\n\t\tsqrtButton.addActionListener(this.actionListener);\n\t\tpowerButton.addActionListener(this.actionListener);\n\t\tdivideButton.addActionListener(this.actionListener);\n\t\tmultiplyButton.addActionListener(this.actionListener);\n\t\tsubtractButton.addActionListener(this.actionListener);\n\t\taddButton.addActionListener(this.actionListener);\n\t\tpercentButton.addActionListener(this.actionListener);\n\t\t\n\t\t\n\t\tfor(int i = 0 ; i < valueButtons.length ; ++i) {\n\t\t\tvalueButtons[i].addActionListener(this.actionListener);\n\t\t}\n\t\t\n\t\t\n\t}", "protected void addMobileListeners(Client client) {\n \tclient.report(\"No listneres added\", true);\n }", "protected void installListeners() {\n\t\tMappingMouseWheelListener mouseWheelHandler = \n\t\t\t\tnew MappingMouseWheelListener(this);\n\n\t\t// Handles mouse wheel events in the outline and graph component\n\t\tgraphOutline.addMouseWheelListener(mouseWheelHandler);\n\t\tgraphComponent.addMouseWheelListener(mouseWheelHandler);\n\n\t\tGraphOutlinePopupMouseAdapter outlinePoputListener = new \n\t\t\t\tGraphOutlinePopupMouseAdapter(this);\n\t\t\n\t\t// Installs the popup menu in the outline\n\t\tgraphOutline.addMouseListener(outlinePoputListener);\n\n\t\tGraphComponentPopupMouseAdapter componentPoputListener = new \n\t\t\t\tGraphComponentPopupMouseAdapter(this);\n\t\t\n\t\t// Installs the popup menu in the graph component\n\t\tgraphComponent.getGraphControl().addMouseListener(\n\t\t\t\tcomponentPoputListener);\n\t}", "private void addListeners() {\n\t\t\n\t\tloadJokesOptionMenu.addActionListener((event) -> {\n\t\t\tJFileChooser openDialog = new JFileChooser();\n\t\t\t\n\t\t FileNameExtensionFilter filter = new FileNameExtensionFilter(\"text files\", \"txt\");\n\t\t openDialog.setFileFilter(filter);\n\t\t int returnVal = openDialog.showOpenDialog(null);\n\t\t if(returnVal == JFileChooser.APPROVE_OPTION) {\t \n\t\t jokeFile = openDialog.getSelectedFile().getAbsolutePath();\n\t\t }\n\t\t});\n\t\t\n\t\tstartServerFileMenu.addActionListener(event -> startServer());\n\t\tstopServerFileMenu.addActionListener(event -> stopServer());\n\t\t\n\t\texitFileMenu.addActionListener(event -> quitApp());\n\n\t\tsetupServerInfoOptionMenu.addActionListener(event -> setupServerInfo());\n\t\t\n\t\taboutHelpMenu.addActionListener(event -> {\n\t\t\tJOptionPane.showMessageDialog(null, \"Knock Knock Server v1.0 Copyright 2017 RLTech Inc\");\n\t\t});\n\t\t\n\t\tstartServerToolBarButton.addActionListener(event -> {\n\t\t\tstartServer();\n\t\t\tstartServerToolBarButton.setEnabled(false);\n\t\t\tstopServerToolBarButton.setEnabled(true);\n\t\t});\n\t\t\n\t\tstopServerToolBarButton.addActionListener(event -> {\n\t\t\tstopServer();\n\t\t\tstartServerToolBarButton.setEnabled(true);\n\t\t\tstopServerToolBarButton.setEnabled(false);\n\t\t});\n\n\t\tkkClientToolBarButton.addActionListener(event -> {\n\n\t\t\ttry {\n\t\t\t\tRuntime.getRuntime().exec(\"java -jar KKClient.jar\");\n\t\t\t} catch (IOException e1) {\n\t\t\t\t//e1.printStackTrace();\n\t\t\t\tUtility.displayErrorMessage(\"Fail to find or launch KKClient.jar client app. Make sure Java run time (JRE) is installed and KKClient.jar is stored in the same path as this server app.\");\n\t\t\t}\n\t\t});\n\t\t\n\t\taddWindowListener(new WindowAdapter() {\n\t\t public void windowClosing(WindowEvent e) {\n\t\t \tquitApp();\t\n\t\t }\n\t\t});\n\t}", "private void setupListeners()\n\t{\n\t\tfinal String query = \"INSERT INTO\" + \"`\" + table + \"` \" + getFields() + \"VALUES\" + getValues();\n\t\t\n\t\tqueryButton.addActionListener(new ActionListener()\n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent click)\n\t\t\t{\n\t\t\t\tbaseController.getDataController().submitUpdateQuery(query);\n\t\t\t}\n\t\t});\n\t}", "private void setListeners() {\r\n \t/*----------------------------\r\n\t\t * 1. Buttons\r\n\t\t\t----------------------------*/\r\n\t\t//\r\n \tButton bt_create = (Button) findViewById(R.id.db_manager_btn_create_table);\r\n \tButton bt_drop = (Button) findViewById(R.id.db_manager_btn_drop_table);\r\n \tButton bt_register_patterns = \r\n \t\t\t\t\t\t(Button) findViewById(R.id.db_manager_btn_register_patterns);\r\n \t\r\n \t/*----------------------------\r\n\t\t * 2. Tags\r\n\t\t\t----------------------------*/\r\n \tbt_create.setTag(Methods.ButtonTags.db_manager_activity_create_table);\r\n \tbt_drop.setTag(Methods.ButtonTags.db_manager_activity_drop_table);\r\n \tbt_register_patterns.setTag(Methods.ButtonTags.db_manager_activity_register_patterns);\r\n \t\r\n \t/*----------------------------\r\n\t\t * 3. Listeners\r\n\t\t * \t\t1. OnClick\r\n\t\t * \t\t2. OnTouch\r\n\t\t\t----------------------------*/\r\n \t/*----------------------------\r\n\t\t * 3.1. OnClick\r\n\t\t\t----------------------------*/\r\n \t//\r\n \tbt_create.setOnClickListener(new ButtonOnClickListener(this));\r\n \tbt_drop.setOnClickListener(new ButtonOnClickListener(this));\r\n \tbt_register_patterns.setOnClickListener(new ButtonOnClickListener(this));\r\n \t\r\n \t/*----------------------------\r\n\t\t * 3.2. OnTouch\r\n\t\t\t----------------------------*/\r\n \t//\r\n \tbt_create.setOnTouchListener(new ButtonOnTouchListener(this));\r\n \tbt_drop.setOnTouchListener(new ButtonOnTouchListener(this));\r\n \tbt_register_patterns.setOnTouchListener(new ButtonOnTouchListener(this));\r\n \t\r\n \t/*----------------------------\r\n\t\t * 4. Disenable => \"Create table\"\r\n\t\t\t----------------------------*/\r\n// \tbt_create.setEnabled(false);\r\n \t\r\n\t}" ]
[ "0.73147786", "0.7190265", "0.7160894", "0.7098607", "0.700109", "0.6984402", "0.6945531", "0.6935786", "0.6935786", "0.69329846", "0.6922738", "0.69075876", "0.6895171", "0.68865883", "0.6794263", "0.6779317", "0.6767129", "0.67408115", "0.66437006", "0.6599085", "0.656852", "0.6546968", "0.6543379", "0.6493164", "0.6490617", "0.6480082", "0.64741194", "0.64548004", "0.64195204", "0.64193356", "0.64091605", "0.63945186", "0.6390705", "0.63883746", "0.6387917", "0.63772935", "0.63759357", "0.63634866", "0.6333977", "0.63308567", "0.6320898", "0.63197666", "0.6306999", "0.62923574", "0.62739646", "0.62607455", "0.62441313", "0.6240346", "0.62266743", "0.62243307", "0.6217571", "0.6216122", "0.6208938", "0.6159808", "0.6159148", "0.61463267", "0.614207", "0.61130387", "0.6110105", "0.61007994", "0.6100717", "0.6098666", "0.6088671", "0.6075057", "0.60697603", "0.6068132", "0.60661674", "0.6053744", "0.6043266", "0.6033298", "0.60244465", "0.60128504", "0.6010939", "0.5995347", "0.59943", "0.5988595", "0.5984932", "0.5978542", "0.59761035", "0.5968802", "0.5968475", "0.5960406", "0.59577805", "0.59504145", "0.5949778", "0.5943525", "0.5940288", "0.59356546", "0.5934296", "0.592958", "0.5926007", "0.5915725", "0.59069103", "0.58901817", "0.58852595", "0.58778185", "0.5862828", "0.58461255", "0.58361614", "0.5835635", "0.5835467" ]
0.0
-1
Add the toolbars that belong with this screen.
public ToolScreen addToolbars() { ToolScreen toolbar = super.addToolbars(); ToolScreen toolbar2 = new EmptyToolbar(this.getNextLocation(ScreenConstants.LAST_LOCATION, ScreenConstants.DONT_SET_ANCHOR), this, null, ScreenConstants.DONT_DISPLAY_FIELD_DESC, null); BaseField converter = null; ScreenComponent sField = null; converter = this.getRecord(Booking.BOOKING_FILE).getField(Booking.GROSS); sField = converter.setupDefaultView(toolbar2.getNextLocation(ScreenConstants.NEXT_INPUT_LOCATION, ScreenConstants.ANCHOR_DEFAULT), toolbar2, ScreenConstants.DEFAULT_DISPLAY); sField.setEnabled(false); converter = this.getRecord(Booking.BOOKING_FILE).getField(Booking.NET); sField = converter.setupDefaultView(toolbar2.getNextLocation(ScreenConstants.RIGHT_WITH_DESC, ScreenConstants.ANCHOR_DEFAULT), toolbar2, ScreenConstants.DEFAULT_DISPLAY); sField.setEnabled(false); converter = this.getRecord(Booking.BOOKING_FILE).getField(Booking.PRICING_STATUS_ID); sField = converter.setupDefaultView(toolbar2.getNextLocation(ScreenConstants.RIGHT_WITH_DESC, ScreenConstants.ANCHOR_DEFAULT), toolbar2, ScreenConstants.DEFAULT_DISPLAY); sField.setEnabled(false); converter = this.getRecord(Booking.BOOKING_FILE).getField(Booking.TOUR_PRICING_TYPE_ID); sField = converter.setupDefaultView(toolbar2.getNextLocation(ScreenConstants.NEXT_INPUT_LOCATION, ScreenConstants.ANCHOR_DEFAULT), toolbar2, ScreenConstants.DEFAULT_DISPLAY); converter = this.getRecord(Booking.BOOKING_FILE).getField(Booking.NON_TOUR_PRICING_TYPE_ID); sField = converter.setupDefaultView(toolbar2.getNextLocation(ScreenConstants.RIGHT_WITH_DESC, ScreenConstants.ANCHOR_DEFAULT), toolbar2, ScreenConstants.DEFAULT_DISPLAY); return toolbar; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setupToolbars(){\n\t\ttopBar = new TopBar(0, 0, setup.getFrameWidth()+12, Constants.WINDOW_HEADER_HEIGHT, \n\t\t\t\tConstants.COLOR_HEADER_1, setup);\n\t\t\n\t\tbottomBar = new BottomBar(0, \n\t\t\t\tConstants.WINDOW_HEADER_HEIGHT+(Constants.WINDOW_MAP_MARGIN*2)+Constants.WINDOW_MAP_HEIGHT, \n\t\t\t\tsetup.getFrameWidth()+12, \n\t\t\t\tConstants.WINDOW_HEADER_HEIGHT, \n\t\t\t\tConstants.COLOR_HEADER_1, setup);\n\t\t\n\t\trightBar = new RightBar((Constants.WINDOW_MAP_MARGIN*2)+Constants.WINDOW_MAP_WIDTH, \n\t\t\t\tConstants.WINDOW_HEADER_HEIGHT, \n\t\t\t\tConstants.WINDOW_RIGHT_BAR_WIDTH, \n\t\t\t\tConstants.WINDOW_RIGHT_BAR_HEIGHT, \n\t\t\t\tConstants.COLOR_MAP_LAND, setup);\n\t}", "private void CreateToolBars(){\n toolBar = new ToolBar();\n btoolBar = new ToolBar();\n login=new Button(\"Login\");\n simulate=new Button(\"Simulate\");\n scoreBoardButton=new Button(\"ScoreBoard\");\n viewBracket= new Button(\"view Bracket\");\n clearButton=new Button(\"Clear\");\n resetButton=new Button(\"Reset\");\n finalizeButton=new Button(\"Finalize\");\n toolBar.getItems().addAll(\n createSpacer(),\n login,\n simulate,\n scoreBoardButton,\n viewBracket,\n createSpacer()\n );\n btoolBar.getItems().addAll(\n createSpacer(),\n clearButton,\n resetButton,\n finalizeButton,\n createSpacer()\n );\n }", "private void createToolbars() {\n\t\tJToolBar toolBar = new JToolBar(\"Tools\");\n\t\ttoolBar.setFloatable(true);\n\n\t\ttoolBar.add(new JButton(new ActionNewDocument(flp, this)));\n\t\ttoolBar.add(new JButton(new ActionOpen(flp, this)));\n\t\ttoolBar.add(new JButton(new ActionSave(flp, this)));\n\t\ttoolBar.add(new JButton(new ActionSaveAs(flp, this)));\n\t\ttoolBar.addSeparator();\n\t\ttoolBar.add(new JButton(new ActionCut(flp, this)));\n\t\ttoolBar.add(new JButton(new ActionCopy(flp, this)));\n\t\ttoolBar.add(new JButton(new ActionPaste(flp, this)));\n\t\ttoolBar.addSeparator();\n\t\ttoolBar.add(new JButton(new ActionStatistics(flp, this)));\n\n\t\tthis.getContentPane().add(toolBar, BorderLayout.PAGE_START);\n\t}", "private void createToolbars() {\r\n\t\tJToolBar toolBar = new JToolBar(\"Tool bar\");\r\n\t\ttoolBar.add(createBlankDocument);\r\n\t\ttoolBar.add(openDocumentAction);\r\n\t\ttoolBar.add(saveDocumentAction);\r\n\t\ttoolBar.add(saveDocumentAsAction);\r\n\t\ttoolBar.add(closeCurrentTabAction);\r\n\t\t\r\n\t\ttoolBar.addSeparator();\r\n\t\ttoolBar.add(copyAction);\r\n\t\ttoolBar.add(cutAction);\r\n\t\ttoolBar.add(pasteAction);\r\n\t\t\r\n\t\ttoolBar.addSeparator();\r\n\t\ttoolBar.add(getStatsAction);\r\n\t\t\r\n\t\ttoolBar.addSeparator();\r\n\t\ttoolBar.add(exitAction);\r\n\t\t\r\n\t\tgetContentPane().add(toolBar, BorderLayout.PAGE_START);\r\n\t}", "private void setupToolBar() {\n\t\tbOk = ConfirmPanel.createOKButton(false);\n\t\tbOk.addActionListener(this);\n\t\tbSearch = ConfirmPanel.createRefreshButton(true);\n\t\tbSearch.addActionListener(this);\n\t\tbCancel = ConfirmPanel.createCancelButton(false);\n\t\tbCancel.addActionListener(this);\n\t\tbZoom = ConfirmPanel.createZoomButton(true);\n\t\tbZoom.addActionListener(this);\n\t\tbExport = ConfirmPanel.createExportButton(true);\n\t\tbExport.addActionListener(this);\n\t\tbDelete = ConfirmPanel.createDeleteButton(true);\n\t\tbDelete.addActionListener(this);\n\t\tAppsAction selectAllAction = new AppsAction(\"SelectAll\", null, Msg.getMsg(Env.getCtx(),\"SelectAll\"));\n\t\tselectAllAction.setDelegate(this);\n\t\tbSelectAll = (CButton) selectAllAction.getButton();\n\t\ttoolsBar = new javax.swing.JToolBar();\n\t}", "private void createToolbar() {\r\n // the visible toolbar is actually a toolbar next to a combobox.\r\n // That is why we need this extra composite, layout and numColums = 2.\r\n final Composite parent = new Composite(SHELL, SWT.FILL);\r\n final GridLayout layout = new GridLayout();\r\n layout.numColumns = 2;\r\n parent.setLayout(layout);\r\n\r\n final ToolBar bar = new ToolBar(parent, SWT.NONE);\r\n final GridData data = new GridData();\r\n data.heightHint = 55;\r\n data.grabExcessVerticalSpace = false;\r\n bar.setLayoutData(data);\r\n bar.setLayout(new GridLayout());\r\n\r\n createOpenButton(bar);\r\n\r\n createGenerateButton(bar);\r\n\r\n createSaveButton(bar);\r\n\r\n createSolveButton(bar);\r\n\r\n createAboutButton(bar);\r\n\r\n algorithmCombo = new AlgorithmCombo(parent);\r\n }", "private void setupToolBar() {\n\t\tJPanel buttons = new JPanel(new GridBagLayout());\n\t\tGridBagConstraints c = new GridBagConstraints();\n\t\tc.fill = GridBagConstraints.HORIZONTAL;\n\t\ttoolBar = new JToolBar(\"Buttons\");\n\t\ttoolBar.setFloatable(false);\n\t\ttoolBar.setOrientation(SwingConstants.VERTICAL);\n\t\tbuttons.add(toolBar, c);\n\t\tadd(buttons, BorderLayout.EAST);\n\t}", "private void defineToolBar() {\r\n //ARREGLO CON LOS BOTONES ORDENADOS POR POSICION\r\n tools = new ImageView[]{im_tool1,im_tool2,im_tool3,im_tool4,im_tool5,im_tool6,im_tool7,im_tool8,im_tool9,im_tool10,im_tool11,im_tool12}; \r\n //CARGA DE LA BD LA CONFIGURACION DE USUARIO PARA LA PANTALLA\r\n toolsConfig = Ln.getInstance().loadToolBar();\r\n // arreglo con cada etiqueta, ordenado por boton\r\n tooltips = new String[]{\r\n \"Nueva \" + ScreenName + \" \",\r\n \"Editar \" + ScreenName + \" \",\r\n \"Guardar \" + ScreenName + \" \",\r\n \"Cambiar Status de \" + ScreenName + \" \",\r\n \"Imprimir \" + ScreenName + \" \",\r\n \"Cancelar \",\r\n \"Sin Asignar \",\r\n \"Faltante en \" + ScreenName + \" \",\r\n \"Devolución en \" + ScreenName + \" \",\r\n \"Sin Asignar\",\r\n \"Sin Asignar\",\r\n \"Buscar \" + ScreenName + \" \"\r\n };\r\n //se asigna la etiqueta a su respectivo boton\r\n for (int i = 0; i < tools.length; i++) { \r\n Tooltip tip_tool = new Tooltip(tooltips[i]);\r\n Tooltip.install(tools[i], tip_tool);\r\n }\r\n \r\n im_tool7.setVisible(false);\r\n im_tool8.setVisible(false);\r\n im_tool9.setVisible(false);\r\n im_tool10.setVisible(false);\r\n im_tool11.setVisible(false);\r\n }", "private JToolBar getToolsToolBar() {\r\n\t\tif (toolsToolBar == null) {\r\n\t\t\ttoolsToolBar = new JToolBar();\r\n\t\t\ttoolsToolBar.setPreferredSize(new Dimension(87, 24));\r\n\t\t\tif(flag){\r\n\t\t\t\ttoolsToolBar.add(getOpenButton());\r\n\t\t\t\ttoolsToolBar.add(getSaveButton());\r\n\t\t\t}\r\n\t\t\ttoolsToolBar.add(getColorButton());\r\n\t\t\ttoolsToolBar.add(getLinkButton());\r\n\t\t\ttoolsToolBar.add(getIcoButton());\r\n\t\t}\r\n\t\treturn toolsToolBar;\r\n\t}", "public ToolBarView() {\r\n\t\tbuttonsToolbar = new JButton[14];\r\n\t\tfor (int i = 0; i < imagesToolbar.length; i++) {\r\n\t\t\tif (i == 2 || i == 3 || i == 8 || i == 10 || i == 11 || i == 12 ) {\r\n /* adding separator to the toolbar */\r\n\t\t\t\taddSeparator();\r\n } \r\n /* adding the buttons to toolbar */\r\n\t\t\tadd(buttonsToolbar[i] = new JButton(new ImageIcon(ClassLoader.getSystemResource(imagesToolbar[i]))));\r\n\t\t\t/* setting the ToolTipText to the buttons of toolbar */\r\n\t\t\tbuttonsToolbar[i].setToolTipText(tipText[i]);\r\n\t\t}\r\n\t}", "private void createToolBar() {\r\n toolbar = new JToolBar();\r\n inbox = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.INBOX_ICON)), \"Maintain Inbox\", \"Maintain Inbox\");\r\n awards = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.AWARDS_ICON)), \"Maintain Awards\", \"Maintain Awards\");\r\n proposal = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.PROPOSAL_ICON)), \"Maintain InstituteProposals\", \"Maintain Institute Proposals\");\r\n proposalDevelopment = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.PROPOSAL_DEVELOPMENT_ICON)), \"Maintain ProposalDevelopment\", \"Maintain Proposal Development\");\r\n rolodex = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.ROLODEX_ICON)), \"Maintain Rolodex\", \"Maintain Rolodex\");\r\n sponsor = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.SPONSOR_ICON)), \"Maintain Sponsor\", \"Maintain Sponsor\");\r\n subContract = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.SUBCONTRACT_ICON)), \"Maintain SubContract\", \"Maintain Subcontract\");\r\n negotiations = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.NEGOTIATIONS_ICON)), \"Maintain Negotiations\", \"Maintain Negotiations\");\r\n buisnessRules = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.BUSINESS_RULES_ICON)), \"Maintain BusinessRules\", \"Maintain Business Rules\");\r\n map = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.MAP_ICON)), \"Maintain Map\", \"Maintain Map\");\r\n personnal = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.PERSONNAL_ICON)), \"Maintain Personal\", \"Maintain Personnel\");\r\n users = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.USERS_ICON)), \"Maintain Users\", \"Maintain Users\");\r\n unitHierarchy = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.UNIT_HIERARCHY_ICON)), \"Maintain UnitHierarchy\", \"Maintain Unit Hierarchy\");\r\n cascade = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.CASCADE_ICON)), \"Cascade\", \"Cascade\");\r\n tileHorizontal = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.TILE_HORIZONTAL_ICON)), \"Tile Horizontal\", \"Tile Horizontal\");\r\n tileVertical = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.TILE_VERTICAL_ICON)), \"Tile Vertical\", \"Tile Vertical\");\r\n layer = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.LAYER_ICON)), \"Layer\", \"Layer\");\r\n \r\n /*Added Icons are Committe,Protocol,Shedule. The Icons are different.Non-availability of standard Icon - Chandrashekar*/\r\n //Added for COEUSQA-2580_Change menu item name from \"Protocol\" to \"IRB Protocol\" on Maintain menu in Premium - Start\r\n /* JM 05-02-2013\r\n irbProtocol = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.PROTOCOL_ICON)), \"Protocol\", \"IRB Protocol\");\r\n \r\n irbProtocolSubmission = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.PROTOCOL_SUBMISSION_BASE_ICON)),\"Protocol Submission\",\"IRB Protocol Submission\");\r\n */\r\n //Added for COEUSQA-2580_Change menu item name from \"Protocol\" to \"IRB Protocol\" on Maintain menu in Premium - End\r\n /* JM 05-02-2013\r\n schedule = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.SCHEDULE_ICON)), \"Schedule\", \"Schedule\");\r\n committee = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.COMMITTEE_ICON)), \"Committee\", \"Committee\");\r\n */\r\n //Added for COEUSQA-2580_Change menu item name from \"Protocol\" to \"IRB Protocol\" on Maintain menu in Premium - Start\r\n //irbProtocolSubmission = new CoeusToolBarButton(new ImageIcon(\r\n // getClass().getClassLoader().getResource(CoeusGuiConstants.PROTOCOL_SUBMISSION_BASE_ICON)),\"Protocol Submission\",\"IRB Protocol Submission\");\r\n //Added for COEUSQA-2580_Change menu item name from \"Protocol\" to \"IRB Protocol\" on Maintain menu in Premium - End\r\n //Added for case id COEUSQA-2717 icons for IACUC to Coeus Premium start\r\n /* JM 05-02-2013\r\n iacucProtocol = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.IACUC_PROTOCOL_ICON)), \"Protocol\", \"IACUC Protocol\");\r\n \r\n iacucProtocolSubmission = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.IACUC_PROTOCOL_SUBMISSION_BASE_ICON)),\"Protocol Submission\",\"IACUC Protocol Submission\");\r\n */\r\n //Added for case id COEUSQA-2717 icons for IACUC to Coeus Premium end\r\n \r\n /* JM 4-25-2016 adding new Contact Coeus Help button */\r\n contactCoeusHelp = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.HELP_ICON)), \"Contact Coeus Help\", \"Contact Coeus Help\");\r\n /* JM END */\r\n \r\n exit = new CoeusToolBarButton(new ImageIcon(\r\n getClass().getClassLoader().getResource(CoeusGuiConstants.EXIT_ICON)), \"Exit\", \"Exit\");\r\n \r\n \r\n toolbar.add(inbox);\r\n toolbar.addSeparator();\r\n toolbar.add(awards);\r\n toolbar.add(proposal);\r\n toolbar.add(proposalDevelopment);\r\n toolbar.add(rolodex);\r\n toolbar.add(sponsor);\r\n toolbar.add(subContract);\r\n toolbar.add(negotiations);\r\n toolbar.add(buisnessRules);\r\n toolbar.add(map);\r\n toolbar.add(personnal);\r\n toolbar.add(users);\r\n toolbar.add(unitHierarchy);\r\n \r\n /*Added Icons are Committe,Protocol,Shedule - Chandrashekar*/\r\n /* JM 05-02-2013\r\n toolbar.add(irbProtocol);\r\n toolbar.add(irbProtocolSubmission);\r\n \r\n toolbar.add(schedule);\r\n toolbar.add(committee);\r\n */\r\n //Added for case id COEUSQA-2717 icons for IACUC to Coeus Premium start\r\n /* JM 05-02-2013\r\n toolbar.add(iacucProtocol);\r\n toolbar.add(iacucProtocolSubmission);\r\n */\r\n //Added for case id COEUSQA-2717 icons for IACUC to Coeus Premium end\r\n \r\n toolbar.addSeparator();\r\n toolbar.add(cascade);\r\n toolbar.add(tileHorizontal);\r\n toolbar.add(tileVertical);\r\n toolbar.add(layer);\r\n toolbar.addSeparator();\r\n \r\n /* JM 4-25-2016 adding new Contact Coeus Help button */\r\n toolbar.add(contactCoeusHelp);\r\n toolbar.addSeparator();\r\n /* JM END */\r\n \r\n toolbar.add(exit);\r\n \r\n toolbar.setFloatable(false);\r\n setTextLabels(false);\r\n MouseListener pl = new PopupListener();\r\n cpm = new CoeusPopupMenu();\r\n toolbar.addMouseListener(pl);\r\n \r\n inbox.addActionListener(this);\r\n awards.addActionListener(this);\r\n proposal.addActionListener(this);\r\n proposalDevelopment.addActionListener(this);\r\n rolodex.addActionListener(this);\r\n sponsor.addActionListener(this);\r\n subContract.addActionListener(this);\r\n negotiations.addActionListener(this);\r\n buisnessRules.addActionListener(this);\r\n map.addActionListener(this);\r\n personnal.addActionListener(this);\r\n users.addActionListener(this);\r\n unitHierarchy.addActionListener(this);\r\n cascade.addActionListener(this);\r\n tileHorizontal.addActionListener(this);\r\n tileVertical.addActionListener(this);\r\n layer.addActionListener(this);\r\n /*Added Icons are Committe,Protocol,Shedule - Chandrashekar*/\r\n /* JM 05-02-2013\r\n irbProtocol.addActionListener(this);\r\n schedule.addActionListener(this);\r\n committee.addActionListener(this);\r\n irbProtocolSubmission.addActionListener(this);\r\n //Added for case id COEUSQA-2717 icons for IACUC to Coeus Premium start\r\n iacucProtocol.addActionListener(this);\r\n iacucProtocolSubmission.addActionListener(this); */\r\n //Added for case id COEUSQA-2717 icons for IACUC to Coeus Premium end\r\n \r\n /* JM 4-25-2016 adding new Contact Coeus Help button */\r\n contactCoeusHelp.addActionListener(this);\r\n /* JM END */\r\n \r\n exit.addActionListener(this);\r\n }", "private void createToolbar() {\n\t\ttoolbarPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));\n\n\t\tString iconsDir = \"icons/\";\n\n\t\tfileToolbar = new JToolBar();\n\t\tfileToolbar.setName(\"File\");\n\n\t\t// Componentes da barra de ferramentas de arquivo\n\t\tIcon newFileIcon = new ImageIcon(getClass().getClassLoader().getResource(iconsDir + \"new.png\"));\n\t\tnewFileButton = new JButton(newFileIcon);\n\t\tnewFileButton.setToolTipText(\"Novo arquivo\");\n\n\t\tIcon openFileIcon = new ImageIcon(getClass().getClassLoader().getResource(iconsDir + \"open.png\"));\n\t\topenFileButton = new JButton(openFileIcon);\n\t\topenFileButton.setToolTipText(\"Abrir arquivo\");\n\t\topenFileButton.addActionListener(new OpenFileHandler());\n\n\t\tIcon saveFileIcon = new ImageIcon(getClass().getClassLoader().getResource(iconsDir + \"save.png\"));\n\t\tsaveFileButton = new JButton(saveFileIcon);\n\t\tsaveFileButton.setToolTipText(\"Salvar arquivo\");\n\n\t\t// fileToolbar.add(newFileButton);\n\t\tfileToolbar.add(openFileButton);\n\t\t// fileToolbar.add(saveFileButton);\n\n\t\t// Componentes da barra de ferramentas de rede\n\t\tnetworkComponentsToolbar = new JToolBar();\n\t\tnetworkComponentsToolbar.setName(\"Network components\");\n\n\t\tIcon newPlaceIcon = new ImageIcon(getClass().getClassLoader().getResource(iconsDir + \"circle_stroked.png\"));\n\t\taddPlaceButton = new JButton(newPlaceIcon);\n\t\taddPlaceButton.setToolTipText(\"Adicionar lugar\");\n\n\t\tIcon newTransitionIcon = new ImageIcon(getClass().getClassLoader().getResource(iconsDir + \"pipe.png\"));\n\t\taddTransitionButton = new JButton(newTransitionIcon);\n\t\taddTransitionButton.setToolTipText(\"Adicionar transição\");\n\n\t\tIcon newEdgeIcon = new ImageIcon(getClass().getClassLoader().getResource(iconsDir + \"arrow_alt_right.png\"));\n\t\taddEdgeButton = new JButton(newEdgeIcon);\n\t\taddEdgeButton.setToolTipText(\"Adicionar aresta\");\n\n\t\tnetworkComponentsToolbar.add(addPlaceButton);\n\t\tnetworkComponentsToolbar.add(addTransitionButton);\n\t\tnetworkComponentsToolbar.add(addEdgeButton);\n\n\t\ttoolbarPanel.add(fileToolbar);\n\t\t// toolbarPanel.add(networkComponentsToolbar);\n\n\t\tthis.add(toolbarPanel, BorderLayout.NORTH);\n\t}", "private Component createToolBar()\n {\n Component toolbarPanel = null;\n\n mainToolBar = new MainToolBar(this);\n\n boolean chatToolbarVisible\n = ConfigurationUtils.isChatToolbarVisible();\n\n if (OSUtils.IS_MAC)\n {\n UnifiedToolBar macToolbarPanel = new UnifiedToolBar();\n\n MacUtils.makeWindowLeopardStyle(getRootPane());\n\n macToolbarPanel.addComponentToLeft(mainToolBar);\n macToolbarPanel.addComponentToRight(contactPhotoPanel);\n macToolbarPanel.disableBackgroundPainter();\n macToolbarPanel.installWindowDraggerOnWindow(this);\n macToolbarPanel.getComponent()\n .setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3));\n macToolbarPanel.getComponent().setVisible(chatToolbarVisible);\n\n toolbarPanel = macToolbarPanel.getComponent();\n }\n else\n {\n ToolbarPanel panel = new ToolbarPanel(new BorderLayout());\n\n panel.setBorder(BorderFactory.createEmptyBorder(3, 0, 3, 0));\n panel.add(mainToolBar, BorderLayout.CENTER);\n panel.add(contactPhotoPanel, BorderLayout.EAST);\n panel.setVisible(chatToolbarVisible);\n\n toolbarPanel = panel;\n }\n\n return toolbarPanel;\n }", "private void loadToolBar() {\r\n //si existe la configuracion de la TOOLBAR asociada al usuario\r\n if(toolsConfig != null){\r\n //Si el id de pantalla es la correcta y se encuentra activo 1 el TOOLBAR\r\n if(Datos.getIdScreen()==toolsConfig[0] && toolsConfig[1]==1){ \r\n for (int i = 0; i < tools.length; i++){ //Recorre el arreglo de botones\r\n if(toolsConfig[i+2] == 1){ //Si esta disponible 1 \r\n enableToolBar(tools, i); //habilita el boton\r\n }else{ \r\n disableToolBar(tools,i); //deshabilita el boton\r\n } \r\n }\r\n }\r\n }\r\n else{\r\n for (int i = 0; i < tools.length; i++){ //Recorre el arreglo de botones\r\n disableToolBar(tools,i); //deshabilita el boton\r\n }\r\n }\r\n }", "private Component buildToolBar() {\r\n DToolBar toolBar = new DToolBar();\r\n// toolBar.applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);\r\n toolBar.setFloatable(true);\r\n toolBar.putClientProperty(\"JToolBar.isRollover\", Boolean.TRUE);\r\n // Swing\r\n toolBar.putClientProperty(\r\n Options.HEADER_STYLE_KEY,\r\n settings.getToolBarHeaderStyle());\r\n toolBar.putClientProperty(\r\n PlasticLookAndFeel.BORDER_STYLE_KEY,\r\n settings.getToolBarPlasticBorderStyle());\r\n toolBar.putClientProperty(\r\n WindowsLookAndFeel.BORDER_STYLE_KEY,\r\n settings.getToolBarWindowsBorderStyle());\r\n toolBar.putClientProperty(\r\n PlasticLookAndFeel.IS_3D_KEY,\r\n settings.getToolBar3DHint());\r\n\r\n AbstractButton button;\r\n/*\r\n toolBar.add(createToolBarButton(\"backward.gif\", \"Back\"));\r\n button = createToolBarButton(\"forward.gif\", \"Next\");\r\n button.setEnabled(false);\r\n toolBar.add(button);*/\r\n \r\n button = createToolBarButton(\"home.gif\", ResourceUtil.getString(\"HOME\"));\r\n toolBar.add(button);\r\n button.addActionListener(this);\r\n button.setActionCommand(\"home\");\r\n// toolBar.addSeparator();\r\n \r\n button = createToolBarButton(\"preference16.gif\", ResourceUtil.getString(\"PREFERENCES\"));\r\n toolBar.add(button);\r\n button.setRolloverIcon(readImageIcon(\"preference16_over.gif\"));\r\n button.addActionListener(this);\r\n button.setActionCommand(\"Preferences\");\r\n toolBar.addSeparator();\r\n\r\n button = createToolBarButton(\"new16.gif\", ResourceUtil.getString(\"NEW\"));\r\n button.setActionCommand(\"new\");\r\n button.addActionListener(this);\r\n toolBar.add(button);\r\n \r\n button = createToolBarButton(\"save_edit.gif\", ResourceUtil.getString(\"SAVE\"));\r\n button.setActionCommand(\"save\");\r\n button.addActionListener(this);\r\n toolBar.add(button);\r\n \r\n button = createToolBarButton(\"delete16.gif\", ResourceUtil.getString(\"DELETE\"));\r\n button.setActionCommand(\"delete\");\r\n button.addActionListener(this);\r\n toolBar.add(button);\r\n \r\n button = createToolBarButton(\"print.gif\", ResourceUtil.getString(\"PRINT\"));\r\n button.setActionCommand(\"print\");\r\n button.addActionListener(this);\r\n toolBar.add(button);\r\n/* \r\n toolBar.add(createToolBarButton(\"print.gif\", \"Print\"));\r\n toolBar.add(createToolBarButton(\"refresh.gif\", \"Update\"));\r\n toolBar.addSeparator();\r\n\r\n ButtonGroup group = new ButtonGroup();\r\n button = createToolBarRadioButton(\"pie_mode.png\", \"Pie Chart\");\r\n button.setSelectedIcon(readImageIcon(\"pie_mode_selected.gif\"));\r\n group.add(button);\r\n button.setSelected(true);\r\n toolBar.add(button);\r\n\r\n button = createToolBarRadioButton(\"bar_mode.png\", \"Bar Chart\");\r\n button.setSelectedIcon(readImageIcon(\"bar_mode_selected.gif\"));\r\n group.add(button);\r\n toolBar.add(button);\r\n\r\n button = createToolBarRadioButton(\"table_mode.png\", \"Table\");\r\n button.setSelectedIcon(readImageIcon(\"table_mode_selected.gif\"));\r\n group.add(button);\r\n toolBar.add(button);\r\n toolBar.addSeparator();\r\n\r\n button = createToolBarButton(\"help.gif\", \"Open Help\");\r\n button.addActionListener(createHelpActionListener());\r\n toolBar.add(button);*/\r\n\r\n return toolBar;\r\n }", "private void contributeToActionBars() {\n\t\tIActionBars bars = getViewSite().getActionBars();\n\t\tfillLocalPullDown(bars.getMenuManager());\n\t\tfillLocalToolBar(bars.getToolBarManager());\n\t}", "private void createToolButtons(final Map<PaintTool, ToolAction> theMap, \n final List<PaintTool> theTools,\n final JFrame theFrame) {\n \n final ButtonGroup toolBarGroup = new ButtonGroup();\n for (final PaintTool aT : theTools) {\n final JToggleButton button = new JToggleButton(aT.getDescription());\n toolBarGroup.add(button);\n aT.addPropertyChangeListener(this);\n button.setAction(theMap.get(aT));\n myToolBar.add(button);\n myToolBar.addSeparator();\n }\n theFrame.add(myToolBar, BorderLayout.PAGE_END);\n }", "@Override\n protected void initializeToolBars() {\n SharedToolBar sharedToolbar = getSharedToolBar();\n sharedToolbar.addPushButton(new HelpAction(\"org.geocraft.ui.traceviewer.MapPlot\"));\n\n // Create a custom toolbar just for the trace viewer.\n SimpleToolBar toolbar = addCustomToolBar();\n\n // Add a color selector for choosing the background color.\n final ColorSelector colorSelector = toolbar.addColorSelector(getBackgroundViewColor());\n colorSelector.getButton().setToolTipText(\"Select background color\");\n colorSelector.addListener(new IPropertyChangeListener() {\n\n /**\n * Invoked when a color is chosen in the color selector.\n * \n * @param event\n * the property change event.\n */\n public void propertyChange(final PropertyChangeEvent event) {\n RGB newColor = colorSelector.getColorValue();\n setBackgroundViewColor(newColor);\n _plot.getModelSpaceCanvas().setGridLineProperties(LineStyle.NONE, newColor, 0);\n }\n });\n }", "private BrowserToolbar() {\n\t\tinitComponents();\n\t}", "public MainToolbar createToolbar()\r\n {\n WbSwingUtilities.invoke(this::_createToolbar);\r\n return toolbar;\r\n }", "private void configureToolBar() {\n toolBar = findViewById(R.id.my_first_toolbar);\n setSupportActionBar(toolBar);\n getSupportActionBar().setDisplayShowTitleEnabled(false);\n }", "protected void fillCoolBar(ICoolBarManager coolBar) {\n\t\tIWorkbenchWindow window = getActionBarConfigurer().getWindowConfigurer().getWindow();\n\t\tIToolBarManager toolbar = new ToolBarManager(SWT.LEFT);\n\t\tcoolBar.add(new ToolBarContributionItem(toolbar, Messages.getString(\"IU.Strings.15\"))); //$NON-NLS-1$\n\t\ttoolbar.add(new GroupMarker(Messages.getString(\"IU.Strings.16\"))); //$NON-NLS-1$\n\n\n\t\t/*IWorkbenchAction open = ActionFactory..create(window);\n\t\topen.setImageDescriptor(Activator.getImageDescriptor(\"icons/charger.png\"));\n\t\ttoolbar.add(open);*/\n\n\t\tIWorkbenchAction save = ActionFactory.SAVE.create(window);\n\t\tsave.setImageDescriptor(Activator.getImageDescriptor(Messages.getString(\"IU.Strings.17\"))); //$NON-NLS-1$\n\t\tsave.setDisabledImageDescriptor(Activator.getImageDescriptor(Messages.getString(\"IU.Strings.18\"))); //$NON-NLS-1$\n\t\tsave.setHoverImageDescriptor(Activator.getImageDescriptor(Messages.getString(\"IU.Strings.19\"))); //$NON-NLS-1$\n\t\tsave.setText(Messages.getString(\"IU.Strings.20\")); //$NON-NLS-1$\n\t\tsave.setToolTipText(Messages.getString(\"IU.Strings.21\")); //$NON-NLS-1$\n\t\ttoolbar.add(save);\n\n\t\tIWorkbenchAction print = ActionFactory.PRINT.create(window);\n\t\tprint.setImageDescriptor(Activator.getImageDescriptor(Messages.getString(\"IU.Strings.22\"))); //$NON-NLS-1$\n\t\tprint.setDisabledImageDescriptor(Activator.getImageDescriptor(Messages.getString(\"IU.Strings.23\"))); //$NON-NLS-1$\n\t\tprint.setHoverImageDescriptor(Activator.getImageDescriptor(Messages.getString(\"IU.Strings.24\"))); //$NON-NLS-1$\n\t\tprint.setText(Messages.getString(\"IU.Strings.25\")); //$NON-NLS-1$\n\t\tprint.setToolTipText(Messages.getString(\"IU.Strings.26\")); //$NON-NLS-1$\n\t\ttoolbar.add(print);\n\n\n\t\ttoolbar.add(new GroupMarker(Messages.getString(\"IU.Strings.27\"))); //$NON-NLS-1$\n\t\ttoolbar.add(new Separator());\n\t\tIWorkbenchAction find = ActionFactory.FIND.create(window);\n\t\tfind.setImageDescriptor(Activator.getImageDescriptor(Messages.getString(\"IU.Strings.28\"))); //$NON-NLS-1$\n\t\t//find.setDisabledImageDescriptor(Activator.getImageDescriptor(Messages.getString(\"IU.Strings.29\"))); //$NON-NLS-1$\n\t\t//find.setHoverImageDescriptor(Activator.getImageDescriptor(Messages.getString(\"IU.Strings.30\"))); //$NON-NLS-1$\n\t\tfind.setText(Messages.getString(\"IU.Strings.31\")); //$NON-NLS-1$\n\t\tfind.setToolTipText(Messages.getString(\"IU.Strings.32\")); //$NON-NLS-1$\n\t\ttoolbar.add(find);\n\n\t\t/*toolbar.add(ActionFactory.COPY.create(window));\n\t\ttoolbar.add(ActionFactory.CUT.create(window));\n\t\ttoolbar.add(ActionFactory.PASTE.create(window));\n\t\ttoolbar.add(new Separator());*/\n\n\t\t//TODO Rrgler le bug d'icon non charger undo / redo entre l'editeur et la console\n\t\t/*IWorkbenchAction undo = ActionFactory.UNDO.create(window);\n\t\tundo.setImageDescriptor(Activator.getImageDescriptor(\"icons/undo.gif\"));\n\t\tundo.setDisabledImageDescriptor(Activator.getImageDescriptor(\"icons/undo.gif\"));\n\t\tundo.setHoverImageDescriptor(Activator.getImageDescriptor(\"icons/undo.gif\"));\n\t\ttoolbar.add(undo);\n\n\t\tIWorkbenchAction redo = ActionFactory.REDO.create(window);\n\t\tredo.setImageDescriptor(Activator.getImageDescriptor(\"icons/redo.gif\"));\n\t\tredo.setDisabledImageDescriptor(Activator.getImageDescriptor(\"icons/redo.gif\"));\n\t\tredo.setHoverImageDescriptor(Activator.getImageDescriptor(\"icons/redo.gif\"));\n\t\ttoolbar.add(redo);*/\n\n\t\t\n\t\t//toolbar.add(ActionFactory.REDO.create(window));*/\n\n\t\t//toolbox2.png\n\t\tToolsBoxAction toolBox = new ToolsBoxAction(window);\n\t\ttoolBox.setImageDescriptor(Activator.getImageDescriptor(Messages.getString(\"IU.Strings.33\"))); //$NON-NLS-1$\n\t\ttoolBox.setDisabledImageDescriptor(Activator.getImageDescriptor(Messages.getString(\"IU.Strings.34\"))); //$NON-NLS-1$\n\t\ttoolBox.setHoverImageDescriptor(Activator.getImageDescriptor(Messages.getString(\"IU.Strings.35\"))); //$NON-NLS-1$\n\t\ttoolbar.add(toolBox);\n\t\t\n\t\t\n\t\t//action_toolsBox.setMenuCreator(new IMenuCreator(){});\n\t\n\t\t//coolBar.add(new ToolBarContributionItem(toolbar2, \"main2\"));\n\t\t//toolbar2.add(ActionFactory.SHOW_VIEW_MENU.create(window));\n\n\t\t\n\t\tIToolBarManager toolbar2 = new ToolBarManager(SWT.RIGHT | SWT.FLAT | SWT.HORIZONTAL);\n\t\t\n\t\tcoolBar.add(new ToolBarContributionItem(toolbar2, Messages.getString(\"IU.Strings.36\")));\t //$NON-NLS-1$\n\t\ttoolbar2.add(new GroupMarker(Messages.getString(\"IU.Strings.37\"))); //$NON-NLS-1$\n\t\ttoolbar2.add(new GroupMarker(Messages.getString(\"IU.Strings.38\"))); //$NON-NLS-1$\n\t}", "public ToolBar(final Map<PaintTool, ToolAction> theMap, \n final List<PaintTool> theTools,\n final JFrame theFrame,\n final DrawingPanel thePanel) { \n\n myToolBar = new JToolBar();\n createToolButtons(theMap, theTools, theFrame);\n createUndoAndRedo(thePanel);\n myBar = theFrame.getJMenuBar();\n myBar.addPropertyChangeListener(this);\n myPcs = new PropertyChangeSupport(this);\n }", "private void setupSystemUI() {\r\n toolbar.animate().translationY(Measure.getStatusBarHeight(getResources())).setInterpolator(new DecelerateInterpolator())\r\n .setDuration(0).start();\r\n getWindow().getDecorView().setSystemUiVisibility(\r\n View.SYSTEM_UI_FLAG_LAYOUT_STABLE\r\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\r\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);\r\n }", "private void configureToolBar(){\n this.toolbar = (Toolbar) findViewById(R.id.activity_main_toolbar);\n setSupportActionBar(toolbar);\n }", "public static void addComponents(){\n navBar.add(heading);\n navBar.add(logoutBtn);\n navBar.setLayout(new BorderLayout());\n panel.add(navBar);\n panel.add(industrys);\n panel.setLayout(new BorderLayout());\n }", "private void initializeToolBarElements() {\n mNavigationView = findViewById(R.id.nav_view);\n mNavigationView.setNavigationItemSelectedListener(this);\n //Remove all tint from Nav Drawer icons\n mNavigationView.setItemIconTintList(null);\n\n mToolBar = findViewById(R.id.toolbar);\n setSupportActionBar(mToolBar);\n\n mDrawerLayout = findViewById(R.id.drawer_layout);\n ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(this, mDrawerLayout, mToolBar,\n R.string.navigation_drawer_open,\n R.string.navigation_drawer_close);\n mDrawerLayout.addDrawerListener(toggle);\n toggle.syncState();\n }", "private void addToolsAndCommands() {\n this.selectTargetCadastreObjectTool\n = new CadastreChangeSelectCadastreObjectTool(this.getPojoDataAccess());\n this.selectTargetCadastreObjectTool.setTargetParcelsLayer(targetParcelsLayer);\n this.selectTargetCadastreObjectTool.setCadastreObjectType(CadastreObjectTypeBean.CODE_PARCEL);\n this.getMap().addTool(this.selectTargetCadastreObjectTool, this.getToolbar(), true);\n }", "@FXML\n public void addBar() {\n \tnew eMenuHandler().hideMenu();\n \tDisplayBuildingInstructions.showBuildingInstr();\n \tAddEntityOnMouseClick.setBuildMode(Boolean.TRUE);\n \tAddEntityOnMouseClick.entityList(new BuildingBar(0, 0));\n }", "private void fillLocalToolBar(IToolBarManager manager) {\n\t\tmanager.add(actionReload);\n\t\tmanager.add(actionSort);\n\t\tmanager.add(new Separator());\n\t\t\n\t\tmanager.add(actionFind);\n//\t\tmanager.add(new Separator());\n//\t\tmanager.add(actionReloadAndValidate);\n\t\tmanager.add(new Separator());\n\t\tmanager.add(actionValidate);\n\t\tmanager.add(actionSimulate);\n\t\tmanager.add(new Separator());\n\t\tmanager.add(actionCollapseAll);\n\t\tmanager.add(actionLinkWithEditor);\n\t\t\n\t\tmanager.add(new Separator());\n\t\tmanager.add(actionShowAboutInfo);\n\t\t\n\t\tmanager.add(new Separator());\n\t\tdrillDownAdapter.addNavigationActions(manager);\n\t}", "void hideToolbars();", "private void setToolBar() {\r\n toolbar.setTitle(R.string.photo_details);\r\n ActionBar ab = getSupportActionBar();\r\n if (ab != null) {\r\n ab.setDisplayHomeAsUpEnabled(true);\r\n }\r\n toolbar.setNavigationIcon(R.drawable.ic_back);\r\n }", "private void setupToolBar(){\n Toolbar toolbar = (Toolbar)findViewById(R.id.my_toolbar);\n setSupportActionBar(toolbar);\n\n getSupportActionBar().setHomeButtonEnabled(true);\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n }", "public JMTToolBar createToolbar() {\r\n \t\tJMTToolBar toolbar = new JMTToolBar(JMTImageLoader.getImageLoader());\r\n \t\t// Builds an array with all actions to be put in the toolbar\r\n \t\tAbstractJmodelAction[] actions = new AbstractJmodelAction[] { newModel, openModel, saveModel, null,\r\n \t\t\t\t// editUndo, editRedo, null,\r\n \t\t\t\tactionCut, actionCopy, actionPaste, null, editUserClasses, editMeasures, editSimParams, editPAParams, null, switchToExactSolver,\r\n \t\t\t\tnull, simulate, pauseSimulation, stopSimulation, showResults, null, editDefaults, openHelp };\r\n \t\ttoolbar.populateToolbar(actions);\r\n \t\treturn toolbar;\r\n \t}", "protected void createContents() {\n setText(BUNDLE.getString(\"TranslationManagerShell.Application.Name\"));\n setSize(599, 505);\n\n final Composite cmpMain = new Composite(this, SWT.NONE);\n cmpMain.setLayout(new FormLayout());\n\n final Composite cmpControls = new Composite(cmpMain, SWT.NONE);\n final FormData fd_cmpControls = new FormData();\n fd_cmpControls.right = new FormAttachment(100, -5);\n fd_cmpControls.top = new FormAttachment(0, 5);\n fd_cmpControls.left = new FormAttachment(0, 5);\n cmpControls.setLayoutData(fd_cmpControls);\n cmpControls.setLayout(new FormLayout());\n\n final ToolBar modifyToolBar = new ToolBar(cmpControls, SWT.FLAT);\n\n tiSave = new ToolItem(modifyToolBar, SWT.PUSH);\n tiSave.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Save\"));\n tiSave.setEnabled(false);\n tiSave.setDisabledImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/d_save.gif\"));\n tiSave.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_save.gif\"));\n\n tiUndo = new ToolItem(modifyToolBar, SWT.PUSH);\n tiUndo.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Undo\"));\n tiUndo.setEnabled(false);\n tiUndo.setDisabledImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/d_reset.gif\"));\n tiUndo.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_reset.gif\"));\n\n tiDeleteSelected = new ToolItem(modifyToolBar, SWT.PUSH);\n tiDeleteSelected.setDisabledImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/d_remove.gif\"));\n tiDeleteSelected.setEnabled(false);\n tiDeleteSelected.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Delete\"));\n tiDeleteSelected.setImage(SWTResourceManager.getImage(TranslationManagerShell.class,\n \"/images/tools16x16/e_remove.gif\"));\n\n txtFilter = new LVSText(cmpControls, SWT.BORDER);\n final FormData fd_txtFilter = new FormData();\n fd_txtFilter.right = new FormAttachment(25, 0);\n fd_txtFilter.top = new FormAttachment(modifyToolBar, 0, SWT.CENTER);\n fd_txtFilter.left = new FormAttachment(modifyToolBar, 25, SWT.RIGHT);\n txtFilter.setLayoutData(fd_txtFilter);\n\n final ToolBar filterToolBar = new ToolBar(cmpControls, SWT.FLAT);\n final FormData fd_filterToolBar = new FormData();\n fd_filterToolBar.top = new FormAttachment(modifyToolBar, 0, SWT.TOP);\n fd_filterToolBar.left = new FormAttachment(txtFilter, 5, SWT.RIGHT);\n filterToolBar.setLayoutData(fd_filterToolBar);\n\n tiFilter = new ToolItem(filterToolBar, SWT.NONE);\n tiFilter.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_find.gif\"));\n tiFilter.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Filter\"));\n\n tiLocale = new ToolItem(filterToolBar, SWT.DROP_DOWN);\n tiLocale.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Locale\"));\n tiLocale.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_globe.png\"));\n\n menuLocale = new Menu(filterToolBar);\n addDropDown(tiLocale, menuLocale);\n\n lblSearchResults = new Label(cmpControls, SWT.NONE);\n lblSearchResults.setVisible(false);\n final FormData fd_lblSearchResults = new FormData();\n fd_lblSearchResults.top = new FormAttachment(filterToolBar, 0, SWT.CENTER);\n fd_lblSearchResults.left = new FormAttachment(filterToolBar, 5, SWT.RIGHT);\n lblSearchResults.setLayoutData(fd_lblSearchResults);\n lblSearchResults.setText(BUNDLE.getString(\"TranslationManagerShell.Label.Results\"));\n\n final ToolBar translateToolBar = new ToolBar(cmpControls, SWT.NONE);\n final FormData fd_translateToolBar = new FormData();\n fd_translateToolBar.top = new FormAttachment(filterToolBar, 0, SWT.TOP);\n fd_translateToolBar.right = new FormAttachment(100, 0);\n translateToolBar.setLayoutData(fd_translateToolBar);\n\n tiDebug = new ToolItem(translateToolBar, SWT.PUSH);\n tiDebug.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Debug\"));\n tiDebug.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/debug.png\"));\n\n new ToolItem(translateToolBar, SWT.SEPARATOR);\n\n tiAddBase = new ToolItem(translateToolBar, SWT.PUSH);\n tiAddBase.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.AddBase\"));\n tiAddBase.setImage(SWTResourceManager.getImage(TranslationManagerShell.class, \"/images/tools16x16/e_add.gif\"));\n\n tiTranslate = new ToolItem(translateToolBar, SWT.CHECK);\n tiTranslate.setToolTipText(BUNDLE.getString(\"TranslationManagerShell.ToolTip.Translate\"));\n tiTranslate.setImage(SWTResourceManager\n .getImage(TranslationManagerShell.class, \"/images/tools16x16/target.png\"));\n\n cmpTable = new Composite(cmpMain, SWT.NONE);\n cmpTable.setLayout(new FillLayout());\n final FormData fd_cmpTable = new FormData();\n fd_cmpTable.bottom = new FormAttachment(100, -5);\n fd_cmpTable.right = new FormAttachment(cmpControls, 0, SWT.RIGHT);\n fd_cmpTable.left = new FormAttachment(cmpControls, 0, SWT.LEFT);\n fd_cmpTable.top = new FormAttachment(cmpControls, 5, SWT.BOTTOM);\n cmpTable.setLayoutData(fd_cmpTable);\n\n final Menu menu = new Menu(this, SWT.BAR);\n setMenuBar(menu);\n\n final MenuItem menuItemFile = new MenuItem(menu, SWT.CASCADE);\n menuItemFile.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.File\"));\n\n final Menu menuFile = new Menu(menuItemFile);\n menuItemFile.setMenu(menuFile);\n\n menuItemExit = new MenuItem(menuFile, SWT.NONE);\n menuItemExit.setAccelerator(SWT.ALT | SWT.F4);\n menuItemExit.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.File.Exit\"));\n\n final MenuItem menuItemHelp = new MenuItem(menu, SWT.CASCADE);\n menuItemHelp.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.Help\"));\n\n final Menu menuHelp = new Menu(menuItemHelp);\n menuItemHelp.setMenu(menuHelp);\n\n menuItemDebug = new MenuItem(menuHelp, SWT.NONE);\n menuItemDebug.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.Help.Debug\"));\n\n new MenuItem(menuHelp, SWT.SEPARATOR);\n\n menuItemAbout = new MenuItem(menuHelp, SWT.NONE);\n menuItemAbout.setText(BUNDLE.getString(\"TranslationManagerShell.Menu.Help.About\"));\n //\n }", "private JToolBar getJToolBar() {\r\n\t\tif (jToolBar == null) {\r\n\t\t\tjToolBar = new JToolBar();\r\n\t\t\tjToolBar.setFloatable(false);\r\n\t\t\tjToolBar.add(getCmdAdd());\r\n\t\t\tjToolBar.add(getCmdDel());\r\n\t\t\tjToolBar.add(getCmdAddT());\r\n\t\t\tjToolBar.add(getCmdUrl());\r\n\t\t\tjToolBar.add(getCmdStart());\r\n\t\t\tjToolBar.add(getCmdPause());\r\n\t\t\tjToolBar.add(getCmdStop());\r\n\t\t\tjToolBar.add(getCmdExport());\r\n\t\t}\r\n\t\treturn jToolBar;\r\n\t}", "public JToolBar getToolBar(){\r\n return toolbar;\r\n }", "public JToolBar gameToolbar() {\n\t\tthis.gameToolbar = new JToolBar();\n\t\t//this.gameToolbar.setPreferredSize(size);\n\t\tFlowLayout tbLayout = new FlowLayout();\n\t\tthis.gameToolbar.setLayout(tbLayout);\n\t\ttbLayout.setAlignment(FlowLayout.CENTER);\n\t\tthis.gameToolbar.setRollover(true);\n\t\tthis.dealButton = new JButton(\"DEAL\");\n\t\tthis.dealButton.addActionListener(this);\n\t\tthis.placeBetButton = new JButton(\"PLACE BET\");\n\t\tthis.placeBetButton.addActionListener(this);\n\t\tthis.resultsButton = new JButton(\"VIEW RESULTS\");\n\t\tthis.resultsButton.addActionListener(this);\n\t\tthis.gameToolbar.add(this.dealButton);\n\t\tthis.gameToolbar.addSeparator();\n\t\tthis.gameToolbar.add(this.placeBetButton);\n\t\tthis.gameToolbar.addSeparator();\n\t\tthis.gameToolbar.add(this.resultsButton);\n\t\treturn this.gameToolbar;\n\t\t\n\t}", "public void makeMenuBar(final List<Action> theToolActions, final DrawingPanel thePanel) {\r\n add(fileMenu(thePanel));\r\n add(optionMenu(thePanel));\r\n add(toolsMenu(theToolActions));\r\n add(helpMenu());\r\n }", "private JToolBar createToolBar() {\n JToolBar toolbar = new JToolBar();\n Insets margins = new Insets(0, 0, 0, 0);\n\n ButtonGroup group1 = new ButtonGroup();\n\n ToolBarButton edit = new ToolBarButton(\"images/E.gif\");\n edit.setToolTipText(\"Edit motes\");\n edit.setMargin(margins);\n edit.setActionCommand(\"edit\");\n edit.setSelected(true);\n edit.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent ae) {\n setMode(ADD_MODE);\n add.enable();\n remove.enable();\n auto.enable();\n add.setSelected(true);\n }\n });\n group1.add(edit);\n toolbar.add(edit);\n\n ToolBarButton vis = new ToolBarButton(\"images/V.gif\");\n vis.setToolTipText(\"Visualize mote network\");\n vis.setMargin(margins);\n vis.setActionCommand(\"visualize\");\n vis.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent ae) {\n// AKD setMode(VIZ_MODE);\n add.setSelected(false);\n remove.setSelected(false);\n auto.setSelected(false);\n add.disable();\n remove.disable();\n auto.disable();\n }\n });\n group1.add(vis);\n toolbar.add(vis);\n\n toolbar.addSeparator();\n\n ButtonGroup group2 = new ButtonGroup();\n\n ToolBarButton pan = new ToolBarButton(\"images/P.gif\");\n pan.setToolTipText(\"Pan view\");\n pan.setMargin(margins);\n pan.setActionCommand(\"pan\");\n pan.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent ae) {\n setMode(PAN_MODE);\n }\n });\n group2.add(pan);\n toolbar.add(pan);\n\n add = new ToolBarButton(\"images/A.gif\");\n add.setToolTipText(\"Add mote\");\n add.setMargin(margins);\n add.setActionCommand(\"add\");\n add.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent ae) {\n setMode(ADD_MODE);\n }\n });\n group2.add(add);\n toolbar.add(add);\n\n remove = new ToolBarButton(\"images/R.gif\");\n remove.setToolTipText(\"Remove mote\");\n remove.setMargin(margins);\n remove.setActionCommand(\"pan\");\n remove.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent ae) {\n setMode(REMOVE_MODE);\n }\n });\n group2.add(remove);\n toolbar.add(remove);\n\n auto = new ToolBarButton(\"images/T.gif\");\n auto.setToolTipText(\"Automatic mode\");\n auto.setMargin(margins);\n auto.setActionCommand(\"auto\");\n auto.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent ae) {\n setMode(AUTO_MODE);\n }\n });\n group2.add(auto);\n toolbar.add(auto);\n\n toolbar.setFloatable(true);\n return toolbar;\n }", "public JToolBar getToolBar() {\n return myToolBar;\n }", "C getRegisteredToolBar(ToolbarPosition position);", "@AutoGenerated\n\tprivate HorizontalLayout buildHlToolbar() {\n\t\thlToolbar = new HorizontalLayout();\n\t\thlToolbar.setImmediate(false);\n\t\thlToolbar.setWidth(\"100.0%\");\n\t\thlToolbar.setHeight(\"100.0%\");\n\t\thlToolbar.setMargin(false);\n\t\t\n\t\t// btnFirstRegister\n\t\tbtnFirstRegister = new Button();\n\t\tbtnFirstRegister.setCaption(\"<<\");\n\t\tbtnFirstRegister.setImmediate(true);\n\t\tbtnFirstRegister.setWidth(\"-1px\");\n\t\tbtnFirstRegister.setHeight(\"-1px\");\n\t\thlToolbar.addComponent(btnFirstRegister);\n\t\t\n\t\t// btnPreviousRegister\n\t\tbtnPreviousRegister = new Button();\n\t\tbtnPreviousRegister.setCaption(\"<\");\n\t\tbtnPreviousRegister.setImmediate(true);\n\t\tbtnPreviousRegister.setWidth(\"-1px\");\n\t\tbtnPreviousRegister.setHeight(\"-1px\");\n\t\tbtnPreviousRegister.setTabIndex(1);\n\t\thlToolbar.addComponent(btnPreviousRegister);\n\t\t\n\t\t// lblCountRegister\n\t\tlblCountRegister = new Label();\n\t\tlblCountRegister.setStyleName(\"nav-toolbar-separator\");\n\t\tlblCountRegister.setImmediate(false);\n\t\tlblCountRegister.setWidth(\"50px\");\n\t\tlblCountRegister.setHeight(\"-1px\");\n\t\tlblCountRegister.setValue(\"1/1\");\n\t\thlToolbar.addComponent(lblCountRegister);\n\t\thlToolbar.setComponentAlignment(lblCountRegister, new Alignment(48));\n\t\t\n\t\t// btnNextRegister\n\t\tbtnNextRegister = new Button();\n\t\tbtnNextRegister.setCaption(\">\");\n\t\tbtnNextRegister.setImmediate(true);\n\t\tbtnNextRegister.setWidth(\"-1px\");\n\t\tbtnNextRegister.setHeight(\"-1px\");\n\t\tbtnNextRegister.setTabIndex(2);\n\t\thlToolbar.addComponent(btnNextRegister);\n\t\t\n\t\t// btnLastRegister\n\t\tbtnLastRegister = new Button();\n\t\tbtnLastRegister.setCaption(\">>\");\n\t\tbtnLastRegister.setImmediate(true);\n\t\tbtnLastRegister.setWidth(\"-1px\");\n\t\tbtnLastRegister.setHeight(\"-1px\");\n\t\tbtnLastRegister.setTabIndex(3);\n\t\thlToolbar.addComponent(btnLastRegister);\n\t\t\n\t\t// btnDownRegister\n\t\tbtnDownRegister = new Button();\n\t\tbtnDownRegister.setCaption(\"v\");\n\t\tbtnDownRegister.setImmediate(true);\n\t\tbtnDownRegister.setWidth(\"-1px\");\n\t\tbtnDownRegister.setHeight(\"-1px\");\n\t\thlToolbar.addComponent(btnDownRegister);\n\t\t\n\t\t// btnUpRegister\n\t\tbtnUpRegister = new Button();\n\t\tbtnUpRegister.setCaption(\"^\");\n\t\tbtnUpRegister.setImmediate(true);\n\t\tbtnUpRegister.setWidth(\"-1px\");\n\t\tbtnUpRegister.setHeight(\"-1px\");\n\t\thlToolbar.addComponent(btnUpRegister);\n\t\t\n\t\t// btnDisplayRegister\n\t\tbtnDisplayRegister = new Button();\n\t\tbtnDisplayRegister.setCaption(\"C\");\n\t\tbtnDisplayRegister.setImmediate(false);\n\t\tbtnDisplayRegister.setWidth(\"-1px\");\n\t\tbtnDisplayRegister.setHeight(\"-1px\");\n\t\thlToolbar.addComponent(btnDisplayRegister);\n\t\t\n\t\t// imgSeparator\n\t\timgSeparator = new Embedded();\n\t\timgSeparator.setImmediate(false);\n\t\timgSeparator.setWidth(\"-1px\");\n\t\timgSeparator.setHeight(\"-1px\");\n\t\timgSeparator.setSource(new ThemeResource(\n\t\t\t\t\"../konekti/images/separator.png\"));\n\t\timgSeparator.setType(1);\n\t\timgSeparator.setMimeType(\"image/png\");\n\t\thlToolbar.addComponent(imgSeparator);\n\t\t\n\t\t// btnRefreshRegister\n\t\tbtnRefreshRegister = new Button();\n\t\tbtnRefreshRegister.setCaption(\"R\");\n\t\tbtnRefreshRegister.setImmediate(true);\n\t\tbtnRefreshRegister.setWidth(\"-1px\");\n\t\tbtnRefreshRegister.setHeight(\"-1px\");\n\t\thlToolbar.addComponent(btnRefreshRegister);\n\t\t\n\t\t// btnAddRegister\n\t\tbtnAddRegister = new Button();\n\t\tbtnAddRegister.setCaption(\"A\");\n\t\tbtnAddRegister.setImmediate(true);\n\t\tbtnAddRegister.setWidth(\"-1px\");\n\t\tbtnAddRegister.setHeight(\"-1px\");\n\t\thlToolbar.addComponent(btnAddRegister);\n\t\t\n\t\t// btnEditRegister\n\t\tbtnEditRegister = new Button();\n\t\tbtnEditRegister.setCaption(\"U\");\n\t\tbtnEditRegister.setImmediate(true);\n\t\tbtnEditRegister.setWidth(\"-1px\");\n\t\tbtnEditRegister.setHeight(\"-1px\");\n\t\thlToolbar.addComponent(btnEditRegister);\n\t\t\n\t\t// btnDeleteRegister\n\t\tbtnDeleteRegister = new Button();\n\t\tbtnDeleteRegister.setCaption(\"D\");\n\t\tbtnDeleteRegister.setImmediate(true);\n\t\tbtnDeleteRegister.setWidth(\"-1px\");\n\t\tbtnDeleteRegister.setHeight(\"-1px\");\n\t\thlToolbar.addComponent(btnDeleteRegister);\n\t\t\n\t\t// imgSeparatorGroup\n\t\timgSeparatorGroup = new Embedded();\n\t\timgSeparatorGroup.setImmediate(false);\n\t\timgSeparatorGroup.setWidth(\"-1px\");\n\t\timgSeparatorGroup.setHeight(\"-1px\");\n\t\timgSeparatorGroup.setSource(new ThemeResource(\n\t\t\t\t\"../konekti/images/separator_group.png\"));\n\t\timgSeparatorGroup.setType(1);\n\t\timgSeparatorGroup.setMimeType(\"image/png\");\n\t\thlToolbar.addComponent(imgSeparatorGroup);\n\t\thlToolbar.setComponentAlignment(imgSeparatorGroup, new Alignment(48));\n\t\t\n\t\t// btnConfirmRegister\n\t\tbtnConfirmRegister = new Button();\n\t\tbtnConfirmRegister.setCaption(\"[]\");\n\t\tbtnConfirmRegister.setImmediate(true);\n\t\tbtnConfirmRegister.setWidth(\"-1px\");\n\t\tbtnConfirmRegister.setHeight(\"-1px\");\n\t\thlToolbar.addComponent(btnConfirmRegister);\n\t\t\n\t\t// btnCancelRegister\n\t\tbtnCancelRegister = new Button();\n\t\tbtnCancelRegister.setCaption(\"X\");\n\t\tbtnCancelRegister.setImmediate(true);\n\t\tbtnCancelRegister.setWidth(\"-1px\");\n\t\tbtnCancelRegister.setHeight(\"-1px\");\n\t\thlToolbar.addComponent(btnCancelRegister);\n\t\t\n\t\treturn hlToolbar;\n\t}", "public JToolBar getToolBar() {\n return toolBar;\n }", "@Override\n\tpublic Toolbar createToolbar() {\n\t\tLightVisualThemeToolbar lightVisualThemeToolbar = new LightVisualThemeToolbar();\n\t\treturn lightVisualThemeToolbar;\n\t}", "private void showBars() {\n if (!mIsActive || mShowBars) {\n return;\n }\n mShowBars = true;\n mOrientationManager.unlockOrientation();\n showToolBar(true);\n showStatusBar();\n // mActionBar.show();\n //mActivity.getGLRoot().setLightsOutMode(false);\n refreshHidingMessage();\n refreshBottomControlsWhenReady();\n }", "Map<ToolbarPosition, ? extends Node> getRegisteredToolBars();", "protected boolean isToolbarNeeded() {\n return true;\n }", "public void addClickables() {\n\t\tclickable.add(button1.getBounds());\n\t\tbehaviors.put(clickable.get(0), () -> hideEscapeScreen());\n\t\tclickable.add(button3.getBounds());\n\t\tbehaviors.put(clickable.get(1), () -> Driver.getInstance().switchToScreen(new FFWorldMap()));\n\t\tclickable.add(button4.getBounds());\n\t\tbehaviors.put(clickable.get(2), () -> Driver.getInstance().switchToScreen(new FFMainMenu()));\n\t}", "private void placeActions() {\n IActionBars actionBars = getViewSite().getActionBars();\n\n // first in the menu\n IMenuManager menuManager = actionBars.getMenuManager();\n menuManager.add(mCreateFilterAction);\n menuManager.add(mEditFilterAction);\n menuManager.add(mDeleteFilterAction);\n menuManager.add(new Separator());\n menuManager.add(mClearAction);\n menuManager.add(new Separator());\n menuManager.add(mExportAction);\n\n // and then in the toolbar\n IToolBarManager toolBarManager = actionBars.getToolBarManager();\n for (CommonAction a : mLogLevelActions) {\n toolBarManager.add(a);\n }\n toolBarManager.add(new Separator());\n toolBarManager.add(mCreateFilterAction);\n toolBarManager.add(mEditFilterAction);\n toolBarManager.add(mDeleteFilterAction);\n toolBarManager.add(new Separator());\n toolBarManager.add(mClearAction);\n }", "@Override\n public void setToolbar(MToolBar arg0)\n {\n \n }", "private void createToolBarActions() {\r\n\t\t// create the action\r\n\t\tGetMessage<Transport> getMessage = new GetMessage<Transport>(new Transport());\r\n\t\tgetMessage.addParameter(IFilterTypes.TRANSPORT_TODO_FILTER, \"\");\r\n\r\n\t\t// add to the toolbar\r\n\t\tform.getToolBarManager().add(new RefreshViewAction<Transport>(getMessage));\r\n\t\tform.getToolBarManager().update(true);\r\n\t}", "public void addMenus(GridBagLayout gridBagLayout) {\n\t\tJMenuBar menuBar = new JMenuBar();\n\t\tthis.setJMenuBar(menuBar);\n\t\t\n\t\tJMenu mnFile = new JMenu(\"File\");\n\t\tmenuBar.add(mnFile);\n\t\t\n\t\tJMenu mnHelp = new JMenu(\"Help\");\n\t\tmenuBar.add(mnHelp);\n\t\t\n\t\tJMenuItem exit = new JMenuItem(\"Exit\", KeyEvent.VK_X);\n\t\tJMenuItem about = new JMenuItem(\"About\", KeyEvent.VK_A);\n\t\t\n\t\texit.setActionCommand(\"exit\");\n\t\tabout.setActionCommand(\"about\");\n\t\t\n\t\texit.addActionListener(new GUIAction());\n\t\tabout.addActionListener(new GUIAction());\n\t\t\n\t\tmnFile.add(exit);\n\t\tmnHelp.add(about);\n\t}", "private void initToolBar(){\n toolbar = (Toolbar) findViewById(R.id.toolbar);\n setSupportActionBar(toolbar);\n }", "public MainToolBar getMainToolBar()\n {\n return mainToolBar;\n }", "void ToolBarFileIOHook() {\n\t\ttoolBar.add(newButton = new JButton(new ImageIcon(this.getClass().getResource(\"images/new.gif\"))));\n\t\ttoolBar.add(openButton = new JButton(new ImageIcon(this.getClass().getResource(\"images/open.gif\"))));\n\t\ttoolBar.add(saveButton = new JButton(new ImageIcon(this.getClass().getResource(\"images/save.gif\"))));\n\t\ttoolBar.add(saveAsButton= new JButton(new ImageIcon(this.getClass().getResource(\"images/saveAs.gif\"))));\n\t\ttoolBar.addSeparator();\n\n\t\t//adding a tool tip text to the button for descriping the image icon.\n\t\tnewButton.setToolTipText(\"New\");\n\t\topenButton.setToolTipText(\"Open\");\n\t\tsaveButton.setToolTipText(\"Save\");\n\t\tsaveAsButton.setToolTipText(\"Save As\");\n}", "private void create_toolbar() {\n setSupportActionBar(toolbar);\n getSupportActionBar().setTitle(\"Event Planner\");//this will set the title of our application\n\n }", "protected abstract JToolBar getNorthToolbar();", "public ToolBar(final List<AbstractAction> theToolActions) {\n super();\n myToolActions = theToolActions;\n\n setupButtons();\n\n }", "public void addMenuItems()\n\t{\n\t\tstartButton = new JButton(\"Start\");\n\t\tstartButton.setLayout(null);\n\t\tstartButton.setBounds(350, 225, 100, 50);\n\t\t\n\t\toptionsButton = new JButton(\"Options\");\n\t\toptionsButton.setLayout(null);\n\t\toptionsButton.setBounds(350, 275, 100, 50);\n\t\t\n\t\texitButton = new JButton(\"Exit\");\n\t\texitButton.setLayout(null);\n\t\texitButton.setBounds(350, 375, 100, 50);\n\t\texitButton.setActionCommand(\"exit\");\n\t\texitButton.addActionListener((ActionListener) this);\n\t\t\n\t\tmainMenuPanel.add(startButton);\n\t\tmainMenuPanel.add(optionsButton);\n\t\tmainMenuPanel.add(startButton);\n\t}", "public void initToolbar(){\n //check if toolbar is already inflated\n if(mToolbar == null){\n //if null, inflate the toolbar\n mToolbar = (Toolbar)findViewById(mHouseKeeper.getToolbarId());\n //set support for toolbar, onCreateOptionsMenu() will be called\n setSupportActionBar(mToolbar);\n }\n }", "private void createWidgets() {\n\n\t\tJPanel filmPanel = createFilmPanel();\n\t\tJPanel musicPanel = createMusicPanel();\n\t\tJPanel unclassPanel = createUnclassifiedPanel();\n\n\t\tthis.add(filmPanel);\n\t\tthis.add(musicPanel);\n\t\tthis.add(unclassPanel);\n\t}", "private static JToolBar initToolBar() {\n JToolBar basicMenu = new JToolBar();\n\n JButton cr = initButton(Icons.CREATE, a -> EditorScreen.instance().create());\n JButton op = initButton(Icons.LOAD, a -> EditorScreen.instance().load());\n JButton sv = initButton(Icons.SAVE, a -> EditorScreen.instance().save(false));\n JButton undo = initButton(Icons.UNDO, a -> UndoManager.instance().undo());\n JButton redo = initButton(Icons.REDO, a -> UndoManager.instance().redo());\n undo.setEnabled(false);\n redo.setEnabled(false);\n\n JToggleButton place = new JToggleButton();\n place.setIcon(Icons.PLACEOBJECT);\n requestFocusOnMouseDown(place);\n\n JToggleButton ed = new JToggleButton();\n ed.setIcon(Icons.EDIT);\n ed.setSelected(true);\n requestFocusOnMouseDown(ed);\n\n JToggleButton mv = new JToggleButton();\n mv.setIcon(Icons.MOVE);\n mv.setEnabled(false);\n requestFocusOnMouseDown(mv);\n\n ed.addActionListener(a -> {\n ed.setSelected(true);\n place.setSelected(false);\n mv.setSelected(false);\n isChanging = true;\n EditorScreen.instance().getMapComponent().setEditMode(MapComponent.EDITMODE_EDIT);\n isChanging = false;\n\n Game.window().getRenderComponent().setCursor(Cursors.DEFAULT, 0, 0);\n });\n\n place.addActionListener(a -> {\n addPopupMenu.show(place, 0, place.getHeight());\n place.setSelected(true);\n ed.setSelected(false);\n mv.setSelected(false);\n isChanging = true;\n EditorScreen.instance().getMapComponent().setEditMode(MapComponent.EDITMODE_CREATE);\n isChanging = false;\n });\n\n mv.addActionListener(a -> {\n mv.setSelected(true);\n ed.setSelected(false);\n place.setSelected(false);\n isChanging = true;\n EditorScreen.instance().getMapComponent().setEditMode(MapComponent.EDITMODE_MOVE);\n isChanging = false;\n\n Game.window().getRenderComponent().setCursor(Cursors.MOVE, 0, 0);\n });\n\n EditorScreen.instance().getMapComponent().onEditModeChanged(i -> {\n if (isChanging) {\n return;\n }\n\n if (i == MapComponent.EDITMODE_CREATE) {\n ed.setSelected(false);\n mv.setSelected(false);\n place.setSelected(true);\n place.requestFocus();\n Game.window().getRenderComponent().setCursor(Cursors.ADD, 0, 0);\n }\n\n if (i == MapComponent.EDITMODE_EDIT) {\n place.setSelected(false);\n mv.setSelected(false);\n ed.setSelected(true);\n ed.requestFocus();\n Game.window().getRenderComponent().setCursor(Cursors.DEFAULT, 0, 0);\n }\n\n if (i == MapComponent.EDITMODE_MOVE) {\n if (!mv.isEnabled()) {\n return;\n }\n\n ed.setSelected(false);\n place.setSelected(false);\n mv.setSelected(true);\n mv.requestFocus();\n Game.window().getRenderComponent().setCursor(Cursors.MOVE, 0, 0);\n }\n });\n\n JButton del = new JButton();\n del.setIcon(Icons.DELETE);\n del.setEnabled(false);\n del.addActionListener(a -> EditorScreen.instance().getMapComponent().delete());\n\n // copy\n JButton cop = new JButton();\n cop.setIcon(Icons.COPY);\n cop.setEnabled(false);\n ActionListener copyAction = a -> EditorScreen.instance().getMapComponent().copy();\n cop.addActionListener(copyAction);\n cop.getModel().setMnemonic('C');\n KeyStroke keyStroke = KeyStroke.getKeyStroke('C', Event.CTRL_MASK, false);\n cop.registerKeyboardAction(copyAction, keyStroke, JComponent.WHEN_IN_FOCUSED_WINDOW);\n\n // paste\n JButton paste = new JButton();\n paste.setIcon(Icons.PASTE);\n\n ActionListener pasteAction = a -> EditorScreen.instance().getMapComponent().paste();\n paste.addActionListener(pasteAction);\n paste.getModel().setMnemonic('V');\n KeyStroke keyStrokePaste = KeyStroke.getKeyStroke('V', Event.CTRL_MASK, false);\n paste.registerKeyboardAction(pasteAction, keyStrokePaste, JComponent.WHEN_IN_FOCUSED_WINDOW);\n\n // cut\n JButton cut = new JButton();\n cut.setIcon(Icons.CUT);\n cut.setEnabled(false);\n ActionListener cutAction = a -> EditorScreen.instance().getMapComponent().cut();\n cut.addActionListener(cutAction);\n cut.getModel().setMnemonic('X');\n KeyStroke keyStrokeCut = KeyStroke.getKeyStroke('X', Event.CTRL_MASK, false);\n cut.registerKeyboardAction(cutAction, keyStrokeCut, JComponent.WHEN_IN_FOCUSED_WINDOW);\n\n EditorScreen.instance().getMapComponent().onFocusChanged(mo -> {\n if (mv.isSelected()) {\n mv.setSelected(false);\n ed.setSelected(true);\n }\n\n mv.setEnabled(mo != null);\n del.setEnabled(mo != null);\n cop.setEnabled(mo != null);\n cut.setEnabled(mo != null);\n undo.setEnabled(UndoManager.instance().canUndo());\n redo.setEnabled(UndoManager.instance().canRedo());\n paste.setEnabled(EditorScreen.instance().getMapComponent().getCopiedBlueprint() != null);\n });\n\n EditorScreen.instance().getMapComponent().onEditModeChanged(mode -> paste.setEnabled(EditorScreen.instance().getMapComponent().getCopiedBlueprint() != null));\n\n UndoManager.onUndoStackChanged(manager -> {\n EditorScreen.instance().getMapComponent().updateTransformControls();\n undo.setEnabled(manager.canUndo());\n redo.setEnabled(manager.canRedo());\n });\n\n JButton colorButton = new JButton();\n colorButton.setIcon(Icons.COLOR);\n colorButton.setEnabled(false);\n\n JSpinner spinnerAmbientAlpha = new JSpinner();\n spinnerAmbientAlpha.setToolTipText(\"Adjust ambient alpha.\");\n spinnerAmbientAlpha.setModel(new SpinnerNumberModel(0, 0, 255, 1));\n spinnerAmbientAlpha.setMaximumSize(new Dimension(50, 50));\n spinnerAmbientAlpha.setEnabled(true);\n spinnerAmbientAlpha.addChangeListener(e -> {\n if (Game.world().environment() == null || Game.world().environment().getMap() == null || isChanging) {\n return;\n }\n\n Game.world().environment().getAmbientLight().setAlpha((int) spinnerAmbientAlpha.getValue());\n String hex = ColorHelper.encode(Game.world().environment().getAmbientLight().getColor());\n colorText.setText(hex);\n Game.world().environment().getMap().setValue(MapProperty.AMBIENTCOLOR, hex);\n\n });\n\n colorText = new JTextField();\n colorText.setHorizontalAlignment(SwingConstants.CENTER);\n colorText.setMinimumSize(new Dimension(70, 20));\n colorText.setMaximumSize(new Dimension(70, 50));\n colorText.setEnabled(false);\n\n colorButton.addActionListener(a -> {\n if (Game.world().environment() == null || Game.world().environment().getMap() == null || isChanging) {\n return;\n }\n\n Color color = null;\n if (colorText.getText() != null && !colorText.getText().isEmpty()) {\n Color solid = ColorHelper.decode(colorText.getText());\n color = new Color(solid.getRed(), solid.getGreen(), solid.getBlue(), (int) spinnerAmbientAlpha.getValue());\n }\n Color result = JColorChooser.showDialog(null, Resources.strings().get(\"panel_selectAmbientColor\"), color);\n if (result == null) {\n return;\n }\n\n spinnerAmbientAlpha.setValue(result.getAlpha());\n\n Game.world().environment().getMap().setValue(MapProperty.AMBIENTCOLOR, colorText.getText());\n Game.world().environment().getAmbientLight().setColor(result);\n String hex = ColorHelper.encode(Game.world().environment().getAmbientLight().getColor());\n colorText.setText(hex);\n });\n\n EditorScreen.instance().getMapComponent().onMapLoaded(map -> {\n isChanging = true;\n colorButton.setEnabled(map != null);\n spinnerAmbientAlpha.setEnabled(map != null);\n\n String colorValue = map.getStringValue(MapProperty.AMBIENTCOLOR, \"#00000000\");\n colorText.setText(colorValue);\n Color color = ColorHelper.decode(colorText.getText());\n if (color != null) {\n spinnerAmbientAlpha.setValue(color.getAlpha());\n }\n\n isChanging = false;\n });\n\n basicMenu.add(cr);\n basicMenu.add(op);\n basicMenu.add(sv);\n basicMenu.addSeparator();\n\n basicMenu.add(undo);\n basicMenu.add(redo);\n basicMenu.addSeparator();\n\n basicMenu.add(place);\n basicMenu.add(ed);\n basicMenu.add(mv);\n basicMenu.add(del);\n basicMenu.add(cop);\n basicMenu.add(paste);\n basicMenu.add(cut);\n basicMenu.addSeparator();\n\n basicMenu.add(colorButton);\n basicMenu.add(Box.createHorizontalStrut(5));\n basicMenu.add(colorText);\n basicMenu.add(Box.createHorizontalStrut(5));\n basicMenu.add(spinnerAmbientAlpha);\n\n return basicMenu;\n }", "private void createResponseToolbar ( ExpandableComposite parent ) {\n \t\trawAction = new ShowRawAction();\n \t\trawAction.setChecked(true);\n \t\tbrowserAction = new ShowInBrowserAction();\n \n \t\tToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT);\n \t\tToolBar toolbar = toolBarManager.createControl(parent);\n \n \t\ttoolBarManager.add(new FileSaveAction());\n \t\ttoolBarManager.add(new OpenInXMLEditorAction());\n \t\ttoolBarManager.add(rawAction);\n \t\ttoolBarManager.add(browserAction);\n \n \t\ttoolBarManager.update(true);\n \n \t\tparent.setTextClient(toolbar);\n \t}", "public void setToolbar() {\n myToolbar = (Toolbar) findViewById(R.id.toolbar_menu_nav);\n myToolbar.setTitle(R.string.Toolbar_Dashboard);\n setSupportActionBar(myToolbar);\n }", "private void setupToolbar(){\n setSupportActionBar(toolbar);\n if(getSupportActionBar() != null){\n getSupportActionBar().setTitle(R.string.card_details_toolbar_title);\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n }\n }", "private static void createGUI(){\n DrawingArea drawingArea = new DrawingArea();\n ToolSelect utilityBar = new ToolSelect();\n MenuBar menuBar = new MenuBar();\n JFrame.setDefaultLookAndFeelDecorated(true);\n JFrame frame = new JFrame(\"GUIMk1\");\n frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );\n frame.setLayout(new BorderLayout());\n frame.getContentPane().add(utilityBar, BorderLayout.WEST);\n frame.getContentPane().add(menuBar,BorderLayout.NORTH);\n frame.getContentPane().add(drawingArea);\n frame.setLocationRelativeTo( null );\n frame.setVisible(true);\n frame.pack();\n\n }", "public void showToolbarAndSideMenu() {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n // This unlocks the drawer so it can be opened\n drawer.setDrawerLockMode(DrawerLayout.LOCK_MODE_UNLOCKED);\n\n // Shows the toolbar\n ViewGroup.LayoutParams layoutParams = toolbar.getLayoutParams();\n layoutParams.height = dpToPx(56);\n toolbar.setLayoutParams(layoutParams);\n }\n });\n }", "@Override\n public Component getToolbarPresenter() {\n \n fxPanel = new JFXPanel();\n \n Platform.setImplicitExit(false); //Ensure JavaFX thread does not close application\n Platform.runLater(()-> { //Create FX scene outside Swing Thread\n createFXScene();\n });\n\n return fxPanel;\n }", "public Component setupControl(boolean bEditableControl)\n {\n if (this.getScreenField().getParentScreen() == null)\n return null;\n boolean bSuccess = this.getScreenField().getParentScreen().removeSField(this.getScreenField()); // Note: doesn't remove me because m_Control = null\n int iSFieldCount = this.getScreenField().getParentScreen().getSFieldCount();\n int iToolbarOrder = iSFieldCount;\n if (this.getScreenField().getScreenLocation().getLocationConstant() != ScreenConstants.LAST_LOCATION)\n {\n\t for (iToolbarOrder = 0; iToolbarOrder < iSFieldCount; iToolbarOrder++)\n\t {\n\t if (!(this.getScreenField().getParentScreen().getSField(iToolbarOrder) instanceof ToolScreen))\n\t break; // Last toolbar\n\t }\n }\n if (bSuccess)\n this.getScreenField().getParentScreen().addSField(this.getScreenField(), iToolbarOrder); // Add this control after the other toolbars, before the screen controls\n \n JToolBar control = new JToolBar();\n control.setAlignmentX(Component.LEFT_ALIGNMENT);\n control.setAlignmentY(Component.TOP_ALIGNMENT);\n control.setFloatable(false);\n control.setOpaque(false);\n\n control.setMargin(new Insets(0,0,0,0));\n return control;\n }", "public void toolbarImplementacionIsmael() {\n\t\t// ToolBar Fuente\n\t\tbtnFuente = new JButton(\"Fuente\");\n\t\tbtnFuente.setEnabled(false);\n\t\ttry {\n\t\t\timg = ImageIO.read(getClass().getResource(\"img/copy.png\"));\n\t\t\timg = img.getScaledInstance(20, 20, Image.SCALE_SMOOTH);\n\t\t\tbtnFuente.setIcon(new ImageIcon(img));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttoolbar.add(btnFuente);\n\n\t\tbtnSeleccionarTodo = new JButton(\"Selec.Todo\");\n\t\tbtnSeleccionarTodo.setEnabled(false);\n\t\ttry {\n\t\t\timg = ImageIO.read(getClass().getResource(\"img/copy.png\"));\n\t\t\timg = img.getScaledInstance(20, 20, Image.SCALE_SMOOTH);\n\t\t\tbtnSeleccionarTodo.setIcon(new ImageIcon(img));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttoolbar.add(btnSeleccionarTodo);\n\n\t\tbtnHora = new JButton(\"Hora\");\n\t\ttry {\n\t\t\timg = ImageIO.read(getClass().getResource(\"img/copy.png\"));\n\t\t\timg = img.getScaledInstance(20, 20, Image.SCALE_SMOOTH);\n\t\t\tbtnHora.setIcon(new ImageIcon(img));\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttoolbar.add(btnHora);\n\t}", "private void createActionsPanel() {\n DefaultActionGroup group = new DefaultActionGroup();\n group.add(new CloseAction());\n ActionManager actionManager = ActionManager.getInstance();\n JComponent actionsToolbar = actionManager\n .createActionToolbar(ActionPlaces.CODE_INSPECTION, group, false)\n .getComponent();\n JPanel actionsPanel = new JPanel(new BorderLayout());\n actionsPanel.add(actionsToolbar, BorderLayout.WEST);\n add(actionsPanel, BorderLayout.WEST);\n }", "@Override\r\n\tpublic void ShowToolBar(Context _in_context) {\n\t\tTypeSDKLogger.e( \"ShowToolBar\");\r\n\t}", "private void setToolBarInfo() {\n mToolbar = (Toolbar)findViewById(R.id.toolbar);\n mToolbar.setTitle(\"Chatアプリ\");\n mToolbar.setTitleTextColor(-1);\n mToolbar.setNavigationIcon(R.drawable.common_google_signin_btn_icon_light);\n //setActionBar(toolbar);\n mToolbar.inflateMenu(R.menu.main_menu);\n mToolbar.setOnMenuItemClickListener(new Toolbar.OnMenuItemClickListener() {\n @Override\n public boolean onMenuItemClick(MenuItem item) {\n // メニューのクリック処理\n switch (item.getItemId()) {\n case R.id.sign_out_menu:\n mFirebaseAuth.signOut();\n Intent intent = new Intent();\n intent.setClassName(D.packageRoot, D.packageRoot + \".MainActivity\");\n startActivity(intent);\n return true;\n }\n return true;\n }\n });\n //setSupportActionBar(toolbar);\n }", "public CreateToolBar(final String theName, final List<ToolAction> theToolActions) {\n myToolBar = new JToolBar(theName);\n final ButtonGroup group = new ButtonGroup();\n \n for (final ToolAction currentTool : theToolActions) {\n final JToggleButton item = new JToggleButton(currentTool);\n group.add(item);\n myToolBar.add(item);\n }\n }", "private void setupMenus() {\n\t\tJMenuBar menuBar = new JMenuBar();\n\n\t\t// Build the first menu.\n\t\tJMenu menu = new JMenu(Messages.getString(\"Gui.File\")); //$NON-NLS-1$\n\t\tmenu.setMnemonic(KeyEvent.VK_A);\n\t\tmenuBar.add(menu);\n\n\t\t// a group of JMenuItems\n\t\tJMenuItem menuItem = new JMenuItem(openAction);\n\t\tmenu.add(menuItem);\n\n\t\t// menuItem = new JMenuItem(openHttpAction);\n\t\t// menu.add(menuItem);\n\n\t\t/*\n\t\t * menuItem = new JMenuItem(crudAction); menu.add(menuItem);\n\t\t */\n\n\t\tmenuItem = new JMenuItem(showLoggingFrameAction);\n\t\tmenu.add(menuItem);\n\n\t\tmenuItem = new JMenuItem(quitAction);\n\t\tmenu.add(menuItem);\n\n\t\tmenuBar.add(menu);\n\n\t\tJMenu optionMenu = new JMenu(Messages.getString(\"Gui.Options\")); //$NON-NLS-1$\n\t\tmenuItem = new JCheckBoxMenuItem(baselineModeAction);\n\t\toptionMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(toggleButtonsAction);\n\t\toptionMenu.add(menuItem);\n\n\t\tmenuBar.add(optionMenu);\n\t\tJMenu buttonMenu = new JMenu(Messages.getString(\"Gui.Buttons\")); //$NON-NLS-1$\n\t\tmenuItem = new JMenuItem(wrongAnswerAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(attendingAction);\n\t\tbuttonMenu.add(menuItem);\n\n\t\tmenuItem = new JMenuItem(independentAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(verbalAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(modelingAction);\n\t\tbuttonMenu.add(menuItem);\n\t\tmenuItem = new JMenuItem(noAnswerAction);\n\t\tbuttonMenu.add(menuItem);\n\n\t\tmenuBar.add(buttonMenu);\n\t\tframe.setJMenuBar(menuBar);\n\n\t\tframe.pack();\n\n\t\tframe.setVisible(true);\n\t}", "public void initToolbar() {\r\n\r\n ((HomeActivity) getActivity()).setUpToolbar(getString(R.string.help), false, true, false,false);\r\n\r\n\r\n }", "public interface IToolbarsContainer {\n\t\n\t/**\n\t * Hide the tool bars of this item.\n\t */\n\tvoid hideToolbars();\n\n}", "private void loadToolbar() {\n android.support.v7.widget.Toolbar toolbar = findViewById(R.id.toolbar_top);\n setSupportActionBar(toolbar);\n\n // add back arrow to toolbar\n if (getSupportActionBar() != null) {\n getSupportActionBar().setTitle(\"\");\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n getSupportActionBar().setDisplayShowHomeEnabled(true);\n }\n\n if(toolbar.getNavigationIcon() != null) {\n toolbar.getNavigationIcon().setColorFilter(this.getColor(R.color.white), PorterDuff.Mode.SRC_ATOP);\n }\n }", "private void initComponents() {\n\n jSeparator1 = new javax.swing.JToolBar.Separator();\n buttonGroup1 = new javax.swing.ButtonGroup();\n btnPin = new javax.swing.JToggleButton();\n toolbar = new javax.swing.JToolBar();\n toolbar2 = new javax.swing.JToolBar();\n\n btnPin.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/org/piraso/ui/api/icons/pin_small.png\"))); // NOI18N\n org.openide.awt.Mnemonics.setLocalizedText(btnPin, org.openide.util.NbBundle.getMessage(BaseEntryViewTopComponent.class, \"BaseEntryViewTopComponent.btnPin.text\")); // NOI18N\n btnPin.setToolTipText(org.openide.util.NbBundle.getMessage(BaseEntryViewTopComponent.class, \"BaseEntryViewTopComponent.btnPin.toolTipText\")); // NOI18N\n btnPin.setFocusable(false);\n btnPin.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n btnPin.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n btnPin.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnPinActionPerformed(evt);\n }\n });\n\n setLayout(new java.awt.BorderLayout());\n\n toolbar.setBackground(new java.awt.Color(226, 226, 226));\n toolbar.setFloatable(false);\n toolbar.setRollover(true);\n add(toolbar, java.awt.BorderLayout.NORTH);\n\n toolbar2.setBackground(new java.awt.Color(226, 226, 226));\n toolbar2.setFloatable(false);\n toolbar2.setOrientation(1);\n toolbar2.setRollover(true);\n toolbar2.setVisible(false);\n add(toolbar2, java.awt.BorderLayout.WEST);\n }", "private void configureToolbar(){\n Toolbar toolbar = (Toolbar) findViewById(R.id.mento_toolbar);\n //Set the toolbar\n setSupportActionBar(toolbar);\n // Get a support ActionBar corresponding to this toolbar\n ActionBar ab = getSupportActionBar();\n\n }", "private static ToolBar header(Stage stage) {\n\t\t// Main menu button on the right\n\t\tButton mainMenu = new Button(\"Main menu\");\n\t\tmainMenu.setOnAction(actionEvent -> mainMenu(stage));\n\t\t\n\t\t// Username on the left\n\t\tLabel usernameLabel = new Label(UserInterfaceLogic.getUsernameLabel());\n\t\t\n\t\tToolBar toolBar = new ToolBar();\n\t\ttoolBar.getItems().addAll(usernameLabel, new Separator(), mainMenu);\n\t\t\n\t\treturn toolBar;\n\t}", "void setupToolBar(String title, View.OnClickListener onClickListener) {\n setupToolBar(title, true, onClickListener);\n showToolbar();\n }", "private void setupUIViews() {\n toolbar = (Toolbar)findViewById(R.id.ToolbarMain);\n listview = (ListView)findViewById(R.id.lvMain);\n }", "protected void addActivePathToolbarButton ()\n {\n\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jToolBar1 = new javax.swing.JToolBar();\n btnDom = new javax.swing.JButton();\n btnBook = new javax.swing.JButton();\n btnTT = new javax.swing.JButton();\n btnPos = new javax.swing.JButton();\n btnTool = new javax.swing.JButton();\n btnNews = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jToolBar1.setRollover(true);\n\n btnDom.setText(\"DOM\");\n btnDom.setFocusable(false);\n btnDom.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n btnDom.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n btnDom.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnDomActionPerformed(evt);\n }\n });\n jToolBar1.add(btnDom);\n\n btnBook.setText(\"Book\");\n btnBook.setFocusable(false);\n btnBook.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n btnBook.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n btnBook.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnBookActionPerformed(evt);\n }\n });\n jToolBar1.add(btnBook);\n\n btnTT.setText(\"T&T\");\n btnTT.setFocusable(false);\n btnTT.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n btnTT.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n btnTT.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnTTActionPerformed(evt);\n }\n });\n jToolBar1.add(btnTT);\n\n btnPos.setText(\"Posição\");\n btnPos.setFocusable(false);\n btnPos.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n btnPos.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n btnPos.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnPosActionPerformed(evt);\n }\n });\n jToolBar1.add(btnPos);\n\n btnTool.setText(\"Ferramentas\");\n btnTool.setFocusable(false);\n btnTool.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n btnTool.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n btnTool.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnToolActionPerformed(evt);\n }\n });\n jToolBar1.add(btnTool);\n\n btnNews.setText(\"Notícias\");\n btnNews.setFocusable(false);\n btnNews.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n btnNews.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n btnNews.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnNewsActionPerformed(evt);\n }\n });\n jToolBar1.add(btnNews);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jToolBar1, javax.swing.GroupLayout.DEFAULT_SIZE, 600, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 253, Short.MAX_VALUE))\n );\n\n pack();\n }", "private void updateToolBar() {\n\t\taddressBarField.setText(displayPane.getPage().toString());\n\t\tif (pageList.size() < 1) {\n\t\t\tbackButton.setEnabled(false);\n\t\t} else {\n\t\t\tbackButton.setEnabled(true);\n\t\t}\n\t}", "public ToolsPaletteWindow()\n {\n super( TOOLS, false, false );\n setContentPane( this.content );\n createUI();\n }", "@Override\r\n\tpublic void ShowToolBar(Context _in_context) {\n\t\tTypeSDKLogger.e(\"ShowToolBar\");\r\n\t}", "private void setupToolbar() {\n Toolbar toolbar = findViewById(R.id.toolbar);\n setSupportActionBar(toolbar);\n DrawerLayout drawer = findViewById(R.id.drawer_layout);\n ActionBarDrawerToggle toggle =\n new ActionBarDrawerToggle(this,\n drawer,\n toolbar,\n R.string.nav_open_navigation_drawer,\n R.string.nav_close_navigation_drawer);\n drawer.addDrawerListener(toggle);\n toggle.syncState();\n }", "private void setupToolbar() {\n Toolbar toolbar = (Toolbar) findViewById(R.id.edit_task_toolbar);\n setSupportActionBar(toolbar);\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n getSupportActionBar().setDisplayShowHomeEnabled(true);\n }", "@Override\r\n\tprotected ToolBarManager createToolBarManager(int style) {\r\n\t\tToolBarManager toolBarManager = new ToolBarManager(style);\r\n\t\treturn toolBarManager;\r\n\t}", "private void initComponent() {\n\t\taddGrid();\n\t\taddToolBars();\n\t}", "private MenuBar setupMenu () {\n MenuBar mb = new MenuBar ();\n Menu fileMenu = new Menu (\"File\");\n openXn = makeMenuItem (\"Open Connection\", OPEN_CONNECTION);\n closeXn = makeMenuItem (\"Close Connection\", CLOSE_CONNECTION);\n closeXn.setEnabled (false);\n MenuItem exit = makeMenuItem (\"Exit\", EXIT_APPLICATION);\n fileMenu.add (openXn);\n fileMenu.add (closeXn);\n fileMenu.addSeparator ();\n fileMenu.add (exit);\n\n Menu twMenu = new Menu (\"Tw\");\n getWksp = makeMenuItem (\"Get Workspace\", GET_WORKSPACE);\n getWksp.setEnabled (false);\n twMenu.add (getWksp);\n\n mb.add (fileMenu);\n mb.add (twMenu);\n return mb;\n }", "private void addComponents() {\n\t\tthis.add(btn_pause);\n\t\tthis.add(btn_continue);\n\t\tthis.add(btn_restart);\n\t\tthis.add(btn_rank);\n\t\tif(Config.user.getUsername().equals(\"root\")) {\n\t\t\tthis.add(btn_admin);\n\t\t}\n\t\n\t\t\n\t}", "private void initFileToolbar() {\n fileToolbarPane = new FlowPane();\n\n // HERE ARE OUR FILE TOOLBAR BUTTONS, NOTE THAT SOME WILL\n // START AS ENABLED (false), WHILE OTHERS DISABLED (true)\n newDraftButton = initChildButton(fileToolbarPane, DraftKit_PropertyType.NEW_DRAFT_ICON, DraftKit_PropertyType.NEW_DRAFT_TOOLTIP, false);\n loadDraftButton = initChildButton(fileToolbarPane, DraftKit_PropertyType.LOAD_DRAFT_ICON, DraftKit_PropertyType.LOAD_DRAFT_TOOLTIP, false);\n saveDraftButton = initChildButton(fileToolbarPane, DraftKit_PropertyType.SAVE_DRAFT_ICON, DraftKit_PropertyType.SAVE_DRAFT_TOOLTIP, true);\n exportDraftButton = initChildButton(fileToolbarPane, DraftKit_PropertyType.EXPORT_DRAFT_ICON, DraftKit_PropertyType.EXPORT_DRAFT_TOOLTIP, true);\n exitButton = initChildButton(fileToolbarPane, DraftKit_PropertyType.EXIT_ICON, DraftKit_PropertyType.EXIT_TOOLTIP, false);\n }", "public void setupToolbar() {\n if (mToolbar != null) {\n setSupportActionBar(mToolbar);\n }\n getSupportActionBar().setDisplayHomeAsUpEnabled(false);\n getSupportActionBar().setDisplayShowTitleEnabled(false);\n }", "public NavigationToolBar() {\n\t\tbuildMainLayout();\n\t\tsetCompositionRoot(mainLayout);\n\n\t\t// TODO add user code here\t\n\t\t// set first button listener\n\t\tthis.btnDownRegister.setEnabled(false);\n\t\t\n\t\t// default status for confirmation buttons\n\t\tthis.btnCancelRegister.setEnabled(false);\n\t\tthis.btnConfirmRegister.setEnabled(false);\n\t\t\n\t\tbtnFirstRegister.addListener(new Button.ClickListener() {\t\t\t\n\t\t\tpublic void buttonClick(com.vaadin.ui.Button.ClickEvent event) {\n\t\t\t\t// set status register\n\t\t\t\tregister = bindingSource.firstItem();\t\n\t\t\t\tint index = bindingSource.getIndex();\n\t\t\t\tlblCountRegister.setValue(bindingSource.getIndex() + \"/\" + bindingSource.size());\n\t\t\t\t\n\t\t\t\tbtnFirstRegister.setEnabled(false);\n\t\t\t\tbtnPreviousRegister.setEnabled(false);\t\t\t\t\n\t\t\t\tbtnNextRegister.setEnabled(true);\n\t\t\t\tbtnLastRegister.setEnabled(true);\n\t\t\t\t\n\t\t\t\t// fire event\n\t\t\t\tif (listenerFirstButton != null)\t\t\t\t\t\n\t\t\t\t\tlistenerFirstButton.firstButtonClick(new ClickNavigationEvent(event.getButton(), event.getComponent() , null, register, index));\n\t\t\t\t\n\t\t\t}\n\t\t});\n\n\t\t// set previous button listener\n\t\tbtnPreviousRegister.addListener(new Button.ClickListener() {\t\t\t\n\t\t\tpublic void buttonClick(com.vaadin.ui.Button.ClickEvent event) {\n\t\t\t\t// set status register\n\t\t\t\tregister = bindingSource.prevItem();\n\t\t\t\tint index = bindingSource.getIndex();\n\t\t\t\t\n\t\t\t\tlblCountRegister.setValue(index + \"/\" + bindingSource.size());\n\t\t\t\t\n\t\t\t\tif (index == 1) {\n\t\t\t\t\tbtnFirstRegister.setEnabled(false);\n\t\t\t\t\tbtnPreviousRegister.setEnabled(false);\n\t\t\t\t\tbtnNextRegister.setEnabled(true);\n\t\t\t\t\tbtnLastRegister.setEnabled(true);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tbtnFirstRegister.setEnabled(true);\n\t\t\t\t\tbtnPreviousRegister.setEnabled(true);\n\t\t\t\t\tbtnNextRegister.setEnabled(true);\n\t\t\t\t\tbtnLastRegister.setEnabled(true);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// fire event\n\t\t\t\tif (listenerPreviousButton != null)\t\t\t\t\t\n\t\t\t\t\tlistenerPreviousButton.previousButtonClick(new ClickNavigationEvent(event.getButton(), event.getComponent() , null, register, index));\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\t// set next button listener\n\t\tbtnNextRegister.addListener(new Button.ClickListener() {\t\t\t\t\n\t\t\tpublic void buttonClick(com.vaadin.ui.Button.ClickEvent event) {\n\t\t\t\t// set status register\n\t\t\t\tregister = bindingSource.nextItem();\n\t\t\t\tint index = bindingSource.getIndex();\n\t\t\t\t\n\t\t\t\tlblCountRegister.setValue(index + \"/\" + bindingSource.size());\n\t\t\t\t\n\t\t\t\tif (index == bindingSource.size()) {\n\t\t\t\t\tbtnFirstRegister.setEnabled(true);\n\t\t\t\t\tbtnPreviousRegister.setEnabled(true);\n\t\t\t\t\tbtnNextRegister.setEnabled(false);\n\t\t\t\t\tbtnLastRegister.setEnabled(false);\n\t\t\t\t}\n\t\t\t\telse {\t\t\t\t\t\n\t\t\t\t\tbtnFirstRegister.setEnabled(true);\n\t\t\t\t\tbtnPreviousRegister.setEnabled(true);\n\t\t\t\t\tbtnNextRegister.setEnabled(true);\n\t\t\t\t\tbtnLastRegister.setEnabled(true);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// fire event\n\t\t\t\tif (listenerNextButton != null)\n\t\t\t\t\tlistenerNextButton.nextButtonClick(new ClickNavigationEvent(event.getButton(), event.getComponent() , null, register, index));\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\t// set last button listener\n\t\tbtnLastRegister.addListener(new Button.ClickListener() {\t\t\t\n\t\t\tpublic void buttonClick(com.vaadin.ui.Button.ClickEvent event) {\n\t\t\t\t// set status register\n\t\t\t\tregister = bindingSource.lastItem();\n\t\t\t\tint index = bindingSource.getIndex();\n\t\t\t\t\n\t\t\t\tlblCountRegister.setValue(bindingSource.getIndex() + \"/\" + bindingSource.size());\n\t\t\t\t\n\t\t\t\tbtnFirstRegister.setEnabled(true);\n\t\t\t\tbtnPreviousRegister.setEnabled(true);\n\t\t\t\tbtnNextRegister.setEnabled(false);\n\t\t\t\tbtnLastRegister.setEnabled(false);\n\t\t\t\t\n\t\t\t\t// fire event\n\t\t\t\tif (listenerLastButton != null)\n\t\t\t\t\tlistenerLastButton.lastButtonClick(new ClickNavigationEvent(event.getButton(), event.getComponent() , null, register, index));\t\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnDownRegister.addListener(new Button.ClickListener() {\n\t\t\t@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\t\n\t\t\t\t// fire the index change\n\t\t\t\tbindingSource.setItemId(this, true, bindingSource.getItemId());\n\t\t\t\t\n\t\t\t\t// fire the app event if it's implemented\n\t\t\t\tif (listenerDownButton != null)\n\t\t\t\t\tlistenerDownButton.downButtonClick(new ClickNavigationEvent(event.getButton(), event.getComponent() , null, register, 0));\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnDisplayRegister.addListener(new Button.ClickListener() {\n\t\t\t@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\t\n\t\t\t\tif (displayMode == DisplayMode.GRID) {\n\t\t\t\t\tbtnDisplayRegister.setCaption(\"G\");\t\t\t\n\t\t\t\t\tdisplayMode = DisplayMode.CARD;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tbtnDisplayRegister.setCaption(\"C\");\n\t\t\t\t\tdisplayMode = DisplayMode.GRID;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tslider.slideDisplay(displayMode);\n\t\t\t\t\n\t\t\t\t// fire the app event if it's implemented\n\t\t\t\tif (listenerDisplayButton != null)\n\t\t\t\t\tlistenerDisplayButton.displayButtonClick(new ClickNavigationEvent(event.getButton(), event.getComponent() , null, register, 0));\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnUpRegister.addListener(new Button.ClickListener() {\t\t\n\t\t\t@Override\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\tif (slider == null)\n\t\t\t\t\treturn;\n\t\t\n\t\t\t\t// go slide up\n\t\t\t\ttry {\n\t\t\t\t\tslider.delSlideBreadCrumb();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// fire the app event if it's implemented\n\t\t\t\tif (listenerUpButton != null)\n\t\t\t\t\tlistenerUpButton.upButtonClick(new ClickNavigationEvent(event.getButton(), event.getComponent() , null, register, 0));\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnRefreshRegister.addListener(new Button.ClickListener() {\t\t\t\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\tif (listenerRefreshButton != null)\n\t\t\t\t\tlistenerRefreshButton.refreshButtonClick(new ClickNavigationEvent(event.getButton(), event.getComponent() , null, register, 0));\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\t// set add button listener\n\t\tbtnAddRegister.addListener(new Button.ClickListener() {\t\t\t\n\t\t\tpublic void buttonClick(com.vaadin.ui.Button.ClickEvent event) {\n\t\t\t\t// enable confirmation buttons\n\t\t\t\tbtnConfirmRegister.setEnabled(true);\n\t\t\t\tbtnCancelRegister.setEnabled(true);\n\t\t\t\t\n\t\t\t\tif (listenerAddButton != null)\n\t\t\t\t\tlistenerAddButton.addButtonClick(new ClickNavigationEvent(event.getButton(), event.getComponent() , null, register, 0));\t\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\t// set edit button listener\n\t\tbtnEditRegister.addListener(new Button.ClickListener() {\t\t\t\n\t\t\tpublic void buttonClick(com.vaadin.ui.Button.ClickEvent event) {\n\t\t\t\t// enable confirmation buttons\n\t\t\t\tbtnConfirmRegister.setEnabled(true);\n\t\t\t\tbtnCancelRegister.setEnabled(true);\n\t\t\t\t\n\t\t\t\tint index = bindingSource.getIndex();\n\t\t\t\tregister = bindingSource.getItemId();\n\t\t\t\t\n\t\t\t\tif (listenerEditButton != null)\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tlistenerEditButton.editButtonClick(new ClickNavigationEvent(event.getButton(), event.getComponent() , null, register, index));\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\t// set delete button listener\n\t\tbtnDeleteRegister.addListener(new Button.ClickListener() {\t\t\t\n\t\t\tpublic void buttonClick(com.vaadin.ui.Button.ClickEvent event) {\n\t\t\t\tint index = bindingSource.getIndex();\n\t\t\t\tregister = bindingSource.getItemId();\n\t\t\t\t\n\t\t\t\tif (listenerDeleteButton != null)\t\t\t\t\t\n\t\t\t\t\tlistenerDeleteButton.deleteButtonClick(new ClickNavigationEvent(event.getButton(), event.getComponent() , null, register, index));\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\t// set confirm button listener\n\t\tbtnConfirmRegister.addListener(new Button.ClickListener() {\t\t\t\n\t\t\tpublic void buttonClick(com.vaadin.ui.Button.ClickEvent event) {\t\t\t\t\n\t\t\t\tint index = bindingSource.getIndex();\n\t\t\t\tregister = bindingSource.getItemId();\n\t\t\t\t\n\t\t\t\tif (listenerConfirmButton != null)\t\t\t\t\t\n\t\t\t\t\tlistenerConfirmButton.confirmButtonClick(new ClickNavigationEvent(event.getButton(), event.getComponent() , null, register, index));\t\t\t\t\n\t\t\t\t\n\t\t\t\t// disable confirmation buttons\n\t\t\t\tbtnConfirmRegister.setEnabled(false);\n\t\t\t\tbtnCancelRegister.setEnabled(false);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\t// set cancel button listener\n\t\tbtnCancelRegister.addListener(new Button.ClickListener() {\t\t\t\n\t\t\tpublic void buttonClick(com.vaadin.ui.Button.ClickEvent event) {\n\t\t\t\tint index = bindingSource.getIndex();\n\t\t\t\tregister = bindingSource.getItemId();\n\t\t\t\t\n\t\t\t\tif (listenerCancelButton != null)\t\t\t\t\t\n\t\t\t\t\tlistenerCancelButton.cancelButtonClick(new ClickNavigationEvent(event.getButton(), event.getComponent() , null, register, index));\t\n\t\t\t\t\n\t\t\t\t// disable confirmation buttons\n\t\t\t\tbtnConfirmRegister.setEnabled(false);\n\t\t\t\tbtnCancelRegister.setEnabled(false);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t}", "public Toolbar() {\n setBorder(BorderFactory.createEtchedBorder());\n saveButton = new JButton();\n saveButton.setIcon(createIcon(\"/image/save16.gif\"));\n saveButton.setToolTipText(\"Save\");\n \n refreshButton = new JButton();\n refreshButton.setIcon(createIcon(\"/image/refresh16.gif\"));\n refreshButton.setToolTipText(\"Refresh\");\n\n saveButton.addActionListener(this);\n refreshButton.addActionListener(this);\n\n add(saveButton);\n addSeparator();\n add(refreshButton);\n }", "public void initToolbar(){\n Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);\n setSupportActionBar(toolbar);\n if(getSupportActionBar()!=null) {\n getSupportActionBar().setTitle(\"\");\n }\n getSupportActionBar().setHomeAsUpIndicator(R.drawable.ic_launcher_white);\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n Window window = getWindow();\n window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);\n window.setStatusBarColor(ContextCompat.getColor(this, R.color.colorPrimaryDarkest));\n }\n }" ]
[ "0.79039943", "0.7837182", "0.76907027", "0.7552378", "0.7351931", "0.72124535", "0.71318907", "0.70980954", "0.70205843", "0.69568694", "0.68876815", "0.66142714", "0.657771", "0.655293", "0.65185744", "0.64755845", "0.6384187", "0.6376274", "0.6355358", "0.6317992", "0.6311967", "0.6297294", "0.6294776", "0.625665", "0.624989", "0.6234278", "0.6227373", "0.61773264", "0.616887", "0.6123477", "0.6118261", "0.6114451", "0.610437", "0.6069094", "0.5974961", "0.59723324", "0.5967171", "0.59624493", "0.5957758", "0.59320414", "0.5912197", "0.59072053", "0.58887917", "0.58782446", "0.58409655", "0.5836391", "0.58318007", "0.58108", "0.5802819", "0.5800345", "0.5799661", "0.5790635", "0.5788611", "0.5769823", "0.5764445", "0.57625794", "0.57445395", "0.57420826", "0.5741009", "0.5733502", "0.5724289", "0.5721242", "0.5702229", "0.5696242", "0.569194", "0.5683281", "0.5683034", "0.56799084", "0.5675331", "0.566152", "0.5649236", "0.56491023", "0.5639393", "0.5629903", "0.5628246", "0.5615613", "0.5615059", "0.5609845", "0.5607333", "0.5605319", "0.5598812", "0.55970335", "0.5596657", "0.5594092", "0.55934864", "0.55933636", "0.5584251", "0.5582645", "0.5575023", "0.5574958", "0.55737394", "0.55703235", "0.556277", "0.555913", "0.55383587", "0.55370057", "0.5535583", "0.55322206", "0.55297965", "0.5528621" ]
0.7380467
4
populateUI would be called to populate the UI when in update mode
private void populateUI(BookEntry book) { // Return if the task is null if (book == null) { return; } // Use the variable book to populate the UI mNameEditText.setText(book.getBook_name()); mQuantityTextView.setText(Integer.toString(book.getQuantity())); mPriceEditText.setText(Double.toString(book.getPrice())); mPhoneEditText.setText(Integer.toString(book.getSupplier_phone_number())); mSupplier = book.getSupplier_name(); switch (mSupplier) { case BookEntry.SUPPLIER_ONE: mSupplierSpinner.setSelection(1); break; case BookEntry.SUPPLIER_TWO: mSupplierSpinner.setSelection(2); break; default: mSupplierSpinner.setSelection(0); break; } mSupplierSpinner.setSelection(mSupplier); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateUI(){}", "@Override\r\n public void updateUI() {\r\n }", "@Override\n public void updateUi() {\n\n }", "@Override\n public void updateUi() {\n\n }", "@Override\n public void updateUi() {\n\n }", "@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}", "@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}", "protected void setupUI() {\n\n }", "private void updateUI() {\n mUser.weight.sortListByDate();\n mUser.bloodPressure.sortListsByDate();\n updateText();\n updateChart();\n }", "private void populateUI() {\n\n tipPercentTextView.setText(Double.toString(tipPercent));\n noPersonsTextView.setText(Integer.toString(noPersons));\n populateResultsUI();\n }", "public void populateUI() {\n // setup toggle button on click listener\n toggleButton.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View v) {\n toggleExtension();\n }\n });\n\n // setup open details click listener\n this.setOnClickListener(new OnClickListener() {\n @Override\n public void onClick(View v) {\n budgetListener.showAccountDetails(refAcc);\n }\n });\n updateUI();\n }", "public void forceUpdateUI() {\n\t\tupdateUI();\n\t}", "private void initUI() {\n }", "public void updateUI() {\n\t\tgetLoaderManager().restartLoader(0, null, this);\n\t}", "void successUiUpdater();", "private void updateUi() {\n this.tabDetail.setDisable(false);\n this.lblDisplayName.setText(this.currentChild.getDisplayName());\n this.lblPersonalId.setText(String.format(\"(%s)\", this.currentChild.getPersonalId()));\n this.lblPrice.setText(String.format(\"%.2f\", this.currentChild.getPrice()));\n this.lblAge.setText(String.valueOf(this.currentChild.getAge()));\n this.dtBirthDate.setValue(this.currentChild\n .getBirthDate()\n .toInstant()\n .atZone(ZoneId.systemDefault())\n .toLocalDate());\n this.lblWeight.setText(String.format(\"%.1f kg\", this.currentChild.getWeight()));\n this.sldWeight.setValue(this.currentChild.getWeight());\n this.checkboxTrueRace.setSelected(!this.currentChild.isRace());\n this.imgChildProfile.setImage(this.currentChild.getAvatar());\n if (this.currentChild.getGender().equals(GenderType.MALE)){\n this.imgSex.setImage(FileUtils.loadImage(\"assets/image/gender/boy.png\"));\n this.lblSex.setText(\"Male\");\n }\n else {\n this.imgSex.setImage(FileUtils.loadImage(\"assets/image/gender/girl.png\"));\n this.lblSex.setText(\"Female\");\n }\n if (this.currentChild.isVirginity()){\n this.imgVirginity.setImage(FileUtils.loadImage(\"assets/image/virginity/virgin.png\"));\n this.lblVirginity.setText(\"Virgin\");\n }\n else {\n this.imgVirginity.setImage(FileUtils.loadImage(\"assets/image/virginity/not-virgin.png\"));\n this.lblVirginity.setText(\"Not Virgin\");\n }\n\n // TODO [assignment2] nastavit obrazek/avatar ditete v karte detailu\n // TODO [assignment2] nastavit spravny obrazek pohlavi v karte detailu\n // TODO [assignment2] nastavit spravny obrazek virginity atribut v v karte detailu\n }", "public void updateUI() {\n\t setUI( LinkButtonUI.createUI( this));\n\t}", "@Override\r\n\tprotected void initUI() {\n\r\n\t}", "private void reloadUI() {\n\t\tMessages.reloadUIi18n(uis);\n\t}", "protected void followup(Refactoring refactoring) {\r\n updateSummaries();\r\n\r\n // Update the GUIs\r\n ReloaderSingleton.reload();\r\n }", "@Override\n public void updateUI() {\n setUI(SubstanceRibbonGalleryUI.createUI(this));\n }", "private void refreshUI() {\n\t\t\n\t\tif (MusicApplication.getInstance().getDiscussView() != null) {\n\t\t\tMusicApplication.getInstance().getDiscussView().renew();\n\t\t}\n\t\t\n\t\tif (MusicApplication.getInstance().getQueueView() != null) {\n\t\t\tMusicApplication.getInstance().getQueueView().renew();\n\t\t}\n\t\t\n\t\tif (MusicApplication.getInstance().getNetworkView() != null) {\n\t\t\tMusicApplication.getInstance().getNetworkView().renew();\n\t\t}\t\n\t\t\n\t\t//Phone Music\n\t\tif ( MusicApplication.getInstance().getMusicListView().mLocalView != null ){\n\t\t\tMusicApplication.getInstance().getMusicListView().mLocalView.renew();\n\t\t}\n\t\t//Folder Music\n\t\tif ( MusicApplication.getInstance().getMusicListView().mLocalView2 != null ){\n\t\t\tMusicApplication.getInstance().getMusicListView().mLocalView2.renew();\n\t\t}\n\t\t//Favorite Music\n\t\tif ( MusicApplication.getInstance().getMusicListView().mCollectView != null ){\n\t\t\tMusicApplication.getInstance().getMusicListView().mCollectView.refresh();\n\t\t}\n\t\t//Download Music\n\t\tif ( MusicApplication.getInstance().getMusicListView().mDownloadView != null ){\n\t\t\t\n\t\t\tif ( MusicApplication.getInstance().getMusicListView().mDownloadView.mLoadedView != null ){\n\t\t\t\tMusicApplication.getInstance().getMusicListView()\n\t\t\t\t\t.mDownloadView.mLoadedView.mLocalMusicList.renew();\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t}", "public void updateUI() {\n if (ui != null) {\n removeKeymap(ui.getClass().getName());\n }\n setUI(UIManager.getUI(this));\n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "private void refreshUI(){\r\n\t\t//update text fields\r\n\t\tConfiguration conf = m_Categorizer.Configuration();\r\n\t\tm_MCSTf.setText(String.valueOf(conf.getMCSScore()));\r\n\t\tm_RelScoreTf.setText(String.valueOf(conf.getRelevanceWeight()));\r\n\t\tm_CohScoreTf.setText(String.valueOf(conf.getCoherenceWeight()));\r\n\t\tm_KeyTf.setText(String.valueOf(conf.getKeywordsWeight()));\r\n\t\tm_CatConfTf.setText(String.valueOf(conf.getCategoryConfidenceWeight()));\r\n\t\tm_RepeatTf.setText(String.valueOf(conf.getRepeatedConceptWeight()));\r\n\t\tm_MinCatsTf.setText(String.valueOf(conf.getMinOutputCategories()));\r\n\t\tm_MaxCatsTf.setText(String.valueOf(conf.getMaxOutputCategories()));\r\n\t\tm_MinCatScoreTf.setText(String.valueOf(conf.getMinScore()));\r\n\t\t//refresh tables\r\n\t\tm_DatasetTable.refresh();\r\n\t\tm_ConceptTable.refresh();\r\n\t\t//refresh statistics window\r\n\t\tm_StatisticsWindow.refresh();\r\n\t\t//refresh filter choicebox\r\n\t\tupdateFilterChoiceBox();\r\n\t}", "public void updateUi() {\n\t\t// // update the car color to reflect premium status or lack thereof\n\t\t// ((ImageView)findViewById(R.id.free_or_premium)).setImageResource(mIsPremium\n\t\t// ? R.drawable.premium : R.drawable.free);\n\t\t//\n\t\t// // \"Upgrade\" button is only visible if the user is not premium\n\t\t// findViewById(R.id.upgrade_button).setVisibility(mIsPremium ?\n\t\t// View.GONE : View.VISIBLE);\n\t\t//\n\t\t// // \"Get infinite gas\" button is only visible if the user is not\n\t\t// subscribed yet\n\t\t// findViewById(R.id.infinite_gas_button).setVisibility(mSubscribedToInfiniteGas\n\t\t// ?\n\t\t// View.GONE : View.VISIBLE);\n\t\t//\n\t\t// // update gas gauge to reflect tank status\n\t\t// if (mSubscribedToInfiniteGas) {\n\t\t// ((ImageView)findViewById(R.id.gas_gauge)).setImageResource(R.drawable.gas_inf);\n\t\t// }\n\t\t// else {\n\t\t// int index = mTank >= TANK_RES_IDS.length ? TANK_RES_IDS.length - 1 :\n\t\t// mTank;\n\t\t// ((ImageView)findViewById(R.id.gas_gauge)).setImageResource(TANK_RES_IDS[index]);\n\t\t// }\n\t}", "public void updateUI()\n\t{\n\t\tif( isRunning() == false) \n\t\t{\n\t\t\tupdateButton(\"Run\");\n\t\t\tbutton.setClickable(true);\n\t\t\tupdateTextView(Feedback.getMessage(Feedback.TYPE.NEW_TEST, null));\n\t\t}else\n\t\t{\n\t\t\tbutton.setClickable(true);\n\t\t\tupdateButton( \"Stop\" );\n\t\t\tupdateTextView(\"Tests are running.\");\n\n\t\t}\n\t}", "private void updateUI() {\n user = mAuth.getCurrentUser();\n if (user != null) {\n user.reload().addOnCompleteListener(userReloadListener);\n }\n }", "private void updateUI(){\n\t\tString eventType = eventbean.getEventType();\n\t\n\t\t//THE FOLLOWING MAKE EVERYTHING DISAPPEAR BEFORE UPDATING THE UI\n\t\t\n\t\t// set invisible text views not used and enable based on request\n\t\tresponse_tv.setVisibility(View.GONE);\n\t\tbtnContacts.setVisibility(View.GONE);\n\t\tbtnCallLog.setVisibility(View.GONE);\n\t\tbtnEnterNumManually.setVisibility(View.GONE);\n\t\tbtnEnterText.setVisibility(View.GONE);\n\t\thint_tv.setVisibility(View.GONE);\n\t\t\n\t\t// IF THERE ARE ALREADY INPUT TEXT REPONSE, THEN SHOW\n\t\tif (eventbean.getTextResponse().length() > 1){\n\t\t\t\n\t\t\tresponse_tv.setVisibility(View.VISIBLE);\n\t\t\tresponse_tv.setText(eventbean.getTextResponse());\n\t\t\t\n\t\t\t}\n\t\t\n\t\t// Clean up all the items in the radio group and check box layout\n\t\tradioGroup.removeAllViews();\n\t\tcheckboxLayout.removeAllViews();\n\t\t\n\t\t// based on the event type, dynamically change the user interface\n\t\tif (eventType.equals(\"TEXT_DISPLAY\")){\n\t\t\t\n\t\t\t// get text value from bean\n\t\t\tString textbody = eventbean.getTextbody().replace(\"\\\"\", \"\");\n\t\t\t\n\t\t\t//update user interface\n\t\t\ttitle_tv.setVisibility(View.GONE);\n\t\t\ttextbody_tv.setText(textbody);\n\t\t\tradioGroup.setVisibility(View.GONE);\n\t\t\t\n\t\t}\n\t\t\n\t\telse if(eventType.equals(\"TIE_DISPLAY\")){\n\t\t\t\n\t\t\t// getting the list of tie criteria associated with this event\n\t\t\tTieCriteria tieCriteria = eventbean.getTieCriteria().get(0);\n\t\t\t\n\t\t\t// initiate a String and a ArrayList to store names\n\t\t\tTie tie = null;\n\t\t\t\n\t\t\tTieGenerator tieGT = new TieGenerator(getActivity());\n\t\t\t\n\t\t\tif(eventbean.getDynamicText().length()<1){\n\t\t\t\n\t\t\t\t/* The following applies SELECTION METHOD = Random\n\t\t\t\t * As only random selection is used in TIE DISPLAY event\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\ttry{\n\t\t\t\t\tint nameCount = tieGT.countTies(tieCriteria);\n\t\t\t\t\t\n\t\t\t\t\t// randomize to get a random name\n\t\t\t\t\tRandom rand = new Random();\n\t\t\t\t\tint place = rand.nextInt(nameCount)+1;\n\t\t\t\t\ttieCriteria.setPlace(place);\n\t\t\t\t\t\n\t\t\t\t\t// get a name based on the tie criteria\n\t\t\t\t\ttie = tieGT.getTieByCriteria(tieCriteria);\n\t\t\t\t\n\t\t\t\t}catch(Exception e){\n\t\t\t\t\t\n\t\t\t\t\ttie = new Tie(eventbean.getQid(),\"NONAME\", \"NONAME\", tieCriteria);\n\t\t\t\t\tLog.v(\"failedcriteria\",tieCriteria.toString());\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t\teventbean.setDynamicText(tie.getName());\n\t\t\t\t\n\t\t\t\t//show in text view\n\t\t\t\ttextbody_tv.setText(tie.getName());\n\t\t\t}\n\t\t\t\n\t\t\t\telse{\n\t\t\t\t\n\t\t\t\t//show in text view\n\t\t\t\ttextbody_tv.setText(eventbean.getDynamicText());\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//update user interface\n//\t\t\ttitle_tv.setText(eventIndex+\".Tie Display\");\n\t\t\ttitle_tv.setVisibility(View.GONE);\n\t\t\tradioGroup.setVisibility(View.GONE);\n\t\t}\n\t\t\n\t\telse if(eventType.equals(\"SURVEY_QUESTION\")){\n\t\t\t\n\t\t\t//IF EVENT IS SURVEY QUESTIONS \n\t\t\t//disable confirm button every time to DISALLOW skipping questions\n\t\t\t\n\t\t\t// setting the text for the question title text view\n//\t\t\tString qtitle = eventIndex+\".Survey Question\";\n\t\t\t\n\t\t\t// setting the text for the question body text view\n\t\t\tString qbody = eventbean.getTextbody().replace(\"\\\"\", \"\");\n\t\t\t\n\t\t\tint choiceTotal = eventbean.getChoicecount();\n\t\t\t\n\t\t\t// setting the current question title\n//\t\t\ttitle_tv.setText(qtitle);\n\t\t\ttitle_tv.setVisibility(View.GONE);\n\t\t\t\n\t\t\t// BRANCH ENABLED ONLY\n\t\t\t// if enabled branch, the hint will show that response can't be changed\n\t\t\tif (eventbean.isBranchEnabled()){\n\t\t\t\t\n\t\t\t\thint_tv.setVisibility(View.VISIBLE);\n\t\t\t\thint_tv.setText(R.string.branchenabled_hint);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t/* THE FOLLOWING APPLIES TO: DYNAMIC QUESTIONS\n\t\t\t * If the survey question requires dynamic text, will based on it\n\t\t\t * to modify the text body\n\t\t\t */\n\t\t\t\n\t\t\t// getting the list of tie criteria associated with this event\n\t\t\tArrayList<TieCriteria> criteriaList = eventbean.getTieCriteria();\n\t\t\t\n\t\t\t// if it is NOT empty, then there's dynamic text to show\n\t\t\tif(!criteriaList.isEmpty()){\n\t\t\t\t\n\t\t\t\t// rearrange the array list in order of text position\n\t\t\t\t// this is necessary for later inserting the text into question body\n\t\t\t\tComparator <TieCriteria> compareTextPosition = new Comparator<TieCriteria>(){\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic int compare(TieCriteria tc1, TieCriteria tc2) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (tc1.getTextPosition()!=tc2.getTextPosition()){\n\t\t\t\t\t\t\treturn tc1.getTextPosition() - tc2.getTextPosition(); \n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\t// rearrange the list in order of text position\n\t\t\t\tCollections.sort(criteriaList,compareTextPosition);\n\t\t\t\t\n\t\t\t\t// this array list is used locally, to make sure multiple tie criteria\n\t\t\t\t// in a single question does not generate the same name\n\t\t\t\tArrayList<String> event_local_namepool = new ArrayList<String>();\n\n\t\t\t\tTieGenerator tieGT = new TieGenerator(getActivity());\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//IF THERE ARE NO EXISTING GENERATED TIES(NEW EVENT)\n\t\t\t\t/* THE if(event.getDynamicText().length()<1) IS USED FOR THE \"BACK\" \n\t\t\t\t * CHECK FIRST IF THE TIE HAS ALREADY BEEN GENERATED\n\t\t\t\t * IF IT DOES, THEN USE PREVIOUSLY GENERATED TIES\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\tif(eventbean.getDynamicText().length()<1){\n\t\t\t\t\n\t\t\t\t\t// this value is added up as tie is inserted into the question\n\t\t\t\t\tint differPos = 0;\n\t\t\t\t\n\t\t\t\tfor (TieCriteria tieCriteria:criteriaList){\n\t\t\t\t\t\n\t\t\t\t\t/* The following applies to when\n\t\t\t\t\t * SELECTION METHOD = Random\n\t\t\t\t\t */\n\t\t\t\t\tTie tie = null;\n\t\t\t\t\t\n\t\t\t\t\tif (tieCriteria.getMethod().equals(\"random\")){\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tint nameCount = tieGT.countTies(tieCriteria);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdo{\n\t\t\t\t\t\t\t// randomize to get a random name\n\t\t\t\t\t\t\tRandom rand = new Random();\n\t\t\t\t\t\t\tint place = rand.nextInt(nameCount)+1;\n\t\t\t\t\t\t\ttieCriteria.setPlace(place);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// get a name based on the tie criteria\n\t\t\t\t\t\t\ttie = tieGT.getTieByCriteria(tieCriteria);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}while(event_local_namepool.indexOf(tie.getName())!=-1);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// assigning question id and event index to the tie\n\t\t\t\t\t\t\ttie.setQid(eventbean.getQid());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttie = new Tie(eventbean.getQid(),\"NONAME\", \"NONAME\", tieCriteria);\n\t\t\t\t\t\t\tLog.v(\"failedcriteria\",tieCriteria.toString());\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// register the name in the name pool\n\t\t\t\t\t\ttieGenerateCallBack.onTieGenerated(tie);\n\t\t\t\t\t\t\n\t\t\t\t\t}else if (tieCriteria.getMethod().equals(\"walk_through\")){\n\t\t\t\t\t\n\t\t\t\t\t\t/* the extra step in WALK THROUGH is just to check the name Pool\n\t\t\t\t\t\t * and make sure the name does not appear again.\n\t\t\t\t\t\t */\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tint nameCount = tieGT.countTies(tieCriteria);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdo{\n\t\t\t\t\t\t\t// randomize to get a random name\n\t\t\t\t\t\t\tRandom rand = new Random();\n\t\t\t\t\t\t\tint place = rand.nextInt(nameCount)+1;\n\t\t\t\t\t\t\ttieCriteria.setPlace(place);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// get a name based on the tie criteria\n\t\t\t\t\t\t\ttie = tieGT.getTieByCriteria(tieCriteria);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}while(local_tiePool.contains(tie) || //PAY ATTENTION IF IT WORKS\n\t\t\t\t\t\t\t\t\tevent_local_namepool.indexOf(tie.getName())!=-1);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// assigning question id to the tie\n\t\t\t\t\t\t\ttie.setQid(eventbean.getQid());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttie = new Tie(eventbean.getQid(),\"NONAME\", \"NONAME\", tieCriteria);\n\t\t\t\t\t\t\tLog.v(\"failedcriteria\",tieCriteria.toString());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// register the name in the name pool\n\t\t\t\t\t\t\ttieGenerateCallBack.onTieGenerated(tie);\n\t\t\t\t\t\t\t\n\t\t\t\t\t}else if (tieCriteria.getMethod().contains(\"use\")){\n\t\t\t\t\t\t\n\t\t\t\t\t\t/* the extra step in USE PREVIOUS TIE is just to check the name Pool\n\t\t\t\t\t\t * and pick up the name used in a previous question.\n\t\t\t\t\t\t */\n\t\t\t\t\t\t\n\t\t\t\t\t\t// first of all, parsing the USE PREVIOUS TIE STRING to get the question id and tie id\n\t\t\t\t\t\tString methodStr = tieCriteria.getMethod();\n\t\t\t\t\t\tint qid = Integer.parseInt(methodStr.substring(methodStr.indexOf(\"q\")+1, methodStr.indexOf(\"t\")));\n\t\t\t\t\t\tint criteria_id = Integer.parseInt(methodStr.substring(methodStr.indexOf(\"t\")+1, methodStr.length()));\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// iterate through the tie pool to find a previous tie that fits the question id and criteria id\n\t\t\t\t\t\t\tfor (int i = 0; i < local_tiePool.size(); i++){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tint q_id = local_tiePool.get(i).getQid();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tint c_id = local_tiePool.get(i).getCriteria().getId();\n\n\t\t\t\t\t\t\t\t// if match is found, get this tie!\n\t\t\t\t\t\t\t\tif(qid == q_id && c_id == criteria_id){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// get this tie\n\t\t\t\t\t\t\t\t\ttie = local_tiePool.get(i);\n\t\t\t\t\t\t\t\t\tbreak;\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}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// NO NEED TO REGISTER, BECAUSE USED PREVIOUS TIE\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// error control: if not found previous tie, then assign NONAME\n\t\t\t\t\t\t\tif(tie == null)tie = new Tie(eventbean.getQid(),\"NONAME\", \"NONAME\", tieCriteria);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//this should not happen, if it does there's a big warning\n\t\t\t\t\t\t\tLog.v(\"debugtag\",\"Warning: Can't find previous tie.\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttie = new Tie(\"NONAME\", \"NONAME\", tieCriteria);\n\t\t\t\t\t\t\tLog.v(\"failedcriteria\",tieCriteria.toString());\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// add to a name list to later avoid having two same names\n\t\t\t\t\tif(!tie.getName().equals(\"NONAME\"))event_local_namepool.add(tie.getName());\n\t\t\t\n\t\t\t\t\t// save this name to the event bean\n\t\t\t\t\teventbean.setDynamicText(eventbean.getDynamicText() + tie.getName() + \",\" );\n\t\t\t\t\t\n\t\t\t\t\t// get the position that this tie wants to be placed\n\t\t\t\t\tint position = tieCriteria.getTextPosition();\n\t\t\t\t\t\n\t\t\t\t\t// use a String Builder to insert the name into the text body\n\t\t\t\t\tStringBuilder inserted_qbody = new StringBuilder(qbody);\n\t\t\t\t\n\t\t\t\t\tint destination_position = (int)position + (int)differPos;\n\t\t\t\t\t\n\t\t\t\t\tif(destination_position > qbody.length())destination_position = qbody.length()-1;\n\t\t\t\n\t\t\t\t\tinserted_qbody.insert(destination_position,tie.getName());\n\t\t\t\t\t\n\t\t\t\t\tqbody = inserted_qbody+\"\";\n\t\t\t\t\t\n\t\t\t\t\tdifferPos = differPos + tie.getName().length();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// ELSE IF the Dynamic Text is not empty\n\t\t\t\t\t// meaning ties have already been generated\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\t\t// this value is added up as tie is inserted into the question\n\t\t\t\t\tint differPos = 0;\n\t\t\t\t\t\n\t\t\t\t\tfor (int i=0 ; i < criteriaList.size();i++){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// retrieve the name from the already generated list\n\t\t\t\t\t\t\tString name = eventbean.getDynamicText().split(\",\")[i];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// get the position that this tie wants to be placed\n\t\t\t\t\t\t\tint position = criteriaList.get(i).getTextPosition();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// use a String Builder to insert the name into the text body\n\t\t\t\t\t\t\tStringBuilder inserted_qbody = new StringBuilder(qbody);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tint destination_position = (int)position + (int)differPos;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(destination_position > qbody.length())destination_position = qbody.length()-1;\n\t\t\t\t\t\n\t\t\t\t\t\t\tinserted_qbody.insert(destination_position,name);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tqbody = inserted_qbody+\"\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdifferPos = differPos + name.length();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t}//correspond to the else\n\t\t\t\t\n\t\t\t}\n\n\t\t\t// setting the question body\n\t\t\ttextbody_tv.setText(qbody);\n\t\t\t\n\t\t\t// identify the question type\n\t\t\t\n\t\t\tString questionType = eventbean.getQuestionType();\n\t\t\t\n\t\t\t/* Based on the question type (single or multiple)\n\t\t\t * Different UI updates code will be initiated\n\t\t\t * 1. Single Choice: RadioGroup and RadioButtons will be used\n\t\t\t * 2. Multiple Choice: Check boxes will be used\n\t\t\t */\n\t\t\t\n\t\t\t\n\t\t\tif (questionType.equals(\"single\")){\n\t\t\t\t\n\t\t\t\t/*1. Single Choice Questions: update radio button for every choice\n\t\t\t\t * \n\t\t\t\t * The following code has been changed from its previous version\n\t\t\t\t * Now, it allows dynamically adding the radio buttons so there are no limit of choices\n\t\t\t\t * \n\t\t\t\t */\n\t\t\t\t\n\t\t\t\tradioGroup.setVisibility(View.VISIBLE);\n\t\t\t\t\n\t\t\t\tfor (int i = 0 ; i < choiceTotal ; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t// getting the text from the bean and update radio button text\n\t\t\t\t\t\tString choice_text = eventbean.getChoice(i);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// instantiate new radio buttons\n\t\t\t\t\t\tRadioButton choiceRadioButton = new RadioButton(getActivity());\n\t\t\t\t\t\t\n\t\t\t\t\t\t// setting the text and tag(used later to read choice text) of the radio button\n\t\t\t\t\t\tchoiceRadioButton.setText(choice_text.replace(\"\\\"\", \"\"));\n\t\t\t\t\t\tchoiceRadioButton.setTag((char) ('A' + i)); // this is to set characters as tags\n\t\t\t\t\t\t\n\t\t\t\t\t\t// setting the layout and style for the radio button\n\t\t\t\t\t\tRadioGroup.LayoutParams params = new RadioGroup.LayoutParams(\n\t\t\t\t LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);\n\t\t\t\t\t\tparams.setMargins(0, 0, 0, 30);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// styling the new added radio button\n\t\t\t\t choiceRadioButton.setLayoutParams(params);\n\t\t\t\t\t\tchoiceRadioButton.setTextSize(27);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tradioGroup.addView(choiceRadioButton,i);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t * Setting a checked change lister for the radio Group\n\t\t\t\t * So when it is selected, will release the \"next\" button\n\t\t\t\t * And user can go to the next event\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\tradioGroup.setOnCheckedChangeListener(new OnCheckedChangeListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onCheckedChanged(RadioGroup group, int checkedId) {\n\n\t\t \t/* Error Control\n\t\t \t * Every time a radio button is checked/unchecked,\n\t\t \t * it will check if there are radio buttons checked\n\t\t \t * if not, it will disable the \"next\" button\n\t\t \t */\n\t\t \t\n\t\t\t\t\t\t// if there exists radio button checked, then enable the next button\n\t\t\t\t\t\tif (checkedId != -1){\n\t\t \t\t\t\t\n\t\t \t\t\t\tRadioButton checkedButton = (RadioButton) group.findViewById(checkedId);\n\t\t \t\t\t\tint checkedIndex = group.indexOfChild(checkedButton) + 1;\n\t\t \t\t\t\t\n\t\t \t\t\t\tresponseCallBack.onEventResponded(eventbean.getIndex(),eventbean.getQid(),\"S\",checkedIndex+\"\");\n\t\t\t\t\t\t\t\n\t\t \t\t\t}else {responseCallBack.onEventResponded(eventbean.getIndex(),eventbean.getQid(),\"S\",\"-1\");}\n\t\t \t\t\t\n\t\t\t\t\t\t// FOR BRANCH ENABLED EVENTS ONLY\n\t\t\t\t\t\t// if branching is enabled, the response will NOT be allowed to change \n\t\t\t\t\t\t\n\t\t\t\t\t\tif(eventbean.isBranchEnabled())disableResponse();\n\t\t\t\t\t\t\n\t\t\t \t\t//record response\n\t\t\t \t\tcheckSingleChoice();\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t }\n\t\t ); \n\t\t\t\t\n\t\t\t\tString responseString = eventbean.getChoiceResponse();\n\t\t\t\t\n\t\t\t\t// make sure selected tag is not null first\n\t\t\t\tif(responseString!=null){\n\t\t\t\t\n\t\t\t\t\t// READ FROM RESPONSE: IF HAVE PREVIOUS RESPONSE, THEN RECALL\n\t\t\t\t\tString selectedTag = responseString.split(\"\\\\.\")[0];\n\t\t\t\t\t\n\t\t\t\t\tfor(int i = 0 ; i < radioGroup.getChildCount(); i++ ){\n\t\t\t\t\t\t\n\t\t\t\t\t\tRadioButton choice = (RadioButton)radioGroup.getChildAt(i);\n\n\t\t\t\t\t\tString choiceTag = choice.getTag()+\"\";\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (choiceTag.equals(selectedTag)){((RadioButton) radioGroup.getChildAt(i)).setChecked(true);}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}else if (questionType.equals(\"multiple\")){\n\t\t\t\t/*2. Multiple Choice Questions: update check boxes for every choice\n\t\t\t\t *Since there's no thing as \"check box group\" the code here just\n\t\t\t\t *add the check boxes to the input linear layout\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\tradioGroup.setVisibility(View.GONE);\n\t\t\t\t\n\t\t\t\t// used to store checked choices, accessed by later code \n\t\t\t\tArrayList<String> checkedChoices = new ArrayList<String>();\n\t\t\t\t\n\t\t\t\t// if there has already been response, check the boxes\n\t\t\t\tif(eventbean.getChoiceResponse().length()>1){\n\t\t\t\t\t\n\t\t\t\t\tString responseStr = eventbean.getChoiceResponse();\n\t\t\t\t\t\n\t\t\t\t\t\t// parsing every choice from the response string and add them to the list\n\t\t\t\t\t\tfor (int i = 0; i < responseStr.split(\",\").length ; i++ ){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString choice = responseStr.split(\",\")[i].split(\"\\\\.\")[0];\n\t\t\t\t\t\t\tcheckedChoices.add(choice);\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor (int i = 0 ; i < choiceTotal ; i++)\n\t\t\t\t\t\n\t\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t// getting the text from the bean and update radio button text\n\t\t\t\t\tString choice_text = eventbean.getChoice(i);\n\t\t\t\t\t\n\t\t\t\t\t// instantiate new radio buttons\n\t\t\t\t\tCheckBox choiceCheckBox = new CheckBox(getActivity());\n\t\t\t\t\t\n\t\t\t\t\t// setting the text and tag(used later to read choice text) of the radio button\n\t\t\t\t\tchoiceCheckBox.setText(choice_text.replace(\"\\\"\", \"\"));\n\t\t\t\t\tchoiceCheckBox.setTag((char) ('A' + i)); // this is to set characters as tags\n\t\t\t\t\t\n\t\t\t\t\t// setting the layout and style for the radio button\n\t\t\t\t\tLinearLayout.LayoutParams params = new LinearLayout.LayoutParams(\n\t\t\t LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);\n\t\t\t\t\tparams.setMargins(0, 0, 0, 30);\n\t\t\t\t\t\n\t\t\t choiceCheckBox.setLayoutParams(params);\n\t\t\t choiceCheckBox.setTextSize(21);\n\t\t\t\t\t\n\t\t\t // setting the listener that will release the \"next\" button when checked\n\t\t\t choiceCheckBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n\n\t\t\t @Override\n\t\t\t public void onCheckedChanged(CompoundButton buttonView,boolean isChecked) {\n\t\t\t\t\t\t\t\n\t\t\t \t/* = Error Control =\n\t\t\t \t * Every time a box is checked/unchecked,\n\t\t\t \t * it will check if there are still boxes checked by the user\n\t\t\t \t * if not, it will disable the \"next\" button\n\t\t\t \t */\n\t\t\t \t\n\t\t\t \tString checkedBoxIndexString = \"\";\n\t\t\t \t\n\t\t\t \tfor (int i =0; i < checkboxLayout.getChildCount();i++){\n\t\t\t \t\t\t\n\t\t\t \t\t\tCheckBox choiceBox = (CheckBox) checkboxLayout.getChildAt(i);\n\t\t\t \t\t\t\n\t\t\t \t\t\t// if there exists checked box, then continue and enable \"next\" button\n\t\t\t \t\t\tif(choiceBox.isChecked()){\n\t\t\t \t\t\t\t\n\t\t\t \t\t\t\t// set the choice index string format\n\t\t\t \t\t\t\tcheckedBoxIndexString = checkedBoxIndexString + (i + 1) + \"&\";\n\t\t\t \t\t\t\t\n\t\t\t \t\t\t}\n\t\t\t \t}\n\t\t\t \t\n\t\t\t \t// if there exists checked box, then continue and enable \"next\" button\n\t\t\t \tif(!checkedBoxIndexString.equals(\"\")){\n\t\t\t \t\t\n\t\t\t \t\t// remove the & sign at end if exists\n\t\t\t\t \t\tif(checkedBoxIndexString.endsWith(\"&\")){\n\t\t\t\t \t\t\t\n\t\t\t\t \t\t\t// remove the & at the end\n\t\t\t\t \t\t\tcheckedBoxIndexString = checkedBoxIndexString.substring(0, checkedBoxIndexString.length()-1);\n\t\t\t\t \t\t\t\n\t\t\t\t \t\t}\n\t\t\t\t \t\t\n\t\t\t \t\tresponseCallBack.onEventResponded(eventbean.getIndex(),eventbean.getQid(),\"M\",checkedBoxIndexString);\n\t\t\t \t\t\n\t\t\t \t\t}\n\t\t\t \t\n\t\t\t \telse {\n\t\t\t \t\n\t\t \t\t\t// if no checked box is found, then disable the button\n\t\t \t\t\t// THIS IS BECAUSE, we don't want to continue without at least a box checked\n\t\t\t \t\tresponseCallBack.onEventResponded(eventbean.getIndex(),eventbean.getQid(),\"M\",\"-1\");\n\t \t\t\t\n\t\t\t \t}\n\t\t\t \t\n\t\t\t \t//record the response\n\t\t\t \tcheckMultipleChoice();\n\t\t\t \t\n\t\t\t }\n\t\t\t }\n\t\t\t ); \n\t\t\t\t\t\n\t\t\t // looking up saved choices and check the selected boxes\n\t\t\t if (!checkedChoices.isEmpty()){\n\t\t\t \t\n\t\t\t \t// tag of the current check box\n\t\t\t \tString box_tag = choiceCheckBox.getTag()+\"\";\n\t\t\t \t\n\t\t\t \t// compared with all checked choices in the list\n\t\t\t \tif (checkedChoices.contains(box_tag))choiceCheckBox.setChecked(true);// if has, then check\n\t\t\t \t\n\t\t\t }\n\t\t\t \n\t\t\t\t\tcheckboxLayout.addView(choiceCheckBox,i);\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\t\t\t// if the question asks user to select from contacts/call log/enter manually\n\t\t\t// the corresponding function button will show\n\t\t\tif(eventbean.isSelectContacts())btnContacts.setVisibility(View.VISIBLE);\n\t\t\tif(eventbean.isSelectCallLog())btnCallLog.setVisibility(View.VISIBLE);\n\t\t\tif(eventbean.isEnterManually())btnEnterNumManually.setVisibility(View.VISIBLE);\n\t\t\tif(eventbean.isEnterText())btnEnterText.setVisibility(View.VISIBLE);\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t}", "private void updateUI() {\n Bite bite = BiteLab.get(getActivity()).getBite(mBiteId);\n\n mPlacementTextView.setText(bite.getPlacement());\n\n Calendar c = bite.getCalendar();\n int year = c.get(Calendar.YEAR);\n int month = c.get(Calendar.MONTH)+1;\n int day = c.get(Calendar.DAY_OF_MONTH);\n mDateTextView.setText(getString(R.string.show_date, day, month, year));\n\n mDaysSinceBiteTextView.setText(getString(R.string.days_since_bite\n , bite.getDaysSinceBite()));\n\n mStageTextView.setText(getString(R.string.show_stage, bite.getStage()));\n }", "void initUI();", "public void updateUI() {\n appViewModel.usersList.observe(getViewLifecycleOwner(), new Observer<PagedList<UserModel>>() {\n @Override\n public void onChanged(PagedList<UserModel> userModels) {\n adapter.submitList(userModels);\n adapter.notifyDataSetChanged();\n }\n });\n }", "public void updateUI(){\n\n getCurrentDate();\n List<Object> tasks = new ArrayList<Object>(TaskManager.sharedInstance().GetTasksInProject());\n //creating a welcome message for when there are no tasks\n if(tasks.size() == 0){\n welcome.setVisibility(View.VISIBLE);\n welcome.setText(R.string.no_tasks);\n\n }else {\n welcome.setText(R.string.empty);\n welcome.setVisibility(View.GONE);\n }\n Project currentProject = ProjectManager.sharedInstance().getCurrentProject();\n List<Object> sortedTaskLists = sortTasks(tasks);\n\n if (mTaskAdapter == null) {\n mTaskAdapter = new TaskAdapter(this.getContext(), sortedTaskLists);\n myTaskListView.setAdapter(mTaskAdapter);\n } else {\n mTaskAdapter.updateData(sortedTaskLists);\n mTaskAdapter.notifyDataSetChanged();\n }\n }", "protected void initUI() {\n\r\n\t\t((Button) findViewById(R.id.project_site_start_wifiscan_button)).setOnClickListener(this);\r\n\r\n\t\t// ((Button) findViewById(R.id.project_site_calculate_ap_positions_button)).setOnClickListener(this);\r\n\r\n\t\t// ((Button) findViewById(R.id.project_site_add_known_ap)).setOnClickListener(this);\r\n\r\n\t\t((Button) findViewById(R.id.project_site_step_detect)).setOnClickListener(this);\r\n\t\t\r\n\t\t((ToggleButton) findViewById(R.id.project_site_toggle_autorotate)).setOnClickListener(this);\r\n\r\n\t\tmultiTouchView = ((MultiTouchView) findViewById(R.id.project_site_resultview));\r\n\t\tmultiTouchView.setRearrangable(false);\r\n\r\n\t\tmultiTouchView.addDrawable(map);\r\n\r\n\t\tif (site.getTitle().equals(ProjectSite.UNTITLED)) {\r\n\t\t\tshowDialog(DIALOG_TITLE);\r\n\t\t} else {\r\n\t\t\tif (freshSite) {\r\n\t\t\t\t// start configuration dialog\r\n\t\t\t\tshowDialog(DIALOG_FRESH_SITE);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "private void updateUI() {\n swipeRefreshLayout.setRefreshing(false);\n adapter.clearItems();\n itemList.addAll(DatabaseController.getInstance(getApplicationContext()).getItems());\n if (itemList.size() > 0){\n emptyTextView.setVisibility(View.GONE);\n adapter.notifyDataSetChanged();\n } else {\n emptyTextView.setVisibility(View.VISIBLE);\n }\n }", "private void initializeUI() {\r\n this.parentFrame = game.getFrame();\r\n parentFrame.setEnabled(false); // Disable main game UI during the ending dialog.\r\n createResultPopup();\r\n }", "private void populateUI() {\n\n Picasso.get()\n .load(Codes.BACKDROP_URL + movie.backdropPath)\n .error(R.drawable.error)\n .into(mBinding.backdrop);\n\n Picasso.get()\n .load(Codes.POSTER_URL + movie.posterPath)\n .error(R.drawable.error)\n .into(mBinding.movieDetails.poster);\n\n diskIO.execute(new Runnable() {\n @Override\n public void run() {\n MiniMovie miniMovie = mDatabase.movieDao().getMovieById(movie.movieId);\n\n if (miniMovie != null) {\n isFavorite = true;\n mBinding.favoriteButton.setImageResource(R.drawable.ic_star_white_24px);\n } else {\n isFavorite = false;\n mBinding.favoriteButton.setImageResource(R.drawable.ic_star_border_white_24px);\n }\n }\n });\n }", "public void refreshUI(){\n\n // disable/endable certain UI elements depending on mode\n this.setModeUI();\n\n if (this.inManualMode == false){ this.automaticModeChecks(); }\n\n /**\n * @bug When selected a train from a TCDispatchedTrainsFrame, a NullPointerException is thrown.\n *\n */\n if (this.isUtilityFailure()){ this.vitalsButton.setForeground(Color.red); } // change to red\n else if (this.isUtilityFailure() == false){this.vitalsButton.setForeground(new Color(0,0,0));}\n\n // checks so that the doors can't open doors if moving..\n if (this.canOpenDoors()){ this.enableOpeningDoors(); }\n\n else{ // shut the doors if moving\n this.disableOpeningDoors();\n if (this.selectedTrain.getLeftDoor() != -1){ this.selectedTrain.setLeftDoor(0); }\n if (this.selectedTrain.getRightDoor() != -1){ this.selectedTrain.setRightDoor(0); }\n }\n\n // set utility stuff based on train information\n this.refreshAC();\n this.refreshHeat();\n this.refreshLights();\n this.refreshLeftDoors();\n this.refreshRightDoors();\n }", "@Override\n\tprotected void UpdateUI() {\n\t\tFineModulationDisplay(FineModulation);\n\t\tAutoGreaseDisplay(AutoGrease);\n\t\tQuickcouplerDisplay(Quickcoupler);\n\t\tRideControlDisplay(RideControl);\n\t\tBeaconLampDisplay(BeaconLamp);\n\t\tMirrorHeatDisplay(MirrorHeat);\n//\t\tFNKeyDisplay(ParentActivity.LockEntertainment);\n\t}", "@Override\r\n\tpublic void refreshUI(int id, MSG msg) {\n\r\n\t}", "private void initUI() {\n mEditTextFatherName = findViewById(R.id.editTextKycParentsAndSpouseInfoFatherName);\n mEditTextMotherName = findViewById(R.id.editTextKycParentsAndSpouseInfoMotherName);\n mEditTextSpouseTitle = findViewById(R.id.editTextKycParentsAndSpouseInfoSpouseTitle);\n mEditTextSpouseName = findViewById(R.id.editTextKycParentsAndSpouseInfoSpouseName);\n mBtnSubmit = findViewById(R.id.btnKycParentsAndSpouseUpdateSubmit);\n mBtnSubmit.setOnClickListener(this);\n mTextViewShowServerResponse = findViewById(R.id.textViewKycParentsAndSpouseInfoServerResponse);\n mStrMasterKey = GlobalData.getStrMasterKey();\n\n if (getSupportActionBar() != null) {\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n }\n\n checkInternet();\n mEditTextFatherName.setText(GlobalData.getStrKYCPersonalAndSpourFathername());\n mEditTextMotherName.setText(GlobalData.getStrKYCPersonalAndSpouseMotherName());\n mEditTextSpouseTitle.setText(GlobalData.getStrKYCPersonalAndSpouseTitle());\n mEditTextSpouseName.setText(GlobalData.getStrKYCPersonalAndSpouseName());\n\n }", "public void updateUI() {\n/* 393 */ setUI((ScrollPaneUI)UIManager.getUI(this));\n/* */ }", "@Override\n\tprotected void UpdateUI() {\n\t\tDisplayFuelData(AverageFuelRate, LatestFuelConsumed);\n\t\t\n\t\tif(bCursurIndex == false && ParentActivity.ScreenIndex == Home.SCREEN_STATE_MENU_MONITORING_FUELHISTORY_GENERALRECORD)\n\t\t\tCursurDisplay(CursurIndex);\n\t}", "private void initUI()\r\n\t{\r\n\t\tthis.label = new Label();\r\n\t\t\r\n\t\tthis.label.setText(\"This view is also saveable\");\r\n\t\t\r\n\t\tthis.label.setSizeUndefined();\r\n\t\tthis.add(this.label);\r\n\t\tthis.setSizeFull();\r\n\t}", "public abstract void initUiAndListener();", "public updatedata() {\n initComponents();\n }", "private void updateUI() {\n mAdapter = new GoalAdapter(userGoals);\n goalRecyclerView.setAdapter(mAdapter);\n }", "@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tupdateUI();\n\t\t\t\t\t\t}", "private void updateUI() {\n mLatestFeedsAdapter.notifyDataSetChanged();\n }", "private void updateUIAfterTick(){ \n //turn counter\n this.turnClock.setText(\"Turn: \" + this.village.getTurnCountAsString());\n \n //population\n this.populationAmount.setText(\"Population: \" + Integer.toString(this.village.getPopulation().getPopulationAmount()) );\n this.populationGrowthrate.setText(\"Growthrate: \" + Float.toString(this.village.getPopulation().getGrowthrate()));\n\n //buildings:\n this.constructedBuildingsArea.setText(this.getConstructedBuildingsAsList());\n \n //event\n this.eventText.setText(this.currentEvent.getEventText());\n this.eventOption1Btn.setText(this.currentEvent.getOption1Text());\n this.eventOption2Btn.setText(this.currentEvent.getOption2Text());\n this.eventOption3Btn.setText(this.currentEvent.getOption3Text());\n this.eventOption4Btn.setText(this.currentEvent.getOption4Text());\n \n }", "private void updateGUI() {\n\t\tsfrDlg.readSFRTableFromCPU();\n\t\tsourceCodeDlg.updateRowSelection(cpu.PC);\n\t\tsourceCodeDlg.getCyclesLabel().setText(\"Cycles count : \" + cpu.getCyclesCount());\n\t\tdataMemDlg.fillDataMemory();\n\t\t//ioPortsDlg.fillIOPorts();\t\t\n\t\tIterator iter = seg7DlgList.iterator();\n\t\twhile(iter.hasNext())\n\t\t\t((GUI_7SegDisplay)iter.next()).drawSeg();\n\t}", "private void update()\n {\n\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n //System.out.println(\"UPDATE\");\n updateHumanPlayerMoney();\n updateListViewDoctorItems();\n updateListViewHospitalItems();\n updateListViewLogWindow();\n updateListViewComputerPlayer();\n load_figure();\n updateComputerPlayerMoney();\n }\n });\n }", "protected void updateUi() {\n final boolean canInput = mSaveAndFinishWorker == null;\n byte[] password = LockPatternUtils.charSequenceToByteArray(mPasswordEntry.getText());\n final int length = password.length;\n if (mUiStage == Stage.Introduction) {\n mPasswordRestrictionView.setVisibility(View.VISIBLE);\n final int errorCode = validatePassword(password);\n String[] messages = convertErrorCodeToMessages(errorCode);\n // Update the fulfillment of requirements.\n mPasswordRequirementAdapter.setRequirements(messages);\n // Enable/Disable the next button accordingly.\n setNextEnabled(errorCode == NO_ERROR);\n } else {\n // Hide password requirement view when we are just asking user to confirm the pw.\n mPasswordRestrictionView.setVisibility(View.GONE);\n setHeaderText(getString(mUiStage.getHint(mIsAlphaMode, getStageType())));\n setNextEnabled(canInput && length >= mPasswordMinLength);\n mSkipOrClearButton.setVisibility(toVisibility(canInput && length > 0));\n }\n int message = mUiStage.getMessage(mIsAlphaMode, getStageType());\n if (message != 0) {\n mMessage.setVisibility(View.VISIBLE);\n mMessage.setText(message);\n } else {\n mMessage.setVisibility(View.INVISIBLE);\n }\n\n setNextText(mUiStage.buttonText);\n mPasswordEntryInputDisabler.setInputEnabled(canInput);\n Arrays.fill(password, (byte) 0);\n }", "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 }", "@Override\n public void updateUI() {\n setUI(new RangeSliderUI(this));\n // Update UI for slider labels. This must be called after updating the\n // UI of the slider. Refer to JSlider.updateUI().\n updateLabelUIs();\n }", "private void updateSetupGUI() {\n\t\tif (isLoggedIn == false) {\n\t\t\trestoreGameLabel.setVisible(false);\n\t\t\trestoreGameButton.setVisible(false);\n\t\t\tcreateAccountButton.setVisible(true);\n\t\t\tcreateAccountLabel.setVisible(true);\n\t\t\tseparator_1.setVisible(true);\n\t\t} else {\n\t\t\tcreateAccountButton.setVisible(false);\n\t\t\tcreateAccountLabel.setVisible(false);\n\t\t\tseparator_1.setVisible(false);\n\t\t\trestoreGameLabel.setVisible(true);\n\t\t\trestoreGameButton.setVisible(true);\n\t\t}\n\t}", "private void populateUI(Event event){\n mTitle.setText(event.getTitle()); //sets title to event title\n mDescription.setText(event.getDescription());\n }", "private void updateUi(final BoxItem sharedItem){\n if (!checkIfHasRequiredFields(sharedItem)){\n refreshShareItemInfo();\n return;\n }\n if (getMainItem().getId().equals(sharedItem.getId())) {\n setMainItem(sharedItem);\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n setupUi();\n }\n });\n }\n }", "private void setupUI(){\n this.setupTimerSchedule(controller, 0, 500);\n this.setupFocusable(); \n this.setupSensSlider();\n this.setupInitEnable();\n this.setupDebugger();\n }", "@Override\n public\n void\n updateView()\n {\n // Stop responding to events.\n setAllowEvents(false);\n\n getAccountChooser().displayElements(getAccounts());\n getPanel().removeAll();\n\n // Get new reference to account incase the type or collection has changed.\n setAccount(getProperAccountReference());\n\n if(getAccount() != null)\n {\n setRegisterPanel(new RegisterPanel(getAccount()));\n\n getAccountChooser().setSelectedItem(getAccount().getIdentifier());\n getFilter().updateFormats();\n\n // Build panel.\n getPanel().setFill(GridBagConstraints.BOTH);\n getPanel().add(getRegisterPanel(), 0, 0, 1, 1, 100, 100);\n\n displayTransactions(null);\n }\n\n // Resume responding to events.\n setAllowEvents(true);\n }", "private void updateGui() {\n final IDebugger debugger = m_debugPerspectiveModel.getCurrentSelectedDebugger();\n final TargetProcessThread thread = debugger == null ? null : debugger.getProcessManager().getActiveThread();\n\n final boolean connected = debugger != null && debugger.isConnected();\n final boolean suspended = connected && thread != null;\n\n m_hexView.setEnabled(connected && suspended && m_provider.getDataLength() != 0);\n\n if (connected) {\n m_hexView.setDefinitionStatus(DefinitionStatus.DEFINED);\n } else {\n // m_hexView.setDefinitionStatus(DefinitionStatus.UNDEFINED);\n\n m_provider.setMemorySize(0);\n m_hexView.setBaseAddress(0);\n m_hexView.uncolorizeAll();\n }\n }", "public void UI_Refresh ()\r\n\t{\r\n\t\tUI_RefreshSensorData ();\r\n\t\tUI_RefreshConnStatus ();\r\n\t}", "protected void _updateWidgets()\n\t{\n\t\t// Show the title\n\t\tString title = _spItem.getTitleAttr() ;\n\t\tif( title != null )\n\t\t\t_obsTitle.setText( title ) ;\n\t\telse\n\t\t\t_obsTitle.setText( \"\" ) ;\n\n\t\tString state = _avTab.get( \"state\" ) ;\n\t\tif( state == null )\n\t\t\t_obsState.setText( \"Not in Active Database\" ) ;\n\t\telse\n\t\t\t_obsState.setText( state ) ;\n\n\t\tignoreActions = true ; // MFO\n\n\t\tSpObs obs = ( SpObs )_spItem ;\n\t\t\n\t\t// Set the priority\n\t\tint pri = obs.getPriority() ;\n\t\t_w.jComboBox1.setSelectedIndex( pri - 1 ) ;\n\n\t\t// Set whether or not this is a standard\n\t\t_w.standard.setSelected( obs.getIsStandard() ) ;\n\n\t\t// Added for OMP (MFO, 7 August 2001)\n\t\t_w.optional.setValue( obs.isOptional() ) ;\n\n\t\tint numberRemaining = obs.getNumberRemaining();\n\t\t_w.setRemainingCount(numberRemaining);\n\n\t\t_w.unSuspendCB.addActionListener( this ) ;\n\n\t\tignoreActions = false ;\n\n\t\t_w.estimatedTime.setText( OracUtilities.secsToHHMMSS( obs.getElapsedTime() , 1 ) ) ;\n\n\t\t_updateMsbDisplay() ;\n\t}", "@Override\n\tpublic void refreshUI(Object pushMsg) {\n\t\t\n\t}", "private void refreshScreen() {\n app.getMainMenu().getTextField().clear();\n for (int key = 0; key < 96; key++) {\n app.getWorkSpace().getGridCell(key).unhighlightGridCell();\n app.getWorkSpace().getGridCell(key).updateState(app);\n }\n Storage.getInstance().writeObject(\"workspace\", app.getWorkSpace().getWorkSpaceMap());\n app.show();\n }", "public BridgingUI() {\n initComponents();\n initUserActions();\n }", "@Override\n\t\t protected void onPreExecute() {\n\t\t\t InitializeUI();\n\t\t }", "private void updateUI() {\n Log.i(DEBUG.TAG, \"BTDevicesActivity - updateUI - start\");\n\n btnBTScan.setEnabled(btAdapter.isEnabled() && !btAdapter.isDiscovering());\n\n if (btAdapter.isDiscovering())\n btnBTScan.setText(R.string.btn_bt_devices_scan_running_text);\n else\n btnBTScan.setText(R.string.btn_bt_devices_scan_text);\n tglBTToggle.setChecked(btAdapter.isEnabled());\n\n // remove all found (if any) devices when BT is disabled\n if (!btAdapter.isEnabled())\n lvAdapter.clear();\n\n if (lvAdapter.getCount() > 0)\n tvHeader.setText(R.string.tv_bt_devices_header_text_devices_found);\n else\n tvHeader.setText(R.string.tv_bt_devices_header_text_no_devices);\n\n Log.i(DEBUG.TAG, \"BTDevicesActivity - updateUI - finish\");\n }", "private void updateUi() {\n mBuyButton = (Button) findViewById(R.id.but_purchase);\n mMessageText = (TextView)findViewById(R.id.txt_purchase);\n }", "public void update()\n {\n for (Container container : containers)\n container.update(false);\n\n Gui.update(BanksGUI.class);\n Gui.update(BankGUI.class);\n Gui.update(ItemsGroupsGUI.class);\n }", "@Override\n\tpublic void handleUpdateUI(String text, int code) {\n\t\t\n\t}", "public abstract void updateFragmentUI();", "public void updateUI() {\n List<Animal> animals;\n\n String searchQuery = LexiconPreferences.getSearchQuery(getActivity());\n\n // Check if there's a search query present\n if (searchQuery != null) {\n ArrayList<String> whereArgs = new ArrayList<>();\n whereArgs.add(LexiconPreferences.getFilterValue(getActivity()));\n\n animals = mAnimalManager.searchAnimals(\n mAnimalManager.createWhereClauseFromFilter(LexiconPreferences.getFilterKey(getActivity())),\n whereArgs,\n searchQuery\n );\n } else {\n animals = mAnimalManager.getAnimals(\n mAnimalManager.createWhereClauseFromFilter(LexiconPreferences.getFilterKey(getActivity())),\n new String[]{LexiconPreferences.getFilterValue(getActivity())}\n );\n }\n\n if (animals.size() > 0) {\n // If the fragment is already running, update the data in case something changed (some animal)\n if (mAnimalAdapter == null) {\n mAnimalAdapter = new AnimalAdapter(animals);\n mAnimalRecyclerView.setAdapter(mAnimalAdapter);\n } else {\n mAnimalAdapter.setAnimals(animals);\n mAnimalAdapter.notifyDataSetChanged();\n }\n } else {\n RelativeLayout emptyList = (RelativeLayout) mView.findViewById(R.id.list_empty);\n emptyList.setVisibility(View.VISIBLE);\n }\n }", "public void update() {\n\n\t\tdisplay();\n\t}", "private void updateUi(){\n competencia = (CompetitionMin) getArguments().getSerializable(\"competencia\");\n\n edtCiudad = vista.findViewById(R.id.edt_ciudad_edit_comp);\n\n spinGenero = vista.findViewById(R.id.spinner_genero_edit);\n spinEstado = vista.findViewById(R.id.spinner_estado_edit);\n\n generos = new ArrayList<>();\n estados = new ArrayList<>();\n\n btnUpdateCompetition = vista.findViewById(R.id.btn_update_edit_comp);\n }", "@Override\n public void setUpUI(Bundle savedInstanceState)\n {\n }", "private void setUpViews() {\n\n updateFooterCarInfo();\n updateFooterUsrInfo();\n\n\n setResultActionListener(new ResultActionListener() {\n @Override\n public void onResultAction(AppService.ActionType actionType) {\n if (ModelManager.getInstance().getGlobalInfo() != null) {\n GlobalInfo globalInfo = ModelManager.getInstance().getGlobalInfo();\n\n switch (actionType) {\n case CarInfo:\n updateFooterCarInfo();\n break;\n case UsrInfo:\n updateFooterUsrInfo();\n break;\n case Charger:\n updateChargeStationList();\n break;\n }\n }\n }\n });\n }", "@FXML\r\n private void onRefresh() {\n HomeLibrary.refreshBooks();\r\n HomeLibrary.refreshAuthors();\r\n HomeLibrary.refreshGenres();\r\n HomeLibrary.refreshPublishingHouses();\r\n HomeLibrary.refreshFriends();\r\n\r\n HomeLibrary.getLibraryOverviewController().refreshOverallInfo();\r\n HomeLibrary.getBookOverviewController().refreshBooks();\r\n HomeLibrary.getGenresOverviewController().refreshGenres();\r\n HomeLibrary.getPubHousesOverviewController().refreshPubHouses();\r\n HomeLibrary.getFriendsOverviewController().refreshFriends();\r\n }", "public void refresh() {\r\n\t\tneeds.setText(needs());\r\n\t\tproduction.setText(production());\r\n\t\tjobs.setText(jobs());\r\n\t\tmarketPrices.setText(marketPrices());\r\n\t\tmarketSellAmounts.setText(marketSellAmounts());\r\n\t\tmarketBuyAmounts.setText(marketBuyAmounts());\r\n\t\tcompanies.setText(companies());\r\n\t\tmoney.setText(money());\r\n\t\ttileProduction.setText(tileProduction());\r\n\t\tcapital.setText(capital());\r\n\t\thappiness.setText(happiness());\r\n\t\tland.setText(land());\r\n\t\t//ArrayList of Agents sorted from lowest to highest in money is retrieved from Tile\r\n\t\tagents=tile.getAgentsByMoney();\r\n\t\tgui3.refresh();\r\n\t\tsliderPerson.setText(\"\"+agents.get(slider.getValue()).getMoney());\r\n\t\ttick.setText(tick());\r\n\t\tthis.pack();\r\n\t}", "public UpdateDialogPage(UpdateState updateState) {\r\n\t\tsuper(new SWTUIPlatform(), \"Update Operation Definition\", \"Define update operations to perform\");\r\n\r\n\t\t// set manipulated data\r\n\t\t_updateState = updateState;\r\n\r\n\t\t// create all UI fields\r\n\t\t_requirementsField = createRequirementsField();\r\n\t\t_addItemToImportField = createAddItemToImportField();\r\n\t\t_addItemToUpdateField = createAddItemToUpdateField();\r\n\t\t_addItemToRevertField = createAddItemToRevertField();\r\n\t\t_updateAllItemsField = createUpdateAllItemsField();\r\n\t\t_clearOpsField = createClearOpsField();\r\n\t\t_computeImpactsField = createComputeImpactsField();\r\n\t\t_impactsField = createImpactsField();\r\n\t\t_errorsField = createErrorsField();\r\n\t\t_causesField = createCausesField();\r\n\t\t_consequencesField = createConsequencesField();\r\n\t\t\r\n\t\tDefaultMC_AttributesItem defaultMc = new DefaultMC_AttributesItem();\r\n\r\n\t\t/*\r\n\t\t * Requirements part\r\n\t\t */\r\n\t\t_requirementsField._field.setHSpan(1);\r\n\t\t\r\n\t\tDGridUI requirementsListGrid = _swtuiPlatforms.createDGridUI(_page, \"#requirementsListPart\", \"\", EPosLabel.none, defaultMc, null, \r\n\t\t\t\t_requirementsField, _computeImpactsField);\r\n\t\trequirementsListGrid._field.setFlag(Item.UI_NO_BORDER, true);\r\n\t\t\r\n\t\tDGridUI requirementsButtonsGrid = _swtuiPlatforms.createDGridUI(_page, \"#requirementsButtonPart\", \"\", EPosLabel.none, defaultMc, null, \r\n\t\t\t\t_addItemToImportField, _addItemToUpdateField, _addItemToRevertField, \r\n\t\t\t\t_updateAllItemsField, _clearOpsField);\r\n\t\trequirementsButtonsGrid._field.setFlag(Item.UI_NO_BORDER, true);\r\n\t\t\r\n\t\tDGridUI requirementsGrid = _swtuiPlatforms.createDGridUI(_page, \"#requirementsPart\", \"\", EPosLabel.none, defaultMc, null, \r\n\t\t\t\trequirementsListGrid, requirementsButtonsGrid);\r\n\t\trequirementsGrid.setColumnNb(2);\r\n\t\t\r\n\t\t/*\r\n\t\t * Impacts part\r\n\t\t */\r\n\t\tDGridUI impactsGrid = _swtuiPlatforms.createDGridUI(_page, \"#impactsPart\", \"\", EPosLabel.none, defaultMc, null, \r\n\t\t\t\t_impactsField, _errorsField);\r\n\t\t\r\n\t\tDGridUI analysisGrid = _swtuiPlatforms.createDGridUI(_page, \"#analysisPart\", \"\", EPosLabel.none, defaultMc, null, \r\n\t\t\t\t_causesField, _consequencesField);\r\n\r\n\t\t_selectedImpactDependentFields.add(_causesField);\r\n\t\t_selectedImpactDependentFields.add(_consequencesField);\r\n\r\n\t\t_separateImpactsAndAnalysisSash = _swtuiPlatforms.createDSashFormUI(_page, \"#selectSash\", \"\", EPosLabel.none, defaultMc, null, \r\n\t\t\t\timpactsGrid, analysisGrid);\r\n\t\t_separateImpactsAndAnalysisSash.setWeight(50); // 50% , 50%\r\n\t\t\r\n\r\n\t\t_separateRequirementsAndImpactsSashField = _swtuiPlatforms.createDSashFormUI(_page, \"#separateRequirementsAndImpactsSash\", \"\", EPosLabel.none, defaultMc, null, \r\n\t\t\t\trequirementsGrid, _separateImpactsAndAnalysisSash);\r\n\t\t_separateRequirementsAndImpactsSashField.setHorizontal(false);\r\n\t\t// 40%\r\n\t\t// 60%\r\n\t\t_separateRequirementsAndImpactsSashField.setWeight(40);\r\n\r\n\t\t// add main field\r\n\t\taddLast(_separateRequirementsAndImpactsSashField);\r\n\r\n\t\t// add listeners\r\n\t\tregisterListener();\r\n\t\t\r\n\t\t\r\n\t}", "public void updateUI(){\n\t\t\n\t\ttimeTV.setText(\"\"+String.format(\"\" + gameClock%10));\n\t\ttimeTV2.setText(\"\"+ gameClock/10+\".\");\n\t\tif (currentGameEngine!=null) {\n\t\t\tmultLeft.setText(\"multiplier: \"+currentGameEngine.getMultiplier()+\"X\");\n\t\t\tscoreTV.setText(\"\"+currentGameEngine.getScore());\n\t\t} else {\n\t\t\tscoreTV.setText(\"0\");\n\t\t}\n\n\t\t//errorTV.setText(\"\"+mFrameNum);\n\t\t\n\t\t\n\t}", "public void updateChooser()\r\n\t{\r\n\t\t/*\twhat shall we do here ? */\r\n\t}", "private void refreshUI(boolean updateAll) {\n if (updateAll) {\n refreshAutoTab();\n refreshManualTab();\n } else {\n if (TAB_AUTO == mTabIndex) {\n refreshAutoTab();\n } else if (TAB_MANUAL == mTabIndex) {\n refreshManualTab();\n } else {\n myAssert(false, \"No such tab!\");\n }\n }\n }", "private void refresh() {\n updatePopulationInfo();\n\n // Update current production info\n updateProductionInfo();\n\n // Update the building grid\n updateBuildingInfo();\n\n // Update the warehouse display\n updateWarehouse();\n\n // Update the list of ships/carriers in port\n updateInPortInfo();\n\n // Update the list of cargo on the selected carrier\n updateCargoInfo();\n }", "public Update_info() {\n initComponents();\n display_data();\n }", "public ruser() {\n initComponents();\n update();\n }", "protected void updateUI() {\n this.runOnUiThread(new Runnable() {\n\n @Override\n public void run() {\n // TODO Auto-generated method stub\n xWakeupUncalibratedGyro.setText(\"Wakeup Uncalibrated Gyro X:\\n\"\n + mWakeupUncalibratedGyroData[0]);\n yWakeupUncalibratedGyro.setText(\"Wakeup Uncalibrated Gyro Y:\\n\"\n + mWakeupUncalibratedGyroData[1]);\n zWakeupUncalibratedGyro.setText(\"Wakeup Uncalibrated Gyro Z:\\n\"\n + mWakeupUncalibratedGyroData[2]);\n }\n });\n }", "private void setupUI() \n\t{\n\t\t\n\t\tthis.setLayout( new FormLayout() );\n\t\tmyInterfaceContainer = new Composite( this, SWT.NONE );\n\t\tmyInterfaceContainer.setLayoutData( FormDataMaker.makeFullFormData());\n\t\t\n\t\tsetupInterfaceContainer();\n\t}", "private void updateUI() {\n\t\t\tfinal TextView MessageVitesse = (TextView) findViewById(R.id.TextView01);\r\n\t\t\tfinal ProgressBar Progress = (ProgressBar) findViewById (R.id.ProgressBar01);\r\n\t\t\tfinal TextView MessageStatus = (TextView)findViewById (R.id.TextView02);\r\n\t\t\t\t\t\r\n\t\t\t//on affecte des valeurs aux composant\r\n\t\t\tMessageVitesse.setText(\"Vitesse Actuelle : \"+ Vitesse + \" Ko/s\");\r\n\t\t\tProgress.setProgress(Pourcent);\r\n\t\t\tMessageStatus.setText (Status);\r\n\t\t\tif (Status.equals(\"Télèchargement terminé!!!\")&&NotifDejaLancée==false){\r\n\t\t\t\tlanceNotification();\r\n\t\t\t\tNotifDejaLancée=true;\r\n\t\t\t}\r\n\t\t\t}", "@Override\n\t\t\tpublic void stateChanged() {\n\t\t\t\tupdateUi();\n\t\t\t\tmakeUserContentPanel(panel);\n\t\t\t}", "private void updateGUIStatus() {\r\n\r\n }", "private void initUI() {\n fileCount = wizard.getFileCount();\n fileByteCount = wizard.getByteCount();\n fileCountLabel.setText(String.valueOf(fileCount));\n updateByteCount(byteCountLabel, byteCountUnit, \"KB\", fileByteCount, 0);\n progressBar.setProgress(0);\n }", "@Override\r\n\t\tpublic void updateUI() {\n\t\t\tif(deparments != null){\r\n\r\n\t\t\t\ttv.setText(deparments.toString());\r\n\t\t\t}else{\r\n\t\t\t\tSystem.out.println(\"deparments \"+deparments.toString());\r\n\t\t\t}\r\n\t\t}", "@Override\n public void update() {\n if ((mLikesDialog != null) && (mLikesDialog.isVisible())) {\n return;\n }\n\n if ((mCommentariesDialog != null) && (mCommentariesDialog.isVisible())) {\n return;\n }\n\n if (!getUserVisibleHint()) {\n return;\n }\n\n updateUI();\n }", "public void update() {\n menu = new PopupMenu();\n\n final MenuItem add = new MenuItem(Messages.JOINCHANNEL);\n\n final MenuItem part = new MenuItem(Messages.PARTCHANNEL);\n\n final MenuItem reload = new MenuItem(Messages.RELOAD);\n\n final Menu language = new Menu(Messages.LANGUAGE);\n\n final MenuItem eng = new MenuItem(Messages.ENGLISH);\n\n final MenuItem fr = new MenuItem(Messages.FRENCH);\n\n final MenuItem sp = new MenuItem(Messages.SPANISH);\n\n final MenuItem debug = new MenuItem(Messages.DEBUG);\n\n final MenuItem about = new MenuItem(Messages.ABOUT);\n\n final MenuItem exit = new MenuItem(Messages.EXIT);\n exit.addActionListener(e -> Application.getInstance().disable());\n about.addActionListener(e -> JOptionPane.showMessageDialog(null,\n Messages.ABOUT_MESSAGE));\n add.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(final ActionEvent e) {\n if (Application.getInstance().getChrome().getToolbar()\n .getButtonCount() < 10) {\n Application.getInstance().getChrome().getToolbar().parent\n .actionPerformed(new ActionEvent(this, e.getID(),\n \"add\"));\n } else {\n JOptionPane.showMessageDialog(null,\n \"You have reached the maximum amount of channels!\");\n }\n }\n });\n part.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(final ActionEvent e) {\n Application.getInstance().getChrome().getToolbar().parent\n .actionPerformed(new ActionEvent(this,\n ActionEvent.ACTION_PERFORMED, \"remove\"\n + \".\"\n + Application.getInstance().getChrome()\n .getToolbar().getCurrentTab()));\n }\n });\n debug.addActionListener(e -> {\n if (!LoadScreen.getDebugger().isVisible()) {\n LoadScreen.getDebugger().setVisible(true);\n } else {\n LoadScreen.getDebugger().setVisible(true);\n }\n });\n\n eng.addActionListener(arg0 -> {\n Messages.setLanguage(Language.ENGLISH);\n Application.getInstance().getTray().update();\n });\n\n fr.addActionListener(arg0 -> {\n Messages.setLanguage(Language.FRENCH);\n Application.getInstance().getTray().update();\n });\n\n sp.addActionListener(arg0 -> {\n Messages.setLanguage(Language.SPANISH);\n Application.getInstance().getTray().update();\n });\n\n if (eng.getLabel().equalsIgnoreCase(Messages.CURR)) {\n eng.setEnabled(false);\n }\n\n if (fr.getLabel().equalsIgnoreCase(Messages.CURR)) {\n fr.setEnabled(false);\n }\n\n if (sp.getLabel().equalsIgnoreCase(Messages.CURR)) {\n sp.setEnabled(false);\n }\n\n if (Application.getInstance().getChrome().getToolbar().getCurrentTab() == -1) {\n part.setEnabled(false);\n }\n if (!Application.getInstance().getChrome().getToolbar().isAddVisible()) {\n add.setEnabled(false);\n }\n\n language.add(eng);\n language.add(fr);\n language.add(sp);\n\n menu.add(add);\n menu.add(part);\n menu.add(reload);\n menu.addSeparator();\n menu.add(language);\n menu.addSeparator();\n menu.add(debug);\n menu.add(about);\n menu.addSeparator();\n menu.add(exit);\n Tray.sysTray.setPopupMenu(menu);\n }", "public void buildGui() {\n\t}", "private void UpdateContentUI() {\n Log.d(TAG, \"UpdateContentUI called\");\n //TODO: choose only the alarms for current user\n SharedPreferences sp = sApplicationContext.getSharedPreferences(PREF_NAME, MODE_PRIVATE);\n String currentUserUUIDString = sp.getString(PREF_CURRENT_USER_UUID, null);\n List<Alarm> alarms = myLab.getAlarms();\n if(mAlarmAdapter == null){\n mAlarmAdapter = new AlarmAdapter(alarms);\n mAlarmRecyclerView.setAdapter(mAlarmAdapter);\n }else {\n mAlarmAdapter.setAlarms(alarms);\n mAlarmAdapter.notifyDataSetChanged();\n }\n\n mEmptyElementTextView.setVisibility(alarms.size() < 1 ? View.VISIBLE : View.GONE);\n }", "@Override\n\tpublic void updateUser(UserInfo ui) {\n\n\t}", "private void updateUI() {\n /* Making an array of strings to store tasks entered by the user. */\n ArrayList<String> taskList = new ArrayList<>();\n SQLiteDatabase db = OpenDB.getReadableDatabase();\n Cursor cursor = db.query(AccessData.ToDoEntry.table,\n new String[]{AccessData.ToDoEntry._ID, AccessData.ToDoEntry.todo_title},\n null, null, null, null, null);\n while (cursor.moveToNext()) {\n int idx = cursor.getColumnIndex(AccessData.ToDoEntry.todo_title);\n taskList.add(cursor.getString(idx));\n }\n\n /* Check if array adapter is created. */\n if (listAdapter == null) {\n /* If adapter is not created i.e. NULL, create a new adapter */\n listAdapter = new ArrayAdapter<>(this,\n R.layout.todo_item,\n R.id.task_title,\n taskList);\n /* Set the above created adapter as the todoListView adapter */\n todoListView.setAdapter(listAdapter);\n } else {\n /* If created: it is assigned to the todoListView */\n listAdapter.clear(); // clear it\n listAdapter.addAll(taskList); // re-populate it\n listAdapter.notifyDataSetChanged(); // notify view to refresh with new data values\n }\n\n cursor.close();\n db.close();\n }", "@Override\r\n\tpublic void setModel() {\n\t\tnew UpUI(context).execute();\r\n\t}", "private void initUI() {\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\trenderer = new LWJGLRenderer();\n\t\t\tgui = new GUI(stateWidget, renderer);\n\t\t\tthemeManager = ThemeManager.createThemeManager(StateWidget.class.getResource(\"gameui.xml\"), renderer);\n\t\t\tgui.applyTheme(themeManager);\n\t\t\t\n\t\t} catch (LWJGLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}" ]
[ "0.7832233", "0.77557063", "0.74558896", "0.74558896", "0.74558896", "0.73002666", "0.73002666", "0.7138129", "0.71119213", "0.7109139", "0.70989436", "0.7080664", "0.7065511", "0.7052993", "0.70141196", "0.6985848", "0.69574875", "0.688982", "0.6869898", "0.686159", "0.6851928", "0.6840413", "0.6701688", "0.6698191", "0.6648901", "0.6648033", "0.66371465", "0.6628836", "0.6607", "0.6542654", "0.65302783", "0.65286237", "0.6526972", "0.64979887", "0.648168", "0.6447829", "0.6444225", "0.6429959", "0.6418919", "0.6407996", "0.6393744", "0.6393299", "0.639036", "0.6380424", "0.637734", "0.6326814", "0.6289308", "0.6288466", "0.6285181", "0.6283504", "0.62630296", "0.62569773", "0.6253244", "0.6238791", "0.6221235", "0.6216317", "0.6186573", "0.61766535", "0.6164044", "0.6152618", "0.61521435", "0.6137784", "0.61327016", "0.6129816", "0.611386", "0.6107086", "0.61051697", "0.60932076", "0.6085113", "0.608409", "0.60738075", "0.6065339", "0.6065169", "0.60469466", "0.6043451", "0.60396516", "0.6017503", "0.60081583", "0.6004905", "0.5990482", "0.59812784", "0.59793496", "0.59774166", "0.5976814", "0.59763485", "0.5973173", "0.5969806", "0.59647447", "0.5964187", "0.59635305", "0.5961927", "0.59611845", "0.596084", "0.59607357", "0.59600013", "0.595977", "0.59592986", "0.5958827", "0.595592", "0.59500295", "0.59486073" ]
0.0
-1
Setup the dropdown spinner that allows the user to select the suppler of the book.
private void setupSpinner() { // Create adapter for spinner. The list options are from the String array it will use // the spinner will use the default layout ArrayAdapter supplierSpinnerAdapter = ArrayAdapter.createFromResource(this, R.array.array_supplier_options, android.R.layout.simple_spinner_item); // Specify dropdown layout style - simple list view with 1 item per line supplierSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line); // Apply the adapter to the spinner mSupplierSpinner.setAdapter(supplierSpinnerAdapter); // Set the integer mSelected to the constant values mSupplierSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { String selection = (String) parent.getItemAtPosition(position); if (!TextUtils.isEmpty(selection)) { if (selection.equals(getString(R.string.supplier_one))) { mSupplier = BookEntry.SUPPLIER_ONE; } else if (selection.equals(getString(R.string.supplier_two))) { mSupplier = BookEntry.SUPPLIER_TWO; } else { mSupplier = BookEntry.SUPPLIER_UNKNOWN; } } } // Because AdapterView is an abstract class, onNothingSelected must be defined @Override public void onNothingSelected(AdapterView<?> parent) { mSupplier = BookEntry.SUPPLIER_UNKNOWN; } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void loadSupplierSpinner() {\n //Retrieve Suppliers list from database\n ArrayList<String> suppliers = getAllSuppliers();\n //Create Adapter for Spinner\n spinnerAdapter= new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, suppliers);\n // Specify dropdown layout style - simple list view with 1 item per line\n spinnerAdapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\n // attaching data adapter to spinner\n mSpinner.setAdapter(spinnerAdapter);\n mSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener(){\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String supplier = parent.getItemAtPosition(position).toString();\n // Showing selected spinner item\n //Toast.makeText(parent.getContext(), \"You selected: \" + supplier, Toast.LENGTH_LONG).show();\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n //Nothing for now\n }\n });\n }", "private void setupSchoolSpinner(){\n //region Used to set up the school spinner\n\n schools = new ArrayList<>(SchoolManager.getListOfAllSchools());\n\n ArrayAdapter<School> schoolAdapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_item, schools);\n schoolAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n schoolSpinner.setAdapter(schoolAdapter);\n schoolSpinner.setOnItemSelectedListener(this);\n\n //endregion End code for school spinner\n }", "private void populateUI(BookEntry book) {\n // Return if the task is null\n if (book == null) {\n return;\n }\n // Use the variable book to populate the UI\n mNameEditText.setText(book.getBook_name());\n mQuantityTextView.setText(Integer.toString(book.getQuantity()));\n mPriceEditText.setText(Double.toString(book.getPrice()));\n mPhoneEditText.setText(Integer.toString(book.getSupplier_phone_number()));\n mSupplier = book.getSupplier_name();\n switch (mSupplier) {\n case BookEntry.SUPPLIER_ONE:\n mSupplierSpinner.setSelection(1);\n break;\n case BookEntry.SUPPLIER_TWO:\n mSupplierSpinner.setSelection(2);\n break;\n default:\n mSupplierSpinner.setSelection(0);\n break;\n }\n mSupplierSpinner.setSelection(mSupplier);\n }", "private void setupSpinner() {\n // Create adapter for spinner. The list options are from the String array it will use\n // the spinner will use the default layout\n ArrayAdapter fruitSpinnerAdapter = ArrayAdapter.createFromResource(this,\n R.array.array_fruit_options, android.R.layout.simple_spinner_item);\n\n // Specify dropdown layout style - simple list view with 1 item per line\n fruitSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\n\n // Apply the adapter to the spinner\n mTypeSpinner.setAdapter(fruitSpinnerAdapter);\n\n // Set the integer mSelected to the constant values\n mTypeSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String selection = (String) parent.getItemAtPosition(position);\n if (!TextUtils.isEmpty(selection)) {\n if (selection.equals(getString(R.string.apple))) {\n mFruit = FruitEntry.TYPE_APPLE;\n } else if (selection.equals(getString(R.string.banana))) {\n mFruit = FruitEntry.TYPE_BANANA;\n } else if (selection.equals(getString(R.string.peach))) {\n mFruit = FruitEntry.TYPE_PEACH;\n } else if (selection.equals(getString(R.string.pineapple))) {\n mFruit = FruitEntry.TYPE_PINEAPPLE;\n } else if (selection.equals(getString(R.string.strawberry))) {\n mFruit = FruitEntry.TYPE_STRAWBERRY;\n } else if (selection.equals(getString(R.string.watermelon))) {\n mFruit = FruitEntry.TYPE_WATERMELON;\n } else {\n mFruit = FruitEntry.TYPE_NOTSELECTED;\n }\n }\n }\n\n // Because AdapterView is an abstract class, onNothingSelected must be defined\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n mFruit = FruitEntry.TYPE_NOTSELECTED;\n }\n });\n }", "private void setUpSpinner(){\n ArrayAdapter paymentSpinnerAdapter =ArrayAdapter.createFromResource(this,R.array.array_gender_option,android.R.layout.simple_spinner_item);\n\n // Specify dropdown layout style - simple list view with 1 item per line, then apply adapter to the spinner\n paymentSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\n mPaymentSpinner.setAdapter(paymentSpinnerAdapter);\n\n // To set the spinner to the selected payment method by the user when clicked from cursor adapter.\n if (payMode != null) {\n if (payMode.equalsIgnoreCase(\"COD\")) {\n mPaymentSpinner.setSelection(0);\n } else {\n mPaymentSpinner.setSelection(1);\n }\n mPaymentSpinner.setOnTouchListener(mTouchListener);\n }\n\n mPaymentSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String selectedPayment = (String)parent.getItemAtPosition(position);\n if(!selectedPayment.isEmpty()){\n if(selectedPayment.equals(getString(R.string.payment_cod))){\n mPaymentMode = clientContract.ClientInfo.PAYMENT_COD; // COD = 1\n }else{\n\n mPaymentMode = clientContract.ClientInfo.PAYMENT_ONLINE; // ONLINE = 0\n }\n }\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n\n }\n });\n\n }", "public void bindSpinner() {\n // Create an ArrayAdapter using the string array and a spinner layout\n ArrayAdapter<CharSequence> adapter;\n adapter = ArrayAdapter.createFromResource(getActivity(), R.array.kind_of_reaction, R.layout.item_spinner_healthbook);\n // Specify the layout to use when the list of choices appears\n adapter.setDropDownViewResource(R.layout.item_spinner_healthbook_dropdown);\n // Apply the adapter to the spinner\n kindOfReactionSpinner.setAdapter(adapter);\n }", "@Then(\"^I choose the park on combobox$\")\n public void i_choose_the_park_on_combobox() {\n onViewWithId(R.id.spinnerParks).click();\n onViewWithText(\"Parque D\").isDisplayed();\n onViewWithText(\"Parque D\").click();\n }", "private void setupSpinner() {\n // Create adapter for spinner. The list options are from the String array it will use\n // the spinner will use the default layout\n ArrayAdapter genderSpinnerAdapter = ArrayAdapter.createFromResource(this,\n R.array.array_gender_options, android.R.layout.simple_spinner_item);\n\n // Specify dropdown layout style - simple list view with 1 item per line\n genderSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\n\n // Apply the adapter to the spinner\n mGenderSpinner.setAdapter(genderSpinnerAdapter);\n\n // Set the integer mSelected to the constant values\n mGenderSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String selection = (String) parent.getItemAtPosition(position);\n if (!TextUtils.isEmpty(selection)) {\n if (selection.equals(getString(R.string.gender_male))) {\n mGender = PetContract.PetEntry.GENDER_MALE;\n } else if (selection.equals(getString(R.string.gender_female))) {\n mGender = PetContract.PetEntry.GENDER_FEMALE;\n } else {\n mGender = PetContract.PetEntry.GENDER_UNKNOWN;\n }\n }\n }\n\n // Because AdapterView is an abstract class, onNothingSelected must be defined\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n mGender = PetContract.PetEntry.GENDER_UNKNOWN;\n }\n });\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n spinnerDescuento.setEditable(false);\n spinnerDescuento.setFocusTraversable(false);\n SpinnerValueFactory<Integer> valueFactory\n = new SpinnerValueFactory.IntegerSpinnerValueFactory(5, 100,5 , 5);\n spinnerDescuento.setValueFactory(valueFactory);\n List<String> tipoPromociones = new ArrayList();\n tipoPromociones.add(\"Mensualidad\");\n tipoPromociones.add(\"Inscripción\");\n ObservableList<String> items = FXCollections.observableArrayList();\n items.addAll(tipoPromociones);\n cmbTipoPromocion.setItems(items);\n crearValidadorres();\n }", "public void spn_adaptor(){\n final String[] sem = getResources().getStringArray(R.array.Semester);\n\n //Creating an instance of ArrayAdaptor\n ArrayAdapter<String> adapter = new ArrayAdapter<>(\n this, android.R.layout.simple_spinner_item, sem);\n\n //Setting the view which will be used in the spinner\n adapter.setDropDownViewResource(\n simple_spinner_dropdown_item\n );\n\n //Assigning the adaptor1 to the spinner\n spn_semester.setAdapter(adapter);\n }", "private void setupLocationSpinner() {\n selectLocation = findViewById(R.id.spinnerLocation);\n ArrayAdapter<String> adapter =\n new ArrayAdapter(this, android.R.layout.simple_spinner_item, locations);\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n selectLocation.setAdapter(adapter);\n selectLocation.setOnItemSelectedListener(\n new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(\n AdapterView<?> adapterView, View view, int position, long id) {\n if (position >= 0 && position < options.length) {\n locationSelection = position;\n View recyclerView = findViewById(R.id.donations_list);\n assert recyclerView != null;\n setupRecyclerView((RecyclerView) recyclerView);\n } else {\n Toast.makeText(\n DonationsListActivity.this,\n \"Selected Category DNE\",\n Toast.LENGTH_SHORT)\n .show();\n }\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {}\n });\n }", "public void setupPrioritySpinner() {\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(getActivity(),\n R.array.prirority_level_list, android.R.layout.simple_spinner_item);\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n mPriority.setAdapter(adapter);\n mPriority.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n removeFocusFromEditText();\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n }\n });\n }", "public void populateSpinner() {\r\n ArrayList<String> ary = new ArrayList<>();\r\n\r\n ary.add(\"Male\");\r\n ary.add(\"Female\");\r\n\r\n ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, R.layout.support_simple_spinner_dropdown_item, ary);\r\n\r\n adapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);\r\n Gender.setAdapter(adapter);\r\n }", "private void SpinnerInitialize() {\n try{\n Spinner dropdownto = findViewById(R.id.tonumbercountrycode);\n\n//create an adapter to describe how the items are displayed, adapters are used in several places in android.\n//There are multiple variations of this, but this is the basic variant.\n ArrayAdapter<String> adapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_dropdown_item, countrycodes);\n//set the spinners adapter to the previously created one.\n\n dropdownto.setAdapter(adapter);\n dropdownto.setSelection(0,true);\n\n Spinner dropdownfrom = findViewById(R.id.fromnumbercountrycode);\n\n//create an adapter to describe how the items are displayed, adapters are used in several places in android.\n//There are multiple variations of this, but this is the basic variant.\n // ArrayAdapter<String> adapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_dropdown_item, countrycodes);\n//set the spinners adapter to the previously created one.\n\n dropdownfrom.setAdapter(adapter);\n dropdownfrom.setSelection(0,true);\n }\n catch (Exception ex){\n Toast.makeText(InsertDb.this, ex.getMessage().toString(), Toast.LENGTH_SHORT).show();\n\n }\n\n\n }", "private void initializeDessertSpinner() {\n // Extracting and storing dessert names and prices\n alDessertNames = extractColumn(\"Dessert\", 1);\n alDessertPrices = extractColumn(\"Dessert\", 2);\n spDessert.setAdapter(getAdapter(alDessertNames));\n\n // Display price of selected dessert item\n spDessert.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n dessertPrice = (i > 0) ? Double.parseDouble(alDessertPrices.get(i)) : Double.parseDouble(\"0.00\");\n edtTxtDessertPrice.setText(String.format(\"$%.2f\", dessertPrice));\n\n updateSubtotal();\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> adapterView) {\n edtTxtDessertPrice.setText(\"0.00\");\n }\n });\n }", "@Override\n public void onNothingSelected(AdapterView<?> parent) {\n mSupplier = BookEntry.SUPPLIER_UNKNOWN;\n }", "private void populatePhone() {\n dataBaseHelper = new DataBaseHelper(this);\n List<String> lables = dataBaseHelper.getPN();\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this,\n android.R.layout.simple_spinner_item, lables);\n dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n phoneNum.setAdapter(dataAdapter);\n\n }", "void setupSpinner() {\n\n Spinner spinner = (Spinner) findViewById(R.id.language_spinner);\n\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this, R.array.language_array, android.R.layout.simple_spinner_item);\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spinner.setAdapter(adapter);\n\n }", "private void setUpSpinner() {\n // Create adapter for student sex spinner\n ArrayAdapter sexSpinnerAdapter = ArrayAdapter.createFromResource(this,\n R.array.array_gender_options, R.layout.sex_spinner_item);\n\n // Specify dropdown layout style\n sexSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n // Apply adapter to spinner\n mStudentSexSpinner.setAdapter(sexSpinnerAdapter);\n\n // Set an onitemseledctedlistener onto the spinner\n mStudentSexSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String selection = (String) parent.getItemAtPosition(position);\n switch (selection) {\n case SEX_MALE:\n mStudentSex = SEX_MALE_INT;\n break;\n case SEX_FEMALE:\n mStudentSex = SEX_FEMALE_INT;\n break;\n default:\n throw new IllegalArgumentException(\"Invalid Student Sex\");\n }\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n // Male is already set as default\n }\n });\n }", "public void setupSpinner()\n {\n if (spinnerAdapter == null)\n {\n spinnerAdapter = new StringSpinnerAdapter(spinner, R.array.graph_period_spinner_values);\n }\n\n spinner.setOnItemSelectedListener(this);\n spinner.setAdapter(spinnerAdapter);\n }", "private void populateFullname() {\n dataBaseHelper = new DataBaseHelper(this);\n List<String> lables = dataBaseHelper.getFN();\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this,\n android.R.layout.simple_spinner_item, lables);\n dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n fullname.setAdapter(dataAdapter);\n\n }", "private void setupSpinner() {\n ArrayAdapter genderSpinnerAdapter = ArrayAdapter.createFromResource(this,\n R.array.array_gender_options, android.R.layout.simple_spinner_item);\n\n // Specify dropdown layout style - simple list view with 1 item per line\n genderSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\n\n // Apply the adapter to the spinner\n mGenderSpinner.setAdapter(genderSpinnerAdapter);\n\n // Set the integer mSelected to the constant values\n mGenderSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String selection = (String) parent.getItemAtPosition(position);\n if (!TextUtils.isEmpty(selection)) {\n if (selection.equals(getString(R.string.gender_male))) {\n mGender = 1; // Male\n } else if (selection.equals(getString(R.string.gender_female))) {\n mGender = 2; // Female\n } else {\n mGender = 0; // Unknown\n }\n }\n }\n\n // Because AdapterView is an abstract class, onNothingSelected must be defined\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n mGender = 0; // Unknown\n }\n });\n }", "private void spinnerAction() {\n Spinner spinnerphonetype = (Spinner) findViewById(R.id.activity_one_phonetype_spinner);//phonetype spinner declaration\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,\n R.array.phone_spinner, android.R.layout.simple_spinner_item); //create the spinner array\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); //set the drop down function\n spinnerphonetype.setAdapter(adapter); //set the spinner array\n }", "private void initializeDrinkSpinner() {\n // Extracting and storing drink names and prices\n alDrinkNames = extractColumn(\"Drink\", 1);\n alDrinkPrices = extractColumn(\"Drink\", 2);\n spDrink.setAdapter(getAdapter(alDrinkNames));\n\n // Display price of selected drink item\n spDrink.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n drinkPrice = (i > 0) ? Double.parseDouble(alDrinkPrices.get(i)) : Double.parseDouble(\"0.00\");\n edtTxtDrinkPrice.setText(String.format(\"$%.2f\", drinkPrice));\n\n updateSubtotal();\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> adapterView) {\n edtTxtDrinkPrice.setText(\"0.00\");\n }\n });\n }", "public void addVotersToSpinner() {\n\n\t\tvoterSpinner = (Spinner) findViewById(R.id.voterSpinner);\n\t\t\n\t\tvoterList = new ArrayList<String>();\n\t\tvoterList.add(\"Andy Adams\");\n\t\tvoterList.add(\"Billy Barnacle\");\n\t\tvoterList.add(\"Charlie Carbuncle\");\n\t\tArrayAdapter<String> voterAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item,voterList);\n\t\tvoterAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\t\tvoterSpinner.setAdapter(voterAdapter);\n\t}", "private String setupselectSpinner1(){\n String ret = \"unknown\";\n try{\n PartnerDB db = new PartnerDB((Context)this);\n SQLiteDatabase plcDB = db.openDB();\n Cursor cur = plcDB.rawQuery(\"select name from partner;\", new String[]{});\n ArrayList<String> al = new ArrayList<String>();\n while(cur.moveToNext()){\n try{\n al.add(cur.getString(0));\n }catch(Exception ex){\n android.util.Log.w(this.getClass().getSimpleName(),\"exception stepping thru cursor\"+ex.getMessage());\n }\n }\n partners = (String[]) al.toArray(new String[al.size()]);\n ret = (partners.length>0 ? partners[0] : \"unknown\");\n partnerAdapter = new ArrayAdapter<String>(this,android.R.layout.simple_spinner_dropdown_item, partners);\n selectSpinner1.setAdapter(partnerAdapter);\n selectSpinner1.setOnItemSelectedListener(this);\n }catch(Exception ex){\n android.util.Log.w(this.getClass().getSimpleName(),\"unable to setup partner spinner\");\n }\n return ret;\n }", "void loadSpinner(Spinner sp){\n List<String> spinnerArray = new ArrayList<>();\n spinnerArray.add(\"Oui\");\n spinnerArray.add(\"Non\");\n\n// (3) create an adapter from the list\n ArrayAdapter<String> adapter = new ArrayAdapter<String>(\n this,\n android.R.layout.simple_spinner_item,\n spinnerArray\n );\n\n//adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n// (4) set the adapter on the spinner\n sp.setAdapter(adapter);\n\n }", "private void setUpSpinner(){\n //instantiates a new CategoryAdapter with the categories from the database\n CategorySpinnerAdapter mCategorySpinnerAdapter = new CategorySpinnerAdapter(this, mCategories);\n mCategorySpinner.setAdapter(mCategorySpinnerAdapter);\n //callback for when an item is selected\n mCategorySpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n\n }\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n\n }\n });\n }", "@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n // TODO\r\n ratingcombobox.getItems().addAll(\"1\",\"2\",\"3\",\"4\",\"5\");\r\n }", "private void init(){\n\t\t\n\t\tpurchasePrice = (EditText)findViewById(R.id.purchasePrice);\n\t\tpurchasePrice.setFilters(new InputFilter[] { new CurrencyFormatInputFilter()});\n\t\t\n\t\tdownPaymentSpinner = (Spinner)findViewById(R.id.inputTypeSpinner);\n\t\tArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,\n\t\t\t\tR.array.inputTypes, android.R.layout.simple_spinner_item);\n\t\tadapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\t\tdownPaymentSpinner.setAdapter(adapter);\n\t\t\n\t\tsellerSpinner = (Spinner)findViewById(R.id.inputTypeSpinnerSeller);\n\t\tArrayAdapter<CharSequence> adapter2 = ArrayAdapter.createFromResource(this,\n\t\t\t\tR.array.inputTypes, android.R.layout.simple_spinner_item);\n\t\tadapter2.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\t\tsellerSpinner.setAdapter(adapter2);\t\n\t}", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n gender.getItems().setAll(\"laki-laki\",\"perempuan\");\n status.getItems().setAll(\"admin\",\"user\");\n // bind the selected fruit label to the selected fruit in the combo box.\n //selectedFruit.textProperty().bind(fruitCombo.getSelectionModel().selectedItemProperty());\n\n\n }", "private void setSpinner(){\n for (String id : activity.getCollectedIDs()){\n if (activity.getCoinsCollection().containsKey(id)) {\n Coin tempCoin = activity.getCoinsCollection().get(id);\n assert tempCoin != null;\n if(!tempCoin.isBanked() && !tempCoin.isTransferred()) {\n spinnerItems.add(tempCoin);\n }\n }\n }\n\n //sort coins on gold value descending\n spinnerItems.sort((a, b) ->\n a.getValue() * activity.getExchangeRates().get(a.getCurrency())\n < b.getValue() * activity.getExchangeRates().get(b.getCurrency()) ? 1 : -1);\n\n ArrayAdapter<Coin> spinnerArrayAdapter = new ArrayAdapter<>(Objects.requireNonNull(getActivity()), R.layout.spinner_item, spinnerItems);\n spinnerArrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n spinner.setAdapter(spinnerArrayAdapter);\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n // TODO\n counselorDetailsBEAN = new CounselorDetailsBEAN();\n counselorDetailsBEAN = Context.getInstance().currentProfile().getCounselorDetailsBEAN();\n ENQUIRY_ID = counselorDetailsBEAN.getEnquiryID();\n // JOptionPane.showMessageDialog(null, ENQUIRY_ID);\n countryCombo();\n cmbCountry.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Object>() {\n \n\n @Override\n public void changed(ObservableValue<? extends Object> observable, Object oldValue, Object newValue) {\n //JOptionPane.showMessageDialog(null, cmbCountry.getSelectionModel().getSelectedItem().toString());\n String[] parts = cmbCountry.getSelectionModel().getSelectedItem().toString().split(\",\");\n String value = parts[0];\n locationcombo(value);\n }\n\n private void locationcombo(String value) {\n List<String> locations = SuggestedCourseDAO.getLocation(value);\n for (String s : locations) {\n location.add(s);\n }\n cmbLocation.setItems(location);\n }\n\n });\n cmbLocation.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Object>() {\n\n @Override\n public void changed(ObservableValue<? extends Object> observable, Object oldValue, Object newValue) {\n universityCombo(cmbLocation.getSelectionModel().getSelectedItem().toString());\n }\n\n private void universityCombo(String value) {\n List<String> universities = SuggestedCourseDAO.getUniversities(value);\n for (String s : universities) {\n university.add(s);\n }\n cmbUniversity.setItems(university);\n }\n \n });\n cmbUniversity.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Object>() {\n\n @Override\n public void changed(ObservableValue<? extends Object> observable, Object oldValue, Object newValue) {\n levetCombo(cmbUniversity.getSelectionModel().getSelectedItem().toString());\n }\n\n private void levetCombo(String value) {\n List<String> levels = SuggestedCourseDAO.getLevels(value);\n for (String s : levels) {\n level.add(s);\n }\n cmbLevel.setItems(level);\n }\n });\n\n }", "public void addItemsOnSpinner() {\n Data dataset = new Data(getApplicationContext());\n List<String> list = new ArrayList<String>();\n list = dataset.getClasses();\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, list);\n dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spinner.setAdapter(dataAdapter);\n }", "private void setupSpinner() {\n // Create adapter for spinner. The list options are from the String array it will use\n // the spinner will use the default layout\n ArrayAdapter colourSpinnerAdapter = ArrayAdapter.createFromResource(this,\n R.array.phone_colour_array, android.R.layout.simple_spinner_item);\n\n // Specify dropdown layout style - simple list view with 1 item per line\n colourSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\n\n // Apply the adapter to the spinner\n mColourSpinner.setAdapter(colourSpinnerAdapter);\n\n // Set the integer mSelected to the constant values\n mColourSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String selection = (String) parent.getItemAtPosition(position);\n if (!TextUtils.isEmpty(selection)) {\n if (selection.equals(getString(R.string.phone_colour_black))) {\n mColour = PhoneEntry.COLOUR_BLACK;\n } else if (selection.equals(getString(R.string.phone_colour_white))) {\n mColour = PhoneEntry.COLOUR_WHITE;\n } else if (selection.equals(getString(R.string.phone_colour_grey))){\n mColour = PhoneEntry.COLOUR_GREY;\n }\n else {\n mColour = PhoneEntry.COLOUR_UNKNOWN;\n }\n }\n }\n\n // Because AdapterView is an abstract class, onNothingSelected must be defined\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n mColour = PhoneEntry.COLOUR_UNKNOWN;\n }\n });\n\n }", "private void bookRadioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bookRadioActionPerformed\n itemList.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"Select a Book\", \"Texas Homeowners Association Law\", \"Harry Potter and the Sorcerer's Stone\", \"Eldest\" }));\n }", "private void spinner() {\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,\n R.array.planets_array, R.layout.simple_spinner_item_new);\n// Specify the layout to use when the list of choices appears\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n// Apply the adapter to the spinner\n// dropDownViewTheme.\n planetsSpinner.setAdapter(adapter);\n planetsSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n Object itemAtPosition = parent.getItemAtPosition(position);\n Log.d(TAG, \"onItemSelected: \" + itemAtPosition);\n\n String[] stringArray = getResources().getStringArray(R.array.planets_array);\n Toast.makeText(DialogListActivity.this, \"选择 \" + stringArray[position], Toast.LENGTH_SHORT).show();\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n Toast.makeText(DialogListActivity.this, \"未选择\", Toast.LENGTH_SHORT).show();\n }\n });\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n\n try {\n cmbBookPublisherIdAdd.getItems().setAll(ChoiceBoxes.PublisherIdChoice());\n cmbBookAuthorIdAdd.getItems().setAll(ChoiceBoxes.AuthorIdChoice());\n cmdBookGenreIdAdd.getItems().setAll(ChoiceBoxes.GenreIdChoice());\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }", "private void choiceBoxInitializer() {\n searchChoiceBox.getItems().addAll(\"Learning Applications\", \"Learning Categories\",\n \"Learning Units\");\n searchChoiceBox.setValue(\"Learning Applications\");\n }", "private void initControlUI() {\n typeAdapter = new SpinnerSimpleAdapter(self, android.R.layout.simple_spinner_item, self.getResources().getStringArray(R.array.arr_feedback_type));\n spnType.setAdapter(typeAdapter);\n }", "private void setupSpinners() {\n\n ArrayAdapter<String> statesAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, states);\n\n // Specify dropdown layout style - simple list view with 1 item per line\n statesAdapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\n // Apply the adapter to the spinner\n statesAdapter.notifyDataSetChanged();\n mStateSpinner.setAdapter(statesAdapter);\n\n // Set the integer mSelected to the constant values\n mStateSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n mState = (String) parent.getItemAtPosition(position);\n setUpStatesSpinner(position);\n }\n\n // Because AdapterView is an abstract class, onNothingSelected must be defined\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n // Unknown\n }\n });\n }", "@Override\r\n\tprotected void InitComboBox() {\n\t\t\r\n\t}", "private void setUpLgaSpinner(List<String> lgas) {\n\n ArrayAdapter lgaAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, lgas);\n lgaAdapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\n lgaAdapter.notifyDataSetChanged();\n mLgaSpinner.setAdapter(lgaAdapter);\n\n mLgaSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long l) {\n mLga = (String) parent.getItemAtPosition(position);\n// Toast.makeText(ProductsActivity.this, \"state: \" + mState + \" lga: \" + mLga, Toast.LENGTH_LONG).show();\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> adapterView) {\n }\n });\n }", "public void setupMealSelectionCombobox(ComboBox<Recipe> mealSelection){\n setupPlannerMealComboboxs(mealSelection);\n }", "private void setupCategorySpinner() {\n //Creating an Empty Category list\n List<String> categories = new ArrayList<>();\n\n //Creating Adapter for Spinner with a Spinner layout, passing in the empty list\n mCategorySpinnerAdapter = new ArrayAdapter<>(requireContext(),\n R.layout.item_product_config_category_spinner, categories);\n //Specifying the Drop down layout to use for choices\n mCategorySpinnerAdapter.setDropDownViewResource(R.layout.item_product_config_category_spinner_dropdown);\n\n //Attaching Adapter to Spinner\n mSpinnerProductCategory.setAdapter(mCategorySpinnerAdapter);\n\n //Setting the Item selected listener\n mSpinnerProductCategory.setOnItemSelectedListener(new CategorySpinnerClickListener());\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View spinnerView, int position,\n long spinnerId) {\n\n try {\n\n if (parent.getId() == R.id.aptNameSpinner) {\n\n if (SAConstants.OTHER.equals(apartmentNameSpinner.getItemAtPosition(position).toString())) {\n DialogFragment apartmentName = new NewApartmentDialog();\n apartmentName.show(getSupportFragmentManager(), \"\");\n }\n } else if (parent.getId() == R.id.aptTypeSpinnerSearch || parent.getId() == R.id.universityNamesSpinner) {\n addApartmentNames();\n }\n\n\n } catch (Exception e) {\n ErrorReporting.logReport(e);\n }\n\n }", "public static void selectYear(By spinner, By option) {\n\t\tnew WebDriverWait(LocalDriverManagerMobile.INSTANCE.getDriver(),15)\n\t\t\t\t.until(ExpectedConditions.elementToBeClickable(spinner)).click();\n\t\tnew WebDriverWait(LocalDriverManagerMobile.INSTANCE.getDriver(),15)\n\t\t\t\t.until(ExpectedConditions.visibilityOfElementLocated(option)).click();\n\t}", "private void addAccountsToSpinner(){\n ArrayAdapter<String> dataAdaptor = new ArrayAdapter<String>(this,\n android.R.layout.simple_spinner_item, customer.getAccountNameList());\n dataAdaptor.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n acctSpinner.setAdapter(dataAdaptor);\n }", "public BlackRockCityMapUI ()\n {\n initComponents ();\n cbYear.setSelectedItem (\"2023\");\n\n }", "public ManageSupplier() {\n initComponents();\n }", "protected void initManufacturersListBox(ManufacturerHolder mh) {\n manufacturersListBox.addItem(\"Please choose...\", \"-1\");\n int index = 1;\n for (ManufacturerHolder manuHolder : mywebapp.getManufacturerHolders()) {\n manufacturersListBox.addItem(manuHolder.getName(), manuHolder.getId().toString());\n if ((mh != null) && (mh.getId() != null)) {\n if (mh.getId().equals(manuHolder.getId())) {\n manufacturersListBox.setSelectedIndex(index);\n }\n }\n index++;\n }\n }", "private void setupFilterSpinner() {\n categories.add(\"All\");\n categories.add(\"Clothing\");\n categories.add(\"Hat\");\n categories.add(\"Kitchen\");\n categories.add(\"Electronics\");\n categories.add(\"Household\");\n categories.add(\"Other\");\n filter = findViewById(R.id.spinnerFilter);\n ArrayAdapter<String> adapter =\n new ArrayAdapter(this, android.R.layout.simple_spinner_item, categories);\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n filter.setAdapter(adapter);\n filter.setOnItemSelectedListener(\n new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(\n AdapterView<?> adapterView, View view, int position, long id) {\n if (position >= 0 && position < options.length) {\n position1 = position;\n View recyclerView = findViewById(R.id.donations_list);\n assert recyclerView != null;\n setupRecyclerView((RecyclerView) recyclerView);\n } else {\n Toast.makeText(\n DonationsListActivity.this,\n \"Selected Category DNE\",\n Toast.LENGTH_SHORT)\n .show();\n }\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {}\n });\n }", "public void initSpinner() {\n }", "private void initializeEntreeSpinner() {\n // Extracting and storing entree names and prices\n alEntreeNames = extractColumn(\"Entree\", 1);\n alEntreePrices = extractColumn(\"Entree\", 2);\n spEntree.setAdapter(getAdapter(alEntreeNames));\n\n // Display price of selected entree item\n spEntree.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n entreePrice = (i > 0) ? Double.parseDouble(alEntreePrices.get(i)) : Double.parseDouble(\"0.00\");\n edtTxtEntreePrice.setText(String.format(\"$%.2f\", entreePrice));\n\n updateSubtotal();\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> adapterView) {\n edtTxtEntreePrice.setText(\"0.00\");\n }\n });\n }", "public NderroPass() {\n initComponents();\n loadComboBox();\n }", "private void itemtypeSpinner() {\n ArrayAdapter<CharSequence> staticAdapter = ArrayAdapter\n .createFromResource(getContext(), R.array.select_array,\n android.R.layout.simple_spinner_item);\n\n // Specify the layout to use when the list of choices appears\n staticAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n // Apply the adapter to the spinner\n mItemTypeSpinnerA2.setAdapter(staticAdapter);\n\n mItemTypeSpinnerA2.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view,\n int position, long id) {\n String itemtypeText = (String) parent.getItemAtPosition(position);\n if (itemtypeText.equals(\"Mobile Phones\")) {\n\n mInputLayoutSerialNoA2.setVisibility(View.VISIBLE);\n mInputLayoutSerialNoA2.setClickable(true);\n mInputLayoutItemImeiA2.setVisibility(View.VISIBLE);\n mInputLayoutItemImeiA2.setClickable(true);\n\n\n } else if (itemtypeText.equals(\"Laptops\")) {\n\n mInputLayoutSerialNoA2.setVisibility(View.VISIBLE);\n mInputLayoutSerialNoA2.setClickable(true);\n mInputLayoutItemImeiA2.setVisibility(View.GONE);\n mInputLayoutItemImeiA2.setClickable(false);\n\n } else {\n mInputLayoutSerialNoA2.setVisibility(View.GONE);\n mInputLayoutSerialNoA2.setClickable(false);\n mInputLayoutItemImeiA2.setVisibility(View.GONE);\n mInputLayoutItemImeiA2.setClickable(false);\n }\n\n\n\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n mItemTypeSpinnerA2.getItemAtPosition(0);\n mInputLayoutSerialNoA2.setVisibility(View.GONE);\n mInputLayoutSerialNoA2.setClickable(false);\n mInputLayoutItemImeiA2.setVisibility(View.GONE);\n mInputLayoutItemImeiA2.setClickable(false);\n\n\n }\n });\n\n }", "public void populateYearSpinner() throws IOException, JSONException, URISyntaxException {\n new Thread(new Runnable() {\n @Override\n public void run() {\n ArrayList<String> yearList = null;\n try {\n yearList = carQuery.getYears();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n final ArrayList<String> finalYearList = yearList;\n yearSpinner.post(new Runnable() {\n @Override\n public void run() {\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(newCarActivity.this,\n android.R.layout.simple_spinner_item, finalYearList);\n dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n yearSpinner.setAdapter(dataAdapter);\n }\n });\n }\n }).start();\n }", "private void courseSpinnerSetup(){\r\n\t\tSpinner spinner = (Spinner) findViewById(R.id.CourseSpinner);\r\n \t\r\n \tArrayAdapter<String> adapter = new ArrayAdapter<String>(Statistics.this, android.R.layout.simple_spinner_item, courses);\r\n \tadapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\r\n \tspinner.setAdapter(adapter);\r\n \t\r\n \tspinner.setOnItemSelectedListener(new OnItemSelectedListener() {\r\n \t\tpublic void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {\r\n \t\t\t//\\todo allow for other players besides the default player (pos=0)\r\n calculateCourseStats(pos, 0);\r\n \t\t\t\r\n \t\t\tcourseSpinnerPosition = pos;\r\n \t\t}\r\n\r\n \t\tpublic void onNothingSelected(AdapterView<?> parent) {\r\n \t\t}\r\n \t}); \t\r\n\t}", "private void spinner() {\n spn_semester.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n id_database = position;\n if(spn_semester.getSelectedItemPosition() == 0){\n listadaptor1();\n }\n else if(spn_semester.getSelectedItemPosition() == 1){\n listadaptor2();\n }\n else{\n listadaptor3();\n }\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n //Nothing\n }\n });\n }", "private void init(){\n //Selected value in Spinner\n String selectedSubj= getActivity().getIntent().getStringExtra(\"subj\");\n String selectedPoten= getActivity().getIntent().getStringExtra(\"prob\");\n String selectedInst= getActivity().getIntent().getStringExtra(\"inst\");\n String selectedY= getActivity().getIntent().getStringExtra(\"peri\");\n\n if(selectedY.equals(\"2015~2017\")){\n String yList[]= {\"2015\", \"2016\", \"2017\"};\n selectedY= yList[new Random().nextInt(yList.length)];\n }\n\n String e_inst= QuestionUtil.create_eInst(selectedY, selectedInst);\n String k_inst= QuestionUtil.create_kInst(e_inst);\n String m= QuestionUtil.createPeriodM(selectedY, e_inst);\n\n QuestionNameBuilder.inst= new QuestionNameBuilder(selectedY, m, k_inst, selectedSubj, QuestionNameBuilder.UNDEFINED\n , QuestionNameBuilder.UNDEFINED, QuestionNameBuilder.TYPE_KOR);\n qnBuilder= QuestionNameBuilder.inst;\n\n //Potential Load\n loadPotentials(selectedPoten);\n }", "private void spinnerFunctions() {\n mTranportSectionAdapter = ArrayAdapter.createFromResource(getContext(), R.array.transport_titles, R.layout.drop_down_spinner_item);\n mTransportSectionSpinner.setAdapter(mTranportSectionAdapter);\n mFuelTypeAdapter = ArrayAdapter.createFromResource(getContext(), R.array.fuel_types, R.layout.drop_down_spinner_item);\n mFuelTypeSpinner.setAdapter(mFuelTypeAdapter);\n mBoxAdapter = ArrayAdapter.createFromResource(getContext(), R.array.box_types, R.layout.drop_down_spinner_item);\n mBoxSpinner.setAdapter(mBoxAdapter);\n }", "public SelectWidget(String name, View rootView) {\n super(name, rootView);\n label = rootView.findViewById(R.id.input_label);\n adapter = new ArrayAdapter<>(rootView.getContext(), R.layout.spinner_item);\n\n spinner = rootView.findViewById(R.id.input_spinner);\n spinner.setAdapter(adapter);\n spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int position, long id) {\n validate();\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parentView) {\n }\n });\n }", "@Override\n\t\t\t\t\t\tpublic void onItemSelected(AdapterView<?> parent,\n\t\t\t\t\t\t\t\tView view, int position, long id) {\n\t\t\t\t\t\t\tif(position!=0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tMyspinner sp = (Myspinner)mandilist.getSelectedItem();\n\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\tencryptedgeoid = new Webservicerequest().Encrypt(sp.getValue());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcatch(Exception e){\n\t\t\t\t\t\t\t\t\te.getMessage();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcategory3.addAll(get.getretailersList(encryptedgeoid));\t\n\t\t\t\t\t\t\t\tMyspinner[] redemo3 = new Myspinner[category3.size()];\n\t\t\t\t \t\t\t\tfor(int i=0; i<category3.size(); i++){\n\t\t\t\t \t\t\t\t\tredemo3[i] = new Myspinner(category3.get(i).get(\"2\"), category3.get(i).get(\"1\"), \"\");\n\t\t\t\t \t\t\t\t}\n\t\t\t\t \t\t\t\tArrayAdapter<Myspinner> adapter3 = new ArrayAdapter<Myspinner>(context, android.R.layout.simple_spinner_dropdown_item, redemo3);\n\t\t\t\t \t\t\t\tretailerslist.setAdapter(adapter3);\n\t\t\t\t\t\t\t\tArrayAdapter<String> adaptervillages = new ArrayAdapter<String>(context, android.R.layout.simple_spinner_dropdown_item, get.getVillageNames(encryptedgeoid));\n\t\t\t\t\t\t\t\tvillages.setAdapter(adaptervillages);\n\t\t\t\t\t\t\t\tvillages.setThreshold(3);\n\t\t\t\t\t\t\t\tvillages.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\t\t\t\t\t\t\t @Override\n\t\t\t\t\t\t\t\t\t public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t\t\t\t\t\t\t\t\t InputMethodManager in = (InputMethodManager)context.getSystemService(Context.INPUT_METHOD_SERVICE);\n\t\t\t\t\t\t\t\t\t in.hideSoftInputFromWindow(villages.getWindowToken(), 0);\n\n\t\t\t\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tvillages.setAdapter(null);\n\t\t\t\t\t\t\t\tArrayList<HashMap<String, String>> category3=new ArrayList<HashMap<String,String>>();\n\t\t\t\t\t\t\t\tHashMap<String, String> map3=new HashMap<String, String>();\n\t\t\t\t \t\t\t\tmap3.put(\"1\",\"\");\n\t\t\t\t \t\t\t\tmap3.put(\"2\",\"Select Retailer\");\n\t\t\t\t \t\t\t\tcategory3.add(map3);\n\t\t\t\t \t\t\t\tMyspinner[] redemo3 = new Myspinner[category3.size()];\n\t\t\t\t \t\t\t\tfor(int i=0; i<category3.size(); i++){\n\t\t\t\t \t\t\t\t\tredemo3[i] = new Myspinner(category3.get(i).get(\"2\"), category3.get(i).get(\"1\"), \"\");\n\t\t\t\t \t\t\t\t}\n\t\t\t\t \t\t\t\tArrayAdapter<Myspinner> adapter3 = new ArrayAdapter<Myspinner>(context, android.R.layout.simple_spinner_dropdown_item, redemo3);\n\t\t\t\t \t\t\t\tretailerslist.setAdapter(adapter3); \t\t\t\t \t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "private void initComboBoxes()\n\t{\n\t\tsampling_combobox.getItems().clear();\n\t\tsampling_combobox.getItems().add(\"Random\");\n\t\tsampling_combobox.getItems().add(\"Cartesian\");\n\t\tsampling_combobox.getItems().add(\"Latin Hypercube\");\n\n\t\t// Set default value.\n\t\tsampling_combobox.setValue(\"Random\");\n\t}", "protected void requestShowPicker() {\n if (widgetListener != null) widgetListener.onShowItemChooser(this);\n }", "public void addItemsOnSpinner() {\r\n\r\n\tspinner = (Spinner) findViewById(R.id.spinner);\r\n\tList<String> list = new ArrayList<String>();\r\n\tlist.add(\"Food\");\r\n\tlist.add(\"RentHouse\");\r\n\tlist.add(\"Closing\");\r\n\tlist.add(\"Party\");\r\n\tlist.add(\"Material\");\r\n\tArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this,android.R.layout.simple_spinner_item, list);\r\n\tdataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\r\n\tspinner.setAdapter(dataAdapter);\r\n }", "private void initGenderSpinner() {\n\t\tfinal Spinner spinner = (Spinner) findViewById(R.id.Spinner_Gender);\n\t\t\n\t\tArrayAdapter<?> adapter = ArrayAdapter.createFromResource(this, R.array.genders , android.R.layout.simple_spinner_item);\n\t\t\n\t\tadapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\t\tspinner.setAdapter(adapter);\n\t\t\n\t\t\n\t\tif (mGameSettings.contains(Constants.GAME_PREFERENCES_GENDER)) {\n\t\t\tgender = mGameSettings.getInt(Constants.GAME_PREFERENCES_GENDER,0);\n\t\t\tspinner.setSelection(gender);\n\t\t}\n\t\t\n\t\t\n\t\t// Handle spinner selections\n\t\tspinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n\t\t\t\n\t\t\tpublic void onItemSelected(AdapterView<?> parent, View itemSelected, int selectedItemPosition, long selectedId) {\n\t\t\t\tgender = selectedItemPosition;\n\t\t\t}\n\n\t\t\tpublic void onNothingSelected(AdapterView<?> parent) {}\n\t\t});\n\t}", "public void initializers() {\n\t\taccidentSpinner = (Spinner) findViewById(R.id.accidentSpinner);\n\t\tdesc = (EditText) findViewById(R.id.descriptionEt);\n\t\timView = (ImageView) findViewById(R.id.image1);\n\t\timView2 = (ImageView) findViewById(R.id.image2);\n\t\timView.setOnClickListener(this);\n\t\timView2.setOnClickListener(this);\n\t\tsubmit = (Button) findViewById(R.id.reportBtn);\n\t\tsubmit.setOnClickListener(this);\n\n\t\ttry {\n\t\t\tArrayAdapter<String> adapter_state = new ArrayAdapter<String>(this,\n\t\t\t\t\tandroid.R.layout.simple_spinner_item, accidentType);\n\t\t\tadapter_state\n\t\t\t\t\t.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\t\t\taccidentSpinner.setAdapter(adapter_state);\n\t\t} catch (Exception ex) {\n\t\t\tToast.makeText(this, \"Something happen\", Toast.LENGTH_SHORT).show();\n\t\t}\n\n\t}", "private void initSpinnerTypeExam()\n {\n Spinner spinner = findViewById(R.id.iTypeExam);\n\n // Adapt\n final ArrayAdapter<String> adapter = new ArrayAdapter<>(\n this,\n R.layout.support_simple_spinner_dropdown_item\n );\n spinner.setAdapter(adapter);\n\n // ajout des types d'examens\n for(TypeExamen t : TypeExamen.values())\n {\n adapter.add(t.toString());\n }\n }", "@Override\n public void initialize(URL url, ResourceBundle resourceBundle) {\n //add the possible postures\n postureSelect.getItems().addAll(\"Stand\", \"StandInit\", \"StandZero\", \"Crouch\", \"Sit\", \"SitRelax\", \"LyingBelly\", \"LyingBack\");\n\n //because the prompt text from a ComboBox is deleted after selected something,\n // and if you clear the selection the text also won't come back,\n // I copied a Listener from StackOverFlow\n postureSelect.setPromptText(\"Select a posture\");\n postureSelect.setButtonCell(new PromptButtonCell<>(\"Select a posture\"));\n }", "private void loadSpinnerProvincias() {\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(\n this, R.array.provincias, android.R.layout.simple_spinner_item);\n // Specify the layout to use when the list of choices appears\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n // Apply the adapter to the spinner\n spProvincias.setAdapter(adapter);\n\n // This activity implements the AdapterView.OnItemSelectedListener\n this.spProvincias.setOnItemSelectedListener(this);\n this.spLocalidades.setOnItemSelectedListener(this);\n\n }", "public GradesUI() {\n items = new ArrayList<>();\n initComponents();\n gradeItem.setModel(new javax.swing.DefaultComboBoxModel(new String[]{\"No Item Added Yet!\"}));\n }", "private void classes() {\n List<String> list = new ArrayList<>();\n list.add(\"Mont.\");\n list.add(\"Nur\");\n list.add(\"KG 1\");\n list.add(\"KG 2\");\n list.add(\"Class 1\");\n list.add(\"Class 2\");\n list.add(\"Class 3\");\n list.add(\"Class 4\");\n list.add(\"Class 5\");\n list.add(\"Class 6\");\n list.add(\"Class 7\");\n list.add(\"Class 8\");\n list.add(\"Class 9\");\n list.add(\"Class 10\");\n\n\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<>(this,\n android.R.layout.simple_spinner_item, list);\n dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n cls.setAdapter(dataAdapter);\n }", "private void loadSpinnerData() {\n\n // Spinner Drop down elements\n areas = dbHendler.getAllAreas();\n for (Area area : areas) {\n String singleitem = area.get_areaName();\n items.add(singleitem);\n }\n\n // Creating adapter for spinnerArea\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, items);\n\n // Drop down layout style - list view with radio button\n dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n // attaching data adapter to spinnerArea\n spinner.setAdapter(dataAdapter);\n }", "private void initGeneroSpinner(Spinner spinner, Genero genero) {\n GeneroDAO generoDAO = new GeneroDAO();\n\n List<Genero> generos = generoDAO.findAll();\n\n CustomSpinnerAdapter customSpinnerAdapter = new CustomSpinnerAdapter(this, generos);\n spinner.setAdapter(customSpinnerAdapter);\n\n spinner.setSelection(generos.indexOf(genero));\n\n spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n generoSelecionado = (Genero) parent.getItemAtPosition(position);\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n }\n });\n }", "public void initialize(URL url, ResourceBundle rb) {\r\n \r\n choiceBoxLabel.setText(\"\");\r\n //choiceBox.getItems().add(\"salut\");\r\n try {\r\n PreparedStatement pt = c.prepareStatement(\"select * from service\");\r\n ResultSet rs = pt.executeQuery();\r\n while (rs.next()) {\r\n comboBox_service.getItems().add(rs.getString(2));\r\n } } catch (SQLException ex) {\r\n Logger.getLogger(service.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n // choiceBox_service.setValue(choiceBox_service.getValue());\r\n \r\n //comboBox_listRdv();\r\n listRdvReserved();\r\n \r\n \r\n }", "public void setBookOffering(java.lang.String value);", "private void preencheSpinner(){\n List<String> listaParentes = new ArrayList<String>();\n\n listaParentes.add(getString(R.string.selecioneParentesco));\n\n listaParentes.add(getString(R.string.pai));\n listaParentes.add(getString(R.string.mae));\n listaParentes.add(getString(R.string.esposoa));\n listaParentes.add(getString(R.string.filhoa));\n\n listaParentes.add(getString(R.string.neto));\n listaParentes.add(getString(R.string.genro));\n listaParentes.add(getString(R.string.nora));\n listaParentes.add(getString(R.string.tioa));\n listaParentes.add(getString(R.string.sobrinhoa));\n listaParentes.add(getString(R.string.amigo));\n\n ArrayAdapter<String> adapteSpinner = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, listaParentes);\n adapteSpinner.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spinnerParentesco.setAdapter(adapteSpinner);\n }", "public View setupSpinners(View v){\n // Assign Spinners\n spinnerCollect = (Spinner) v.findViewById(R.id.eSpinner_CollectWhat);\n\n // Create an ArrayAdapter using the string array and a default spinner layout\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this.getActivity(),\n R.array.eCollectWhat_array, android.R.layout.simple_spinner_item);\n // Specify the layout to use when the list of choices appears\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n spinnerCollect.setAdapter(adapter); // Apply the adapter to the spinner\n\n spinnerCollect.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n ((ScoutFormActivity) getActivity()).getScoutForm().setEHPCOLLECT_COLUMN(spinnerCollect.getSelectedItem().toString());\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> arg0) {\n }\n });\n\n return v;\n }", "private void ShowSpinner(String[] items, Spinner spinner)\n {\n String[] list = items;\n\n final List<String> plantsList = new ArrayList<>(Arrays.asList(list));\n\n // Initializing an ArrayAdapter\n final ArrayAdapter<String> spinnerArrayAdapter = new ArrayAdapter<String>(\n this, R.layout.support_simple_spinner_dropdown_item, plantsList) {\n @Override\n public boolean isEnabled(int position) {\n if (position == 0) {\n // Disable the first item from Spinner\n // First item will be use for hint\n return false;\n } else {\n return true;\n }\n }\n\n @Override\n public View getDropDownView(int position, View convertView,\n ViewGroup parent) {\n View view = super.getDropDownView(position, convertView, parent);\n TextView tv = (TextView) view;\n if (position == 0) {\n // Set the hint text color gray\n tv.setTextColor(Color.parseColor(\"#C1C1C1\"));\n } else {\n tv.setTextColor(Color.BLACK);\n }\n return view;\n }\n };\n spinnerArrayAdapter.setDropDownViewResource(R.layout.support_simple_spinner_dropdown_item);\n spinner.setAdapter(spinnerArrayAdapter);\n spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n topicname = (String) parent.getItemAtPosition(position);\n // If user change the default selection\n // First item is disable and it is used for hint\n if (position > 0) {\n // Notify the selected item text\n Toast.makeText\n (getApplicationContext(), \"Topic \" + topicname+\" selected\", Toast.LENGTH_SHORT)\n .show();\n }\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n\n }\n });\n }", "public void initialize() {\n fillCombobox();\n }", "private void initComboBox() {\n jComboBox1.removeAllItems();\n listaDeInstrutores = instrutorDao.recuperarInstrutor();\n listaDeInstrutores.forEach((ex) -> {\n jComboBox1.addItem(ex.getNome());\n });\n }", "public void buildConsultantComboBox(){\r\n combo_user.getSelectionModel().selectFirst(); // Select the first element\r\n \r\n // Update each timewindow to show the string representation of the window\r\n Callback<ListView<User>, ListCell<User>> factory = lv -> new ListCell<User>(){\r\n @Override\r\n protected void updateItem(User user, boolean empty) {\r\n super.updateItem(user, empty);\r\n setText(empty ? \"\" : user.getName());\r\n }\r\n };\r\n \r\n combo_user.setCellFactory(factory);\r\n combo_user.setButtonCell(factory.call(null)); \r\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n showPromotion();\n showCombo();\n showComboPart();\n \n }", "public ItemPro() {\n initComponents();\n comboFill();\n }", "public MenuUtamaPenyedia() {\n initComponents();\n tabPenyedia.setTitleAt(0, \"View Profile\");\n tabPenyedia.setTitleAt(1, \"Edit Profile\");\n tabPenyedia.setTitleAt(2, \"Create Barang\");\n tglSpinner.setValue(0);\n blnSpinner.setValue(0);\n thnSpinner.setValue(2016);\n kbComboBox.setMaximumRowCount(2);\n kbComboBox.removeAllItems();\n kbComboBox.insertItemAt(\"Bagus\", 0);\n kbComboBox.insertItemAt(\"Tidak Bagus\", 1);\n }", "private void initSpinners() {\r\n Spinner arrivalSpinner = (Spinner)findViewById(R.id.arrival_place);\r\n SpinnerAdapter arrivalSpinnerAdapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_item, new LinkedList<>(manager.getAllSights()));\r\n arrivalSpinner.setAdapter(arrivalSpinnerAdapter);\r\n\r\n Spinner departureSpinner = (Spinner)findViewById(R.id.departure_place);\r\n SpinnerAdapter departureSpinnerAdapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_item, new LinkedList<>(manager.getAllSights()));\r\n departureSpinner.setAdapter(departureSpinnerAdapter);\r\n\r\n Spinner focusSpinner = (Spinner)findViewById(R.id.focus);\r\n SpinnerAdapter focusSpinnerAdapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_item, Category.values());\r\n focusSpinner.setSelection(3);\r\n focusSpinner.setAdapter(focusSpinnerAdapter);\r\n }", "@Override\n public void onItemSelected(AdapterView<?> arg0, View arg1,\n int pos, long arg3) {\n societyName = String.valueOf(societyNameSpinner\n .getSelectedItem());\n\n }", "public void populateQualityCombo() {\n\n // Making a list of poster qualities\n List<KeyValuePair> qualityList = new ArrayList<KeyValuePair>() {{\n\n add(new KeyValuePair(Constants.MEDIA_QUALITY_w92, \"Thumbnail\\t[ 92x138 ]\"));\n add(new KeyValuePair(Constants.MEDIA_QUALITY_w154, \"Tiny\\t\\t\\t[ 154x231 ]\"));\n add(new KeyValuePair(Constants.MEDIA_QUALITY_w185, \"Small\\t\\t[ 185x278 ]\"));\n add(new KeyValuePair(Constants.MEDIA_QUALITY_w342, \"Medium\\t\\t[ 342x513 ]\"));\n add(new KeyValuePair(Constants.MEDIA_QUALITY_w500, \"Large\\t\\t[ 500x750 ]\"));\n add(new KeyValuePair(Constants.MEDIA_QUALITY_w780, \"xLarge\\t\\t[ 780x1170 ]\"));\n add(new KeyValuePair(Constants.MEDIA_QUALITY_original, \"xxLarge\\t\\t[ HD ]\"));\n }};\n\n // Converting the list to an observable list\n ObservableList<KeyValuePair> obList = FXCollections.observableList(qualityList);\n\n // Filling the ComboBox\n cbPosterQuality.setItems(obList);\n\n // Setting the default value for the ComboBox\n cbPosterQuality.getSelectionModel().select(preferences.getInt(\"mediaQuality\", 3));\n }", "public DropDownAdapter(SpinnerAdapter adapter) {\n this.adapter = adapter;\n }", "private void loadSpinnerData() {\n rows = db.getPumpDetails();\n\n // Creating adapter for spinner\n dataAdapter = new ArrayAdapter<String>(this,\n android.R.layout.simple_spinner_item, rows);\n\n // Drop down layout style - list view with radio button\n dataAdapter\n .setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n // attaching data adapter to spinner\n spinner.setAdapter(dataAdapter);\n }", "private void addSuggestedBrands() {\n Activity activity = getActivity();\n if (brand == null || activity == null) {\n return;\n }\n String[] allBrands = allBrandsLoaded ? ObjectCache.getBrands(activity, client, true, false) : null;\n BrandAdapter brandAdapter = new BrandAdapter(activity, R.layout.dropdown_brand_item,\n suggestedBrandOwners, allBrands);\n brand.setAdapter(brandAdapter);\n brand.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Object object = parent.getItemAtPosition(position);\n String brandName;\n String brandOwnerName = null;\n if (object instanceof SimpleBrand) {\n brandName = object.toString();\n brandOwnerName = ((SimpleBrand) object).brandOwner;\n } else {\n brandName = (String) object;\n }\n brand.setText(brandName);\n if (brandOwnerName != null && !brandOwnerName.isEmpty()) {\n // also set the brand's owner\n brandOwner.setText(brandOwnerName);\n }\n }\n });\n }", "private void setUpCategorySpinner() {\n mCategorySpinner = (Spinner) findViewById(R.id.spnCategory);\n categoryList = new ArrayList<>();\n categoryList.add(AppUtils.SELECT_CATEGORY);\n List<String> tempList = AppUtils.getAllCategoryName();\n categoryList.addAll(tempList);\n int size = categoryList.size();\n categoryList.add(size, AppUtils.CREATE_CATEGORY);\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this,\n android.R.layout.simple_spinner_item, categoryList);\n dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n mCategorySpinner.setAdapter(dataAdapter);\n mCategorySpinner.setOnItemSelectedListener(this);\n }", "@Override\n public void onItemSelected(AdapterView<?> arg0, View arg1, int pos,\n long arg3) {\n financialYr = String.valueOf(chooseyrSpiner.getSelectedItem());\n\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n svf = new SpinnerValueFactory.IntegerSpinnerValueFactory(0, 1000000, 0);\n spinnerAdet.setValueFactory(svf);\n\n olKategori = FXCollections.observableArrayList(\"Demirbaş\", \"Genel\");\n cbKategori.setItems(olKategori);\n olKDV = FXCollections.observableArrayList(0, 1, 5, 8, 18);\n cbKDV.setItems(olKDV);\n olKDVTipi = FXCollections.observableArrayList(\"Dahil\", \"Hariç\");\n cbKDVTipi.setItems(olKDVTipi);\n cbKDVTipi.setValue(\"Dahil\");\n olBirim = FXCollections.observableArrayList(\"Adet\", \"Balya\", \"CM\", \"KG\", \"Koli\", \"Litre\", \"Metre\", \"ML\", \"Ton\", \"Top\");\n cbBirim.setItems(olBirim);\n\n efekt = new DropShadow();\n\n tfAlisFiyat.textProperty().addListener((observable, oldValue, newValue) -> {\n karHesapla();\n });\n tfSatisFiyat.textProperty().addListener((observable, oldValue, newValue) -> {\n karHesapla();\n });\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String item = parent.getItemAtPosition(position).toString();\n tuning = position;\n setUpDisplay();\n\n // Showing selected spinner item\n if (tuner1 == 3) {\n Toast.makeText(TunerActivity.this, \"\" + item, Toast.LENGTH_LONG).show();\n }\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view,\n int position, long id) {\n\n if (syrupA2.getSelectedItemPosition() < 1 || syrupE3.getSelectedItemPosition() < 1 || syrupN4.getSelectedItemPosition() < 1) {\n syrupA2.setSelection(syrupM1.getSelectedItemPosition());\n syrupE3.setSelection(syrupM1.getSelectedItemPosition());\n syrupN4.setSelection(syrupM1.getSelectedItemPosition());\n }\n\n }", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n recipeType = (String) recipeAdapter.getRecipeType(position);\n\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n // TODOcomboBoxCh\n remplirTableView();\n comboBoxCh.getItems().addAll(\"Code Adherent\", \"Nom Adherent\");\n }", "private void povoarSpinners() {\n List<String> lista = new ArrayList<>();\n lista.add(UsuarioNivelConstantes.VETOR_DESCRICOES[0]);\n lista.add(UsuarioNivelConstantes.VETOR_DESCRICOES[1]);\n lista.add(UsuarioNivelConstantes.VETOR_DESCRICOES[2]);\n ArrayAdapter<String> arrayAdapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_dropdown_item, lista);\n arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_item);\n spnNivel.setAdapter(arrayAdapter);\n lista = new ArrayList<>();\n lista.add(UsuarioEstadoConstantes.VETOR_DESCRICOES[0]);\n lista.add(UsuarioEstadoConstantes.VETOR_DESCRICOES[1]);\n arrayAdapter = new ArrayAdapter<>(this, android.R.layout.simple_spinner_dropdown_item, lista);\n arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_item);\n spnEstado.setAdapter(arrayAdapter);\n }" ]
[ "0.7244812", "0.6598248", "0.6443767", "0.635182", "0.6303384", "0.6184366", "0.6167623", "0.6140182", "0.6133735", "0.61046255", "0.6098147", "0.6062041", "0.6061554", "0.6060482", "0.6037969", "0.6028974", "0.6025729", "0.59627074", "0.5953089", "0.59525645", "0.594787", "0.59372526", "0.5915829", "0.59064233", "0.588816", "0.58674175", "0.5842675", "0.58124804", "0.58093786", "0.5797064", "0.5789622", "0.57842845", "0.5710488", "0.57070714", "0.5692933", "0.5689562", "0.5673399", "0.5666996", "0.5661825", "0.5653029", "0.5649219", "0.564672", "0.56338495", "0.56218594", "0.5618678", "0.5613286", "0.56077766", "0.5603369", "0.5600848", "0.5589912", "0.5584658", "0.5576218", "0.5575739", "0.55715036", "0.55622333", "0.55559117", "0.5545503", "0.5544366", "0.55328625", "0.5530019", "0.5527324", "0.55206555", "0.55078125", "0.5504594", "0.5503872", "0.5498755", "0.5494449", "0.5483875", "0.54785013", "0.547205", "0.5467623", "0.5463822", "0.5458614", "0.54497296", "0.54485726", "0.54459995", "0.5445683", "0.5433898", "0.5423341", "0.5418955", "0.5418748", "0.5417601", "0.54121196", "0.54018956", "0.5398617", "0.539723", "0.5396198", "0.5395162", "0.5394383", "0.5393609", "0.5389105", "0.5389028", "0.5377373", "0.53760034", "0.53713995", "0.5367671", "0.53597295", "0.53573656", "0.5356402", "0.5355636" ]
0.7612856
0
Because AdapterView is an abstract class, onNothingSelected must be defined
@Override public void onNothingSelected(AdapterView<?> parent) { mSupplier = BookEntry.SUPPLIER_UNKNOWN; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onNothingSelected(AdapterView<?> adapterView) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> adapterView) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> adapterView) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> adapterView) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> adapterView) {\n\n }", "@Override\n public void onNothingSelected(AdapterView<?> arg0)\n {\n }", "@Override\n public void onNothingSelected(AdapterView<?> arg0) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> arg0) {\n }", "@Override\r\n public void onNothingSelected(AdapterView<?> arg0) {\n }", "@Override\r\n public void onNothingSelected(AdapterView<?> arg0) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> adapterView) {\n\n }", "@Override\n public void onNothingSelected(AdapterView<?> arg0)\n {\n }", "public void onNothingSelected(AdapterView<?> adapterView) {\n\t\t}", "public void onNothingSelected(AdapterView<?> adapterView) {\n\t\t}", "public void onNothingSelected(AdapterView<?> adapterView) {\n\t\t}", "public void onNothingSelected(AdapterView<?> adapterView) {\n\t\t}", "@Override\n public void onNothingSelected(AdapterView<?> arg0) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> arg0) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> arg0) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> arg0) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> arg0) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> arg0) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> arg0) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> arg0) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> arg0) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> arg0) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> arg0) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> arg0) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> arg0) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> adapter) {\n\n }", "@Override\n public void onNothingSelected(AdapterView<?> adapter) {\n\n }", "@Override\n public void onNothingSelected(AdapterView<?> adapter) {\n\n }", "@Override\n\t\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\t\t\t\t}", "@Override\n\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\t\t\t}", "@Override\n\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\t\t\t}", "@Override\n\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\t\t\t}", "@Override\n\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\t\t\t}", "@Override\n\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\t\t\t}", "@Override\n\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\t\t\t}", "@Override\n public void onNothingSelected(AdapterView<?> arg0) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> arg0) {\n }", "@Override\r\n\tpublic void onNothingSelected(AdapterView<?> adapterview) {\n\r\n\t}", "@Override\r\n\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\r\n\t\t}", "@Override\n\t\t\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\t\t\t\t\t}", "@Override\n\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\t\t}", "@Override\r\n\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\t\t\t}", "@Override\r\n\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\t\t\t}", "@Override\r\n\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\t\t\t}", "@Override\r\n\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\t\t\t}", "@Override\r\n\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\t\t\t}", "@Override\n\t\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\n\t\t\t\t}", "@Override\r\n public void onNothingSelected(AdapterView<?> parent) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> adapterView) {\n Log.d(TAG, \"onNothingSelected: \");\n }", "@Override\n\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\n\t\t}", "@Override\n\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\n\t\t}", "@Override\n\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\n\t\t}", "@Override\n public void onNothingSelected(AdapterView<?> arg0) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> arg0) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> arg0) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> arg0) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> arg0) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> arg0) {\n }", "@Override\r\n public void onNothingSelected(AdapterView<?> parent) {\n }", "@Override\r\n public void onNothingSelected(AdapterView<?> parent) {\n }", "@Override\r\n\t\t\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\t\t\t\t\t}", "@Override\n\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\n\n\t\t\t}", "@Override\r\n public void onNothingSelected(AdapterView<?>parent){\n }", "@Override\n public void onNothingSelected(AdapterView<?> parent) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> parent) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> parent) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> parent) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> parent) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> parent) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> parent) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> parent) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> parent) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> parent) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> parent) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> parent) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> parent) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> parent) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> parent) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> parent) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> parent) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> parent) {\n }", "@Override\n public void onNothingSelected(AdapterView<?> parent) {\n // Unknown\n }" ]
[ "0.9140743", "0.9140743", "0.9140743", "0.91055983", "0.9024272", "0.8994319", "0.89926064", "0.89926064", "0.89871067", "0.89871067", "0.8962797", "0.8952994", "0.89423794", "0.89423794", "0.89423794", "0.89423794", "0.8934432", "0.8934432", "0.8934432", "0.8934432", "0.8934432", "0.8934432", "0.8934432", "0.8934432", "0.8934432", "0.8934432", "0.8934432", "0.8934432", "0.8934432", "0.893009", "0.893009", "0.893009", "0.89271325", "0.89271325", "0.8922065", "0.8922065", "0.8922065", "0.8922065", "0.8922065", "0.8922065", "0.8912762", "0.8912762", "0.89119697", "0.8906193", "0.8905404", "0.8905404", "0.8905404", "0.8902101", "0.8896539", "0.8896539", "0.8896539", "0.8896539", "0.8896539", "0.88927966", "0.888723", "0.88840085", "0.8882611", "0.8882611", "0.8882611", "0.8877142", "0.8877142", "0.8877142", "0.8877142", "0.8877142", "0.8877142", "0.887706", "0.88770425", "0.8876999", "0.8876726", "0.8876726", "0.8876726", "0.8876726", "0.8876726", "0.8876726", "0.8876726", "0.8876726", "0.8876726", "0.8876726", "0.8876726", "0.8876726", "0.8876726", "0.8870881", "0.88707215", "0.88707215", "0.88707215", "0.88707215", "0.88707215", "0.88707215", "0.88707215", "0.88707215", "0.88707215", "0.88707215", "0.88707215", "0.88707215", "0.88707215", "0.88707215", "0.88707215", "0.88707215", "0.88707215", "0.88707215", "0.8863771" ]
0.0
-1
SaveData is called when the "save" options menu item is clicked. It retrieves user input and inserts that new task data into the underlying database.
private void saveData() { readViews(); final BookEntry bookEntry = new BookEntry(mNameString, mQuantityString, mPriceString, mSupplier, mPhoneString); AppExecutors.getInstance().diskIO().execute(new Runnable() { @Override public void run() { // Insert the book only if mBookId matches DEFAULT_BOOK_ID // Otherwise update it // call finish in any case if (mBookId == DEFAULT_BOOK_ID) { mDb.bookDao().insertBook(bookEntry); } else { //update book bookEntry.setId(mBookId); mDb.bookDao().updateBook(bookEntry); } finish(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void saveData() {\n\t\tthis.dh = new DataHelper(this);\n\t\tthis.dh.updateData(String.valueOf(mData.getText()), i.getId());\n\t\tthis.dh.close();\n\t\tToast\n\t\t\t\t.makeText(ctx, \"Changes saved successfully...\",\n\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\n\t\tIntent myIntent = new Intent(EditActivity.this, StartActivity.class);\n\t\tEditActivity.this.startActivity(myIntent);\n\t\tfinish();\n\t}", "private void saveTask(){\n \tZadatakApp app = (ZadatakApp)getApplicationContext();\n \t\n \tTask task = new Task();\n \ttask.set(Task.Attributes.Name, nameText);\n \ttask.set(Task.Attributes.Duedate, datePicker);\n \ttask.set(Task.Attributes.Hours, lengthText);\n \ttask.set(Task.Attributes.Progress, progressBar);\n \ttask.set(Task.Attributes.Priority, priorityBox);\n \t\n \t// Save it to the database either as a new task or over an old task\n \tif (editmode) { app.dbman.editTask(id, task); }\n \telse { app.dbman.insertTask(task); }\n \t\n \t// A task has been added or changed, rescedule\n \tapp.schedule();\n \t\n \tapp.toaster(\"NEW / EDITED TASK\");\n \t\n \t// Quit the activity\n \tfinish();\n }", "public void saveData ( ) {\n\t\tinvokeSafe ( \"saveData\" );\n\t}", "private void saveData() {\n }", "public void saveTask() {\r\n if (validateTask(textFieldName, textFieldDescription, textFieldDueDate, comboPriority)) {\r\n if (myTask == null) {\r\n myTask = new Task(textFieldName.getText(), textFieldDescription.getText(),\r\n LocalDate.parse(textFieldDueDate.getText()),\r\n Priority.valueOf(Objects.requireNonNull(comboPriority.getSelectedItem()).toString()));\r\n } else {\r\n myTask.setName(textFieldName.getText());\r\n myTask.setDescription(textFieldDescription.getText());\r\n myTask.setDueDate(LocalDate.parse(textFieldDueDate.getText()));\r\n myTask.setPriority(Priority.valueOf(Objects.requireNonNull(\r\n comboPriority.getSelectedItem()).toString()));\r\n }\r\n myTodo.getTodo().put(myTask.getHashKey(), myTask);\r\n todoListGui();\r\n }\r\n }", "public void saveData(){\n reporter.info(\"Save edited form\");\n clickOnElement(LOCATORS.getBy(COMPONENT_NAME,\"SAVE_BUTTON\"));\n }", "public void onSaveButtonClicked() {\n String description = mEditText.getText().toString();\n Date date = new Date();\n\n final DiaryEntry entry = new DiaryEntry(description, date);\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n if (mEntryId == DEFAULT_ENTRY_ID) {\n // insert new task\n mDb.entryDao().insertEntry(entry);\n } else {\n //update task\n entry.setId(mEntryId);\n mDb.entryDao().updateEntry(entry);\n }\n finish();\n }\n });\n }", "public void saveData(){\r\n file.executeAction(modelStore);\r\n }", "void saveSaves(Object data, Context context);", "private void menuSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuSaveActionPerformed\n saveDataToFile();\n }", "private void saveData() {\n\t\tdataSaver.save(data);\n\t}", "public void saveData() {\n\t\t//place to save notes e.g to file\n\t}", "public void saveData(){\n String name = editTextName.getText().toString();\n if(!name.isEmpty()){\n DataManager.getInstance().addName(name);\n }\n\n finish();\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 }", "private void saveData() {\n // Save data to ReminderData class\n reminderData.setMinutes(timePicker.getMinute());\n reminderData.setDataHours(timePicker.getHour());\n reminderData.setNotificationText(reminderText.getText().toString());\n reminderData.saveDataToSharedPreferences();\n }", "private void onSaveButtonClicked() {\n final String date = dayValue + \".\" + monthValue + \".\" + yearValue;\n final String name = edtEventName.getText().toString();\n final String location = edtEventLocation.getText().toString();\n final String desc = edtEventDesc.getText().toString();\n final EventData eventData = new EventData(name,\n date, location, desc);\n\n // create a new thread to insert or update db\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n // the condition when user click the one of the items in recyclerView (Update existing row)\n if (intent != null && intent.hasExtra(\"id\")) {\n eventData.setId(intent.getIntExtra(\"id\", 0));\n eventDatabase.eventDAO().updateEvent(eventData);\n }\n // the condition when user click plus button from MainActivity.java (Insert a new row)\n else {\n eventDatabase.eventDAO().insertNewEvent(eventData);\n\n }\n finish(); // destroy activity (when u press back key after clicking \"save btn\", this activity won't be called again)\n }\n });\n }", "private void saveData() {\r\n\t\tif(mFirstname.getText().toString().trim().length() > 0 &&\r\n\t\t\t\tmLastname.getText().toString().trim().length() > 0 &&\r\n\t\t\t\tmEmail.getText().toString().trim().length() > 0) {\r\n\t\t\tmPrefs.setFirstname(mFirstname.getText().toString().trim());\r\n\t\t\tmPrefs.setLastname(mLastname.getText().toString().trim());\r\n\t\t\tmPrefs.setEmail(mEmail.getText().toString().trim());\r\n\t\t\tif(mMaleBtn.isChecked())\r\n\t\t\t\tmPrefs.setGender(0);\r\n\t\t\telse if(mFemaleBtn.isChecked())\r\n\t\t\t\tmPrefs.setGender(1);\r\n\t\t\tif(!mCalendarSelected.after(mCalendarCurrent)) \r\n\t\t\t\tmPrefs.setDateOfBirth(mCalendarSelected.get(Calendar.YEAR), \r\n\t\t\t\t\t\tmCalendarSelected.get(Calendar.MONTH), \r\n\t\t\t\t\t\tmCalendarSelected.get(Calendar.DAY_OF_MONTH));\r\n\t\t\tToast.makeText(getActivity(), R.string.msg_changes_saved, Toast.LENGTH_LONG).show();\r\n\t\t} else \r\n\t\t\tToast.makeText(getActivity(), R.string.msg_registration_empty_field, Toast.LENGTH_LONG).show();\r\n\t}", "private void performSave() {\n if (validate()) {\n int taskId = AppUtils.getLatestTaskId() + 1;\n int catId;\n if (category.equals(AppUtils.CREATE_CATEGORY)) {\n catId = saveNewCategory();\n } else {\n catId = AppUtils.getCategoryIdByName(category);\n }\n saveNewTask(taskId, catId);\n clearAll();\n redirectToViewTask();\n }\n\n }", "public void saveClicked(View actionView)\n {\n \t//If ID is empty it is a new Task\n \tif( taskId.getText().length() > 0 )\n \t{\n \t\tupdateTask();\n \t}\n \t//If ID exists it is updating an existing task\n \telse\n \t{\n \t\tnewTask();\n \t}\n }", "public void save() {\n if (AppUtil.isEmpty(txtName.getText().toString())) {\n AppUtil.alertMessage(mainActivity,\"Please enter valid recipe name.\");\n txtName.requestFocus();\n } else if (AppUtil.isEmpty(txtDesc.getText().toString())) {\n AppUtil.alertMessage(mainActivity, \"Please enter recipe description.\");\n txtDesc.requestFocus();\n } else if (AppUtil.isEmpty(txtIng.getText().toString())) {\n AppUtil.alertMessage(mainActivity, \"Please enter ingredient/s.\");\n txtIng.requestFocus();\n } else if (AppUtil.isEmpty(txtSteps.getText().toString())) {\n AppUtil.alertMessage(mainActivity, \"Please enter preparation steps.\");\n txtSteps.requestFocus();\n } else {\n try {\n if (MainActivity.checkNetwork(mainActivity)) {\n SaveAsyncTask task = new SaveAsyncTask();\n task.execute();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "private void saveData(){\n\t\tdataBase=mHelper.getWritableDatabase();\n\t\tContentValues values=new ContentValues();\n\t\t\n\t\tvalues.put(DbHelper.KEY_NNAME,nname);\n\t\t//values.put(DbHelper.KEY_LNAME,lname );\n\t\t\n\t\tSystem.out.println(\"\");\n\t\tif(isUpdate)\n\t\t{ \n\t\t\t//update database with new data \n\t\t\tdataBase.update(DbHelper.TABLE_NOTE, values, DbHelper.KEY_ID+\"=\"+id, null);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//insert data into database\n\t\t\tdataBase.insert(DbHelper.TABLE_NOTE, null, values);\n\t\t}\n\t\t//close database\n\t\tdataBase.close();\n\t\tfinish();\n\t\t\n\t\t\n\t}", "@Override\n public void onClick(View v) {\n titleTask = txtTitle.getText().toString();\n descriptionTask = txtDescription.getText().toString();\n locationTask = txtLocation.getText().toString();\n\n\n //Also set the code to add the object to the server,\n //It should call getInfo() which will store all of the inputs into strings or ints\n\n\n //This checks to make sure the input is valid, if not will not allow the user to save to database\n if (dayPass == 0 || monthPass == 0 || yearPass == 0 || titleTask == null || descriptionTask == null || startMinute == 0 || startHour == 0)\n Toast.makeText(AddTask.this, \"Incorrect input, please try again\", Toast.LENGTH_SHORT).show();\n else {\n if(MainActivity.groupview)\n MainActivity.dh.writeTask(MainActivity.user.getUserID(), MainActivity.group.getGroupID(), new Task(dayPass, monthPass, yearPass, startHour, startMinute, categoryTask, titleTask, descriptionTask, locationTask, false, MainActivity.user));\n else\n MainActivity.dh.writeTask(MainActivity.user.getUserID(), \"\", new Task(dayPass, monthPass, yearPass, startHour, startMinute, categoryTask, titleTask, descriptionTask, locationTask, false, MainActivity.user));\n //MainActivity.dh.readBlock(MainActivity.user.getUserID(), \"\", \"04202019\");\n Toast.makeText(AddTask.this, \"Task saved to your calendar\", Toast.LENGTH_LONG).show();\n Intent intentHome = new Intent(AddTask.this,\n MainActivity.class);\n startActivity(intentHome);\n }\n\n }", "public void saveAction (){\n\t \tif(dayNum ==7){\n\t \t\tintPhaseCompletes = intPhaseCompletes +1;\n\t \t\tdb.execSQL(\"UPDATE Phases SET Completions= \"+ intPhaseCompletes + \" WHERE PhaseID = \" + \"'\" + phaseID + \"'\");\n\t \t}\n \tcontent = timerTextView.getText().toString();\n \tstrDate = functions.getDate();\n \tintCompletes = intCompletes +1;\n \tdb.execSQL(\"INSERT INTO results (ExerciseName,time,date) VALUES(\"+ \"'\" + dayName +\"'\" + \",\" \n \t\t\t+ \"'\" + content + \"'\" + \",\"+ \"'\" + strDate +\"'\"+ \")\");\n \tdb.execSQL(\"UPDATE Days SET LastDate= \"+ \"'\" + strDate + \"'\" + \" WHERE _id = \" + \"'\" + dayID + \"'\");\n \tdb.execSQL(\"UPDATE Days SET Completions= \"+ intCompletes + \" WHERE _id = \" + \"'\" + dayID + \"'\");\n \tdb.close();\n \tdialogShare();\n }", "private void saveData() {\n try {\n Student student = new Student(firstName.getText(), lastName.getText(),\n form.getText(), stream.getText(), birth.getText(),\n gender.getText(), Integer.parseInt(admission.getText()),\n Integer.parseInt(age.getText()));\n\n\n if (action.equalsIgnoreCase(\"new\") && !assist.checkIfNull(student)) {\n\n dao.insertNew(student);\n JOptionPane.showMessageDialog(null, \"Student saved !\", \"Success\", JOptionPane.INFORMATION_MESSAGE);\n\n } else if (action.equalsIgnoreCase(\"update\") && !assist.checkIfNull(student)) {\n dao.updateStudent(student, getSelected());\n JOptionPane.showMessageDialog(null, \"Student Updated !\", \"Success\", JOptionPane.INFORMATION_MESSAGE);\n }\n\n prepareTable();\n prepareHistory();\n buttonSave.setVisible(false);\n admission.setEditable(true);\n }catch (Exception e)\n {}\n }", "public void saveData(){\n\n if(addFieldstoLift()) {\n Intent intent = new Intent(SetsPage.this, LiftsPage.class);\n intent.putExtra(\"lift\", lift);\n setResult(Activity.RESULT_OK, intent);\n finish();\n }else{\n AlertDialog.Builder builder = new AlertDialog.Builder(SetsPage.this);\n builder.setCancelable(true);\n builder.setTitle(\"Invalid Entry\");\n builder.setMessage(\"Entry is invalid. If you continue your changes will not be saved\");\n builder.setPositiveButton(\"Continue\",\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n }\n });\n builder.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n }\n });\n\n AlertDialog dialog = builder.create();\n dialog.show();\n }\n }", "public void saveData(ArrayList<Task> tasks) {\r\n try {\r\n writeToFile(tasks);\r\n } catch (IOException exception) {\r\n ui.printIoExceptionErrorMessage(exception);\r\n }\r\n }", "@UiHandler(\"save\")\n\tvoid onSaveClicked(ClickEvent evt) {\n\t\tScheduler.get().scheduleDeferred(new ScheduledCommand() {\n\t\t\t@Override\n\t\t\tpublic void execute() {\n\t\t\t\tpresenter.save();\n\t\t\t}\n\t\t});\n\t}", "public void saveData() {\n throw new UnsupportedOperationException(\"Not yet supported\");\n }", "public boolean doPerformSave(RunData runData, Context context,\n AntelopeTaskInstance taskInstance,\n AntelopeProcessInstance processInstance, FormTool form)\n throws Exception {\n\n return doPerformDone(runData, context, taskInstance, processInstance, form);\n }", "protected void saveValues() {\n dataModel.persist();\n }", "public void save() {\n UTILS.write(FILE.getAbsolutePath(), data);\n }", "public boolean save(Data model);", "public void saveData() {\n if (dataComplete()) {\n if(validLengths())\n {\n Item old_item = items.get(item_index);\n int item_purchase_status = 0;\n if (!item_purchased.isChecked()) {\n item_purchase_status = 1;\n }\n\n ds.open();\n Item new_item = new Item(old_item.id, item_name.getText().toString(), item_category.getText().toString(),\n item_description.getText().toString(), Double.parseDouble(item_price.getText().toString()), item_purchase_status);\n boolean success = ds.editEntry(new_item);\n ds.close();\n\n if (success) {\n exit();\n } else {\n empty_error.setVisibility(empty_error.INVISIBLE);\n overflow_error.setVisibility(overflow_error.INVISIBLE);\n unexpected_error.setVisibility(unexpected_error.VISIBLE);\n }\n }\n else\n {\n empty_error.setVisibility(empty_error.INVISIBLE);\n unexpected_error.setVisibility(unexpected_error.INVISIBLE);\n overflow_error.setVisibility(overflow_error.VISIBLE);\n }\n } else {\n unexpected_error.setVisibility(unexpected_error.INVISIBLE);\n overflow_error.setVisibility(overflow_error.INVISIBLE);\n empty_error.setVisibility(empty_error.VISIBLE);\n }\n }", "private static void saveData(String data) {\n }", "public static void savePendingData(JSONArray pendingData){\n SharedPreferences preferences = UbibikeApp.getAppContext().getSharedPreferences(UBI_PREFS, Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putString(\"pending_data\", pendingData.toString());\n editor.apply();\n }", "public void saveData(){\n SerializableManager.saveSerializable(this,user,\"userInfo.data\");\n SerializableManager.saveSerializable(this,todayCollectedID,\"todayCollectedCoinID.data\");\n SerializableManager.saveSerializable(this,CollectedCoins,\"collectedCoin.data\");\n uploadUserData uploadUserData = new uploadUserData(this);\n uploadUserData.execute(this.Uid);\n System.out.println(Uid);\n\n }", "void saveTask( org.openxdata.server.admin.model.TaskDef task, AsyncCallback<Void> callback );", "@Override\r\n\tpublic void save(ExecuteTask executeTask) {\n\t\tString sql = \"INSERT INTO executetask(et_member_id,et_task_id,et_comments) VALUES(?,?,?)\";\r\n\t\tupdate(sql,executeTask.getMemberId(),executeTask.getTaskId(),executeTask.getComments());\r\n\t}", "public void onSaveClicked(View view) {\n\n if (mInterest != 0.0f) {\n\n ContentValues values = new ContentValues();\n values.put(SavingsItemEntry.COLUMN_NAME_BANK_NAME, bankInput.getText().toString());\n values.put(SavingsItemEntry.COLUMN_NAME_AMOUNT, mAmount);\n values.put(SavingsItemEntry.COLUMN_NAME_YIELD, mYield);\n values.put(SavingsItemEntry.COLUMN_NAME_START_DATE, mStartDate.getTime());\n values.put(SavingsItemEntry.COLUMN_NAME_END_DATE, mEndDate.getTime());\n values.put(SavingsItemEntry.COLUMN_NAME_INTEREST, mInterest);\n\n if (mEditMode){\n //Update the data into database by ContentProvider\n getContentResolver().update(SavingsContentProvider.CONTENT_URI, values,\n SavingsItemEntry._ID + \"=\" + mSavingsBean.getId(), null);\n Log.d(Constants.LOG_TAG, \"Edit mode, updated existing savings item: \" + mSavingsBean.getId());\n }else {\n // Save the data into database by ContentProvider\n getContentResolver().insert(\n SavingsContentProvider.CONTENT_URI,\n values\n );\n }\n // Go back to dashboard\n //Intent intent = new Intent(this, DashboardActivity.class);\n //startActivity(intent);\n Utils.gotoDashBoard(this);\n finish();\n } else {\n Toast.makeText(this, R.string.missing_savings_information, Toast.LENGTH_LONG).show();\n }\n\n }", "@Override\n\tpublic void save(DataKey arg0) {\n\t\t\n\t}", "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 saveData() {\n // Actualiza la información\n client.setName(nameTextField.getText());\n client.setLastName(lastNameTextField.getText());\n client.setDni(dniTextField.getText());\n client.setAddress(addressTextField.getText());\n client.setTelephone(telephoneTextField.getText());\n\n // Guarda la información\n DBManager.getInstance().saveData(client);\n }", "public void saveOnClick(View view) {\n final EditText nameET = (EditText) findViewById(R.id.name_et);\n final EditText titleET = (EditText) findViewById(R.id.title_et);\n final EditText emailET = (EditText) findViewById(R.id.email_et);\n final EditText addressET = (EditText) findViewById(R.id.address_et);\n user.setName(nameET.getText().toString());\n user.setTitle(titleET.getText().toString());\n user.setEmailAddress(emailET.getText().toString());\n user.setHomeAddress(addressET.getText().toString());\n\n RegistrationData.editUserData(db, user);\n finish();\n }", "public void saveTask (View view) {\n \t\n \tTask task = gatherTaskInfo();\n \t//calls to crowd sourcer only if a task is returned\n \tif(task != null) {\n \t\tnew saveTask().execute(task);\t\t\n \t} \t\n }", "public void save(HashMap<Integer, T> data) {\n\t\tthis.data.putAll(data);\n\t}", "public void save();", "public void save();", "public void save();", "public void save();", "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 saveAction() {\n\t\tresult.setValue(convertPairsToText());\n\t\tcloseDialog();\n\t}", "protected abstract void doSave();", "private void save() {\r\n\t\tif (Store.save()) {\r\n\t\t\tSystem.out.println(\" > The store has been successfully saved in the file StoreData.\\n\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\" > An error occurred during saving.\\n\");\r\n\t\t}\r\n\t}", "public void saveButtonClicked(View view) {\n if (selectedType.equals(\"\")) {\n Log.e(Globals.TAG, \"tried to save the dish without type (possibly also without quantity) entered\");\n Toast.makeText(getApplicationContext(), \"must enter pasta type\", Toast.LENGTH_SHORT).show();\n return;\n }\n if (enteredUnit.equals(\"\")) {\n Log.e(Globals.TAG, \"tried to save the dish without quantity entered\");\n Toast.makeText(getApplicationContext(), \"must enter pasta unit\", Toast.LENGTH_SHORT).show();\n return;\n }\n if (enteredAmount<0) {\n Log.e(Globals.TAG, \"tried to save the dish without amount entered\");\n Toast.makeText(getApplicationContext(), \"must enter nonzero pasta amount\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n //pass data and return to MainActivity\n Intent intent = new Intent();\n intent.putExtra(\"selectedType\", selectedType);\n intent.putExtra(\"enteredAmount\", enteredAmount);\n intent.putExtra(\"enteredUnit\", enteredUnit);\n setResult(RESULT_OK, intent);\n\n finish();\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 }", "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 onSaveClick() {\n Log.d(\"database\", \"onSaveClick invoked.\");\n Prediction p = new Prediction(0, resultStringToSave, byteArrayToSave);\n Log.d(\"database\", \"Prediction before adding to db... id: ? prediction string: \" + resultStringToSave + \" bytearr: \" + byteArrayToSave);\n PredictionDatabase.insert(p);\n // save to db\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 saveToDb() {\r\n ContentValues values = new ContentValues();\r\n values.put(DbAdapter.KEY_DATE, mTime);\r\n if (mPayeeText != null && mPayeeText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_PAYEE, mPayeeText.getText().toString());\r\n if (mAmountText != null && mAmountText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_AMOUNT, mAmountText.getText().toString());\r\n if (mCategoryText != null && mCategoryText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_CATEGORY, mCategoryText.getText().toString());\r\n if (mMemoText != null && mMemoText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_MEMO, mMemoText.getText().toString());\r\n if (mTagText != null && mTagText.getText() != null)\r\n \tvalues.put(DbAdapter.KEY_TAG, mTagText.getText().toString());\r\n\r\n \tif (Utils.validate(values)) {\r\n \t\tmDbHelper.open();\r\n \t\tif (mRowId == null) {\r\n \t\t\tlong id = mDbHelper.create(values);\r\n \t\t\tif (id > 0) {\r\n \t\t\t\tmRowId = id;\r\n \t\t\t}\r\n \t\t} else {\r\n \t\t\tmDbHelper.update(mRowId, values);\r\n \t\t}\r\n \t\tmDbHelper.close();\r\n \t}\r\n\t}", "public static void SaveProcessedData()\n\t{\n\t\tSystem.out.println(\"\\r\\n... Saving processed Data....\");\n\t\t\n\t\tString date = new SimpleDateFormat(\"yyyyMMddhhmm\").format(new Date());\n\t\tString generalInput = \"FeatureExpressionCollection=\" + FeatureExpressionCollection.GetCount() + \";\" + FeatureExpressionCollection.GetLoc() + \";\" + FeatureExpressionCollection.GetMeanLofc() + \";\" + FeatureExpressionCollection.numberOfFeatureConstants;\n\t\t\n\t\t// Save files\n\t\ttry \n\t\t{\n\t\t\tFileUtils.write(new File(date + \"_\" + featuresPath), FeatureExpressionCollection.SerializeFeatures());\n\t\t\tFileUtils.write(new File(date + \"_\" + methodsPath), MethodCollection.SerializeMethods());\n\t\t\tFileUtils.write(new File(date + \"_\" + filesPath), FileCollection.SerializeFiles());\n\t\t\tFileUtils.write(new File(date + \"_\" + generalPath), generalInput);\n\t\t} \n\t\tcatch (IOException e) \n\t\t{\n\t\t\tSystem.out.println(\"ERROR: Could not save processed data files\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"... done!\");\n\t}", "private void dataSubmission() {\n getPreferences(); // reload all the data\n\n String jsonObjectString = createJsonObject();\n StringBuilder url = new StringBuilder();\n url.append(serverUrl);\n\n if (vslaName == null || numberOfCycles == null || representativeName == null || representativePost == null\n || repPhoneNumber == null || grpBankAccount == null || physAddress == null\n || grpPhoneNumber == null || grpSupportType == null) {\n flashMessage(\"Please Fill all Fields\");\n\n } else if (IsEditing.equalsIgnoreCase(\"1\")) {\n url.append(\"editVsla\");\n new HttpAsyncTaskClass().execute(url.toString(), jsonObjectString);\n saveVslaInformation();\n\n } else { // Creating a new VSLA\n url.append(\"addNewVsla\");\n new HttpAsyncTaskClass().execute(url.toString(), jsonObjectString);\n saveVslaInformation();\n }\n }", "private void saveGoal() {\n // Read from input fields\n // Use trim to eliminate leading or trailing white space\n String descriptionString = mDescriptionEditText.getText().toString().trim();\n\n\n // Check if this is supposed to be a new product\n // and check if all the fields in the editor are blank\n if (mCurrentGoalUri == null && (TextUtils.isEmpty(descriptionString) )) {\n Toast.makeText(this, \"Please add info to all the fields\",\n Toast.LENGTH_SHORT).show();\n // Since no fields were modified, we can return early without creating a new goal.\n // No need to create ContentValues and no need to do any ContentProvider operations.\n return;\n }\n\n // Create a ContentValues object where column names are the keys,\n // and goal attributes from the editor are the values.\n ContentValues values = new ContentValues();\n values.put(GoalandTaskMatcherContract.GoalEntry.COLUMN_GOAL_DESCRIPTION, descriptionString);\n\n // Determine if this is a new or existing goal by checking if mCurrentGoalUri is null or not\n if (mCurrentGoalUri == null) {\n // This is a NEW goal, so insert a new goal into the provider,\n // returning the content URI for the new goal.\n Uri newUri = getContentResolver().insert(GoalandTaskMatcherContract.GoalEntry.CONTENT_URI, values);\n\n // Show a toast message depending on whether or not the insertion was successful.\n if (newUri == null) {\n // If the new content URI is null, then there was an error with insertion.\n Toast.makeText(this, getString(R.string.editor_insert_goal_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the insertion was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_insert_goal_successful),\n Toast.LENGTH_SHORT).show();\n }\n } else {\n // Otherwise this is an EXISTING goal, so update the goal with content URI: mCurrentGoalUri\n // and pass in the new ContentValues. Pass in null for the selection and selection args\n // because mCurrentGoalUri will already identify the correct row in the database that\n // we want to modify.\n int rowsAffected = getContentResolver().update(mCurrentGoalUri, values, null, null);\n\n // Show a toast message depending on whether or not the update was successful.\n if (rowsAffected == 0) {\n // If no rows were affected, then there was an error with the update.\n Toast.makeText(this, getString(R.string.editor_update_goal_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the update was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_update_goal_successful),\n Toast.LENGTH_SHORT).show();\n }\n }\n }", "public void saveButtonPressed(ActionEvent actionEvent) throws IOException{\n validateInputs(actionEvent);\n\n if (isInputValid) {\n //creates a new Product object with identifier currentProduct\n currentProduct = new Product(productNameInput, productInventoryLevel, productPriceInput, maxInventoryLevelInput, minInventoryLevelInput);\n\n //passes currentProduct as the argument for the .addMethod.\n Inventory.getAllProducts().add(currentProduct);\n\n //utilizes the associatedPartsTableviewHolder wiht a for loop to pass each element as an argument\n //for the .addAssociatedPart method.\n for (Part part : associatedPartTableViewHolder) {\n currentProduct.addAssociatedPart(part);\n }\n\n //calls the returnToMainMen() method.\n mainMenuWindow.returnToMainMenu(actionEvent);\n }\n else {\n isInputValid = true;\n }\n\n }", "public void AddTaskToDB(View view){\n\t\tif (TASK_CREATED == true){\n\t\t\tString name = taskName.getText().toString();\n\t\t\tString desc = taskDescription.getText().toString();\n//\t\t\tlong millisecondsToReminder = 0;\n\t\t\tlong millisecondsToCreated = 0;\n//\t\t\tyear = taskDatePicker.getYear();\n//\t\t\tmonth = taskDatePicker.getMonth() + 1;\n//\t\t\tday = taskDatePicker.getDayOfMonth();\n//\t\t\thour = taskTimePicker.getCurrentHour();\n//\t\t\tminute = taskTimePicker.getCurrentMinute();\n\t\t\ttry {\n\t\t\t\tCalendar cal = Calendar.getInstance();\n\t\t\t\tDate dateCreated = cal.getTime();\n\t\t\t\tmillisecondsToCreated = dateCreated.getTime();\n//\t\t\t\tString dateToParse = day + \"-\" + month + \"-\" + year + \" \" + hour + \":\" + minute;\n//\t\t\t\tSimpleDateFormat dateFormatter = new SimpleDateFormat(\"d-M-yyyy hh:mm\");\n//\t\t\t\tDate date = dateFormatter.parse(dateToParse);\n//\t\t\t\tmillisecondsToReminder = date.getTime();\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} // You will need try/catch around this\n\n\t\t\tBujoDbHandler taskHandler = new BujoDbHandler(view.getContext());\n\t\t\tcurrentTask = new Task(name, desc, millisecondsToCreated);\n\t\t\ttaskHandler.addTask(currentTask);\n\t\t}\n\t}", "private void save(){\n\n this.title = mAssessmentTitle.getText().toString();\n String assessmentDueDate = dueDate != null ? dueDate.toString():\"\";\n Intent intent = new Intent();\n if (update){\n assessment.setTitle(this.title);\n assessment.setDueDate(assessmentDueDate);\n assessment.setType(mAssessmentType);\n intent.putExtra(MOD_ASSESSMENT,assessment);\n } else {\n intent.putExtra(NEW_ASSESSMENT, new Assessment(course.getId(),this.title,mAssessmentType,assessmentDueDate));\n }\n setResult(RESULT_OK,intent);\n finish();\n }", "public static void doSavechanges ( RunData data)\n\t{\n\t\tSessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ());\n\t\tParameterParser params = data.getParameters ();\n\n\t\tString flow = params.getString(\"flow\").trim();\n\n\t\tif(flow == null || \"cancel\".equals(flow))\n\t\t{\n\t\t\tdoCancel(data);\n\t\t\treturn;\n\t\t}\n\n\t\t// get values from form and update STATE_STACK_EDIT_ITEM attribute in state\n\t\tcaptureValues(state, params);\n\n\t\tMap current_stack_frame = peekAtStack(state);\n\n\t\tEditItem item = (EditItem) current_stack_frame.get(STATE_STACK_EDIT_ITEM);\n\n\t\tif(flow.equals(\"showMetadata\"))\n\t\t{\n\t\t\tdoShow_metadata(data);\n\t\t\treturn;\n\t\t}\n\t\telse if(flow.equals(\"hideMetadata\"))\n\t\t{\n\t\t\tdoHide_metadata(data);\n\t\t\treturn;\n\t\t}\n\t\telse if(flow.equals(\"intentChanged\"))\n\t\t{\n\t\t\tdoToggle_intent(data);\n\t\t\treturn;\n\t\t}\n\t\telse if(flow.equals(\"addInstance\"))\n\t\t{\n\t\t\tString field = params.getString(\"field\");\n\t\t\taddInstance(field, item.getProperties());\n\t\t\tResourcesMetadata form = item.getForm();\n\t\t\tList flatList = form.getFlatList();\n\t\t\titem.setProperties(flatList);\n\t\t\treturn;\n\t\t}\n\t\telse if(flow.equals(\"linkResource\"))\n\t\t{\n\t\t\t// captureMultipleValues(state, params, false);\n\t\t\tcreateLink(data, state);\n\t\t\t//Map new_stack_frame = pushOnStack(state);\n\t\t\t//new_stack_frame.put(ResourcesAction.STATE_RESOURCES_HELPER_MODE, ResourcesAction.MODE_ATTACHMENT_SELECT);\n\t\t\tstate.setAttribute(ResourcesAction.STATE_RESOURCES_HELPER_MODE, ResourcesAction.MODE_ATTACHMENT_SELECT);\n\n\t\t\treturn;\n\t\t}\n\n\n\t\tSet alerts = (Set) state.getAttribute(STATE_EDIT_ALERTS);\n\n//\t\tif(item.isStructuredArtifact())\n//\t\t{\n//\t\t\tSchemaBean bean = (SchemaBean) current_stack_frame.get(STATE_STACK_STRUCT_OBJ_SCHEMA);\n//\t\t\tSaveArtifactAttempt attempt = new SaveArtifactAttempt(item, bean.getSchema());\n//\t\t\tvalidateStructuredArtifact(attempt);\n//\n//\t\t\tIterator errorIt = attempt.getErrors().iterator();\n//\t\t\twhile(errorIt.hasNext())\n//\t\t\t{\n//\t\t\t\tValidationError error = (ValidationError) errorIt.next();\n//\t\t\t\talerts.add(error.getDefaultMessage());\n//\t\t\t}\n//\t\t}\n\n\t\tif(alerts.isEmpty())\n\t\t{\n\t\t\t// populate the property list\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// get an edit\n\t\t\t\tContentCollectionEdit cedit = null;\n\t\t\t\tContentResourceEdit redit = null;\n\t\t\t\tGroupAwareEdit gedit = null;\n\t\t\t\tResourcePropertiesEdit pedit = null;\n\n\t\t\t\tif(item.isFolder())\n\t\t\t\t{\n\t\t\t\t\tcedit = ContentHostingService.editCollection(item.getId());\n\t\t\t\t\tgedit = cedit;\n\t\t\t\t\tpedit = cedit.getPropertiesEdit();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tredit = ContentHostingService.editResource(item.getId());\n\t\t\t\t\tgedit = redit;\n\t\t\t\t\tpedit = redit.getPropertiesEdit();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tBoolean preventPublicDisplay = (Boolean) state.getAttribute(STATE_PREVENT_PUBLIC_DISPLAY);\n\t\t\t\t\tif(preventPublicDisplay == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tpreventPublicDisplay = Boolean.FALSE;\n\t\t\t\t\t\tstate.setAttribute(STATE_PREVENT_PUBLIC_DISPLAY, preventPublicDisplay);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(! preventPublicDisplay.booleanValue())\n\t\t\t\t\t{\n\t\t\t\t\t\tContentHostingService.setPubView(gedit.getId(), item.isPubview());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(! AccessMode.GROUPED.toString().equals(item.getAccess()) && AccessMode.GROUPED == gedit.getAccess())\n\t\t\t\t\t{\n\t\t\t\t\t\tgedit.clearGroupAccess();\n\t\t\t\t\t}\n\t\t\t\t\telse if(AccessMode.GROUPED.toString().equals(item.getAccess()) && ! item.getEntityGroupRefs().isEmpty())\n\t\t\t\t\t{\n\t\t\t\t\t\tgedit.setGroupAccess(item.getEntityGroupRefs());\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tgedit.clearGroupAccess();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch(InconsistentException e)\n\t\t\t\t{\n\t\t\t\t\t// TODO: Should this be reported to user??\n\t\t\t\t\tlogger.debug(\"ResourcesAction.doSavechanges ***** InconsistentException changing groups ***** \" + e.getMessage());\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\tif(ContentHostingService.isAvailabilityEnabled())\n\t\t\t\t{\n\t\t\t\t\tTime releaseDate = null;\n\t\t\t\t\tTime retractDate = null;\n\t\t\t\t\t\n\t\t\t\t\tboolean hidden = item.isHidden();\n\t\t\t\t\t\n\t\t\t\t\tif(item.useReleaseDate())\n\t\t\t\t\t{\n\t\t\t\t\t\treleaseDate = item.getReleaseDate();\n\t\t\t\t\t}\n\t\t\t\t\tif(item.useRetractDate())\n\t\t\t\t\t{\n\t\t\t\t\t\tretractDate = item.getRetractDate();\n\t\t\t\t\t}\n\t\t\t\t\tgedit.setAvailability(hidden, releaseDate, retractDate);\n\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\tif(item.isFolder())\n\t\t\t\t{\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(item.isUrl())\n\t\t\t\t\t{\n\t\t\t\t\t\tredit.setContent(item.getFilename().getBytes());\n\t\t\t\t\t}\n\t\t\t\t\telse if(item.isStructuredArtifact())\n\t\t\t\t\t{\n\t\t\t\t\t\tredit.setContentType(item.getMimeType());\n\t\t\t\t\t\tredit.setContent(item.getContent());\n\t\t\t\t\t}\n\t\t\t\t\telse if(item.contentHasChanged())\n\t\t\t\t\t{\n\t\t\t\t\t\tredit.setContentType(item.getMimeType());\n\t\t\t\t\t\tredit.setContent(item.getContent());\n\t\t\t\t\t}\n\t\t\t\t\telse if(item.contentTypeHasChanged())\n\t\t\t\t\t{\n\t\t\t\t\t\tredit.setContentType(item.getMimeType());\n\t\t\t\t\t}\n\n\t\t\t\t\tBasicRightsAssignment rightsObj = item.getRights();\n\t\t\t\t\trightsObj.addResourceProperties(pedit);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tString copyright = StringUtil.trimToNull(params.getString (\"copyright\"));\n\t\t\t\t\tString newcopyright = StringUtil.trimToNull(params.getCleanString (NEW_COPYRIGHT));\n\t\t\t\t\tString copyrightAlert = StringUtil.trimToNull(params.getString(\"copyrightAlert\"));\n\t\t\t\t\tif (copyright != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (state.getAttribute(COPYRIGHT_NEW_COPYRIGHT) != null && copyright.equals(state.getAttribute(COPYRIGHT_NEW_COPYRIGHT)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (newcopyright != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tpedit.addProperty (ResourceProperties.PROP_COPYRIGHT, newcopyright);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\talerts.add(rb.getString(\"specifycp2\"));\n\t\t\t\t\t\t\t\t// addAlert(state, rb.getString(\"specifycp2\"));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if (state.getAttribute(COPYRIGHT_SELF_COPYRIGHT) != null && copyright.equals (state.getAttribute(COPYRIGHT_SELF_COPYRIGHT)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tString mycopyright = (String) state.getAttribute (STATE_MY_COPYRIGHT);\n\t\t\t\t\t\t\tpedit.addProperty (ResourceProperties.PROP_COPYRIGHT, mycopyright);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tpedit.addProperty(ResourceProperties.PROP_COPYRIGHT_CHOICE, copyright);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (copyrightAlert != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tpedit.addProperty (ResourceProperties.PROP_COPYRIGHT_ALERT, copyrightAlert);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tpedit.removeProperty (ResourceProperties.PROP_COPYRIGHT_ALERT);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!(item.isFolder() && (item.getId().equals ((String) state.getAttribute (STATE_HOME_COLLECTION_ID)))))\n\t\t\t\t{\n\t\t\t\t\tpedit.addProperty (ResourceProperties.PROP_DISPLAY_NAME, item.getName());\n\t\t\t\t}\t// the home collection's title is not modificable\n\n\t\t\t\tpedit.addProperty (ResourceProperties.PROP_DESCRIPTION, item.getDescription());\n\t\t\t\t// deal with quota (collections only)\n\t\t\t\tif ((cedit != null) && item.canSetQuota())\n\t\t\t\t{\n\t\t\t\t\tif (item.hasQuota())\n\t\t\t\t\t{\n\t\t\t\t\t\t// set the quota\n\t\t\t\t\t\tpedit.addProperty(ResourceProperties.PROP_COLLECTION_BODY_QUOTA, item.getQuota());\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// clear the quota\n\t\t\t\t\t\tpedit.removeProperty(ResourceProperties.PROP_COLLECTION_BODY_QUOTA);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tList metadataGroups = (List) state.getAttribute(STATE_METADATA_GROUPS);\n\n\t\t\t\tstate.setAttribute(STATE_EDIT_ALERTS, alerts);\n\t\t\t\tsaveMetadata(pedit, metadataGroups, item);\n\t\t\t\talerts = (Set) state.getAttribute(STATE_EDIT_ALERTS);\n\n\t\t\t\t// commit the change\n\t\t\t\tif (cedit != null)\n\t\t\t\t{\n\t\t\t\t\tContentHostingService.commitCollection(cedit);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tContentHostingService.commitResource(redit, item.getNotification());\n\t\t\t\t}\n\n\t\t\t\tcurrent_stack_frame.put(STATE_STACK_EDIT_INTENT, INTENT_REVISE_FILE);\n\n\t\t\t\tBoolean preventPublicDisplay = (Boolean) state.getAttribute(STATE_PREVENT_PUBLIC_DISPLAY);\n\t\t\t\tif(preventPublicDisplay == null)\n\t\t\t\t{\n\t\t\t\t\tpreventPublicDisplay = Boolean.FALSE;\n\t\t\t\t\tstate.setAttribute(STATE_PREVENT_PUBLIC_DISPLAY, preventPublicDisplay);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (TypeException e)\n\t\t\t{\n\t\t\t\talerts.add(rb.getString(\"typeex\") + \" \" + item.getId());\n\t\t\t\t// addAlert(state,\" \" + rb.getString(\"typeex\") + \" \" + item.getId());\n\t\t\t}\n\t\t\tcatch (IdUnusedException e)\n\t\t\t{\n\t\t\t\talerts.add(RESOURCE_NOT_EXIST_STRING);\n\t\t\t\t// addAlert(state,RESOURCE_NOT_EXIST_STRING);\n\t\t\t}\n\t\t\tcatch (PermissionException e)\n\t\t\t{\n\t\t\t\talerts.add(rb.getString(\"notpermis10\") + \" \" + item.getId());\n\t\t\t\t// addAlert(state, rb.getString(\"notpermis10\") + \" \" + item.getId() + \". \" );\n\t\t\t}\n\t\t\tcatch (InUseException e)\n\t\t\t{\n\t\t\t\talerts.add(rb.getString(\"someone\") + \" \" + item.getId());\n\t\t\t\t// addAlert(state, rb.getString(\"someone\") + \" \" + item.getId() + \". \");\n\t\t\t}\n\t\t\tcatch (ServerOverloadException e)\n\t\t\t{\n\t\t\t\talerts.add(rb.getString(\"failed\"));\n\t\t\t}\n\t\t\tcatch (OverQuotaException e)\n\t\t\t{\n\t\t\t\talerts.add(rb.getString(\"changing1\") + \" \" + item.getId() + \" \" + rb.getString(\"changing2\"));\n\t\t\t\t// addAlert(state, rb.getString(\"changing1\") + \" \" + item.getId() + \" \" + rb.getString(\"changing2\"));\n\t\t\t}\n\t\t\tcatch(RuntimeException e)\n\t\t\t{\n\t\t\t\tlogger.debug(\"ResourcesAction.doSavechanges ***** Unknown Exception ***** \" + e.getMessage());\n\t\t\t\tlogger.debug(\"ResourcesAction.doSavechanges ***** Unknown Exception ***** \", e);\n\t\t\t\talerts.add(rb.getString(\"failed\"));\n\t\t\t}\n\t\t}\t// if - else\n\n\t\tif(alerts.isEmpty())\n\t\t{\n\t\t\t// modify properties sucessful\n\t\t\tString mode = (String) state.getAttribute(STATE_MODE);\n\t\t\tpopFromStack(state);\n\t\t\tresetCurrentMode(state);\n\t\t}\t//if-else\n\t\telse\n\t\t{\n\t\t\tIterator alertIt = alerts.iterator();\n\t\t\twhile(alertIt.hasNext())\n\t\t\t{\n\t\t\t\tString alert = (String) alertIt.next();\n\t\t\t\taddAlert(state, alert);\n\t\t\t}\n\t\t\talerts.clear();\n\t\t\tstate.setAttribute(STATE_EDIT_ALERTS, alerts);\n\t\t\t// state.setAttribute(STATE_CREATE_MISSING_ITEM, missing);\n\t\t}\n\n\t}", "@Override\n\tpublic void save() {\n\t\tSystem.out.println(\"save method\");\n\t}", "public void saveMealPlanner(){\n Data.<Days>saveList(ObservableWeekList, mealPlannerFile);\n }", "void onSaveClicked();", "private void handleMenuSave() {\n String initialDirectory = getInitialDirectory();\n String initialFileName = getInitialFilename(Constants.APP_FILEEXTENSION_SPV);\n File file = FileChooserHelper.showSaveDialog(initialDirectory, initialFileName, this);\n\n if (file == null) {\n return;\n }\n\n handleFileStorageFactoryResult(controller.saveFile(file.getAbsolutePath()));\n }", "private void saveAndExit() {\n if (yesNoQuestion(\"Would you like to save the current active courses to the saved list before saving?\")) {\n addActiveCourseListToCourseList();\n }\n try {\n JsonWriter writer = new JsonWriter(\"./data/ScheduleList.json\",\n \"./data/CourseList.json\");\n writer.open(true);\n writer.writeScheduleList(scheduleList);\n writer.close(true);\n\n writer.open(false);\n writer.writeCourseList(courseList);\n writer.close(false);\n } catch (IOException ioe) {\n System.out.println(\"File Not Found, failed to save\");\n } catch (Exception e) {\n System.out.println(\"Unexpected Error, failed to save\");\n }\n\n }", "@Override\n\tpublic void doTaskWorkPostSave(HttpServletRequest request,\n\t\t\tHttpServletResponse response, User user, Db db)\n\t{\n\t\t// time to update sampling timepoints\n\t\tString cultureType = ItemType.STRAINCULTURE;\n\t\tculture = getServerItemValue(ItemType.STRAINCULTURE);\n\t\tif(WtUtils.isNullOrBlank(culture))\n\t\t{\n\t\t\tculture = getServerItemValue(ItemType.EXPERIMENTALCULTURE);\n\t\t\tcultureType = ItemType.EXPERIMENTALCULTURE;\n\t\t}\n\t\t\n\t\t// record the timepoints, either from UI table or row in file\n\t\tArrayList<String> params = new ArrayList<String>();\n\t\tList<String> lsTimepoints = getServerItemValues(\"Timepoint\");\n\t\tList stplist = getServerItemValues(ItemType.SAMPLING_TIMEPT);\n\t\tint idx = 0;\n\t\t// -- may be only one timept if row in file\n\t\tfor (String timept : lsTimepoints)\n\t\t{\n\t\t\tif(timept.startsWith(\"'\"))\n\t\t\t{\n\t\t\t\t// remove Excel format flag\n\t\t\t\ttimept = timept.substring(1);\n\t\t\t}\n\t\t\t// add any new timepoints to the custom db tables\n\t\t\tparams.clear();\n\t\t\tparams.add((String)stplist.get(idx)); // making assoc w/datetime now, so order is unimportant\n\t\t\tparams.add(culture);\n\t\t\tparams.add(timept);\n\t\t\tparams.add(getTranId()+\"\");\n\t\t\ttry\n\t\t\t{\n\t\t\t\tdbHelper.callStoredProc(db, \"spEMRE_insertSamplingTimepoint\", params, false);\n\t\t\t}\n\t\t\tcatch (Exception ex)\n\t\t\t{\n\t\t\t\tif(ex.getMessage().indexOf(\"already exists\") > 0)\n\t\t\t\t{\n\t\t\t\t\tthrow new LinxUserException(ex.getMessage());\n\t\t\t\t}\n\t\t\t\tthrow new LinxUserException(\"Error saving timepoint \" + timept\n\t\t\t\t\t\t+ \" for culture '\" + culture + \"':\" + ex.getMessage());\n\t\t\t}\n\t\t\tidx++;\n\t\t}\n\t\tsetMessage(\"Successfully updated sampling timepoints through culture \" + culture);\n\n\t}", "private void saveInfoHelper(){\n\n if(!isAnyEmpty()) {\n boolean firstSave = (prefs.getString(\"email\", null) == null);\n //store first name\n editor.putString(\"fname\", fname.getText().toString());\n // store last name\n editor.putString(\"lname\", lname.getText().toString());\n // store email\n editor.putString(\"email\", email.getText().toString());\n // store password\n editor.putString(\"password\", password.getText().toString());\n // store currency\n editor.putInt(\"curr\", spinner_curr.getSelectedItemPosition());\n // store stock\n editor.putInt(\"stock\", spinner_stock.getSelectedItemPosition());\n // store date\n editor.putString(\"date\", new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\").format(Calendar.getInstance().getTime()));\n\n editor.putString(\"token\", \"\");\n\n editor.commit();\n\n Toast.makeText(this, R.string.data_saved, Toast.LENGTH_SHORT).show();\n\n loadInfo(); //to show new data immediately without refreshing the page\n\n requestToken();\n\n if(firstSave){\n finish();\n }\n\n }else{\n Toast.makeText(this, R.string.data_empty, Toast.LENGTH_SHORT).show();\n }\n\n }", "abstract public void saveData(Bundle bundle);", "@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}", "private void save() {\n Saver.saveTeam(team);\n }", "public void save() {\t\n\t\n\t\n\t}", "void save();", "void save();", "void save();", "public void buttonSave(View view) {\n\n Map<String, String> params = new HashMap();\n params.put(\"name\", editTextName.getText().toString());\n params.put(\"email\", editTextEmail.getText().toString());\n\n JSONObject jsonParams = new JSONObject(params);\n String stringParams = jsonParams.toString();\n\n new BackgroundEditTask(stringParams).execute();\n }", "public void saveTodo() {\r\n File file = new File(\"C:\\\\Users\\\\Dalia\\\\Desktop\\\\CPSC 210\\\\Project\\\\project_b2h3b\\\\data\");\r\n JFileChooser chooser = new JFileChooser();\r\n chooser.setDialogTitle(\"Specify a file to save\");\r\n chooser.setCurrentDirectory(file);\r\n int userSelection = chooser.showSaveDialog(null);\r\n if (userSelection == JFileChooser.APPROVE_OPTION) {\r\n File f = chooser.getSelectedFile();\r\n System.out.println(\"Save as file: \" + f.getAbsolutePath());\r\n String tempFileName = f.getAbsolutePath();\r\n writer = new MyTodoJsonWriter(tempFileName);\r\n try {\r\n writer.open();\r\n writer.write(myTodo);\r\n fileName = tempFileName;\r\n playSound(\"c1.wav\");\r\n } catch (IOException ioException) {\r\n JOptionPane.showMessageDialog(null, \"Cannot save todolist!\");\r\n } finally {\r\n writer.close();\r\n JOptionPane.showMessageDialog(null, \"Save successful!\");\r\n }\r\n todoListGui();\r\n }\r\n }", "public void save() {\n }", "void handleSaveClicked(ActionEvent event);", "private void btnSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSaveActionPerformed\n boolean flag = this.cutiController.save(txtCutiID.getText(), (txtTglAwal.getText()), (txtTglAkhir.getText()),\n txtKet.getText(), cmbCutiKhususID.getSelectedIndex());\n String message = \"Failed to save data...\";\n if (flag){\n message = \"Success to save data...\";\n }\n JOptionPane.showMessageDialog(this, message, \"Allert / Notification\", \n JOptionPane.INFORMATION_MESSAGE);\n \n bindingTable();\n reset();\n }", "@Override\n\tpublic void saveTestingData() {\n\t\t\n\t}", "private void save() {\n Toast.makeText(ContactActivity.this, getString(R.string.save_contact_toast), Toast.LENGTH_SHORT).show();\n\n String nameString = name.getText().toString();\n String titleString = title.getText().toString();\n String emailString = email.getText().toString();\n String phoneString = phone.getText().toString();\n String twitterString = twitter.getText().toString();\n \n if (c != null) {\n datasource.editContact(c, nameString, titleString, emailString, phoneString, twitterString);\n }\n else {\n \tc = datasource.createContact(nameString, titleString, emailString, phoneString, twitterString);\n }\n }", "@Override\r\n public void save(DiagramTask task)\r\n {\r\n try\r\n {\r\n TASK_DAO.addTask(task);\r\n addMessage(\"Success!\", \"Task added correctly.\");\r\n \r\n }\r\n catch (HibernateException e)\r\n {\r\n addMessage(\"Error!\", \"Please try again.\");\r\n Logger.getLogger(DiagramTaskBean.class.getName()).log(Level.SEVERE, null, e);\r\n }\r\n\r\n }", "private void sendData() {\n String Own_Easting = OEast.getText().toString();\n String Own_Northing = ONorth.getText().toString();\n String En_Easting = EEast.getText().toString();\n String En_nothing = ENorth.getText().toString();\n String OTbg = OTBG.getText().toString();\n String rt=Rt.getText().toString();\n String add=Add.getText().toString();\n\n DB bg = new DB(this);\n bg.execute(Own_Easting,Own_Northing,En_Easting,En_nothing\n ,OTbg,rt,add);\n\n }", "public void save() {\n\t\tSystem.out.println(\"-----------from PersonDao.save()\");\n\t}", "@Override\n public void saveTask(TaskEntity task) {\n this.save(task);\n }", "private void saveStation() {\n MainActivity.new_station = true;\n stationname = user_stationname_input.getText().toString();\n stationurl = user_station_input.getText().toString();\n Intent passStation = new Intent(addStationActivity.this, MainActivity.class);\n passStation.putExtra(\"stationurl\", stationurl);\n passStation.putExtra(\"stationname\", stationname);\n startActivity(passStation);\n }", "@Override\n public void saveData() {\n System.out.println(\"GateWay\");\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate void saveAndExit() throws IrregularFormatException{\n\t\tJSONObject event;\n\t\ttry{\n\t\t\tevent = new JSONObject();\n\t\t\tevent.put(Event.NAME_STRING, (String)nameText.getText());\n\t\t\tevent.put(Event.DATE_STRING, mDate);\n\t\t\tif(allDay.isSelected())\n\t\t\t{\n\t\t\t\tevent.put(Event.START_STRING, \"-1\");\n\t\t\t\tevent.put(Event.STOP_STRING, \"-1\");\n\t\t\t}else{\n\t\t\t\tevent.put(Event.START_STRING, startTime.getSelectedItem().toString());\n\t\t\t\tevent.put(Event.STOP_STRING, endTime.getSelectedItem().toString());\n\t\t\t}\n\t\t\tevent.put(Event.DESC_STRING, (String)descriptionText.getText());\n\t\t\t\n\t\t\tRandom r = new Random(System.currentTimeMillis());\n\t\t\tlong id = r.nextLong();\n\t\t\tevent.put(Event.ID_STRING, id );\n\t\t}catch(Exception e){\n\t\t\tthrow new IrregularFormatException();\n\t\t}\n\n\t\tEventCache.getInstance().addEvent(event);\n\t\tJOptionPane.showMessageDialog(this, \"Event Saved!\",\"Event Planner\",JOptionPane.INFORMATION_MESSAGE);\n\t\tthis.dispose();\n\t\tLock.getLock().release();\n\t\tCalendarApp.app.updateCurrentView();\n\t}", "public void save(){\r\n\t\tmanager.save(this);\r\n\t}", "public void saveProfileEditData() {\r\n\r\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 void saveResults(){\n //Tell adapter to save gathered data\n //Call appropriate function\n }", "private void saveProduct() {\n //Delegating to the Presenter to trigger focus loss on listener registered Views,\n //in order to persist their data\n mPresenter.triggerFocusLost();\n\n //Retrieving the data from the views and the adapter\n String productName = mEditTextProductName.getText().toString().trim();\n String productSku = mEditTextProductSku.getText().toString().trim();\n String productDescription = mEditTextProductDescription.getText().toString().trim();\n ArrayList<ProductAttribute> productAttributes = mProductAttributesAdapter.getProductAttributes();\n mCategoryOtherText = mEditTextProductCategoryOther.getText().toString().trim();\n\n //Delegating to the Presenter to initiate the Save process\n mPresenter.onSave(productName,\n productSku,\n productDescription,\n mCategoryLastSelected,\n mCategoryOtherText,\n productAttributes\n );\n }", "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 }" ]
[ "0.71911913", "0.6985328", "0.6920634", "0.6605918", "0.6587292", "0.6462684", "0.6424102", "0.6377799", "0.6307151", "0.6253238", "0.6244674", "0.6165885", "0.61418444", "0.6092721", "0.6086487", "0.60561615", "0.60521203", "0.6046085", "0.6036003", "0.5968568", "0.59659904", "0.5961079", "0.5926746", "0.59155923", "0.58267635", "0.58162385", "0.58099866", "0.5791207", "0.578561", "0.5776942", "0.5760701", "0.57501245", "0.5742145", "0.5723867", "0.5714571", "0.5712653", "0.5704309", "0.5685776", "0.56120485", "0.56051826", "0.55589694", "0.5556401", "0.5549533", "0.5539877", "0.5533958", "0.55315024", "0.55315024", "0.55315024", "0.55315024", "0.5524577", "0.5523673", "0.5515894", "0.55128026", "0.54987293", "0.5497912", "0.54947686", "0.54924136", "0.54798275", "0.5479105", "0.5451827", "0.54204136", "0.53798854", "0.53706324", "0.5367137", "0.53653497", "0.53630525", "0.53582686", "0.5347712", "0.5344098", "0.53419423", "0.5339661", "0.5338117", "0.533179", "0.533104", "0.53307647", "0.5325435", "0.53165394", "0.5305253", "0.5305253", "0.5305253", "0.5303845", "0.53036284", "0.52993315", "0.5296941", "0.52947545", "0.52792144", "0.527192", "0.5268441", "0.5268208", "0.5268147", "0.52539706", "0.5248828", "0.5236248", "0.52353805", "0.52308166", "0.52169013", "0.52090305", "0.5204836", "0.5202185", "0.5201414" ]
0.6282537
9
Insert the book only if mBookId matches DEFAULT_BOOK_ID Otherwise update it call finish in any case
@Override public void run() { if (mBookId == DEFAULT_BOOK_ID) { mDb.bookDao().insertBook(bookEntry); } else { //update book bookEntry.setId(mBookId); mDb.bookDao().updateBook(bookEntry); } finish(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean insertBook(Book book) {\r\n books.add(book);\r\n return true;\r\n }", "public boolean insertBook(Book book) {\n \tassert _loggerHelper != null;\n \t\n \tif (book == null) {\n \t\tthrow new IllegalArgumentException();\n \t}\n \t\n \tboolean result = insertBook(book, false);\n \t_loggerHelper.logInfo(result ? \"Book was succesfully inserted\" : \"Book insertion failed\");\n \treturn result;\n }", "boolean insertBook(Book book);", "@Override\r\n\tpublic int insertBook(Book book) {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic void storedBook(Book book) {\n\t\tticketDao.insertBook(book);\r\n\t}", "@Override\n\tpublic String insertBook(Book book) {\n\t\treturn \"Book successfully inserted\";\n\t}", "private void saveData() {\n readViews();\n final BookEntry bookEntry = new BookEntry(mNameString, mQuantityString, mPriceString, mSupplier, mPhoneString);\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n // Insert the book only if mBookId matches DEFAULT_BOOK_ID\n // Otherwise update it\n // call finish in any case\n if (mBookId == DEFAULT_BOOK_ID) {\n mDb.bookDao().insertBook(bookEntry);\n } else {\n //update book\n bookEntry.setId(mBookId);\n mDb.bookDao().updateBook(bookEntry);\n }\n finish();\n }\n });\n }", "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 }", "@Override\r\n\tpublic boolean addBook(BookDto book) {\n\t\tsqlSession.insert(ns + \"addBook\", book);\t\t\r\n\t\treturn true;\r\n\t}", "public boolean addBook(Books books){\n String sql=\"insert into Book(book_name,book_publish_date,book_author,book_price,scraption)values(?,?,?,?,?)\";\n boolean flag=dao.exeucteUpdate(sql,new Object[]{books.getBook_name(),books.getBook_publish_date(),\n books.getBook_author_name(),books.getBook_price(),books.getScraption()});\n return flag;\n }", "private void insertBook() {\n /// Create a ContentValues object with the dummy data\n ContentValues values = new ContentValues();\n values.put(BookEntry.COLUMN_BOOK_NAME, \"Harry Potter and the goblet of fire\");\n values.put(BookEntry.COLUMN_BOOK_PRICE, 100);\n values.put(BookEntry.COLUMN_BOOK_QUANTITY, 2);\n values.put(BookEntry.COLUMN_BOOK_SUPPLIER_NAME, \"Supplier 1\");\n values.put(BookEntry.COLUMN_BOOK_SUPPLIER_PHONE, \"972-3-1234567\");\n\n // Insert the dummy data to the database\n Uri uri = getContentResolver().insert(BookEntry.CONTENT_URI, values);\n // Show a toast message\n String message;\n if (uri == null) {\n message = getResources().getString(R.string.error_adding_book_toast).toString();\n } else {\n message = getResources().getString(R.string.book_added_toast).toString();\n }\n Toast.makeText(this, message, Toast.LENGTH_LONG).show();\n }", "@Override\r\n\tpublic boolean addBook(Book book) {\n\r\n\t\tif (searchBook(book.getISBN()).getISBN() == 98564567l) {\r\n\t\t\ttransactionTemplate.setReadOnly(false);\r\n\t\t\treturn transactionTemplate.execute(new TransactionCallback<Boolean>() {\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic Boolean doInTransaction(TransactionStatus status) {\r\n\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\ttry {\r\n\r\n\t\t\t\t\t\tint rows = bookDAO.addBook(book);\r\n\t\t\t\t\t\tif (rows > 0)\r\n\t\t\t\t\t\t\treturn true;\r\n\r\n\t\t\t\t\t} catch (Exception exception) {\r\n\t\t\t\t\t\tstatus.setRollbackOnly();\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn false;\r\n\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic Book updateBook(Book book) {\n\t\treturn bd.save(book);\r\n\t}", "@Override\r\n\tpublic Book addBook(Book book) {\n\t\treturn bd.save(book);\r\n\t}", "@Override\n\tpublic boolean addBook(Book book) throws DAOException {\n\t\treturn false;\n\t}", "int insertSelective(BookInfo record);", "@Override\n\tpublic boolean insertRegisterBook(yw_RegisterBook yw_RegisterBook) {\n\t\tyw_RegisterBookMapper.insertRegisterBook(yw_RegisterBook);\n\t\treturn false;\n\t}", "public boolean bookSave(Book book) {\n\t\t\r\n\t\treturn true;\r\n\t}", "@Override\n public int addBook(Book book) throws DaoException {\n DataBaseHelper helper = new DataBaseHelper();\n ResultSet resultSet = null;\n try (Connection connection = SqlConnector.connect();\n PreparedStatement statementAdd =\n helper.prepareStatementAdd(connection, book);\n PreparedStatement statementSelect =\n helper.prepareStatementSelect(connection, book)) {\n statementAdd.executeUpdate();\n resultSet = statementSelect.executeQuery();\n resultSet.next();\n return new BookCreator().getBookId(resultSet);\n } catch (SQLException e) {\n throw new DaoException(e);\n } finally {\n close(resultSet);\n }\n }", "private boolean insertBook(Book book, boolean replaceExisting) {\n \tassert book != null;\n \tassert _xsdFilePath != null && !_xsdFilePath.isEmpty();\n \tassert _libFilePath != null && !_libFilePath.isEmpty();\n \tassert _schemaFactory != null;\n \tassert _loggerHelper != null;\n \t\n \tString xmlToValidate = libraryNodeStringFromBook(book);\n \tassert xmlToValidate != null && !xmlToValidate.isEmpty();\n \t\n \tboolean result = validateXmlStringWithSchema(xmlToValidate, _xsdFilePath);\n \t_loggerHelper.logInfo(result ? \"Insertion validation passed\" : \"Insertion validation failed\");\n \t\n \tif(result) {\n \t\ttry {\n \t\t\tFile f = new File(_libFilePath);\n \t\tFileInputStream fis = new FileInputStream(f);\n \t\tbyte[] ba = new byte[(int)f.length()]; \n \t\tfis.read(ba); \t\n \t\tfis.close();\n \t\t\n \t\tVTDGen vg = new VTDGen(); \n \t\tvg.setDoc(ba); \n \t\tvg.parse(false); \n \t\tVTDNav vn = vg.getNav(); \n \t\t\n \t\tXMLModifier xm = new XMLModifier();\n \t\txm.bind(vn);\n \t\t\n \t\t// Check if book already exists\n \t\tvn.toElement(VTDNav.ROOT);\n \t\tString isbn = book.getAttributes().getISBN();\n \t\tif (vn.toElement(VTDNav.FIRST_CHILD, \"Book\")) {\n \t\tdo {\n \t\t\tint i = vn.getAttrVal(\"ISBN\");\n \t\t\tif (i!=-1 && vn.toString(i).equals(isbn)) {\n \t\t\t\t_loggerHelper.logWarning(\"Book with given ISBN \\\"\" + isbn + \"\\\" arelady exists\");\n \t\t\t\t\n \t\t\t\t// TODO: Get rid of empty tabs after replacing\n \t\t\t\tif (replaceExisting) {\n \t\t\t\t\t_loggerHelper.logWarning(\"Book with ISBN \\\"\" + isbn + \"\\\" will be replaced\");\n \t\t\t\t\txm.remove();\n \t\t\t\t} else {\n \t\t\t\t\treturn false;\n \t\t\t\t}\n \t\t\t}\n \t\t} while (vn.toElement(VTDNav.NEXT_SIBLING, \"Book\"));\n \t}\n \t\t\n \t\tvn.toElement(VTDNav.ROOT);\n \t\t// TODO: Replace hard-coded nesting level number\n \t\txm.insertAfterHead(identXmlStringWithTabs(\"\\n\" + book.toXML(), 1)); \n \t\t\n \t\t// Insert book authors if they don't exists\n \t\tfor (Author author : book.getAuthorList()) {\n \t\t\tboolean exists = false;\n \t\t\tString authorId = author.getIdent();\n \t\t\tvn.toElement(VTDNav.ROOT);\n \t\t\tif (vn.toElement(VTDNav.FIRST_CHILD, \"Author\")) {\n \t\tdo {\n \t\t\tint i = vn.getAttrVal(\"ident\");\n \t\t\tif (i!=-1 && vn.toString(i).equals(authorId)) {\n \t\t\t\t// If author with given ident already exists, skip\n \t\t\t\t// Note: We are assuming idents are unique for given first-last-name pair\n \t\t\t\texists = true;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t} while (vn.toElement(VTDNav.NEXT_SIBLING, \"Author\"));\n \t}\n \t\t\t\n \t\t\tif (!exists) {\n \t\t\t\tvn.toElement(VTDNav.ROOT);\n \t\tvn.toElement(VTDNav.LAST_CHILD, \"Book\");\n \t\txm.insertAfterElement(identXmlStringWithTabs(\"\\n\" + author.toXML(), 1)); \n \t\t\t}\n \t\t}\n \t\t\n \t\txm.output(new FileOutputStream(_libFilePath));\n \t\t \n \t\treturn true;\n \t\t\n \t} catch (Exception e) { \n \t\t_loggerHelper.logError(e.getMessage());\n return false;\n \t}\n \t} else {\n \t\treturn false;\n \t}\n }", "@Override\n public void run() {\n if (mBookId != DEFAULT_BOOK_ID) {\n bookEntry.setId(mBookId);\n mDb.bookDao().deleteBook(bookEntry);\n }\n finish();\n }", "int insertSelective(Book record);", "int insertSelective(Book record);", "private void update(){\n if(!((EditText)findViewById(R.id.bookTitle)).getText().toString().trim().isEmpty()){\n if(!appData.getCurrentBookId().isEmpty()){\n mRealm.executeTransactionAsync(new Realm.Transaction() {\n @Override\n public void execute(Realm realm) {\n BookInfo mBookInfo= realm.where(BookInfo.class).equalTo(\"mBookId\",\n appData.getCurrentBookId()).findFirst();\n mBookInfo.setBookTitle(((EditText) findViewById(R.id.bookTitle))\n .getText().toString());\n mBookInfo.setAuthorsNames(((EditText) findViewById(R.id.bookAuthor))\n .getText().toString());\n mBookInfo.setGenre(mSelectedGenre.get(\"position\"));\n }\n });\n Intent main = new Intent(this,BookListActivity.class);\n startActivity(main);\n finish();\n }else{\n\n mRealm.executeTransactionAsync(new Realm.Transaction() {\n @Override\n public void execute(Realm realm) {\n\n BookInfo mBookInfo = realm.createObject(BookInfo.class,\n UUID.randomUUID().toString());\n mBookInfo.setBookTitle(((EditText) findViewById(R.id.bookTitle))\n .getText().toString());\n mBookInfo.setAuthorsNames(((EditText) findViewById(R.id.bookAuthor))\n .getText().toString());\n mBookInfo.setGenre(mSelectedGenre.get(\"position\"));\n }\n });\n Intent main = new Intent(this,BookListActivity.class);\n startActivity(main);\n finish();\n\n }\n }else{\n new AlertDialog.Builder(EditOrAddBookActivity.this)\n .setTitle(\"No Book Title\")\n .setMessage(\"You must at the very least have a book title\")\n .setCancelable(false)\n .setPositiveButton(\"ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n // Whatever...\n }\n }).show();\n }\n }", "int insertSelective(CmsRoomBook record);", "private void saveBook() {\n // Read the data from the fields\n String productName = productNameEditText.getText().toString().trim();\n String price = priceEditText.getText().toString().trim();\n String quantity = Integer.toString(bookQuantity);\n String supplierName = supplierNameEditText.getText().toString().trim();\n String supplierPhone = supplierPhoneEditText.getText().toString().trim();\n\n // Check if any fields are empty, throw error message and return early if so\n if (productName.isEmpty() || price.isEmpty() ||\n quantity.isEmpty() || supplierName.isEmpty() ||\n supplierPhone.isEmpty()) {\n Toast.makeText(this, R.string.editor_activity_empty_message, Toast.LENGTH_SHORT).show();\n return;\n }\n\n // Format the price so it has 2 decimal places\n String priceFormatted = String.format(java.util.Locale.getDefault(), \"%.2f\", Float.parseFloat(price));\n\n // Create the ContentValue object and put the information in it\n ContentValues contentValues = new ContentValues();\n contentValues.put(BookEntry.COLUMN_BOOK_PRODUCT_NAME, productName);\n contentValues.put(BookEntry.COLUMN_BOOK_PRICE, priceFormatted);\n contentValues.put(BookEntry.COLUMN_BOOK_QUANTITY, quantity);\n contentValues.put(BookEntry.COLUMN_BOOK_SUPPLIER_NAME, supplierName);\n contentValues.put(BookEntry.COLUMN_BOOK_SUPPLIER_PHONE_NUMBER, supplierPhone);\n\n // Save the book data\n if (currentBookUri == null) {\n // New book, so insert into the database\n Uri newUri = getContentResolver().insert(BookEntry.CONTENT_URI, contentValues);\n\n // Show toast if successful or not\n if (newUri == null)\n Toast.makeText(this, getString(R.string.editor_insert_book_failed), Toast.LENGTH_SHORT).show();\n else\n Toast.makeText(this, getString(R.string.editor_insert_book_successful), Toast.LENGTH_SHORT).show();\n } else {\n // Existing book, so save changes\n int rowsAffected = getContentResolver().update(currentBookUri, contentValues, null, null);\n\n // Show toast if successful or not\n if (rowsAffected == 0)\n Toast.makeText(this, getString(R.string.editor_update_book_failed), Toast.LENGTH_SHORT).show();\n else\n Toast.makeText(this, getString(R.string.editor_update_book_successful), Toast.LENGTH_SHORT).show();\n\n }\n\n finish();\n }", "@Override\r\n\t@Transactional\r\n\tpublic Book save(Book book) {\r\n\t\tSession session = getSession();\r\n\r\n\t\tsession.save(book);\r\n\r\n\t\treturn book;\r\n\t}", "@Override\n\tpublic int insertWannaBook(WannaBookVO wannaBookvo) throws RemoteException {\n\t\treturn 0;\n\t}", "private void saveBook() {\n // Read from input fields\n // Use trim to eliminate leading or trailing white space\n String productName = etTitle.getText().toString().trim();\n String author = etAuthor.getText().toString().trim();\n String price = etPrice.getText().toString().trim();\n String quantity = etEditQuantity.getText().toString().trim();\n String supplier = etSupplier.getText().toString().trim();\n String supplierPhoneNumber = etPhoneNumber.getText().toString().trim();\n\n // If this is a new book and all of the fields are blank.\n if (currentBookUri == null &&\n TextUtils.isEmpty(productName) && TextUtils.isEmpty(author) &&\n TextUtils.isEmpty(price) && quantity.equals(getString(R.string.zero)) &&\n TextUtils.isEmpty(supplier) && TextUtils.isEmpty(supplierPhoneNumber)) {\n // Exit the activity without saving a new book.\n finish();\n return;\n }\n\n // Make sure the book title is entered.\n if (TextUtils.isEmpty(productName)) {\n Toast.makeText(this, R.string.enter_title, Toast.LENGTH_SHORT).show();\n return;\n }\n\n // Make sure the author is entered.\n if (TextUtils.isEmpty(author)) {\n Toast.makeText(this, R.string.enter_author, Toast.LENGTH_SHORT).show();\n return;\n }\n\n // Make sure the price is entered.\n if (TextUtils.isEmpty(price)) {\n Toast.makeText(this, R.string.enter_price, Toast.LENGTH_SHORT).show();\n return;\n }\n\n // Make sure the quantity is entered if it is a new book.\n // Can be zero when editing book, in case the book is out of stock and user wants to change\n // other information, but hasn't received any new inventory yet.\n if (currentBookUri == null && (quantity.equals(getString(R.string.zero)) ||\n quantity.equals(\"\"))) {\n Toast.makeText(this, R.string.enter_quantity, Toast.LENGTH_SHORT).show();\n return;\n }\n\n // Make sure the supplier is entered.\n if (TextUtils.isEmpty(supplier)) {\n Toast.makeText(this, R.string.enter_supplier, Toast.LENGTH_SHORT).show();\n return;\n }\n\n // Make sure the supplier's phone number is entered.\n if (TextUtils.isEmpty(supplierPhoneNumber)) {\n Toast.makeText(this, R.string.enter_suppliers_phone_number,\n Toast.LENGTH_SHORT).show();\n return;\n }\n\n // Convert the price to a double.\n double bookPrice = Double.parseDouble(price);\n\n // Convert the quantity to an int, if there is a quantity entered, if not set it to zero.\n int bookQuantity = 0;\n if (!quantity.equals(\"\")) {\n bookQuantity = Integer.parseInt(quantity);\n }\n\n // Create a new map of values, where column names are the keys\n ContentValues values = new ContentValues();\n values.put(BookEntry.COLUMN_BOOK_PRODUCT_NAME, productName);\n values.put(BookEntry.COLUMN_BOOK_AUTHOR, author);\n values.put(BookEntry.COLUMN_BOOK_PRICE, bookPrice);\n values.put(BookEntry.COLUMN_BOOK_QUANTITY, bookQuantity);\n values.put(BookEntry.COLUMN_BOOK_SUPPLIER, supplier);\n values.put(BookEntry.COLUMN_BOOK_SUPPLIER_PHONE_NUMBER, supplierPhoneNumber);\n\n // Check if this is a new or existing book.\n if (currentBookUri == null) {\n // Insert a new book into the provider, returning the content URI for the new book.\n Uri newUri = getContentResolver().insert(BookEntry.CONTENT_URI, values);\n\n // Show a toast message depending on whether or not the insertion was successful.\n if (newUri == null) {\n // If the row ID is null, then there was an error with insertion.\n Toast.makeText(this, R.string.save_error, Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the insertion was successful, display a toast.\n Toast.makeText(this, R.string.save_successful, Toast.LENGTH_SHORT).show();\n }\n } else {\n // Check to see if any updates were made if not, no need to update the database.\n if (!bookHasChanged) {\n // Exit the activity without updating the book.\n finish();\n } else {\n // Update the book.\n int rowsUpdated = getContentResolver().update(currentBookUri, values, null,\n null);\n\n // Show a toast message depending on whether or not the update was successful.\n if (rowsUpdated == 0) {\n // If no rows were updated, then there was an error with the update.\n Toast.makeText(this, R.string.update_error, Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the update was successful, display a toast.\n Toast.makeText(this, R.string.update_successful,\n Toast.LENGTH_SHORT).show();\n }\n }\n }\n\n // Exit the activity, called here so the user can enter all of the required fields.\n finish();\n }", "@Override\r\n\tpublic Book update(Book book) {\r\n\t\treturn null;\r\n\t}", "String insertSelective(BookDO record);", "int insert(BookInfo record);", "@Override\n\tpublic Book createBook(Book book) throws SQLException {\n\t\ttry {\n\t\t\treturn dao.insertBook(book);\n\t\t} catch (ClassNotFoundException | SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}return book;\n\t}", "public boolean maybeSave(final Bid bid);", "public Book save(Book book) {\n return bookRepository.save(book);\n }", "@Override\r\n\t\t\t\tpublic Boolean doInTransaction(TransactionStatus status) {\n\t\t\t\t\ttry {\r\n\r\n\t\t\t\t\t\tint rows = bookDAO.addBook(book);\r\n\t\t\t\t\t\tif (rows > 0)\r\n\t\t\t\t\t\t\treturn true;\r\n\r\n\t\t\t\t\t} catch (Exception exception) {\r\n\t\t\t\t\t\tstatus.setRollbackOnly();\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn false;\r\n\r\n\t\t\t\t}", "@Override\r\n\tpublic boolean updateByBookId(Book book) {\n\t\tboolean flag=false;\r\n\t\tString sql=\"update books set title=?,author=?,publisherId=?,publishDate=?,isbn=?,wordsCount=?,unitPrice=?,contentDescription=?,aurhorDescription=?,editorComment=?,TOC=?,categoryId=?,booksImages=?,quantity=?,address=?,baoyou=? \"\r\n\t\t\t\t+ \"where id=?\";\r\n\t\tList<Object> list=new ArrayList<Object>();\r\n\t\tif(book!=null){\r\n\t\t\tlist.add(book.getTitle());\r\n\t\t\tlist.add(book.getAuthor());\r\n\t\t\tlist.add(book.getPublisherId());\r\n\t\t\tlist.add(book.getPublishDate());\r\n\t\t\tlist.add(book.getIsbn());\r\n\t\t\tlist.add(book.getWordsCount());\r\n\t\t\tlist.add(book.getUnitPrice());\r\n\t\t\tlist.add(book.getContentDescription());\r\n\t\t\tlist.add(book.getAurhorDescription());\r\n\t\t\tlist.add(book.getEditorComment());\r\n\t\t\tlist.add(book.getTOC());\r\n\t\t\tlist.add(book.getCategoryId());\r\n\t\t\t\r\n\t\t\tlist.add(book.getBooksImages());\r\n\t\t\tlist.add(book.getQuantity());\r\n\t\t\t\r\n\t\t\tlist.add(book.getAddress());\r\n\t\t\tif(book.getBaoyou()==\"0\"){\r\n\t\t\t\tbook.setBaoyou(\"不包邮\");\r\n\t\t\t}else{\r\n\t\t\t\tbook.setBaoyou(\"包邮\");\r\n\t\t\t}\r\n\t\t\tlist.add(book.getBaoyou());\r\n\t\t\tlist.add(book.getId());\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tint update = runner.update(sql, list.toArray());\r\n\t\t\tif(update>0){\r\n\t\t\t\tflag=true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn flag;\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn flag;\r\n\t}", "public void insertFavoriteBook(BookTable bookTable) {\n new InsertFavoriteBookAsyncTask(bookTableDAO).execute(bookTable);\n }", "public void insertBook(){\n\n // Create a new map of values, where column names are the keys\n ContentValues values = new ContentValues();\n values.put(BookContract.BookEntry.COLUMN_PRODUCT_NAME, \"You Do You\");\n values.put(BookContract.BookEntry.COLUMN_PRICE, 10);\n values.put(BookContract.BookEntry.COLUMN_QUANTITY, 20);\n values.put(BookContract.BookEntry.COLUMN_SUPPLIER_NAME, \"Kedros\");\n values.put(BookContract.BookEntry.COLUMN_SUPPLIER_PHONE_NUMBER, \"210 27 10 48\");\n\n Uri newUri = getContentResolver().insert(BookContract.BookEntry.CONTENT_URI, values);\n }", "public com.huqiwen.demo.book.model.Books create(long bookId);", "int insert(CmsRoomBook record);", "private boolean addBook(Book book) {\n\t\tfor (int i = 0; i < items.size(); i++)\n\t\t\tif (items.get(i).keyEquals(book))\n\t\t\t\treturn false;\n\t\titems.add(book);\n\t\treturn true;\n\t}", "int insert(Book record);", "int insert(Book record);", "public User markfinished(String id,int bookId){\n User user = getById(id);\n for(SavedBook book : user.getSavedBooks()){\n if((bookId) == book.getBookId()){\n book.setIsFinished(\"True\");\n\n }\n }\n userRepo.save(user);\n return user;\n }", "@Override\n public Optional<BookDto> updateBook(Integer bookId, BookDto bookDto) {\n try {\n Optional<BookEntity> bookEntity = bookRepository.findByBookId(bookId);\n if (bookEntity.isPresent()) {\n BookEntity updatedBookEntity = bookRepository.save(new BookEntity(bookId,\n bookDto.getBookName(), bookDto.getBookAuthor()));\n LogUtils.getInfoLogger().info(\"Book Updated: {}\", updatedBookEntity.toString());\n return Optional.of(bookDtoBookEntityMapper.bookEntityToBookDto(updatedBookEntity));\n } else {\n LogUtils.getInfoLogger().info(\"Book Not updated\");\n return Optional.empty();\n }\n }catch (Exception exception){\n throw new BookException(exception.getMessage());\n }\n }", "public boolean addOrUpdateBanks(BankModel bankDetails) {\n //Use the Cached Connection\n SQLiteDatabase db = getWritableDatabase();\n Boolean transactionSuccessful = false;\n\n //As usual Wrap it in a transaction\n db.beginTransaction();\n try {\n ContentValues values = new ContentValues();\n values.put(KEY_BANK_OBJECT_ID, bankDetails.getBankObjectId());\n values.put(KEY_BANK_NAME, bankDetails.getBankName());\n values.put(KEY_BANK_IMAGE, bankDetails.getBankImage());\n values.put(KEY_BANK_ADDRESS, bankDetails.getBankAddress());\n values.put(KEY_BANK_SWIFT_CODE, bankDetails.getBankSwiftCode());\n values.put(KEY_BANK_STOCK_CODE, bankDetails.getBankStockCode());\n values.put(KEY_BANK_DESCRIPTION, bankDetails.getBankDescription());\n values.put(KEY_BANK_ESTABLISHED, bankDetails.getBankEstablished());\n values.put(KEY_BANK_CONTACTS, bankDetails.getBankContacts());\n values.put(KEY_BANK_TYPE, bankDetails.getBankType());\n values.put(KEY_BANK_WEBSITE, bankDetails.getBankWebsite());\n values.put(KEY_BANK_STATUS, bankDetails.getBankStatus());\n values.put(KEY_BANK_SUMMARY, bankDetails.getBankSummary());\n values.put(KEY_BANK_PRODUCTS, bankDetails.getBankProducts());\n\n //Let's try to update the Saved Product if it exists.\n int rows = db.update(TABLE_BANKS, values, KEY_BANK_OBJECT_ID + \"= ?\", new String[]{bankDetails.getBankObjectId()});\n\n //Let's check if the update worked\n if (rows == 1) {\n //Ok, we have updated a Saved bank, we could probably get the Bank updated at this point if we needed to\n db.setTransactionSuccessful();\n transactionSuccessful = true;\n\n } else {\n //No Such Bank Here, insert it\n db.insertOrThrow(TABLE_BANKS, null, values);\n db.setTransactionSuccessful();\n transactionSuccessful = true;\n }\n } catch (Exception e) {\n Log.d(TAG, \"Error trying to Update banks table\");\n transactionSuccessful = false;\n } finally {\n db.endTransaction();\n }\n return transactionSuccessful;\n\n }", "public void create(Book book) {\n\t\tentityManager.persist(book);\n\t\tSystem.out.println(\"BookDao.create()\" +book.getId());\n\t\t\n\t}", "public static void addBook(final @Valid Book book) {\n\t\tif (book.serie.id == null) {\r\n\t\t\tValidation.required(\"book.serie.name\", book.serie.name);\r\n\r\n\t\t\tif (book.serie.name != null) {\r\n\t\t\t\tSerie serie = Serie.find(\"byName\", book.serie.name).first();\r\n\t\t\t\tif (serie != null) {\r\n\t\t\t\t\tValidation.addError(\"book.serie.name\",\r\n\t\t\t\t\t\t\t\"La série existe déjà\",\r\n\t\t\t\t\t\t\tArrayUtils.EMPTY_STRING_ARRAY);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Validation errror treatment\r\n\t\tif (Validation.hasErrors()) {\r\n\r\n\t\t\tif (Logger.isDebugEnabled()) {\r\n\t\t\t\tfor (play.data.validation.Error error : Validation.errors()) {\r\n\t\t\t\t\tLogger.debug(error.message() + \" \" + error.getKey());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Specific treatment for isbn, just to provide example\r\n\t\t\tif (!Validation.errors(\"book.isbn\").isEmpty()) {\r\n\t\t\t\tflash.put(\"error_isbn\", Messages.get(\"error.book.isbn.msg\"));\r\n\t\t\t}\r\n\r\n\t\t\tparams.flash(); // add http parameters to the flash scope\r\n\t\t\tValidation.keep(); // keep the errors for the next request\r\n\t\t} else {\r\n\r\n\t\t\t// Create serie is needed\r\n\t\t\tif (book.serie.id == null) {\r\n\t\t\t\tbook.serie.create();\r\n\t\t\t}\r\n\r\n\t\t\tbook.create();\r\n\r\n\t\t\t// Send WebSocket message\r\n\t\t\tWebSocket.liveStream.publish(MessageFormat.format(\r\n\t\t\t\t\t\"La BD ''{0}'' a été ajoutée dans la série ''{1}''\",\r\n\t\t\t\t\tbook.title, book.serie.name));\r\n\r\n\t\t\tflash.put(\"message\",\r\n\t\t\t\t\t\"La BD a été ajoutée, vous pouvez créer à nouveau.\");\r\n\t\t}\r\n\r\n\t\tBookCtrl.prepareAdd(); // Redirection toward input form\r\n\t}", "int addBookToLibrary(Book book) {\n\t\t\n\t\t// checks if the book is already in our library \n\t\tint checkBookId = this.getBookId(book);\n\n\t\tif (checkBookId != -1) {\n\t\t\treturn checkBookId;\n\t\t}\n\t\t\n\t\t// checks if passed the amount of books we can hold\n\t\tif (this.bookCounter >= this.maxBookCapacity) {\n\t\t\treturn -1; \n\t\t}\n\t\t\t\n\t\t// adds the book to the bookshelf\n\t\tthis.bookShelf[this.bookCounter] = book; \n\t\t\n\t\t// update the counter\n\t\tthis.bookCounter ++; \n\t\t\n\t\treturn (this.bookCounter - 1); \n\t}", "@Override\n\tpublic void updateBookData() {\n\t\tList<Book> bookList = dao.findByHql(\"from Book where bookId > 1717\",null);\n\t\tString bookSnNumber = \"\";\n\t\tfor(Book book:bookList){\n\t\t\tfor (int i = 1; i <= book.getLeftAmount(); i++) {\n\t\t\t\t// 添加图书成功后,根据ISBN和图书数量自动生成每本图书SN号\n\t\t\t\tBookSn bookSn = new BookSn();\n\t\t\t\t// 每本书的bookSn号根据书的ISBN号和数量自动生成,\n\t\t\t\t// 如书的ISBN是123,数量是3,则每本书的bookSn分别是:123-1,123-2,123-3\n\t\t\t\tbookSnNumber = \"-\" + i;//book.getIsbn() + \"-\" + i;\n\t\t\t\tbookSn.setBookId(book.getBookId());\n\t\t\t\tbookSn.setBookSN(bookSnNumber);\n\t\t\t\t// 默认书的状态是0表示未借出\n\t\t\t\tbookSn.setStatus(new Short((short) 0));\n\t\t\t\t// 添加bookSn信息\n\t\t\t\tbookSnDao.save(bookSn);\n\t\t\t}\n\t\t}\n\t}", "public void insertBooking(){\n \n Validator v = new Validator();\n if (createBookingType.getValue() == null)\n {\n \n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Set Booking Type!\")\n .showInformation();\n \n return;\n \n }\n if (createBookingType.getValue().toString().equals(\"Repair\"))\n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Go to Diagnosis and Repair tab for creating Repair Bookings!\")\n .showInformation();\n \n \n if(v.checkBookingDate(parseToDate(createBookingDate.getValue(),createBookingTimeStart.localTimeProperty().getValue()),\n parseToDate(createBookingDate.getValue(),createBookingTimeEnd.localTimeProperty().getValue()))\n && customerSet)\n \n { \n \n int mID = GLOBAL.getMechanicID();\n \n try {\n mID = Integer.parseInt(createBookingMechanic.getSelectionModel().getSelectedItem().toString().substring(0,1));\n } catch (Exception ex) {\n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Set Mechanic!\")\n .showInformation();\n return;\n }\n \n if (mID != GLOBAL.getMechanicID())\n if (!getAuth(mID)) return;\n \n createBookingClass();\n dbH.insertBooking(booking);\n booking.setID(dbH.getLastBookingID());\n appointment = createAppointment(booking);\n closeWindow();\n \n }\n else\n {\n String extra = \"\";\n if (!customerSet) extra = \" Customer and/or Vehicle is not set!\";\n Dialogs.create()\n .owner(prevStage)\n .title(\"Error!\")\n .masthead(null)\n .message(\"Errors with booking:\"+v.getError()+extra)\n .showInformation();\n }\n \n }", "public void reserveBook(String cardNo, String book_id) throws SQLException {\n\t\tPreparedStatement myStmt = null;\n\t\t\n\t\tString query = \" insert into book_loans (book_id, branch_id, card_no, date_out, date_due)\"\n\t\t + \" values (?, 9745, ?, curdate(), curdate()+7)\";\n\t\t\n\t\tmyStmt = myConn.prepareStatement(query);\n\t\t\n\t\tmyStmt.setString(1, book_id);\n\t\tmyStmt.setString(2, cardNo);\n\t\t\n\t\t\n\t\t\n\t\tmyStmt.execute();\n\t\t\n\t}", "public Book updateBook(Long id, Book book) {\n return this.sRepo.save(book);\n\n\t}", "private static void addNewBook(){\n\t\tSystem.out.println(\"===Add New Book===\");\n\t\tBookDetails new_book = new BookDetails();\n\t\tScanner string_input = new Scanner(System.in); //takes string input from user\n\t\tScanner integer_input = new Scanner(System.in); //takes integer input from user\n\t\t\n\t\tSystem.out.println(\"Enter BookId: \");\n\t\tint bookId = getIntegerInput(); //ensures user input is an integer value\n\t\t/*if bookId entered already exists then continually ask user to enter bookId until a bookId that does not exist is entered. \n\t\t * Do the same if bookId is less than 1 because book's in the library will not have Id's less than 1.*/\n\t\twhile(ALL_BOOKS.containsKey(bookId) || bookId < 1){\n\t\t\tSystem.out.println(\"Book Id entered already exists! Enter BookId: \");\n\t\t\tbookId = integer_input.nextInt();\n\t\t}\n\t\tnew_book.setBookId(bookId);\n\t\t\n\t\tSystem.out.println(\"Enter Book Title: \");\n\t\tString bookTitle = string_input.nextLine();\n\t\tnew_book.setBookTitle(bookTitle);\n\t\t\n\t\tString author_firstname;\n\t\tdo{\n\t\t\tSystem.out.println(\"Enter Author's First Name: \");\n\t\t\tauthor_firstname = string_input.next();\n\t\t}while(!new_book.setAuthorFirstName(author_firstname)); //loop until name input is valid (contains only letters) \n\t\t\n\t\tString author_middlename;\n\t\tdo{\n\t\t\tSystem.out.println(\"Enter Author's Middle Name (Type 'null' if author has no middle name): \");\n\t\t\tauthor_middlename = string_input.next();\n\t\t}while(!new_book.setAuthorMiddleName(author_middlename)); //loop until name input is valid (contains only letters) \n\t\t\n\t\tString author_lastname;\n\t\tdo{\n\t\t\tSystem.out.println(\"Enter Author's Last Name: \");\n\t\t\tauthor_lastname = string_input.next();\n\t\t}while(!new_book.setAuthorLastName(author_lastname)); //loop until name input is valid (contains only letters) \n\t\t\n\t\tstring_input = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter Book's Publisher: \");\n\t\tString publisher = string_input.nextLine();\n\t\tnew_book.setPublisher(publisher);\n\t\t\n\t\t\n\t\t/*Set book's genre. Valid values for a book's Genre are Biology, Mathematics, Chemistry, Physics,\n\t\t * Science_Fiction, Fantasy, Action, Drama, Romance, Horror, History, Autobiography, Biography.*/\n\t\tString genre;\n\t\tdo{\n\t\t\tSystem.out.println(\"Enter Book's Genre: \");\n\t\t\tgenre = string_input.next();\n\t\t}while(!new_book.setGenre(genre)); //loop until valid genre value is entered\n\t\t\n\t\t/*Set book's condition. Valid values for a book's Condition are New, Good, Worn, Damaged.*/\n\t\tString condition;\n\t\tdo{\n\t\t\tSystem.out.println(\"Enter Book's Condition: \");\n\t\t\tcondition = string_input.next();\n\t\t}while(!new_book.setCondition(condition)); //loop until valid value for condition is entered\n\t\t\n\t\tALL_BOOKS.put(new_book.getBookId(), new_book);\n\t\taddToPublisherTable(new_book.getPublisher(), new_book.getBookTitle()); //add book's title to the ALL_PUBLISHERS Hashtable\n\t\taddToGenreTable(new_book, new_book.getBookTitle()); //add book's title to the ALL_GENRES ArrayList\n\t\taddToAuthorTable(new_book.getAuthor().toString(), new_book.getBookTitle()); //add book's title to the ALL_AUTHORS Hashtable\n\t\tSystem.out.println(\"Book Successfully Added!\");\n\t}", "@Override\r\n\tpublic int updateBookInfo(Book book, int book_id) {\n\t\treturn 0;\r\n\t}", "public boolean addOrUpdateInternationalBanks(InternationalBankModel internationalBankDetails) {\n //Use the Cached Connection\n SQLiteDatabase db = getWritableDatabase();\n Boolean transactionSuccessful = false;\n\n //As usual Wrap it in a transaction\n db.beginTransaction();\n try {\n ContentValues values = new ContentValues();\n values.put(KEY_INTERNATIONAL_BANK_OBJECT_ID, internationalBankDetails.getInternationalBankObjectId());\n values.put(KEY_INTERNATIONAL_BANK_NAME, internationalBankDetails.getInternationalBankName());\n values.put(KEY_INTERNATIONAL_BANK_IMAGE, internationalBankDetails.getInternationalBankImage());\n values.put(KEY_INTERNATIONAL_BANK_ADDRESS, internationalBankDetails.getInternationalBankAddress());\n values.put(KEY_INTERNATIONAL_BANK_SWIFT_CODE, internationalBankDetails.getInternationalBankSwiftCode());\n values.put(KEY_INTERNATIONAL_BANK_STOCK_CODE, internationalBankDetails.getInternationalBankStockCode());\n values.put(KEY_INTERNATIONAL_BANK_DESCRIPTION, internationalBankDetails.getInternationalBankDescription());\n values.put(KEY_INTERNATIONAL_BANK_ESTABLISHED, internationalBankDetails.getInternationalBankEstablished());\n values.put(KEY_INTERNATIONAL_BANK_CONTACTS, internationalBankDetails.getInternationalBankContacts());\n values.put(KEY_INTERNATIONAL_BANK_TYPE, internationalBankDetails.getInternationalBankType());\n values.put(KEY_INTERNATIONAL_BANK_WEBSITE, internationalBankDetails.getInternationalBankWebsite());\n values.put(KEY_INTERNATIONAL_BANK_STATUS, internationalBankDetails.getInternationalBankStatus());\n values.put(KEY_INTERNATIONAL_BANK_SUMMARY, internationalBankDetails.getInternationalBankSummary());\n //Let's try to update the Saved Product if it exists.\n int rows = db.update(TABLE_INTERNATIONAL_BANKS, values, KEY_INTERNATIONAL_BANK_OBJECT_ID + \"= ?\", new String[]{internationalBankDetails.getInternationalBankObjectId()});\n\n //Let's check if the update worked\n if (rows == 1) {\n //Ok, we have updated a Saved bank, we could probably get the Bank updated at this point if we needed to\n db.setTransactionSuccessful();\n transactionSuccessful = true;\n\n } else {\n //No Such Bank Here, insert it\n db.insertOrThrow(TABLE_BANKS, null, values);\n db.setTransactionSuccessful();\n transactionSuccessful = true;\n }\n } catch (Exception e) {\n Log.d(TAG, \"Error trying to Update International banks table\");\n transactionSuccessful = false;\n } finally {\n db.endTransaction();\n }\n return transactionSuccessful;\n\n }", "public boolean addBook(Book b){\n\t\tif(books == 3){\n\t\t\treturn false;\n\t\t}\n\t\telse{\n\t\t\tif(b1 == null){\n\t\t\t\tb1 = b;\n\t\t\t\tbooks++;\n\t\t\t}\n\t\t\telse if(b2 == null){\n\t\t\t\tb2 = b;\n\t\t\t\tbooks++;\n\t\t\t}\n\t\t\telse if(b3 == null){\n\t\t\t\tb3 = b;\n\t\t\t\tbooks++;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t}", "public static void addBook(Book book) throws HibernateException{\r\n session=sessionFactory.openSession();\r\n session.beginTransaction();\r\n \r\n //Insert detail of the book to the database\r\n session.save(book);\r\n \r\n session.getTransaction().commit();\r\n session.close();\r\n \r\n }", "@Override\n\tpublic Long addBook(BookRequestVO request) {\n\t\tLong savedBookId = bookStorePersistDao.addBook(request);\n\t\treturn savedBookId;\n\t}", "public void setBookId(long bookId) {\n _sTransaction.setBookId(bookId);\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n final String newBookName = bookEditText.getText().toString();\n final String newAuthorName = authorEditText.getText().toString();\n\n if(!newBookName.isEmpty()) {\n //start realm write transaction\n realm.executeTransactionAsync(new Realm.Transaction() {\n @Override\n public void execute(Realm realm) {\n //create a realm object\n Book newbook = realm.createObject(Book.class, UUID.randomUUID().toString());\n newbook.setBook_name(newBookName);\n newbook.setAuthor_name(newAuthorName);\n }\n });\n }\n }", "@Test\n\tpublic void addBook_EmptyTitle(){\n\t\tBook b = new Book(\"abc\", \"\");\n\t\tassertTrue(db.putBook(b));\n\t}", "private void updateBook(final Properties bookData){\n\t\tnew SwingWorker<Boolean, Void>() {\n\n\t\t\t@Override\n\t\t\tprotected Boolean doInBackground() {\n\t\t\t\tJDBCBroker.getInstance().startTransaction();\n\t\t\t\tif(book.isLost()){\n\t\t\t\t\tBorrower borrower = book.getBorrowerThatLost();\n\t\t\t\t\tif(borrower == null || !borrower.subtractMonetaryPenaltyForLostBook(book)){\n\t\t\t\t\t\tJDBCBroker.getInstance().rollbackTransaction();\n\t\t\t\t\t\tstateChangeRequest(Key.MESSAGE, new MessageEvent(MessageType.ERROR, \"Whoops! An error occurred while saving.\"));\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbookData.setProperty(\"Status\", \"Active\");\n\t\t\t\tbook.stateChangeRequest(bookData);\n\t\t\t\treturn book.save();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void done() {\n\t\t\t\tboolean success = false;\n\t\t\t\ttry {\n\t\t\t\t\tsuccess = get();\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\tsuccess = false;\n\t\t\t\t} catch (ExecutionException e) {\n\t\t\t\t\tsuccess = false;\n\t\t\t\t}\n\t\t\t\tif(success){\n\t\t\t\t\tJDBCBroker.getInstance().commitTransaction();\n\t\t\t\t\tstateChangeRequest(Key.BACK, \"ListBooksView\");\n\t\t\t\t\tlistBooksTransaction.stateChangeRequest(Key.MESSAGE, new MessageEvent(MessageType.SUCCESS, \"Well done! The book was sucessfully saved.\"));\n\t\t\t\t}else{\n\t\t\t\t\tJDBCBroker.getInstance().rollbackTransaction();\n\t\t\t\t\tList<String> inputErrors = book.getErrors();\n\t\t\t\t\tif(inputErrors.size() > 0){\n\t\t\t\t\t\tstateChangeRequest(Key.MESSAGE, new MessageEvent(MessageType.ERROR, \"Aw shucks! There are errors in the input. Please try again.\", inputErrors));\n\t\t\t\t\t}else{\n\t\t\t\t\t\tstateChangeRequest(Key.MESSAGE, new MessageEvent(MessageType.ERROR, \"Whoops! An error occurred while saving.\"));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}.execute();\n\t}", "String insert(BookDO record);", "public User markUnfinished(String id,int bookId){\n User user = getById(id);\n for(SavedBook book : user.getSavedBooks()){\n if(book.getBookId() ==(bookId)){\n book.setIsFinished(\"False\");\n\n }\n }\n userRepo.save(user);\n return user;\n }", "@Test\n @DisplayName(\"Deve salvar um livro\")\n public void saveBookTest() {\n given(bookToSaveMocked.getIsbn()).willReturn(BookHelperTest.DOM_CASMURRO_ISBN);\n given(bookRepositoryMocked.existsByIsbn(BookHelperTest.DOM_CASMURRO_ISBN)).willReturn(false);\n given(bookRepositoryMocked.save(bookToSaveMocked)).willReturn(bookSavedMocked);\n\n // When execute save\n Book bookSaved = bookService.save(bookToSaveMocked);\n\n // Then validate save return\n assertThat(bookSaved).isNotNull();\n\n // And verify mocks interaction\n verify(bookToSaveMocked, times(1)).getIsbn();\n verify(bookRepositoryMocked, times(1)).existsByIsbn(BookHelperTest.DOM_CASMURRO_ISBN);\n verify(bookRepositoryMocked, times(1)).save(Mockito.any(Book.class));\n }", "@PostMapping(\"/book\")\n public ResponseEntity<?> addBook(@RequestBody Book book) {\n if(bookService.findBook(book.getBarcode()).isPresent()){\n return ResponseEntity.badRequest().body(\"Book with this barcode already exists.\");\n } else {\n bookService.addBook(book);\n return ResponseEntity.status(HttpStatus.OK).body(\"Book was added.\");\n }\n\n }", "public void addLivros( LivroModel book){\n Connection connection=ConexaoDB.getConnection();\n PreparedStatement pStatement=null;\n try {\n String query=\"Insert into book(id_book,title,author,category,publishing_company,release_year,page_number,description,cover)values(null,?,?,?,?,?,?,?,?)\";\n pStatement=connection.prepareStatement(query);\n pStatement.setString(1, book.getTitulo());\n pStatement.setString(2, book.getAutor());\n pStatement.setString(3, book.getCategoria());\n pStatement.setString(4, book.getEditora());\n pStatement.setInt(5, book.getAnoDeLancamento());\n pStatement.setInt(6, book.getPaginas());\n pStatement.setString(7, book.getDescricao());\n pStatement.setString(8, book.getCapa());\n pStatement.execute();\n } catch (Exception e) {\n \n }finally{\n ConexaoDB.closeConnection(connection);\n ConexaoDB.closeStatement(pStatement);\n }\n }", "public void insertBooking(Booking booking) throws SQLException, Exception;", "int insertSelective(IntegralBook record);", "@Override\n\tpublic void insertBookData(BookingBus b) {\n\t\tuserdao.insertBookData(b);\n\t}", "@Override\r\n\tpublic void updatebook(BookDto book) {\n\t\tsqlSession.update(ns + \"updatebook\", book);\r\n\t}", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\tStoredBookDAO storeBookDAO = new StoredBookDAO(BookInfoActivity.this);\n\t\t\tBookStoredEntity testBookBorrowedEntity1 = new BookStoredEntity();\n\t\t\ttestBookBorrowedEntity1.setBookId(\"1\");\n\t\t\ttestBookBorrowedEntity1.setBookText(\"android\");\n\t\t\ttestBookBorrowedEntity1.setBookImageUrl(\"android\");\n\t\t\ttestBookBorrowedEntity1.setBookPress(\"android\");\n\t\t\ttestBookBorrowedEntity1.setBookPressTime(\"android\");\n\t\t\tstoreBookDAO.insert(testBookBorrowedEntity1);\n\t\t\tToast.makeText(BookInfoActivity.this, R.string.storesuccess, Toast.LENGTH_SHORT).show();\n\t\t}", "public void book(long bookRecordId) {\n book(bookRecordId, false);\n }", "@Override\n\tpublic void put(Integer id, BookCopies object) throws SQLException {\n\t\t\n\t}", "public boolean addOrUpdateCapitalMarkets(CapitalMarketsModel companyDetails) {\n //Use the Cached Connection\n SQLiteDatabase db = getWritableDatabase();\n Boolean transactionSuccessful = false;\n\n //As usual Wrap it in a transaction\n db.beginTransaction();\n try {\n ContentValues values = new ContentValues();\n values.put(KEY_COMPANY_OBJECT_ID, companyDetails.getCompanyObjectId());\n values.put(KEY_COMPANY_NAME, companyDetails.getCompanyName());\n values.put(KEY_COMPANY_IMAGE, companyDetails.getCompanyImage());\n values.put(KEY_COMPANY_ADDRESS, companyDetails.getCompanyAddress());\n values.put(KEY_COMPANY_STOCK_CODE, companyDetails.getCompanyStockCode());\n values.put(KEY_COMPANY_DESCRIPTION, companyDetails.getCompanyDescription());\n values.put(KEY_COMPANY_ESTABLISHED, companyDetails.getCompanyEstablished());\n values.put(KEY_COMPANY_CONTACTS, companyDetails.getCompanyContacts());\n values.put(KEY_COMPANY_INDUSTRY, companyDetails.getCompanyType());\n values.put(KEY_COMPANY_WEBSITE, companyDetails.getCompanyWebsite());\n values.put(KEY_COMPANY_STATUS, companyDetails.getCompanyStatus());\n values.put(KEY_COMPANY_SUMMARY, companyDetails.getCompanySummary());\n //Let's try to update the Saved Product if it exists.\n int rows = db.update(TABLE_BANKS, values, KEY_COMPANY_OBJECT_ID + \"= ?\", new String[]{companyDetails.getCompanyObjectId()});\n\n //Let's check if the update worked\n if (rows == 1) {\n //Ok, we have updated a Saved COMPANY, we could probably get the COMPANY updated at this point if we needed to\n db.setTransactionSuccessful();\n transactionSuccessful = true;\n\n } else {\n //No Such Bank Here, insert it\n db.insertOrThrow(TABLE_CAPITAL_MARKETS, null, values);\n db.setTransactionSuccessful();\n transactionSuccessful = true;\n }\n } catch (Exception e) {\n Log.d(TAG, \"Error trying to Update company table\");\n transactionSuccessful = false;\n } finally {\n db.endTransaction();\n }\n return transactionSuccessful;\n\n }", "public boolean addOrUpdateInvestmentBanks(InvestmentBankModel investmentBankDetails) {\n //Use the Cached Connection\n SQLiteDatabase db = getWritableDatabase();\n Boolean transactionSuccessful = false;\n\n //As usual Wrap it in a transaction\n db.beginTransaction();\n try {\n ContentValues values = new ContentValues();\n values.put(KEY_INVESTMENT_BANK_OBJECT_ID, investmentBankDetails.getInvestmentBankObjectId());\n values.put(KEY_INVESTMENT_BANK_NAME, investmentBankDetails.getInvestmentBankName());\n values.put(KEY_INVESTMENT_BANK_IMAGE, investmentBankDetails.getInvestmentBankImage());\n values.put(KEY_INVESTMENT_BANK_ADDRESS, investmentBankDetails.getInvestmentBankAddress());\n values.put(KEY_INVESTMENT_BANK_SWIFT_CODE, investmentBankDetails.getInvestmentBankSwiftCode());\n values.put(KEY_INVESTMENT_BANK_STOCK_CODE, investmentBankDetails.getInvestmentBankStockCode());\n values.put(KEY_INVESTMENT_BANK_DESCRIPTION, investmentBankDetails.getInvestmentBankDescription());\n values.put(KEY_INVESTMENT_BANK_ESTABLISHED, investmentBankDetails.getInvestmentBankEstablished());\n values.put(KEY_INVESTMENT_BANK_CONTACTS, investmentBankDetails.getInvestmentBankContacts());\n values.put(KEY_INVESTMENT_BANK_TYPE, investmentBankDetails.getInvestmentBankType());\n values.put(KEY_INVESTMENT_BANK_WEBSITE, investmentBankDetails.getInvestmentBankWebsite());\n values.put(KEY_INVESTMENT_BANK_STATUS, investmentBankDetails.getInvestmentBankStatus());\n values.put(KEY_INVESTMENT_BANK_SUMMARY, investmentBankDetails.getInvestmentBankSummary());\n //Let's try to update the Saved Product if it exists.\n int rows = db.update(TABLE_INVESTMENT_BANKS, values, KEY_INVESTMENT_BANK_OBJECT_ID + \"= ?\", new String[]{investmentBankDetails.getInvestmentBankObjectId()});\n\n //Let's check if the update worked\n if (rows == 1) {\n //Ok, we have updated a Saved InvestmentBank, we could probably get the InvestmentBank updated at this point if we needed to\n db.setTransactionSuccessful();\n transactionSuccessful = true;\n\n } else {\n //No Such InvestmentBank Here, insert it\n db.insertOrThrow(TABLE_INVESTMENT_BANKS, null, values);\n db.setTransactionSuccessful();\n transactionSuccessful = true;\n }\n } catch (Exception e) {\n Log.d(TAG, \"Error trying to Update banks table\");\n transactionSuccessful = false;\n } finally {\n db.endTransaction();\n }\n return transactionSuccessful;\n\n }", "public void insert(long key,BookObj book)\r\n\t{\r\n\t\t//go through node to insert\r\n\t\troot = insert(root,key,book);\r\n\t}", "@Override\n\tpublic BookModel update(BookModel updateBook) {\n\t\tCategoryModel category = categoryDao.findByCode(updateBook.getCategoryCode());\n\t\tupdateBook.setCategoryId(category.getId());\n\t\tbookDao.update(updateBook);\n\t\treturn bookDao.findOne(updateBook.getId());\n\t}", "public boolean updateBookRecord(Connection con, Book book) {\n try {\n String updateRecord = \"UPDATE tblBooks SET book_title = ?, book_author = ?, book_released = ?, book_blurb = ?, book_cover = ? WHERE book_id = ?\";\n PreparedStatement prepStatement = con.prepareStatement(updateRecord);\n //The below statements must be in the correct order as the SQL statement referes ot it to getBooktitle etc\n prepStatement.setString(1, book.getBookTitle());\n prepStatement.setString(2, book.getBookAuthor());\n prepStatement.setString(3, book.getBookYear());\n prepStatement.setString(4, book.getBookBlurb());\n prepStatement.setString(5, book.getCoverURL());\n prepStatement.setInt(6, book.getBookID());\n\n prepStatement.executeUpdate();\n prepStatement.close();\n } catch (Exception ex) {\n System.out.println(ex.getClass());\n ex.printStackTrace();\n return false;\n } finally {\n try {\n con.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n return true;\n }", "public void addBook(Book book) {\n \tset.add(book);\n }", "public void addBook(Book book) {\n\t\tboolean notFound = true;\n\t\tfor (Item item : items) {\n\t\t\tif(item.getName().equals(book.getName())) {\n\t\t\t\t// Found\n\t\t\t\tnotFound = false;\n\t\t\t\titem.updateQuantity();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(notFound) {\n\t\t\tItem item = new Item(book, 1);\n\t\t\titems.add(item);\n\t\t}\n\t}", "@Override\r\n\tpublic boolean createBooking(Booking_IF bk) {\r\n\t\tPreparedStatement myStatement = null;\r\n\t\tString query = null;\r\n\t\tint count = 0;\r\n\t\ttry{\r\n\t\t\tquery = \"insert into Booking values(?,?);\";\r\n\t\t\tmyStatement = myCon.prepareStatement(query);\r\n\t\t\tmyStatement.setInt(2, bk.getUserid());\r\n\t\t\tmyStatement.setInt(1, bk.getShiftid());\r\n\t\t\tcount = myStatement.executeUpdate();\r\n\t\t} catch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally{\r\n\t\t\ttry {\r\n\t\t\t\tif (myStatement != null)\r\n\t\t\t\t\tmyStatement.close();\r\n\t\t\t}\r\n\t\t\tcatch(Exception e){\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(count!=1){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t}", "public static void AddBooking(Booking booking){\n \n \n try (Connection connection = DbConnector.connectToDb();\n Statement statement = connection.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);\n ResultSet resultSet = statement.executeQuery(\"SELECT * FROM booking\")){\n \n resultSet.moveToInsertRow();\n resultSet.updateInt(\"BookingNumber\", booking.getBookingNumber());\n resultSet.updateString(\"FlightNumber\", booking.getFlightNumber());\n resultSet.updateDouble(\"Price\", booking.getPrice());\n resultSet.updateString(\"CabinClass\", booking.getCabinClass());\n resultSet.updateInt(\"Quantity\", booking.getQuantity());\n resultSet.updateInt(\"Insurance\", booking.getInsurance());\n resultSet.insertRow();\n \n \n }\n catch(SQLException sqle){\n System.out.println(sqle.toString());\n } \n \n \n \n \n }", "public void insertBook(int ISBN, String BookName, String AuthorName, int Price) {\n String sql = \"INSERT INTO books (ISBN, BookName, AuthorName, Price) VALUES(?,?,?,?)\";\n\n try (Connection conn = this.connect();\n PreparedStatement pstmt = conn.prepareStatement(sql)) {\n // Set values\n pstmt.setInt(1, ISBN);\n pstmt.setString(2, BookName);\n pstmt.setString(3, AuthorName);\n pstmt.setInt(4, Price);\n\n pstmt.executeUpdate();\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "@Override\n\tpublic long store() {\n\t\tlong existence = exists(this.nompId);\n\t\tif (existence != -1) {\n\t\t\treturn existence;\n\t\t}\n\t\t\n\t\t// build the content values for insert\n\t\tContentValues mContentValues = getBaseContentValues();\n\t\tmContentValues.put(NOMPDataContract.Need.COLUMN_NAME_BUDGET, budget);\n\n\t\t// insert\n\t\tSQLiteDatabase writable = this.getWritableDatabase();\n\t\t_id = writable.insert(NOMPDataContract.Need.TABLE_NAME, null,\n\t\t\t\tmContentValues);\n\n\t\twritable.close();\n\t\treturn _id;\n\t}", "boolean hasInsertOrUpdate();", "private void deleteBook() {\n readViews();\n final BookEntry bookEntry = new BookEntry(mNameString, mQuantityString, mPriceString, mSupplier, mPhoneString);\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n // Delete the book only if mBookId matches DEFAULT_BOOK_ID\n if (mBookId != DEFAULT_BOOK_ID) {\n bookEntry.setId(mBookId);\n mDb.bookDao().deleteBook(bookEntry);\n }\n finish();\n }\n });\n\n }", "public void addNewBook(Book b) {\n if (totalbooks < books.length) {\n books[totalbooks] = b;\n totalbooks++;\n } else {\n System.out.println(\"The bookstore is full\");\n }\n\n }", "@Override\n\tpublic int addBook(bookInfo bookinfo) {\n\t\treturn 0;\n\t}", "@Override\n\tpublic Book getIdBook(int idBook) {\n\t\treturn null;\n\t}", "public Book createBook(Book newBook) {\n\t\treturn this.sRepo.save(newBook);\n\t}", "@Override\n\tpublic void add() {\n\t\tHashMap<String, String> data = new HashMap<>();\n\t\tdata.put(\"title\", title);\n\t\tdata.put(\"author\", author);\n\t\tdata.put(\"publisher\", publisher);\n\t\tdata.put(\"isbn\", isbn);\n\t\tdata.put(\"bookID\", bookID);\n\t\tHashMap<String, Object> result = null;\n\t\tString endpoint = \"bookinfo/post.php\";\n\t\ttry {\n\t\t\tresult = APIClient.post(BookInfo.host + endpoint, data);\n\t\t\tvalid = result.get(\"status_code\").equals(\"Success\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void setBookId(Integer bookId) {\n this.bookId = bookId;\n }", "public void setBookId(Integer bookId) {\n this.bookId = bookId;\n }", "public void setBookId(Integer bookId) {\n this.bookId = bookId;\n }", "public void persistBook(Book book) {\n\t\tEntityManager entityManager = factory.createEntityManager();\n\t\t// User user = new User(\"someuser2\",\"password2123\");\n\t\tentityManager.getTransaction().begin();\n\t\tentityManager.persist(book);\n\t\tentityManager.getTransaction().commit();\n\t\tSystem.out.println(\"added Book\");\n\t}", "public void addCertainRow(String bookname, String ISBN, String author, String description,\n String quantity, String publisher, String category)\n {\n String insertStr;\n try{\n\n insertStr=\"INSERT IGNORE INTO material (bookname, ISBN, author, description, quantity, publisher, category) VALUES(\"\n +quotate(bookname)+\",\"\n +quotate(ISBN)+\",\"\n +quotate(author)+\",\"\n +quotate(publisher)+\",\"\n +quotate(quantity)+\",\"\n +quotate(publisher)+\",\"\n +quotate(category)\n +\")\";\n\n stmt.executeUpdate(insertStr);\n\n } catch(Exception e){\n System.out.println(\"Error occurred in inserting data\");\n }\n return;\n }", "public User saveBook(String id, SavedBook savebook){\n User user = getById(id);\n if(user!=null){\n for(SavedBook book : user.getSavedBooks()){\n if(book.getBookId() ==(savebook.getBookId())){\n return user;\n }\n }\n System.out.println(user.getSavedBooks().add((SavedBook) savebook));\n userRepo.save(user);\n return user;\n }\n throw new UserNotFoundException(\"\");\n }" ]
[ "0.66873395", "0.658369", "0.6575898", "0.65669185", "0.63226974", "0.6302235", "0.62305135", "0.61634743", "0.61574054", "0.6142185", "0.6139827", "0.6115086", "0.6059939", "0.60482943", "0.5997679", "0.5993008", "0.59659255", "0.59606546", "0.59381497", "0.5900489", "0.5873573", "0.58394873", "0.58394873", "0.5812453", "0.5804129", "0.57759595", "0.5759873", "0.5754794", "0.57378924", "0.57259476", "0.56758505", "0.56744355", "0.5671439", "0.566648", "0.5659996", "0.5559072", "0.55540055", "0.5546581", "0.55433434", "0.5523679", "0.55187696", "0.5491782", "0.54749274", "0.54749274", "0.5470091", "0.5465445", "0.5452162", "0.5444896", "0.5439441", "0.5431397", "0.5419069", "0.5411649", "0.5409271", "0.53978324", "0.5392088", "0.5389447", "0.53885657", "0.5385401", "0.53822356", "0.5365917", "0.5354513", "0.5354503", "0.53358316", "0.53318805", "0.53303015", "0.5326102", "0.531239", "0.5306203", "0.52968323", "0.52940387", "0.5281733", "0.52799183", "0.5271927", "0.5260458", "0.52544403", "0.5250196", "0.5246049", "0.5231226", "0.5215714", "0.52139837", "0.520661", "0.5189432", "0.517573", "0.5168526", "0.514268", "0.51405746", "0.51156884", "0.51107144", "0.51037073", "0.5101372", "0.50999403", "0.5098902", "0.5094129", "0.5092176", "0.5088994", "0.5088994", "0.5088994", "0.5083573", "0.50823134", "0.5063703" ]
0.717669
0
Perform the deletion of the book in the database.
private void deleteBook() { readViews(); final BookEntry bookEntry = new BookEntry(mNameString, mQuantityString, mPriceString, mSupplier, mPhoneString); AppExecutors.getInstance().diskIO().execute(new Runnable() { @Override public void run() { // Delete the book only if mBookId matches DEFAULT_BOOK_ID if (mBookId != DEFAULT_BOOK_ID) { bookEntry.setId(mBookId); mDb.bookDao().deleteBook(bookEntry); } finish(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void delete(Book book){\n try{\n String query = \"DELETE FROM testdb.book WHERE id=\" + book.getId();\n DbConnection.update(query);\n }\n catch(Exception e){\n e.printStackTrace();\n }\n }", "private void deleteBook() {\n if (currentBookUri != null) {\n int rowsDeleted = getContentResolver().delete(currentBookUri, null, null);\n\n // Confirmation or failure message on whether row was deleted from database\n if (rowsDeleted == 0)\n Toast.makeText(this, R.string.editor_activity_book_deleted_error, Toast.LENGTH_SHORT).show();\n else\n Toast.makeText(this, R.string.editor_activity_book_deleted, Toast.LENGTH_SHORT).show();\n }\n finish();\n }", "private void deleteBook() {\n // Only perform the delete if this is an existing book.\n if (currentBookUri != null) {\n // Delete an existing book.\n int rowsDeleted = getContentResolver().delete(currentBookUri, null,\n 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, R.string.delete_error, Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the delete was successful, display a toast.\n Toast.makeText(this, R.string.delete_successful, Toast.LENGTH_SHORT).show();\n }\n }\n // Exit the activity.\n finish();\n }", "@Override\n\tpublic void deleteBook() {\n\t\t\n\t}", "@Override\r\n\tpublic int deleteBook(int book_id) {\n\t\treturn 0;\r\n\t}", "@Override\r\n\tpublic void deletebook(int seq) {\n\t\tsqlSession.delete(ns + \"deletebook\", seq);\r\n\t}", "int deleteByPrimaryKey(String bookId);", "void delete(Book book);", "@Override\n\tpublic int deleteBook(int bookID) {\n\t\treturn 0;\n\t}", "public void delete(int bookId){ \n dbmanager.open();\n try (DBIterator keyIterator = dbmanager.getDB().iterator()) {\n keyIterator.seekToFirst();\n\n while (keyIterator.hasNext()) {\n String key = asString(keyIterator.peekNext().getKey());\n String[] splittedString = key.split(\"-\");\n\n if(!\"book\".equals(splittedString[0])){\n keyIterator.next();\n continue;\n }\n\n String resultAttribute = asString(dbmanager.getDB().get(bytes(key)));\n JSONObject jauthor = new JSONObject(resultAttribute);\n\n if(jauthor.getInt(\"idBOOK\")==bookId){\n \n dbmanager.getDB().delete(bytes(key));\n break;\n }\n keyIterator.next(); \n }\n } catch(Exception ex){\n ex.printStackTrace();\n } \n dbmanager.close();\n }", "public void delete(Book book) {\n\t\tif (entityManager.contains(book))\n\t\t\tentityManager.remove(book);\n\t\tentityManager.remove(entityManager.merge(book));\n\t\treturn;\n\n\t}", "@Override\n\tpublic boolean deleteBook(int idBook) throws DAOException {\n\t\treturn false;\n\t}", "@Override\n public void delete(int id) {\n Book bookDb = repository.findById(id)\n .orElseThrow(RecordNotFoundException::new);\n // delete\n repository.delete(bookDb);\n }", "int deleteByPrimaryKey(Long integralBookId);", "public int delete(int rb_seq) {\n\t\t\n\t\tint ret = readBookDao.delete(rb_seq);\n\t\treturn ret;\n\t}", "int deleteByPrimaryKey(String bookIsbn);", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString number=textFieldn.getText();\n\t\t\t\t\t\t\t\n\t\t\t\tBookModel bookModel=new BookModel();\n\t\t\t\tbookModel.setBook_number(number);\n\t\t\t\t\n\t\t\t\tBookDao bookDao=new BookDao();\n\t\t\t\t\n\t\t\t\tDbUtil dbUtil = new DbUtil();\n\t\t\t\tConnection con =null;\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\tcon = dbUtil.getCon();\n\t\t\t\t\tint db=bookDao.deletebook(con,bookModel);\n\t\t\t\t\t\n\t\t\t\t\tif(db==1) {\n\t\t\t\t\t JOptionPane.showMessageDialog(null, \"删除成功\");\n\t\t\t\t\t } \t\t\t\t\t\n\t\t\t\t}catch (Exception e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "private void deleteEmployeeBooking() {\n BookingModel bookingModel1 = new BookingModel();\n try {\n bookingModel1.deleteBooking(employeeID);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "public void delete(String book_id){\n\t\tmap.remove(book_id);\n\t\t\n\t}", "@Override\n public void run() {\n if (mBookId != DEFAULT_BOOK_ID) {\n bookEntry.setId(mBookId);\n mDb.bookDao().deleteBook(bookEntry);\n }\n finish();\n }", "private void deleteAllBooks(){\n int rowsDeleted = getContentResolver().delete(BookContract.BookEntry.CONTENT_URI, null, null);\n Log.v(\"MainActivity\", rowsDeleted + \" rows deleted from database\");\n }", "void deleteBookingById(BookingKey bookingKey);", "@Override\n\tpublic void delete(String id) {\n\t\tString query=\"Delete from Book Where id='\"+id+\"'\";\n\t\texecuteQuery(query);\n\t\tnotifyAllObservers();\n\t\t\n\t}", "public void deleteBook(int num)\n { \n bookList.remove(num); \n }", "public void onClick(View v) {\n MySQLiteHelper.deleteBookByID(currentBookID);\n // Then go back to book list\n startActivity(new Intent(BookDetailActivity.this, BookListViewActivity.class));\n }", "@DeleteMapping(\"/{username}/books/{bookId}\")\n public void deleteBookFromLibrary(@PathVariable String username,\n @PathVariable Long bookId) {\n userService.deleteBook(username, bookId);\n }", "@DeleteMapping(\"/delete/{id}\")\n public void deleteBookById(@PathVariable(\"id\") Long id) throws BookNotFoundException {\n bookService.deleteBookById(id);\n }", "public abstract void deleteAPriceBook(String priceBookName);", "@Test\n\tpublic void testDeleteBook() {\n\t\t//System.out.println(\"Deleting book from bookstore...\");\n\t\tstore.deleteBook(b1);\n\t\tassertFalse(store.getBooks().contains(b1));\n\t\t//System.out.println(store);\n\t}", "@Override\n\tpublic void deleteKeyword(Integer bookId) {\n\t\tdao.removeKeyword(bookId);\n\t\t\n\t\t\n\t}", "public void delete(Book entity) {\n\t\tentityManager.remove(entityManager.contains(entity) ? entity : entityManager.merge(entity));\n\t}", "@Override\n\tpublic Response deleteOrder(BookDeleteRequest request) {\n\t\treturn null;\n\t}", "@DELETE\n public void delete() {\n PersistenceService persistenceSvc = PersistenceService.getInstance();\n try {\n persistenceSvc.beginTx();\n deleteEntity(getEntity());\n persistenceSvc.commitTx();\n } finally {\n persistenceSvc.close();\n }\n }", "int deleteByPrimaryKey(Long authorId);", "boolean deleteAuthor(Author author) throws PersistenceException, IllegalArgumentException;", "@Override\n\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\tdeleteBook(position);\n\t\t\t\t\tcandelete =-1;\n\t\t\t\t}", "private void deleteAllBooks() {\n int rowsDeleted = getContentResolver().delete(BookEntry.CONTENT_URI, null, null);\n // Update the message for the Toast\n String message;\n if (rowsDeleted == 0) {\n message = getResources().getString(R.string.inventory_delete_books_failed).toString();\n } else {\n message = getResources().getString(R.string.inventory_delete_books_successful).toString();\n }\n // Show toast\n Toast.makeText(this, message, Toast.LENGTH_LONG).show();\n }", "@Override\r\n\tpublic boolean deleteBooking(Booking_IF bk) {\r\n\t\tPreparedStatement myStatement = null;\r\n\t\tString query = null;\r\n\t\tint count = 0;\r\n\t\ttry{\r\n\t\t\tquery = \"delete from Booking where Shift_ID = ? AND User_ID = ?\";\r\n\t\t\tmyStatement = myCon.prepareStatement(query);\r\n\t\t\tmyStatement.setInt(1, bk.getShiftid());\r\n\t\t\tmyStatement.setInt(2, bk.getUserid());\r\n\t\t\tcount = myStatement.executeUpdate();\r\n\t\t} catch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfinally{\r\n\t\t\ttry {\r\n\t\t\t\tif (myStatement != null)\r\n\t\t\t\t\tmyStatement.close();\r\n\t\t\t}\r\n\t\t\tcatch(Exception e){\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(count!=1){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "@Override\n\tpublic void delete(BookInfoVO vo) {\n\t\tbookInfoDao.delete(vo);\n\t}", "@DeleteMapping(\"/book\")\n public ResponseEntity<?> delete(@RequestBody Book book) {\n bookService.delete(book);\n return ResponseEntity.ok().body(\"Book has been deleted successfully.\");\n }", "public void deleteAll()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tbookdao.openCurrentSessionwithTransation();\r\n\t\t\tbookdao.deleteAll();\r\n\t\t\tbookdao.closeSessionwithTransaction();\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic boolean deleteBook(long ISBN) {\n\t\tif (searchBook(ISBN).getISBN() == ISBN) {\r\n\t\ttransactionTemplate.setReadOnly(false);\t\r\n\t\t\t\treturn transactionTemplate.execute(new TransactionCallback<Boolean>() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic Boolean doInTransaction(TransactionStatus status) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\ttry {\r\n\t\t\t\t\t\tboolean result = bookDAO.deleteBook(ISBN);\r\n\t\t\t\t\t\treturn result;\r\n\r\n\t\t\t\t} catch (Exception exception) {\r\n\t\t\t\t\tstatus.setRollbackOnly();\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public void delete() {\r\n\t\tCampLeaseDAO leaseDao = (CampLeaseDAO) getApplicationContext().getBean(\"leaseDaoBean\", CampLeaseDAO.class);\r\n\t\tleaseDao.delete(this);\r\n\t}", "public void delete() throws SQLException {\n DatabaseConnector.updateQuery(\"DELETE FROM course \"\n + \"WHERE courseDept='\" + this.courseDept \n + \"' AND courseNum = '\" + this.courseNum + \"'\");\n }", "public static int deleteBook(String itemCode) throws HibernateException{\r\n session=sessionFactory.openSession();\r\n session.beginTransaction();\r\n \r\n Query query=session.getNamedQuery(\"INVENTORY_deleteBook\").setString(\"itemCode\", itemCode);\r\n \r\n //Execute the query which delete the detail of the book from the database\r\n int res=query.executeUpdate();\r\n \r\n //check whether transaction is correctly done\r\n session.getTransaction().commit();\r\n session.close();\r\n \r\n return res;\r\n \r\n }", "@FXML\n private void handleBookDeleteOption(ActionEvent event) {\n Book selectedItem = tableViewBook.getSelectionModel().getSelectedItem();\n if (selectedItem == null) {\n AlertMaker.showErrorMessage(\"No book selected\", \"Please select book for deletion.\");\n return;\n }\n if (DatabaseHandler.getInstance().isBookAlreadyIssued(selectedItem)) {\n AlertMaker.showErrorMessage(\"Cant be deleted\", \"This book is already issued and cant be deleted.\");\n return;\n }\n //confirm the opertion\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setTitle(\"Deleting Book\");\n Stage stage = (Stage) alert.getDialogPane().getScene().getWindow();\n UtilitiesBookLibrary.setStageIcon(stage);\n alert.setHeaderText(null);\n alert.setContentText(\"Are u sure u want to Delete the book ?\");\n Optional<ButtonType> response = alert.showAndWait();\n if (response.get() == ButtonType.OK) {\n \n boolean result = dbHandler.deleteBook(selectedItem);\n if (result == true) {\n AlertMaker.showSimpleAlert(\"Book delete\", selectedItem.getTitle() + \" was deleted successfully.\");\n observableListBook.remove(selectedItem);\n } else {\n AlertMaker.showSimpleAlert(\"Failed\", selectedItem.getTitle() + \" unable to delete.\");\n\n }\n } else {\n AlertMaker.showSimpleAlert(\"Deletion Canclled\", \"Deletion process canclled.\");\n\n }\n\n }", "public void onClick(DialogInterface dialog,int which) {\n new deleteBook().execute();\n }", "int deleteByExample(BookExample example);", "public void delete() throws Exception\n {\n dao.delete(this);\n }", "public void deleteEntry(String book1)\n{\n}", "protected void deleteRecord() throws DAOException {\r\n\t\t// Elimina relaciones\r\n\t\tfor (Sedrelco relco : object.getRelcos()) {\r\n\t\t\tsedrelcoDao.delete(relco);\r\n\t\t}\r\n\t\t// Elimina objeto\r\n\t\tobjectDao.delete(object);\r\n\t}", "public void deleteDB() {\n \n sql = \"Delete from Order where OrderID = \" + getOrderID();\n db.deleteDB(sql);\n \n }", "@Override\n public Optional<BookDto> deleteBook(Integer bookId) {\n try {\n Optional<BookEntity> bookEntity = bookRepository.findByBookId(bookId);\n if (bookEntity.isPresent()) {\n bookRepository.deleteByBookId(bookId);\n LogUtils.getInfoLogger().info(\"Book Deleted: {}\",bookEntity.get().toString());\n return Optional.of(bookDtoBookEntityMapper.bookEntityToBookDto(bookEntity.get()));\n } else {\n LogUtils.getInfoLogger().info(\"Book not Deleted\");\n return Optional.empty();\n }\n }catch (Exception exception){\n throw new BookException(exception.getMessage());\n }\n }", "public boolean deleteBook(int book_id[]){\n String sql=\"delete from Book where id=?\";\n for (int i=0;i<book_id.length;i++){\n if( !dao.exeucteUpdate(sql,new Object[]{book_id[i]})){\n return false;\n }\n }\n return true;\n }", "private void deleteItem()\n {\n Category categoryToDelete = dataCategories.get(dataCategories.size()-1);\n AppDatabase db = Room.databaseBuilder(getApplicationContext(),\n AppDatabase.class, \"database-name\").allowMainThreadQueries().build();\n db.categoryDao().delete(categoryToDelete);\n testDatabase();\n }", "public void delete() throws SQLException {\n Statement stmtIn = DatabaseConnector.getInstance().getStatementIn();\n int safeCheck = BusinessFacade.getInstance().checkIDinDB(this.goodID,\n \"orders\", \"goods_id\");\n if (safeCheck == -1) {\n stmtIn.executeUpdate(\"DELETE FROM ngaccount.goods WHERE goods.goods_id = \" +\n this.goodID + \" LIMIT 1;\");\n }\n }", "public void delete() throws SQLException {\r\n\t\t//SQL Statement\r\n\r\n\t\tString sql = \"DELETE FROM \" + table+ \" WHERE \" + col_genreID + \" = ?\";\r\n\t\tPreparedStatement stmt = DBConnection.getConnection().prepareStatement(sql);\r\n\t\tstmt.setInt(1, this.getGenreID());\r\n\r\n\t\tint rowsDeleted = stmt.executeUpdate();\r\n\t\tSystem.out.println(\"Es wurden \"+rowsDeleted+ \"Zeilen gelöscht\");\r\n\t\tstmt.close();\r\n\t}", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete Books : {}\", id);\n booksRepository.deleteById(id);\n booksSearchRepository.deleteById(id);\n }", "@Override\r\n\tpublic void remove(Book book) {\r\n\r\n\t}", "public void deleteRecord() {\n\n new BackgroundDeleteTask().execute();\n }", "@Override\n\tpublic void deleteBourse(Bourse brs) {\n\t\t\n\t}", "private void deleteAllBooks() {\n int booksDeleted = getContentResolver().delete(BookEntry.CONTENT_URI, null, null);\n Log.v(\"MainActivity\", booksDeleted + getString(R.string.all_deleted));\n }", "public void delete1(int biblio_id, String library_id, String sub_library_id) {\n Session session = HibernateUtil.getSessionFactory().openSession();\n Transaction tx = null;\n \n\n try {\n tx = session.beginTransaction();\n \n Query query = session.createQuery(\"DELETE FROM DocumentDetails WHERE biblioId = :biblioId and id.libraryId = :libraryId and id.sublibraryId = :subLibraryId\");\n\n query.setInteger(\"biblioId\", biblio_id);\n query.setString(\"libraryId\", library_id);\n query.setString(\"subLibraryId\", sub_library_id);\n query.executeUpdate();\n tx.commit();\n \n } catch (RuntimeException e) {\n\n tx.rollback();\n e.printStackTrace();\n } finally {\n session.close();\n }\n }", "@Override\n\tpublic void delete(DatabaseHandler db) {\n\t\tdb.deleteWork(this);\n\t\t\n\t}", "public void delete(int biblio_id, String library_id, String sub_library_id) {\n Session session = HibernateUtil.getSessionFactory().openSession();\n Transaction tx = null;\n //Object acqdocentry = null;\n\n try {\n tx = session.beginTransaction();\n //acqdocentry = session.load(BibliographicDetails.class, id);\n Query query = session.createQuery(\"DELETE FROM BibliographicDetails WHERE id.biblioId = :biblioId and id.libraryId = :libraryId and id.sublibraryId = :subLibraryId\");\n\n query.setInteger(\"biblioId\", biblio_id);\n query.setString(\"libraryId\", library_id);\n query.setString(\"subLibraryId\", sub_library_id);\n query.executeUpdate();\n tx.commit();\n //return (BibliographicDetails) query.uniqueResult();\n } catch (RuntimeException e) {\n\n tx.rollback();\n e.printStackTrace();\n } finally {\n session.close();\n }\n }", "public void onClick(DialogInterface dialog, int id) {\n deleteBook();\n }", "public void onClick(DialogInterface dialog, int id) {\n deleteBook();\n }", "public void delete(String id)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tbookdao.openCurrentSessionwithTransation();\r\n\t\t\tBook book=bookdao.findById(id);\r\n\t\t\tbookdao.delete(book);\r\n\t\t\tbookdao.closeSessionwithTransaction();\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\n\tpublic void delete() {\n\t\tSystem.out.println(\"Mysql DB 서버에 접속해서 삭제를 하다.\");\n\t}", "public void deleteRecord() {\n// foods.clear();\n// try {\n// FoodRecordDao dao = new FoodRecordDao();\n// dao.saveFoodRecords(foods);\n// } catch (DaoException ex) {\n// Logger.getLogger(FoodLogViewController.class.getName()).log(Level.SEVERE, null, ex);\n// }\n }", "@Override\n @DELETE\n @Path(\"/delete/{id}\")\n public void delete(@PathParam(\"id\") int id) {\n EntityManager em = PersistenceUtil.getEntityManagerFactory().createEntityManager();\n DaoImp dao = new DaoImp(em);\n dao.delete(Author.class, id);\n }", "public void delete() {\n\n\t}", "public void deletedb()\n {\n this.appContext.deleteDatabase(DB_NAME);\n Log.d(\"testdeletedb\",\"done\");\n }", "@Override\n\tpublic void deleteExam(ExamBean exam) {\n\t\t\n\t}", "public void delete(){\r\n\r\n }", "int deleteByPrimaryKey(String bid);", "@Override\n\tpublic void delete(String... args) throws SQLException {\n\t\t\n\t}", "public void delete(final Book key) {\n root = delete(root, key);\n }", "@Override\n\tpublic void delete(int chapter_id) {\n\t\trDao.delete(chapter_id);\n\t}", "@Override\n public Book removeBookById(int id) throws DaoException {\n DataBaseHelper helper = new DataBaseHelper();\n Book book = Book.newBuilder().build();\n try (Connection connection = SqlConnector.connect();\n PreparedStatement statementSelectById =\n helper.prepareStatementSelectById(connection, id);\n ResultSet resultSet = statementSelectById.executeQuery()) {\n while (resultSet.next()) {\n BookCreator bookCreator = new BookCreator();\n book = bookCreator.create(resultSet);\n resultSet.deleteRow();\n }\n if (book.getId() == 0) {\n throw new DaoException(\"There is no such book in warehouse!\");\n }\n } catch (SQLException e) {\n throw new DaoException(e);\n }\n return book;\n }", "@Override\n\t\tpublic void delete() {\n\n\t\t}", "public void deleteByPrimaryKey(Long tagId) {\n }", "@RequestMapping(\"/book/delete/{id}\")\n public String delete(@PathVariable Long id){\n bookService.deleteBook(id);\n return \"redirect:/books\";\n }", "void deleteBooking(int detail_id) throws DataAccessException;", "@RequestMapping(value = \"/delete/{bookId}\", method = RequestMethod.GET)\n\tpublic @ResponseBody()\n\tStatus deleteEmployee(@PathVariable(\"bookId\") long bookId) {\n\t\ttry {\n\t\t\tbookService.deleteBook(bookId);;\n\t\t\treturn new Status(1, \"book deleted Successfully !\");\n\t\t} catch (Exception e) {\n\t\t\treturn new Status(0, e.toString());\n\t\t}\n\t}", "int deleteByPrimaryKey(Long articleTagId);", "private void delete()\n\t{\n\t\ttry\n\t\t{\n\t\t\tConnection con = Connector.DBcon();\n\t\t\tString query = \"select * from items where IT_ID=?\";\n\t\t\t\n\t\t\tPreparedStatement pst = con.prepareStatement(query);\n\t\t\tpst.setString(1, txticode.getText());\n\t\t\tResultSet rs = pst.executeQuery();\n\t\t\t\n\t\t\tint count = 0;\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\t\n\t\t\tif(count == 1)\n\t\t\t{\n\t\t\t\tint choice = JOptionPane.showConfirmDialog(null, \"Are you sure you want to delete selected item data?\", \"ALERT\", JOptionPane.YES_NO_OPTION);\n\t\t\t\tif(choice==JOptionPane.YES_OPTION)\n\t\t\t\t{\n\t\t\t\t\tquery=\"delete from items where IT_ID=?\";\n\t\t\t\t\tpst = con.prepareStatement(query);\n\t\t\t\t\t\n\t\t\t\t\tpst.setString(1, txticode.getText());\n\t\t\t\t\t\n\t\t\t\t\tpst.execute();\n\t\t\t\t\t\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Deleted Successfully\", \"RESULT\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tloadData();\n\t\t\t\t\n\t\t\t\trs.close();\n\t\t\t\tpst.close();\n\t\t\t\tcon.close();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Record Not Found!\", \"Alert\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\n\t\t\trs.close();\n\t\t\tpst.close();\n\t\t\tcon.close();\n\t\t\t\n\t\t} \n\t\tcatch (Exception e)\n\t\t{\n\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t}\n\t}", "public void delete() {\n\t\tTimelineUpdater timelineUpdater = TimelineUpdater.getCurrentInstance(\":mainForm:timeline\");\n\t\tmodel.delete(event, timelineUpdater);\n\n\t\tFacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, \"The booking \" + getRoom() + \" has been deleted\", null);\n\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\t}", "@Override\r\n\t\t\tpublic Boolean doInTransaction(TransactionStatus status) {\n\t\t\t\ttry {\r\n\t\t\t\t\t\tboolean result = bookDAO.deleteBook(ISBN);\r\n\t\t\t\t\t\treturn result;\r\n\r\n\t\t\t\t} catch (Exception exception) {\r\n\t\t\t\t\tstatus.setRollbackOnly();\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\r\n\t\t\t}", "public void delete() {\n \t\t try(Connection con = DB.sql2o.open()) {\n \t\t\t String sql = \"DELETE FROM sightings where id=:id\";\n\t\t\t con.createQuery(sql)\n\t\t\t.addParameter(\"id\", this.id)\n\t\t\t.executeUpdate();\n\n \t\t }\n \t }", "public void delete() throws EntityPersistenceException {\n\n }", "@RequestMapping(value = \"/{branch}/stackRoom/{book}\", method = RequestMethod.DELETE)\n public String removeBookFromStock(@PathVariable String branch, @PathVariable String book) {\n branchBookService.removeBook(branch, book);\n return \"Success\";\n }", "@Override\n public int deleteByUserIdAndBookshelfIdAndBookId(\n final int userId,\n final int shelfId,\n final int bookId) {\n return jdbcTemplate.update(\"delete from MyBook where user_id = ? \"\n + \"and book_id = ? and bookshelf_id = ?\",\n new Object[] {userId, bookId, shelfId});\n }", "@Override\n\t\tpublic void delete() {\n\t\t\tSystem.out.println(\"새로운 삭제\");\n\t\t}", "public void remove()\r\n {\r\n if(bookCount>0)\r\n {\r\n bookCount-=1;\r\n }\r\n }", "@Override\n\tpublic void delete(Long primaryKey) {\n\t\t\n\t}", "public void delete(Object bo) {\r\n getPersistenceBrokerTemplate().delete(bo);\r\n }", "private void delete() {\n\n\t}", "@Override\n public void delete()\n {\n }", "@DeleteMapping(\"/{isbn}\")\n\tpublic ResponseEntity<?> deleteBook(@PathVariable(name = \"isbn\") String isbn){\n\t\treturn bookRepository.findByIsbn(isbn).\n\t\t\tmap(bookDelete -> {\n\t\t\t\tbookRepository.delete(bookDelete);\n\t\t\t\treturn new ResponseEntity<>(HttpStatus.NO_CONTENT);\n\t\t\t})\n\t\t\t.orElseThrow(() -> new BookNotFoundException(\"Wrong isbn\"));\n\t}" ]
[ "0.8171349", "0.8134893", "0.80911005", "0.7878423", "0.7587086", "0.7585488", "0.74985904", "0.7320216", "0.7267945", "0.7245022", "0.71861017", "0.715279", "0.70480335", "0.7018207", "0.69185203", "0.68763137", "0.68593174", "0.6851473", "0.67659265", "0.6707733", "0.66962373", "0.6673912", "0.66412646", "0.6628531", "0.6608755", "0.65894663", "0.6564721", "0.65628207", "0.6552872", "0.6537574", "0.65321535", "0.6530994", "0.6524979", "0.6509584", "0.6506014", "0.6503837", "0.65037715", "0.6470306", "0.64561117", "0.6449827", "0.6448482", "0.6430894", "0.6425722", "0.6413141", "0.63963944", "0.63946533", "0.6386131", "0.6377262", "0.6368887", "0.636334", "0.6361996", "0.6345235", "0.634445", "0.63223714", "0.63161445", "0.63074464", "0.63011855", "0.6291194", "0.62780666", "0.6269134", "0.6263197", "0.6252566", "0.62458444", "0.62354827", "0.6232027", "0.622985", "0.622985", "0.6217166", "0.6216964", "0.6211209", "0.62057173", "0.62042457", "0.619525", "0.619385", "0.6191246", "0.619108", "0.617959", "0.6179428", "0.6169437", "0.61689603", "0.61549366", "0.6154475", "0.61422336", "0.61422217", "0.61302614", "0.6118491", "0.6108506", "0.61050516", "0.6100507", "0.6099207", "0.6093336", "0.60911626", "0.608991", "0.6087334", "0.60867053", "0.6085138", "0.6081953", "0.6081467", "0.6079016", "0.6078421" ]
0.82748044
0
Delete the book only if mBookId matches DEFAULT_BOOK_ID
@Override public void run() { if (mBookId != DEFAULT_BOOK_ID) { bookEntry.setId(mBookId); mDb.bookDao().deleteBook(bookEntry); } finish(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void deleteBook() {\n readViews();\n final BookEntry bookEntry = new BookEntry(mNameString, mQuantityString, mPriceString, mSupplier, mPhoneString);\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n // Delete the book only if mBookId matches DEFAULT_BOOK_ID\n if (mBookId != DEFAULT_BOOK_ID) {\n bookEntry.setId(mBookId);\n mDb.bookDao().deleteBook(bookEntry);\n }\n finish();\n }\n });\n\n }", "@Override\r\n\tpublic int deleteBook(int book_id) {\n\t\treturn 0;\r\n\t}", "@Override\n\tpublic boolean deleteBook(int idBook) throws DAOException {\n\t\treturn false;\n\t}", "@Override\n\tpublic int deleteBook(int bookID) {\n\t\treturn 0;\n\t}", "private void deleteBook() {\n // Only perform the delete if this is an existing book.\n if (currentBookUri != null) {\n // Delete an existing book.\n int rowsDeleted = getContentResolver().delete(currentBookUri, null,\n 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, R.string.delete_error, Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the delete was successful, display a toast.\n Toast.makeText(this, R.string.delete_successful, Toast.LENGTH_SHORT).show();\n }\n }\n // Exit the activity.\n finish();\n }", "public void delete(Book book){\n try{\n String query = \"DELETE FROM testdb.book WHERE id=\" + book.getId();\n DbConnection.update(query);\n }\n catch(Exception e){\n e.printStackTrace();\n }\n }", "private void deleteBook() {\n if (currentBookUri != null) {\n int rowsDeleted = getContentResolver().delete(currentBookUri, null, null);\n\n // Confirmation or failure message on whether row was deleted from database\n if (rowsDeleted == 0)\n Toast.makeText(this, R.string.editor_activity_book_deleted_error, Toast.LENGTH_SHORT).show();\n else\n Toast.makeText(this, R.string.editor_activity_book_deleted, Toast.LENGTH_SHORT).show();\n }\n finish();\n }", "public void delete(int bookId){ \n dbmanager.open();\n try (DBIterator keyIterator = dbmanager.getDB().iterator()) {\n keyIterator.seekToFirst();\n\n while (keyIterator.hasNext()) {\n String key = asString(keyIterator.peekNext().getKey());\n String[] splittedString = key.split(\"-\");\n\n if(!\"book\".equals(splittedString[0])){\n keyIterator.next();\n continue;\n }\n\n String resultAttribute = asString(dbmanager.getDB().get(bytes(key)));\n JSONObject jauthor = new JSONObject(resultAttribute);\n\n if(jauthor.getInt(\"idBOOK\")==bookId){\n \n dbmanager.getDB().delete(bytes(key));\n break;\n }\n keyIterator.next(); \n }\n } catch(Exception ex){\n ex.printStackTrace();\n } \n dbmanager.close();\n }", "@Override\n public Optional<BookDto> deleteBook(Integer bookId) {\n try {\n Optional<BookEntity> bookEntity = bookRepository.findByBookId(bookId);\n if (bookEntity.isPresent()) {\n bookRepository.deleteByBookId(bookId);\n LogUtils.getInfoLogger().info(\"Book Deleted: {}\",bookEntity.get().toString());\n return Optional.of(bookDtoBookEntityMapper.bookEntityToBookDto(bookEntity.get()));\n } else {\n LogUtils.getInfoLogger().info(\"Book not Deleted\");\n return Optional.empty();\n }\n }catch (Exception exception){\n throw new BookException(exception.getMessage());\n }\n }", "int deleteByPrimaryKey(String bookId);", "@Override\n\tpublic void deleteBook() {\n\t\t\n\t}", "@Test\n\tpublic void testDeleteBook() {\n\t\t//System.out.println(\"Deleting book from bookstore...\");\n\t\tstore.deleteBook(b1);\n\t\tassertFalse(store.getBooks().contains(b1));\n\t\t//System.out.println(store);\n\t}", "@Override\r\n\tpublic boolean deleteByBookId(String id) {\n\t\tConnection conn=null;\r\n\t\tPreparedStatement pst=null;\r\n\t\r\n\t\tboolean flag=false;\r\n\t\ttry {\r\n\t\t\tconn=Dbconn.getConnection();\r\n\t\t\tString sql = \"update books set tag=0 where id=?\";\r\n\t\t\tpst = conn.prepareStatement(sql);\r\n\t\t\tpst.setString(1, id);\r\n\t\t\tif(0<pst.executeUpdate()){\r\n\t\t\t\tflag=true;\r\n\t\t\t}\r\n\t\t\treturn flag;\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}finally{\r\n\t\t\tDbconn.closeConn(pst, null, conn);\r\n\t\t}\r\n\t\treturn flag;\r\n\t}", "@Override\r\n\tpublic boolean deleteBook(long ISBN) {\n\t\tif (searchBook(ISBN).getISBN() == ISBN) {\r\n\t\ttransactionTemplate.setReadOnly(false);\t\r\n\t\t\t\treturn transactionTemplate.execute(new TransactionCallback<Boolean>() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic Boolean doInTransaction(TransactionStatus status) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\ttry {\r\n\t\t\t\t\t\tboolean result = bookDAO.deleteBook(ISBN);\r\n\t\t\t\t\t\treturn result;\r\n\r\n\t\t\t\t} catch (Exception exception) {\r\n\t\t\t\t\tstatus.setRollbackOnly();\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\r\n\t\t\t}\r\n\t\t});\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public void delete(String book_id){\n\t\tmap.remove(book_id);\n\t\t\n\t}", "public void delete(Book book) {\n\t\tif (entityManager.contains(book))\n\t\t\tentityManager.remove(book);\n\t\tentityManager.remove(entityManager.merge(book));\n\t\treturn;\n\n\t}", "public boolean deleteBook(int book_id[]){\n String sql=\"delete from Book where id=?\";\n for (int i=0;i<book_id.length;i++){\n if( !dao.exeucteUpdate(sql,new Object[]{book_id[i]})){\n return false;\n }\n }\n return true;\n }", "int deleteByPrimaryKey(Long integralBookId);", "@Override\n\tpublic Response deleteOrder(BookDeleteRequest request) {\n\t\treturn null;\n\t}", "int deleteByPrimaryKey(String bookIsbn);", "void delete(Book book);", "public void deleteBook(int num)\n { \n bookList.remove(num); \n }", "int deleteByExample(BookExample example);", "public boolean removeBook(Book book) {\n \treturn set.remove(book);\n }", "@Override\n public int deleteByUserIdAndBookshelfIdAndBookId(\n final int userId,\n final int shelfId,\n final int bookId) {\n return jdbcTemplate.update(\"delete from MyBook where user_id = ? \"\n + \"and book_id = ? and bookshelf_id = ?\",\n new Object[] {userId, bookId, shelfId});\n }", "public void delete(int id) {\n\tListIterator<Book> listItr = list.listIterator();\n\twhile(listItr.hasNext()) {\n\t\tBook book2 = listItr.next();\n\t\tif(book2.id == id) {\n\t\t\tlistItr.remove();\n\t\t\tSystem.out.println(\"Successfully deleted: \"+id);\n\t\t\treturn;\n\t\t}\n\t}\n\tSystem.out.println(\"No such Book ID exists\");\n}", "@Override\n public void delete(int id) {\n Book bookDb = repository.findById(id)\n .orElseThrow(RecordNotFoundException::new);\n // delete\n repository.delete(bookDb);\n }", "public boolean removeBook(String bookId) {\r\n Book book = search(bookId);\r\n if (book == null) {\r\n return false;\r\n } else {\r\n return books.remove(book);\r\n }\r\n }", "@Override\n public Book removeBookById(int id) throws DaoException {\n DataBaseHelper helper = new DataBaseHelper();\n Book book = Book.newBuilder().build();\n try (Connection connection = SqlConnector.connect();\n PreparedStatement statementSelectById =\n helper.prepareStatementSelectById(connection, id);\n ResultSet resultSet = statementSelectById.executeQuery()) {\n while (resultSet.next()) {\n BookCreator bookCreator = new BookCreator();\n book = bookCreator.create(resultSet);\n resultSet.deleteRow();\n }\n if (book.getId() == 0) {\n throw new DaoException(\"There is no such book in warehouse!\");\n }\n } catch (SQLException e) {\n throw new DaoException(e);\n }\n return book;\n }", "public void delete(Book entity) {\n\t\tentityManager.remove(entityManager.contains(entity) ? entity : entityManager.merge(entity));\n\t}", "@Test\n\tpublic void deleteBook_Nonexistent() {\n\t\tsystem.deleteBook(\"asdfasdfasdfaslkjdfasd\");\n\t}", "@Override\n\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\tdeleteBook(position);\n\t\t\t\t\tcandelete =-1;\n\t\t\t\t}", "@Override\n\tpublic void delete(String id) {\n\t\tString query=\"Delete from Book Where id='\"+id+\"'\";\n\t\texecuteQuery(query);\n\t\tnotifyAllObservers();\n\t\t\n\t}", "@DeleteMapping(\"/{username}/books/{bookId}\")\n public void deleteBookFromLibrary(@PathVariable String username,\n @PathVariable Long bookId) {\n userService.deleteBook(username, bookId);\n }", "@Override\r\n\tpublic boolean deleteBooking(Booking_IF bk) {\r\n\t\tPreparedStatement myStatement = null;\r\n\t\tString query = null;\r\n\t\tint count = 0;\r\n\t\ttry{\r\n\t\t\tquery = \"delete from Booking where Shift_ID = ? AND User_ID = ?\";\r\n\t\t\tmyStatement = myCon.prepareStatement(query);\r\n\t\t\tmyStatement.setInt(1, bk.getShiftid());\r\n\t\t\tmyStatement.setInt(2, bk.getUserid());\r\n\t\t\tcount = myStatement.executeUpdate();\r\n\t\t} catch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tfinally{\r\n\t\t\ttry {\r\n\t\t\t\tif (myStatement != null)\r\n\t\t\t\t\tmyStatement.close();\r\n\t\t\t}\r\n\t\t\tcatch(Exception e){\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(count!=1){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "void deleteBookingById(BookingKey bookingKey);", "private void deleteAllBooks() {\n int rowsDeleted = getContentResolver().delete(BookEntry.CONTENT_URI, null, null);\n // Update the message for the Toast\n String message;\n if (rowsDeleted == 0) {\n message = getResources().getString(R.string.inventory_delete_books_failed).toString();\n } else {\n message = getResources().getString(R.string.inventory_delete_books_successful).toString();\n }\n // Show toast\n Toast.makeText(this, message, Toast.LENGTH_LONG).show();\n }", "@Override\n\tpublic String removeBook(int bookId) {\n\t\treturn null;\n\t}", "public boolean remove(Book book) {\n int index = find(book);\n if (index == NOT_FOUND){ return false; }\n for (int i = index; i < books.length - 1; i ++){\n books[i] = books[i+1];\n }\n books[books.length - 1] = null;\n numBooks --;\n return true;\n }", "public com.huqiwen.demo.book.model.Books remove(long bookId)\n\t\tthrows com.huqiwen.demo.book.NoSuchBooksException,\n\t\t\tcom.liferay.portal.kernel.exception.SystemException;", "@Override\n\tpublic Book getIdBook(int idBook) {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic void deletebook(int seq) {\n\t\tsqlSession.delete(ns + \"deletebook\", seq);\r\n\t}", "boolean deleteAuthor(Author author) throws PersistenceException, IllegalArgumentException;", "@Override\r\n\tpublic void remove(Book book) {\r\n\r\n\t}", "public abstract void deleteAPriceBook(String priceBookName);", "public boolean deleteAuthorById(int id);", "@Override\n public void delete(Long id) {\n log.debug(\"Request to delete Books : {}\", id);\n booksRepository.deleteById(id);\n booksSearchRepository.deleteById(id);\n }", "@Override\n\tpublic void deleteKeyword(Integer bookId) {\n\t\tdao.removeKeyword(bookId);\n\t\t\n\t\t\n\t}", "public void onClick(DialogInterface dialog, int id) {\n deleteBook();\n }", "public void onClick(DialogInterface dialog, int id) {\n deleteBook();\n }", "private void deleteAllBooks(){\n int rowsDeleted = getContentResolver().delete(BookContract.BookEntry.CONTENT_URI, null, null);\n Log.v(\"MainActivity\", rowsDeleted + \" rows deleted from database\");\n }", "public void removeBook(Book book) {\n this.bookList.remove(book);\n }", "public void deleteBook(String title)\n {\n for(int iterator = 0; iterator < bookList.size() ; iterator++)\n {\n if(bookList.get(iterator).getTitle().equals(title))\n {\n bookList.remove(iterator); \n }\n }\n }", "int deleteByExample(IntegralBookExample example);", "private void deleteAllBooks() {\n int booksDeleted = getContentResolver().delete(BookEntry.CONTENT_URI, null, null);\n Log.v(\"MainActivity\", booksDeleted + getString(R.string.all_deleted));\n }", "@DeleteMapping(\"/books/{id}\")\n\tpublic ResponseEntity<Map<String, Boolean>> deleteBook(@PathVariable Long id)\n\t{\n\t\tBook book = bookRepository.findById(id)\n\t\t\t\t.orElseThrow(() -> new ResourceNotFoundException(\"Book Not found with id\" + id));\n\t\tbookRepository.delete(book);\n\t\tMap<String, Boolean> response = new HashMap<>();\n\t\tresponse.put(\"deleted\", Boolean.TRUE);\n\t\treturn ResponseEntity.ok(response);\n\t}", "@FXML\n private void handleBookDeleteOption(ActionEvent event) {\n Book selectedItem = tableViewBook.getSelectionModel().getSelectedItem();\n if (selectedItem == null) {\n AlertMaker.showErrorMessage(\"No book selected\", \"Please select book for deletion.\");\n return;\n }\n if (DatabaseHandler.getInstance().isBookAlreadyIssued(selectedItem)) {\n AlertMaker.showErrorMessage(\"Cant be deleted\", \"This book is already issued and cant be deleted.\");\n return;\n }\n //confirm the opertion\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setTitle(\"Deleting Book\");\n Stage stage = (Stage) alert.getDialogPane().getScene().getWindow();\n UtilitiesBookLibrary.setStageIcon(stage);\n alert.setHeaderText(null);\n alert.setContentText(\"Are u sure u want to Delete the book ?\");\n Optional<ButtonType> response = alert.showAndWait();\n if (response.get() == ButtonType.OK) {\n \n boolean result = dbHandler.deleteBook(selectedItem);\n if (result == true) {\n AlertMaker.showSimpleAlert(\"Book delete\", selectedItem.getTitle() + \" was deleted successfully.\");\n observableListBook.remove(selectedItem);\n } else {\n AlertMaker.showSimpleAlert(\"Failed\", selectedItem.getTitle() + \" unable to delete.\");\n\n }\n } else {\n AlertMaker.showSimpleAlert(\"Deletion Canclled\", \"Deletion process canclled.\");\n\n }\n\n }", "int deleteByPrimaryKey(Long authorId);", "@DeleteMapping(\"/delete/{id}\")\n public void deleteBookById(@PathVariable(\"id\") Long id) throws BookNotFoundException {\n bookService.deleteBookById(id);\n }", "@Override\n\t\tpublic boolean delete(int id) {\n\t\t\t\treturn false;\n\t\t}", "@Override\n\tpublic void delete(BookInfoVO vo) {\n\t\tbookInfoDao.delete(vo);\n\t}", "@Override\n\tpublic void delete(int chapter_id) {\n\t\trDao.delete(chapter_id);\n\t}", "public boolean deleteSavedBook(String sysno) {\n \tSQLiteDatabase db = dbHelper.getWritableDatabase();\n \tboolean success = false;\n \t\n \tContentValues v = new ContentValues();\n \tv.put(KEY_SAVED, 0);\n \tv.put(KEY_LAST_MODIFIED, System.currentTimeMillis());\n \tdb.beginTransaction();\n \tsuccess = db.update(TABLE_NAME, v, KEY_SYSNO + \"='\" + sysno + \"'\", null) == 1;\n \tdb.setTransactionSuccessful();\n \tdb.endTransaction();\n \tnotifyListener(BooksDbLoader.BookDbBroadcastReceiver.ACTION_SAVED_BOOKS_CHANGED);\n \t\n \treturn success;\n }", "@Override\n public boolean delete(Integer id) {\n return false;\n }", "@Override\r\n\tpublic boolean delete(int id) {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean delete(int id) {\n\t\treturn false;\r\n\t}", "@RequestMapping(value = \"/delete/{bookId}\", method = RequestMethod.GET)\n\tpublic @ResponseBody()\n\tStatus deleteEmployee(@PathVariable(\"bookId\") long bookId) {\n\t\ttry {\n\t\t\tbookService.deleteBook(bookId);;\n\t\t\treturn new Status(1, \"book deleted Successfully !\");\n\t\t} catch (Exception e) {\n\t\t\treturn new Status(0, e.toString());\n\t\t}\n\t}", "public void onClick(DialogInterface dialog, int id) {\n deleteAllBooks();\n }", "@Override\n\tpublic boolean delete(int id) {\n\t\treturn false;\n\t}", "public void onClick(DialogInterface dialog, int id) {\n deleteBook();\n finish();\n }", "@Override\r\n\t\t\tpublic Boolean doInTransaction(TransactionStatus status) {\n\t\t\t\ttry {\r\n\t\t\t\t\t\tboolean result = bookDAO.deleteBook(ISBN);\r\n\t\t\t\t\t\treturn result;\r\n\r\n\t\t\t\t} catch (Exception exception) {\r\n\t\t\t\t\tstatus.setRollbackOnly();\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\r\n\t\t\t}", "@DeleteMapping(\"/book\")\n public ResponseEntity<?> delete(@RequestBody Book book) {\n bookService.delete(book);\n return ResponseEntity.ok().body(\"Book has been deleted successfully.\");\n }", "void deleteAuthor(Long authorId) throws LogicException;", "public void removeBook(Book book) {\r\n\t\tbooks.computeIfPresent(book, (k, v) -> {\r\n\t\t\tif(v == 0) return null;\r\n\t\t\telse return --v;\r\n\t\t});\r\n\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n if (bookItem.equals( getString(R.string.empty_list))) return;\n DataBaseHelper myDbHelper = new DataBaseHelper(getActivity());\n try {\n myDbHelper.createDataBase();\n } catch (IOException ioe) {\n throw new Error(\"Unable to create database\");\n }\n\n try {\n myDbHelper.openDataBase();\n } catch (SQLException sqle) {\n throw new Error(\"Unable to open database\");\n }\n\n if (!myDbHelper.deleteBook(bookItem)) {\n return;\n }\n\n myDbHelper.deleteBook(bookItem);\n myDbHelper.close();\n\n mBookList.remove(selectedItem);\n dataAdapter = new MySimpleCustomAdapter(getActivity(), R.layout.list_item, mBookList);\n listView.setAdapter(dataAdapter);\n if (dataAdapter.isEmpty())\n Toast.makeText(getActivity(), getString(R.string.empty), Toast.LENGTH_SHORT).show();\n\n }", "public void removeBook(Book book)\r\n\t{\r\n\t\tList<Book> oldValue = items;\r\n\t\titems = new ArrayList<Book>(items);\r\n\t\titems.remove(book);\r\n\t\tfirePropertyChange(\"books\", oldValue, items);\r\n\t\tfirePropertyChange(\"itemsCount\", oldValue.size(), items.size());\r\n\t}", "@GetMapping(\"/deleteBook\")\n public String deleteBook(@RequestParam(\"id\") int id, Model model){\n bookService.deleteBook(id);\n return \"redirect:/1\";\n }", "@Override\n @Transactional\n public int deleteById(final int id) {\n return jdbcTemplate.update(\"delete from MyBook where id = ?\",\n new Object[] {id});\n }", "public void onClick(View v) {\n MySQLiteHelper.deleteBookByID(currentBookID);\n // Then go back to book list\n startActivity(new Intent(BookDetailActivity.this, BookListViewActivity.class));\n }", "public void delete(String id)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tbookdao.openCurrentSessionwithTransation();\r\n\t\t\tBook book=bookdao.findById(id);\r\n\t\t\tbookdao.delete(book);\r\n\t\t\tbookdao.closeSessionwithTransaction();\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private void deleteEmployeeBooking() {\n BookingModel bookingModel1 = new BookingModel();\n try {\n bookingModel1.deleteBooking(employeeID);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n }", "@Override\n public boolean delete(Revue objet) {\n return false;\n }", "@Override\n\tpublic boolean delete(long id) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean delete(long id) {\n\t\treturn false;\n\t}", "@DeleteMapping(\"/{isbn}\")\n\tpublic ResponseEntity<?> deleteBook(@PathVariable(name = \"isbn\") String isbn){\n\t\treturn bookRepository.findByIsbn(isbn).\n\t\t\tmap(bookDelete -> {\n\t\t\t\tbookRepository.delete(bookDelete);\n\t\t\t\treturn new ResponseEntity<>(HttpStatus.NO_CONTENT);\n\t\t\t})\n\t\t\t.orElseThrow(() -> new BookNotFoundException(\"Wrong isbn\"));\n\t}", "@GetMapping(\"/delete\")\n\tpublic String removeBookById(Map<String, Object> map, @ModelAttribute(\"bookCmd\") Book book, HttpServletRequest res,\n\t\t\tRedirectAttributes attribute) {\n\t\tString msg = null;\n\t\tList<BookModel> listmodel = null;\n\t\tmsg = service.deleteBookDetail(Integer.parseInt(res.getParameter(\"bookid\")));\n\t\tlistmodel = service.findAllBookDetails();\n\t\tattribute.addFlashAttribute(\"listmodel\", listmodel);\n\t\tattribute.addFlashAttribute(\"msg\", msg);\n\t\treturn \"redirect:/register\";\n\n\t}", "@DeleteMapping(\"/{id}/shoppingcart\")\n public ShoppingCart removeBookFromShoppingCart(@PathVariable long id, @RequestBody Book book){\n Customer b = customerRepository.findById(id);\n ShoppingCart sc = b.getShoppingCart();\n sc.removeBook(book);\n b = customerRepository.save(b);\n \n return b.getShoppingCart();\n }", "@Override\n\tpublic boolean cancelSeat(int bookingId) {\n\t\tSession session = factory.getCurrentSession();\n\t\tQuery query = session\n\t\t\t\t.createQuery(\"delete from Booking b where b.bookingId=\" + bookingId + \"\");\n\t\tint i = query.executeUpdate();\n\t\t//System.out.println(\"status change\");\n\t\treturn true;\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString number=textFieldn.getText();\n\t\t\t\t\t\t\t\n\t\t\t\tBookModel bookModel=new BookModel();\n\t\t\t\tbookModel.setBook_number(number);\n\t\t\t\t\n\t\t\t\tBookDao bookDao=new BookDao();\n\t\t\t\t\n\t\t\t\tDbUtil dbUtil = new DbUtil();\n\t\t\t\tConnection con =null;\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\tcon = dbUtil.getCon();\n\t\t\t\t\tint db=bookDao.deletebook(con,bookModel);\n\t\t\t\t\t\n\t\t\t\t\tif(db==1) {\n\t\t\t\t\t JOptionPane.showMessageDialog(null, \"删除成功\");\n\t\t\t\t\t } \t\t\t\t\t\n\t\t\t\t}catch (Exception e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "@Override\n public void removeFromCart(Publication book) {\n if(shoppingCart.contains(book)){\n shoppingCart.remove(book);\n } else throw new NoSuchPublicationException();\n }", "boolean delete(final ID id);", "@Override\n\tpublic boolean deleteById(int id) {\n\t\treturn false;\n\t}", "public interface DeleteInterface {\n void bookDeleted(Book b);\n}", "boolean isBookIdValid(int bookId) {\n\t\t\n\t\t// checks if the id is to big for the book case or if that location is not taken \n\t\tif (bookId >= this.maxBookCapacity || this.bookShelf[bookId] == null || bookId < 0) {\n\t\t\treturn false; \n\t\t}\n\t\t\n\t\treturn true; \n\t}", "public void deleteEntry(String book1)\n{\n}", "Boolean delete(Long id);", "@Override\n\tpublic boolean delete(long id) {\n\t\treturn true;\n\t}", "@RequestMapping(value = \"/{branch}/stackRoom/{book}\", method = RequestMethod.DELETE)\n public String removeBookFromStock(@PathVariable String branch, @PathVariable String book) {\n branchBookService.removeBook(branch, book);\n return \"Success\";\n }", "@Override\r\n\tpublic boolean delete(Moteur obj) {\n\t\treturn false;\r\n\t}", "@Override\n\tpublic boolean delete(String internalModel) {\n\t\treturn false;\n\t}" ]
[ "0.74978304", "0.73993254", "0.7375725", "0.71426576", "0.6881187", "0.6832967", "0.68116546", "0.68055165", "0.6738702", "0.66979337", "0.66411126", "0.6558852", "0.65569776", "0.65105337", "0.64741755", "0.6464038", "0.63818955", "0.62737715", "0.6264504", "0.6256621", "0.602825", "0.6021696", "0.60142785", "0.5994236", "0.59602535", "0.59587145", "0.58906037", "0.5890018", "0.58750993", "0.58364093", "0.5776502", "0.57471514", "0.5739631", "0.5722915", "0.57048047", "0.57013375", "0.56998336", "0.5696154", "0.5692803", "0.5680826", "0.56670916", "0.5645566", "0.5622505", "0.5618752", "0.55811965", "0.5565594", "0.5518757", "0.55115926", "0.5510508", "0.5510508", "0.55068123", "0.5501346", "0.5499147", "0.5491284", "0.5470049", "0.54696494", "0.54538333", "0.54059666", "0.5402946", "0.53962123", "0.53829765", "0.5353883", "0.5347342", "0.53470695", "0.5344725", "0.5344725", "0.53377384", "0.53327554", "0.5323246", "0.5315111", "0.5295304", "0.5288933", "0.5283683", "0.52801627", "0.52722263", "0.52664256", "0.52634764", "0.5254825", "0.5246583", "0.5242973", "0.52238095", "0.5213799", "0.52072084", "0.52072084", "0.5202418", "0.51843053", "0.5178486", "0.51767206", "0.51758534", "0.5175048", "0.51710206", "0.51689667", "0.5163752", "0.5147184", "0.51460093", "0.51386184", "0.5137783", "0.5132332", "0.5126557", "0.5112435" ]
0.6435871
16
Read from input fields Use trim to eliminate leading or trailing white space
private void readViews() { mNameString = mNameEditText.getText().toString().trim(); mQuantityString = Integer.parseInt(mQuantityTextView.getText().toString().trim()); mPriceString = Double.parseDouble(mPriceEditText.getText().toString().trim()); mPhoneString = Integer.parseInt(mPhoneEditText.getText().toString().trim()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void trim() {\n read(0);\n }", "public String getData() {\r\n Scanner sc = new Scanner(System.in);\r\n String s = sc.nextLine();\r\n while ((s.startsWith(\"\") && s.endsWith(\" \")) || (s.length() == 0) || (s.startsWith(\" \"))) {\r\n System.out.print(\"A space record, or a space at the beginning is not acceptable. \\n\"\r\n + \"Please try again: \");\r\n s = sc.nextLine();\r\n }\r\n return s;\r\n }", "private void getTextFromInput() {\n firstName = firstNameField.getText();\n lastName = lastNameField.getText();\n age = ageField.getText();\n email = emailField.getText().toLowerCase();\n }", "protected String readAndTrim(int index) {\n String value = this.parts[index];\n return value != null ? value.trim() : null;\n }", "static void getNonBlank() throws IOException{\n while(curr_char == 32)\n {\n curr_char = pbIn.read();\n }\n }", "public List<String> readFields() throws IOException\n {\n List<String> fields = new ArrayList<String>();\n StringBuffer sb = new StringBuffer();\n String line = in.readLine();\n\n if (line == null)\n return null;\n\n if (line.length() == 0)\n {\n fields.add(line);\n return fields;\n }\n\n int i = 0;\n do\n {\n sb.setLength(0);\n if (i < line.length() && line.charAt(i) == textQualifier)\n {\n i = handleQuotedField(line, sb, ++i); // skip quote\n }\n else\n {\n i = handlePlainField(line, sb, i);\n }\n\n // Make sure the field name is trimmed before adding it\n fields.add(sb.toString().trim());\n i++;\n }\n while (i < line.length());\n\n return fields;\n }", "private void prepareUserFields(String fieldInput) throws AutomicException {\n String[] fields = fieldInput.split(\",\");\n userInputFields = new ArrayList<String>(fields.length);\n uniqueFields = new HashSet<String>(fields.length);\n for (String field : fields) {\n String temp = field.trim();\n if (CommonUtil.checkNotEmpty(temp)) {\n userInputFields.add(temp);\n uniqueFields.add(temp.toLowerCase());\n }\n }\n if (uniqueFields.isEmpty()) {\n throw new AutomicException(String.format(\"Invalid Fields have been provided [%s] \", fieldInput));\n }\n }", "public String readString() {\n\t\tboolean read = false;\n\t\tString input = \"\";\n\t\twhile (!read) {\n\t\t\ttry {\n\t\t\t\tinput = myInput.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\twhile (input.contains(\" \")) {\n\t\t\t\tSystem.out.println(\"Please do not use spaces. Type CamelCase or use underscores.\");\n\t\t\t\tSystem.out.println(\"Try Again:\");\n\t\t\t\ttry {\n\t\t\t\t\tinput = myInput.readLine();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tread = true;\n\t\t}\n\t\treturn input;\n\t}", "public void readInput()\n\t{\n\t\tString userInput;\n\t\tChoices choice;\n\t\t\n\t\tdo {\n\t\t\tlog.log(Level.INFO, \"Please give the inputs as:\\n\"\n\t\t\t\t\t+ \"ADDACCOUNT to add the account\\n\" \n\t\t\t\t\t+ \"DISPLAYALL to display all accounts\\n\"\n\t\t\t\t\t+ \"SEARCHBYACCOUNT to search by account\\n\"\n\t\t\t\t\t+ \"DEPOSIT to deposit into account\\n\"\n\t\t\t\t\t+ \"WITHDRAW to withdraw from the account\\n\"\n\t\t\t\t\t+ \"EXIT to end the application\"\n\t\t\t\t\t);\n userInput = scan.next();\n choice = Choices.valueOf(userInput);\n\n switch (choice) {\n case ADDACCOUNT : \taddAccount();\n \t\t\t\t\t\tbreak;\n \n case DISPLAYALL :\t\tdisplayAll();\n \t\t\t\t\t\tbreak;\n\n case SEARCHBYACCOUNT :\tsearchByAccount();\n \t\t\t\t\t\tbreak;\n \n case DEPOSIT :\t\t\tdepositAmount();\n \t\t\t\t\t\tbreak;\n \n case WITHDRAW :\t\t\twithDrawAmount();\n \t\t\t\t\t\tbreak;\n \n case EXIT:\t\t\t\tlog.log(Level.INFO, \"Application has ended successfully\");\n \t\t\t\t\t\tbreak;\n \n default: break;\n }\n } while(choice != Choices.EXIT);\n\t\t\n\t\tscan.close();\n\t}", "public void readUserInput(){\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n try {\n String input = reader.readLine();\n while (!userValidation.validateUserInput(input)){\n input = reader.readLine();\n }\n elevatorController.configureNumberOfElevators(input);\n\n } catch (\n IOException e) {\n logger.error(e);\n }\n\n }", "public void readEditTexts() {\n }", "public String readInput() {\n\t\treturn null;\n\t}", "public abstract void readFields(DataInput in) throws IOException;", "private static void readInput() { input = sc.nextLine().toLowerCase().toCharArray(); }", "private String[] readLine( String line ) throws IOException {\n if ( StringUtils.isBlank( line ) ) {\n return null;\n }\n if ( line.startsWith( \"#\" ) ) {\n return null;\n }\n\n String[] fields = StringUtils.splitPreserveAllTokens( line, '\\t' );\n if ( fields.length < 2 ) {\n throw new IOException( \"Illegal format, expected at least 2 columns, got \" + fields.length );\n }\n return fields;\n\n }", "void readInput() {\n\t\ttry {\n\t\t\tBufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n\t\t\t\n\t\t\tString line = input.readLine();\n\t\t\tString [] numbers = line.split(\" \");\n\n\t\t\tlenA = Integer.parseInt(numbers[0]);\n\t\t\tlenB = Integer.parseInt(numbers[1]); \n\n\t\t\twordA = input.readLine().toLowerCase(); \n\t\t\twordB = input.readLine().toLowerCase();\n\n\t\t\tg = Integer.parseInt(input.readLine());\n\n\t\t\tString key; \n\t\t\tString [] chars;\n\t\t\tpenaltyMap = new HashMap<String, Integer>();\n\n\t\t\tfor(int i=0;i<676;i++) {\n\t\t\t\tline = input.readLine();\n\t\t\t\tchars = line.split(\" \");\n\t\t\t\tkey = chars[0] + \" \" + chars[1];\n\t\t\t\tpenaltyMap.put(key, Integer.parseInt(chars[2]));\n\n\t\t\t}\n\n\t\t\tinput.close();\n\n\t\t} catch (IOException io) {\n\t\t\tio.printStackTrace();\n\t\t}\n\t}", "@Override\n\tpublic void readFields(DataInput in) throws IOException {\n\t\tword = in.readUTF();\n\t\ttitle = in.readUTF();\n\t}", "public static String readUserInput() {\n return in.nextLine();\n }", "public static String getString(){\n Scanner in = new Scanner(System.in); //scanner variable to take input\n return in.nextLine().trim();\n }", "@Override\n\tpublic String read() \n\t{\n\t\tString res = \"\";\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tif (scan.hasNextLine())\n\t\t\tres = scan.nextLine();\n\t\t\n\t\treturn res;\n\t\t\n\n\t}", "public static String readInput() {\r\n return SCANNER.nextLine();\r\n }", "public void read() {\r\n\t\tJTextField txtCustomerNo = new JTextField();\r\n\t\ttxtCustomerNo.setText(\"\" + this.getCustomerNo());\r\n\t\tJTextField txtTitle = new JTextField();\r\n\t\ttxtTitle.requestFocus();\r\n\t\tJTextField txtFirstName = new JTextField();\r\n\t\tJTextField txtSurname = new JTextField();\r\n\t\tJTextField txtAddress = new JTextField();\r\n\t\tJTextField txtPhoneNo = new JTextField();\r\n\t\tJTextField txtEmail = new JTextField();\r\n\r\n\t\t\r\n\t\tObject[] message = { \"Customer Number:\", txtCustomerNo, \"Title:\", txtTitle, \"First Name:\", txtFirstName,\r\n\t\t\t\t\"Surname:\", txtSurname, \"Address:\", txtAddress, \"Phone Number:\", txtPhoneNo, \"Email:\", txtEmail, };\r\n\t\t\r\n\r\n\t\tint option = JOptionPane.showConfirmDialog(null, message, \"Enter customer details\",\r\n\t\t\t\tJOptionPane.OK_CANCEL_OPTION);\r\n\t\t\r\n\t\tName txtName = new Name(txtTitle.getText(), txtFirstName.getText(), txtSurname.getText());\r\n\r\n\t\tif (option == JOptionPane.OK_OPTION) {\r\n\t\t\tthis.name = txtName;\r\n\t\t\tthis.address = txtAddress.getText();\r\n\t\t\tthis.phoneNo = txtPhoneNo.getText();\r\n\t\t\tthis.emailAddress = txtEmail.getText();\r\n\t\t}\r\n\t}", "public static String stringValidation() {\n\t\tString input = \"\";\n\t\tinput = in.nextLine().trim();\n\t\treturn input;\n\t}", "public void readFields(DataInput in) throws IOException {\n\t\tfirstName.readFields(in);\n\t\tlastName.readFields(in);\n\t}", "public String readCommand() {\n String input = in.nextLine();\n while (input.trim().isEmpty()) {\n input = in.nextLine();\n }\n return input;\n }", "public String[] parse() {\n String line = input.nextLine();\n line = line.trim();\n if (StringUtils.isNotEmpty(line)) {\n return StringUtils.split(line, \" \");\n }\n return null;\n }", "private void processInput() {\r\n\t\ttry {\r\n\t\t\thandleInput(readLine());\r\n\t\t} catch (WrongFormatException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "static String read ()\r\n \t{\r\n \t\tString sinput;\r\n \r\n \t\ttry\r\n \t\t{\r\n \t\t\tsinput = br.readLine();\r\n \t\t}\r\n \t\tcatch (IOException e)\r\n \t\t{\r\n \t\t\tErrorLog.addError(\"Input exception occured in command line interface!\");\r\n \t\t\treturn null; //Menu will exit when fed a null\r\n \t\t}\r\n \t\treturn sinput;\r\n \t}", "@Override\n public String readUserInput() {\n while (true) {\n System.out.println(\"\");\n System.out.print(\"Enter Information: \");\n Scanner in = new Scanner(System.in);\n String userInput = in.nextLine();\n\n if (!userInput.equals(\"0\")) {\n String[] parts = userInput.split(\",\");\n if (parts.length == 5) {\n if (DateSorting.isDateValid(\"dd-MM-yyyy\", parts[2])) {\n if (TodoList.tasks.get(parts[0]) == null) {\n return userInput;\n } else {\n System.out.println(\"A task with this ID already exists, try again: \");\n }\n } else {\n System.out.println(\"The date entered is invalid, try again: \");\n }\n } else {\n System.out.println(\"Please follow instructions, try again: \");\n }\n } else {\n return userInput;\n }\n }\n }", "@Override\n\tpublic void readFields(DataInput arg0) throws IOException {\n\t\tfirst = arg0.readUTF();\n\t\tsecond = arg0.readUTF();\n\t}", "private static String readInput(){\n\t\ttry {\n\t\t\tInput = br.readLine();\n\t\t\t}\n\t\tcatch (IOException ioe) {\n\t\t\tSystem.out.println(\"IO error trying to read your name!\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\treturn Input;\n\t}", "public static String readString() {\n return in.nextLine();\n }", "private void readForm() {\n }", "private void parseAndPopulate(String in) {\r\n\t\tIParser parser = new AbbyyOCRDataParser(in);\r\n\t\tocrData = parser.parse();\r\n\t\tStore.addData(ocrData);\r\n\t\t\r\n\t\tEditText np = (EditText)findViewById(R.id.patient_et);\r\n\t\tEditText nm = (EditText)findViewById(R.id.medicine_et);\r\n\t\tEditText cd = (EditText)findViewById(R.id.consumption_et);\r\n\t\t\r\n\t\tPatient2Medicine p2m = ocrData.getPatient2Medicine();\r\n\t\tnp.setText(ocrData.getPatient().getName());\r\n\t\tnm.setText(ocrData.getMedicine().getMedicine());\r\n\t\tcd.setText(p2m.getFrequencyOfIntake()\r\n\t\t\t\t+ \" \" + p2m.getQuantityPerIntake() + \" by \" + p2m.getMode());\r\n\t\t\r\n\t}", "public void displayRawTrim( ) throws NamingException {\r\n\t\tTrimHeader trimHeader = getTrimBean().findTrimHeader(getTrimName());\r\n TolvenLogger.info( \"******************************* Raw Trim *******************************\", SubmitTrim2.class);\r\n TolvenLogger.info( \"Name: \" + trimHeader.getName(), SubmitTrim2.class);\r\n TolvenLogger.info( \"Date last updated: \" + trimHeader.getLastUpdated(), SubmitTrim2.class);\r\n TolvenLogger.info( \"Comment: \" + trimHeader.getComment(), SubmitTrim2.class);\r\n TolvenLogger.info( \"************************************************************************\", SubmitTrim2.class);\r\n\t\tTolvenLogger.info( new String( trimHeader.getTrim()), SubmitTrim2.class);\r\n TolvenLogger.info( \"************************************************************************\", SubmitTrim2.class);\r\n\t}", "public void inputInformation() throws IOException {\n BufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n\n try {\n System.out.println(\"Please enter shape: \");\n shape = input.readLine();\n\n System.out.println(\"Please enter color\");\n color = input.readLine();\n\n System.out.println(\"Please enter name: \");\n name = input.readLine();\n\n System.out.println(\"Please enter weight: \");\n weight = Double.parseDouble(input.readLine());\n } catch (NumberFormatException e) {\n System.out.println(\"Error: \" + e.toString());\n }\n }", "private String[] parseLine(final String nextLine, final boolean readLine)\n throws IOException {\n String line = nextLine;\n if (line.length() == 0) {\n return new String[0];\n } else {\n\n final List<String> fields = new ArrayList<String>();\n StringBuilder sb = new StringBuilder();\n boolean inQuotes = false;\n boolean hadQuotes = false;\n do {\n if (inQuotes && readLine) {\n sb.append(\"\\n\");\n line = getNextLine();\n if (line == null) {\n break;\n }\n }\n for (int i = 0; i < line.length(); i++) {\n final char c = line.charAt(i);\n if (c == CsvConstants.QUOTE_CHARACTER) {\n hadQuotes = true;\n if (inQuotes && line.length() > i + 1\n && line.charAt(i + 1) == CsvConstants.QUOTE_CHARACTER) {\n sb.append(line.charAt(i + 1));\n i++;\n } else {\n inQuotes = !inQuotes;\n if (i > 2 && line.charAt(i - 1) != this.fieldSeparator\n && line.length() > i + 1\n && line.charAt(i + 1) != this.fieldSeparator) {\n sb.append(c);\n }\n }\n } else if (c == this.fieldSeparator && !inQuotes) {\n hadQuotes = false;\n if (hadQuotes || sb.length() > 0) {\n fields.add(sb.toString());\n } else {\n fields.add(null);\n }\n sb = new StringBuilder();\n } else {\n sb.append(c);\n }\n }\n } while (inQuotes);\n if (sb.length() > 0 || fields.size() > 0) {\n if (hadQuotes || sb.length() > 0) {\n fields.add(sb.toString());\n } else {\n fields.add(null);\n }\n }\n return fields.toArray(new String[0]);\n }\n }", "public void read() {\n try {\n pw = new PrintWriter(System.out, true);\n br = new BufferedReader(new InputStreamReader(System.in));\n input = br.readLine();\n while (input != null) {\n CM.processCommand(input, pw, true);\n input = br.readLine();\n }\n } catch (IOException ioe) {\n pw.println(\"ERROR: Problem with reading user input.\");\n } finally {\n try {\n br.close();\n } catch (IOException ioe) {\n pw.println(\"ERROR: Buffer DNE\");\n }\n }\n }", "public void readFields(DataInput dataInput) throws IOException {\n }", "public void readFields(DataInput in) throws IOException {\n\t\trating = in.readInt();\n\t\tproductTitle = in.readUTF();\n\t}", "private void skipBlankSpaces() {\n while (currentIndex < this.data.length) {\n if (!Character.isWhitespace(data[currentIndex])) {\n break;\n }\n currentIndex++;\n }\n }", "public static String inputString(boolean allowBlank) throws IOException\r\n\t{\r\n\t\t// open a new input reader\r\n\t\tBufferedReader input = new BufferedReader(new InputStreamReader(System.in));\r\n\t\t// stores the final string to return\r\n\t\tString returnString = new String();\r\n\t\t\r\n\t\t// Continue requesting inputs until a valid string is entered\r\n\t\tif(allowBlank)\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"> \");\r\n\t\t\t\treturnString = input.readLine();\r\n\t\t\t}\r\n\t\t\tcatch (IOException e)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"IOException\");\r\n\t\t\t\treturnString = inputString(allowBlank);\r\n\t\t\t}\r\n\t\t\r\n\t\t\treturn returnString;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tdo\r\n\t\t\t{\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.print(\"> \");\r\n\t\t\t\t\treturnString = input.readLine();\r\n\t\t\t\t}\r\n\t\t\t\tcatch (IOException e)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"IOException\");\r\n\t\t\t\t\treturnString = inputString(false);\r\n\t\t\t\t}\r\n\t\t\t}while(returnString.length() == 0);\r\n\t\t\r\n\t\t\treturn returnString;\r\n\t\t}\r\n\t}", "private static List<String[]> readInput(String filePath) {\n List<String[]> result = new ArrayList<>();\n int numOfObject = 0;\n\n try {\n Scanner sc = new Scanner(new File(filePath));\n sc.useDelimiter(\"\");\n if (sc.hasNext()) {\n numOfObject = Integer.parseInt(sc.nextLine());\n }\n for (int i=0;i<numOfObject;i++) {\n if (sc.hasNext()) {\n String s = sc.nextLine();\n if (s.trim().isEmpty()) {\n continue;\n }\n result.add(s.split(\" \"));\n }\n }\n sc.close();\n }\n catch (FileNotFoundException e) {\n System.out.println(\"FileNotFoundException\");\n }\n return result;\n }", "private void handleInput() {\n\n // Get the input string and check if its not empty\n String text = textInput.getText().toString();\n if (text.equals(\"\\n\")) {\n textInput.setText(\"\");\n return;\n }\n // remove empty line\n if (text.length() >= 2 && text.endsWith(\"\\n\")) text = text.substring(0, text.length() - 1);\n\n if (TextUtils.isEmpty(text)) return;\n textInput.setText(\"\");\n\n myGame.onInputString(text);\n }", "private static String readLine() {\r\n String input=\"\";\r\n try {\r\n input = in.readLine();\r\n } catch (IOException e) {\r\n System.out.println(e.getMessage());\r\n }\r\n return input;\r\n }", "private void trimWhitespaces() {\n \n while(currentIndex < dataLength && Character.isWhitespace( data[currentIndex] )) {\n ++currentIndex;\n }\n }", "private String scan() {\n line = line.trim();\n if (line.length() == 0)\n return \"\";\n\n int i = 0;\n while (i < line.length() && line.charAt(i) != ' ' && line.charAt(i) != '\\t') {\n i = i + 1;\n }\n String word = line.substring(0, i);\n line = line.substring(i);\n return word;\n }", "private List<String> getInputList(BufferedReader br) throws IOException {\n\t\tArrayList<String> inputWordsList = new ArrayList<String>();\n\t\tString tempInputWord = null;\n\t\twhile ((tempInputWord = br.readLine()) != null) {\n\t\t\tinputWordsList.add(tempInputWord);\n\t\t}\n\t\treturn inputWordsList;\n\t}", "public String readLine(){\n\t\tString line;\n\t\ttry{\n\t\t\tline=scanner.nextLine();\n\t\t}catch (NoSuchElementException e){\n\t\t\tline=null;\n\t\t}\n\t\treturn line;\n\t}", "private void checkForEmptyFields() throws EmptyTextFieldException {\n\n if (date == null || title.equals(\"\") || function.equals(\"\") || protagonist.equals(\"\")\n || source.equals(\"\") || references.equals(\"\") || description.equals(\"\")) {\n throw new EmptyTextFieldException();\n }\n }", "private void updateTrimData() {\n\t\tupdateLeftTrimData();\r\n\t\tupdateRightTrimData();\r\n\t}", "public void skipWhitespace() {\n while (this.index < this.input.length() && Character.isWhitespace(this.input.charAt(this.index)))\n this.index++;\n }", "public void getGamerInput() {\n\t\ttry {\n\t\t\tsCurrentCharInput = String.format(\"%s\", (consoleInput.readLine())).toUpperCase(Locale.getDefault());\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t/* ************************************* */\n\t\tconsoleLog.println(\" \");\n\t\t// System.out.println(\" Quit readline \");\n\t\t/* ************************************* */\n\t\t// if (sCurrentCharInput.length() == 0)\n\t\t// continue;\n\n\t\t// if (sCurrentCharInput.contains(sAskedWord))\n\t\t// continue;\n\n\t}", "private void skipBlankSpaces() {\n\t\twhile(currentIndex < data.length) {\n\t\t\tchar c = data[currentIndex];\n\t\t\tif(c == ' ' || c == '\\t' || c =='\\n' || c == '\\r') {\n\t\t\t\tcurrentIndex++;\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "private static void parseInput(BufferedReader reader) {\n\t\tString line = \"\";\n\t\tField f;\n\t\ttry {\n\t\t\tline = reader.readLine();\n\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\twhile (line != null) {\n\t\t\tf = Field.parse(line);\n\t\t\tif (dimension < f.getCoords().getX()) {\n\t\t\t\tdimension = f.getCoords().getX();\n\t\t\t}\n\t\t\tmap.put(f.getCoords(), f);\n\t\t\ttry {\n\t\t\t\tline = reader.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t}\n\n\t}", "protected void readFieldDelim(java.lang.String s) throws java.io.IOException {\n readExpected(s);\n }", "private String skipEmptyLines(String line, Scanner myReader){\n while (myReader.hasNextLine()){\n if (line.length() == 0){\n line = myReader.nextLine();\n }\n else{\n String[] tokens = line.split(\" \");\n if (tokens.length > 0){\n return line;\n }\n }\n }\n return \"\";\n }", "public void readQuestion()\n\t{\n\t\tnumLines = (int)numScan.nextDouble();\n\t\tquestion = stringScan.nextLine();\n\t}", "public String readCommand() {\n sc = new Scanner(System.in);\n userInput = new TextField();\n return userInput.getText();\n }", "public String Get_Input()throws IOException{\r\n\t\tString input=\"\";\r\n\t\tInputStreamReader converter = new InputStreamReader(System.in);\r\n\t\tBufferedReader in = new BufferedReader(converter);\r\n\t\t\r\n\t\tinput = in.readLine();\r\n\t\t\r\n\t\treturn input;\r\n\t}", "public static String readKeyBoard() {\n String line = \"\";\n for(;;){\n line = scanner.nextLine();\n if (line.length() < 1) {\n System.out.print(\"Nothing input,please input again:\\n\");\n continue;\n }\n break;\n }\n return line;\n }", "private void setFieldsEmpty(){\n nameInput.setText(\"\");\n frontTrackInput.setText(\"\");\n cornerWeightFLInput.setText(\"\");\n cornerWeightRLInput.setText(\"\");\n rearTrackInput.setText(\"\");\n cornerWeightRRInput.setText(\"\");\n cornerWeightFRInput.setText(\"\");\n cogInput.setText(\"\");\n frontRollDistInput.setText(\"\");\n wheelBaseInput.setText(\"\");\n }", "private void getUserTextInput() {\n if (!TextUtils.isEmpty(mBinding.fragmentSearchZipcodeTxt.getText()))\n mZipcodeInput = Integer.parseInt(mBinding.fragmentSearchZipcodeTxt.getText().toString().trim());\n if (!TextUtils.isEmpty(mBinding.fragmentSearchCityTxt.getText()))\n mCityInput = mBinding.fragmentSearchCityTxt.getText().toString().trim();\n if (!TextUtils.isEmpty(mBinding.fragmentSearchMinSurfaceTxt.getText()))\n mMinSurfaceInput = Utils.convertAreaAccordingToPreferences(mActivity, mBinding.fragmentSearchMinSurfaceTxt.getText().toString().trim());\n if (!TextUtils.isEmpty(mBinding.fragmentSearchMaxSurfaceTxt.getText()))\n mMaxSurfaceInput = Utils.convertAreaAccordingToPreferences(mActivity, mBinding.fragmentSearchMaxSurfaceTxt.getText().toString().trim());\n if (!TextUtils.isEmpty(mBinding.fragmentSearchMinPriceTxt.getText()))\n mMinPriceInput = Utils.convertPriceAccordingToPreferences(mActivity, mBinding.fragmentSearchMinPriceTxt.getText().toString().trim());\n if (!TextUtils.isEmpty(mBinding.fragmentSearchMaxPriceTxt.getText()))\n mMaxPriceInput = Utils.convertPriceAccordingToPreferences(mActivity, mBinding.fragmentSearchMaxPriceTxt.getText().toString().trim());\n if (!TextUtils.isEmpty(mBinding.fragmentSearchMinFloorsTxt.getText()))\n mFloorsInput = Integer.parseInt(mBinding.fragmentSearchMinFloorsTxt.getText().toString().trim());\n if (!TextUtils.isEmpty(mBinding.fragmentSearchForSaleTxt.getText()))\n mForSaleDate = Converters.dateToTimestamp(Utils.convertStringToDate(mBinding.fragmentSearchForSaleTxt.getText().toString().trim()));\n if (!TextUtils.isEmpty(mBinding.fragmentSearchSoldTxt.getText()))\n mSoldDate = Converters.dateToTimestamp(Utils.convertStringToDate(mBinding.fragmentSearchSoldTxt.getText().toString().trim()));\n }", "public static String getValidation(String message) { // Example of using Method Overloading\r\n\r\n Scanner reader = new Scanner(System.in); // Create a Scanner object\r\n String input = null;\r\n int charIsNotSpace = 0;\r\n\r\n do {\r\n System.out.print(message);\r\n\r\n while (!reader.hasNextLine()) { // I think that the program never enters this while because .hasNextLine identifies\r\n System.out.print(\"Please enter a valid name with at least 3 characters\"); // any type of input as a valid\r\n reader.next(); // value, including \"enter\" and space, but it is like this in the \"PPT Input Validation\"\r\n }\r\n\r\n input = reader.nextLine();\r\n\r\n for (int i=0; i < input.length(); i++) { // checks if at least three characters are not space\r\n if (input.charAt(i) != ' ') {\r\n charIsNotSpace ++;\r\n }\r\n }\r\n\r\n } while (input == null || input.equals(\"\") || input.length() < 3 || charIsNotSpace < 3); //While the input value is not a null value or empty string or least 3 characters.\r\n\r\n // Loop used to capitalize the first letter of the name and without using any other auxiliary class, such as the StringBuilder\r\n String letter = \"\";\r\n String capitalizedName = \"\";\r\n boolean isFirstLetter;\r\n for (int i=0; i < input.length(); i++) {\r\n\r\n isFirstLetter = false;\r\n\r\n if (i == 0) {\r\n while (input.charAt(i) == ' ') { // Ignores spaces that the user typed before the first letter of the name\r\n i++;\r\n }\r\n isFirstLetter = true;\r\n }\r\n\r\n if (input.charAt(i) == ' ' && (i+1) < input.length()) {\r\n if (input.charAt(i) == ' ' && input.charAt(i + 1) == ' ') {\r\n letter = \"\";\r\n } else {\r\n letter += \" \" + input.charAt(i + 1);\r\n capitalizedName += letter.toUpperCase();\r\n i++;\r\n letter = \"\";\r\n }\r\n }\r\n else if (isFirstLetter == true) {\r\n letter += input.charAt(i);\r\n capitalizedName += letter.toUpperCase();\r\n letter = \"\";\r\n }\r\n else if (input.charAt(i) != ' ') {\r\n letter += input.charAt(i);\r\n capitalizedName += letter.toLowerCase();\r\n letter = \"\";\r\n }\r\n }\r\n\r\n return capitalizedName;\r\n }", "public static String readString(){\n\t\tstringInput = readInput();\n\t\treturn stringInput; \n\t}", "protected void readAhead() {\n if (! reader.hasNext()) {\n this.nextLine = null;\n } else {\n this.nextLine = reader.next();\n while (this.nextLine != null && this.nextLine.isEmpty() && reader.hasNext())\n this.nextLine = reader.next();\n }\n }", "public static void processInputNames() {\r\n\t\tif (!IniSetup.enterNames.getText().equals(\"\")) {\r\n\t\t\tnames.add((String) IniSetup.enterNames.getText());\r\n\t\t}\r\n\t}", "@Test(timeout=100)\r\n\tpublic void testQuotedFields() {\r\n\t\tString [] r1 = {\"An Apple\", \"or Orange\"};\r\n\t\t// should not remove space inside of quotes\r\n\t\tString [] r2 = {\"\",\"a b\",\" has space \"};\r\n\t\tquoteline(r1);\r\n\t\tquoteline(r2);\r\n\t\tout.close();\r\n\t\r\n\t\tCSVReader csv = new CSVReader(getInstream());\r\n\t\tassertTrue( csv.hasNext() );\r\n\t\tassertArrayEquals( r1, csv.next() );\r\n\t\tassertArrayEquals( r2, csv.next() );\r\n\t}", "@Override\n\tpublic void readFields(DataInput in) throws IOException {\n\t\tthis.id=in.readInt();\n\t\tthis.date=in.readUTF();\n\t\tthis.pid=in.readUTF();\n\t\tthis.amount=in.readInt();\n\t\tthis.name=in.readUTF();\n\t\tthis.category_id=in.readUTF();\n\t\tthis.price=in.readInt();\n\t\tthis.flag=in.readUTF();\n\t\t\t\t\n\t\t\t\t\n\t\t\n\t}", "public void parseDateTextFieldHelper() {\n\t\tyear = Integer.parseInt(textFieldDate.getText().substring(0, 4));\n\t\tmonth = Integer.parseInt(textFieldDate.getText().substring(5, 7));\n\t\tdayOfMonth = Integer.parseInt(textFieldDate.getText().substring(8, 10));\n\t}", "public static String readAll() {\n if (!scanner.hasNextLine())\n return \"\";\n\n String result = scanner.useDelimiter(EVERYTHING_PATTERN).next();\n // not that important to reset delimeter, since now scanner is empty\n scanner.useDelimiter(WHITESPACE_PATTERN); // but let's do it anyway\n return result;\n }", "String readInput() {\n Scanner scanner = new Scanner(System.in);\n return scanner.nextLine();\n }", "public void input(Scanner in) { \r\n if (in.hasNext()) firstName = in.next();\r\n if (in.hasNext()) lastName = in.next();\r\n\t}", "public void inputItemDetails()\r\n\t{\r\n\t\tserialNum = inputValidSerialNum();\r\n\t\tweight = inputValidWeight();\r\n\t}", "public void extractData(Scanner in) {\n while (in.hasNext()) {\n in.useDelimiter(\",(?=([^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)\");\n\n term = (in.next());\n subject = (in.next());\n number = Integer.parseInt(in.next());\n section = (in.next());\n crossList = (in.next());\n title = (in.next());\n\n if (title.startsWith(\"\\\"\")) {\n String newTitle = title.substring(1, title.length() - 1);\n title = \"\";\n title = newTitle;\n }\n\n faculty = (in.next());\n building = (in.next());\n room = (in.next()); // Integer.parseInt(in.next());\n\n if (Character.isLetter(room.charAt(room.length() - 1))) {\n oldRoomLetter = room.substring(room.length() - 1);\n String newRoomString = room.substring(0, room.length() - 1);\n newRoom = Integer.parseInt(newRoomString);\n } else {\n newRoom = Integer.parseInt(room);\n }\n\n startDate = (in.next());\n dayTime = (in.next());\n }\n\n }", "@Override\r\n\tpublic void readFields(DataInput in) throws IOException {\n\t\tthis.url=in.readUTF();\r\n\t\tthis.counts=in.readInt();\r\n\t}", "private void parseField(String line){\n List<Integer> commaPos = ParserUtils.getCommaPos(line);\n int size = commaPos.size();\n // parse field\n String zip = line.substring(commaPos.get(size-ZIP_CODE_POS-1)+1, commaPos.get(size-ZIP_CODE_POS));\n // if zip is not valid return\n zip = zip.trim();\n if(zip==null || zip.length()<5){\n return;\n }\n // only keep the first 5 digits\n zip = zip.substring(0,5);\n String marketVal = line.substring(commaPos.get(MARKET_VALUE_POS-1)+1, commaPos.get(MARKET_VALUE_POS));\n String liveableArea = line.substring(commaPos.get(size-TOTAL_LIVEABLE_AREA_POS-1)+1, commaPos.get(size-TOTAL_LIVEABLE_AREA_POS));\n // cast those value to Long Double\n Long lZip = ParserUtils.tryCastStrToLong(zip);\n Double DMarketVal = ParserUtils.tryCastStrToDouble(marketVal);\n Double DLiveableArea = ParserUtils.tryCastStrToDouble(liveableArea);\n // update those field into the map\n updatePropertyInfo(lZip,DMarketVal, DLiveableArea);\n }", "public void Input() {\n wordArray.clear();\n try (BufferedReader in = new BufferedReader(new InputStreamReader(System.in))) {\n do {\n System.out.print(\"Please input program string, end with '.': \");\n line = in.readLine();\n } while (!line.endsWith(\".\"));\n } catch(IOException e) {\n e.printStackTrace();\n }\n\n int pos;\n if ((pos = line.indexOf(\".\")) != line.length() - 1)\n line = line.substring(0, pos + 1);\n\n }", "public void getInput(){\n\t\tScanner scan= new Scanner(System.in);\n\t\t//Get the range\n\t\tif(scan.hasNext()){\n\t\t\tcount=Integer.parseInt(scan.nextLine()); \n\t\t}\n\t\t//Initialize the array\n\t\tpeople = new People[count];\n\t\t//Get the array elements\n\t\tint i=0;\n\t\twhile(i<count){\n\t\t\tString lin[] = scan.nextLine().split(\" \");\n\t\t\tpeople[i] = new People(Integer.parseInt(lin[0]), Double.parseDouble(lin[1]));\n\t\t\ti++;\n\t\t}\n\t\t\n\t\t\n\t}", "private static String getString(BufferedReader reader) throws IOException{\n String result=null;\n while(result==null) {\n result = reader.readLine();\n }\n return result.trim();\n }", "private int readSkipWs() throws IOException {\n for (;;) {\n int c = _in.read();\n if (c == -1 || c > ' ') {\n return c;\n }\n }\n }", "public DATATYPE trim() {\n\t\tif (size() > 0) {\n\t\t\tList<String> list = new ArrayList<String>();\n\t\t\t\n\t\t\tfor (int i=0; i < mLines.length; i++) {\n\t\t\t\tif (mLines[i].trim().length() > 0) {\n\t\t\t\t\tlist.add(mLines[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tmLines = list.toArray( new String[list.size()] );\n\t\t}\n\t\t\n\t\treturn (DATATYPE) this;\n\t}", "private String readLine() {\n\t\ttry {\n\t\t\treturn reader.nextLine();\t\n\t\t} catch (NoSuchElementException e) {\n\t\t\treturn null;\n\t\t}\n\t}", "public void readFields(DataInput in) throws IOException {\n\t\tthis.setId(in.readLong());\r\n\t\tthis.setLat(in.readDouble());\r\n\t\tthis.setLon(in.readDouble());\r\n\t\tthis.setTimestamp(in.readLong());\r\n\t\tthis.setTag(in.readInt());\r\n\t\tthis.setTileNumber(in.readInt());\r\n\t\tthis.setTiles(in.readUTF());\r\n\t\tthis.setOthers(in.readUTF());\r\n\t\tthis.setCandidateTags(in.readUTF());\r\n\t\t\r\n\t\tthis.setTileTag(in.readUTF());\r\n\t\tthis.setUploadtime(in.readLong());\r\n\t\tthis.setServerId(in.readLong());\r\n\t\tthis.setDevice(in.readUTF());\r\n\t\tthis.setDescription(in.readUTF());\r\n\t\t\r\n\t}", "public String keyboardReadString() {\n BufferedReader myReader = new BufferedReader(new InputStreamReader(System.in));\n String stringItem = \"\";\n try {\n stringItem = myReader.readLine();\n } // try\n catch (IOException IOError) {\n System.out.println(\"Read Error in Termio.KeyboardReadString method\");\n } // catch\n return stringItem;\n }", "public void readInput(String msg){\n if(msg.startsWith(\"User:\")){\n msg = msg.substring(msg.indexOf(':') + 1);\n users.add(msg);\n notifyObservers(ObserverEnum.ADD, msg);\n }else if(msg.startsWith(\"Message:\")){\n msg = msg.substring(msg.indexOf(':') + 1);\n notifyObservers(ObserverEnum.MESSAGE, msg);\n }else if(msg.startsWith(\"Disconnect:\")){\n msg = msg.substring(msg.indexOf(':') + 1);\n users.remove(msg);\n notifyObservers(ObserverEnum.REMOVE, msg);\n }else if(msg.startsWith(\"IDisconnect:\")){\n users.clear();\n notifyObservers(ObserverEnum.DISCONNECTED, msg);\n }\n }", "public void emptyTextField(){\n spelerIDField.setText(\"\");\n typeField.setText(\"\");\n codeField.setText(\"\");\n heeftBetaaldField.setText(\"\");\n }", "private static void takeInput() throws IOException {\n\n System.out.println(\"Enter number 1\");\n BufferedReader br= new BufferedReader(new InputStreamReader(System.in));\n String number1=br.readLine();\n System.out.println(\"Enter number 2\");\n String number2=br.readLine();\n System.out.println(\"Operation\");\n String op=br.readLine();\n //WhiteHatHacker processes the input\n WhiteHatHacker hack=new WhiteHatHacker(number1,number2,op);\n hack.processInput();\n }", "@Override\n\tpublic void readFields(DataInput arg0) throws IOException {\n\t\tthis.country.set(arg0.readUTF());\n\t\tthis.tag.set(arg0.readUTF());\n\t}", "private static String inputStringHelper(Scanner scanner, String field) {\n System.out.println(\"Type in your new friend's \" + field + \": \");\n return scanner.nextLine();\n }", "static List<Intervall> handleInput(String input) {\n\t\tList<Intervall> listIntervall = new ArrayList<>();\n\t\tif (input.length() > 0) {\n\t\t\tString[] inputArray = input.split(\" \");\n\n\t\t\tfor (String s : inputArray) {\n\t\t\t\tString sTrimmed = s.substring(1, s.length() - 1);\n\t\t\t\tString[] inputValues = sTrimmed.split(\",\");\n\t\t\t\tlistIntervall.add(new Intervall(Integer.parseInt(inputValues[0]), Integer.parseInt(inputValues[1])));\n\t\t\t}\n\t\t}\n\t\treturn listIntervall;\n\t}", "protected abstract void resetInputFields();", "private void parse_text()\n {\n float temporary_min = min; // used to hold the values entered, before\n float temporary_max = max; // validating them\n\n String str = getText();\n Float Float_NaN = new Float(Float.NaN);\n // get the first number\n float val = findNumber( START, str, SEPARATOR );\n Float Float_val = new Float(val);\n if ( !Float_val.equals(Float_NaN) )\n temporary_min = val;\n // get the second number\n val = findNumber( SEPARATOR, str, END );\n Float_val = new Float(val);\n if ( !Float_val.equals(Float_NaN) )\n temporary_max = val;\n\n if ( temporary_min < temporary_max ) // make sure the values\n { // define a non-degenerate\n min = temporary_min; // interval, before we \n max = temporary_max; // accept them\n }\n\n show_text();\n }", "public abstract String read_string();", "private String getAndClrInput(){\n\t\tString theReturn = userInput.getText();\n\t\tuserInput.setText(\"\");\n\t\treturn theReturn;\n\t}", "@Override\n public <T> T trim(T entrant) throws Exception {\n for (Field field : entrant.getClass().getDeclaredFields()) {\n field.setAccessible(true);\n System.out.print(\"Field: \" + field.getName() + \" - \");\n Type type = field.getGenericType();\n if (type instanceof ParameterizedType) {\n ParameterizedType pType = (ParameterizedType)type;\n System.out.print(\"Raw type: \" + pType.getRawType() + \" - \");\n System.out.print(\"Type args: \" + pType.getActualTypeArguments()[0]+ \" - \");\n } else {\n System.out.print(\"Type: \" + field.getType()+ \" - \");\n }\n Object value = field.get(entrant);\n if(field.getType().getName().equals(\"java.lang.String\")) {\n String trimVal = value.toString().trim();\n field.set(entrant, trimVal);\n }\n System.out.println(\"Value: '\" + field.get(entrant)+\"'\");\n }\n return (T) entrant;\n }", "public static String readString() {\n BufferedReader br\n = new BufferedReader(new InputStreamReader(System.in), 1);\n\n // Declare and initialize the string\n String string = \" \";\n\n // Get the string from the keyboard\n try {\n string = br.readLine();\n\n } catch (IOException ex) {\n System.out.println(ex);\n }\n\n // Return the string obtained from the keyboard\n return string;\n }", "String userInputFromTextArea();", "private void readFromParcel(Parcel in){\n name = in.readString();\n phone = in.readString();\n email = in.readString();\n }", "public static void readRecords() {\n\t\t\n\t\tSystem.out.printf(\"%-10s%-12s%-12s%10s%n\", \"Account\", \"First Name\", \"Last Name\", \"Balance\");\n\t\t\n\t\ttry {\n\t\t\twhile (input.hasNext()) {\n\t\t\t\tSystem.out.printf(\"%-10s%-12s%-12s%10.2f%n\", input.nextInt(), input.next(), input.next(), input.nextDouble());\n\t\t\t\n\t\t\t}\n\t\t}\n\t\tcatch (NoSuchElementException elementException) {\n\t\t\tSystem.out.println(elementException);\n\t\t\tSystem.err.println(\"File improperly formed. Terminating.\");\n\t\t}\n\t\tcatch (IllegalStateException stateException)\n\t\t{\n\t\t\tSystem.err.println(\"Error reading from file. Terminating.\");\n\t\t}\n\t\t\t\n\t\t}" ]
[ "0.6211137", "0.6153244", "0.6101061", "0.5933332", "0.5854031", "0.5765104", "0.56803656", "0.5650689", "0.5619073", "0.55918264", "0.558909", "0.55846643", "0.55662155", "0.55329365", "0.5518073", "0.54969084", "0.5470423", "0.5465738", "0.5460659", "0.54595673", "0.54472417", "0.54234517", "0.54138625", "0.5372303", "0.53685886", "0.53664327", "0.53351843", "0.5327281", "0.530071", "0.53006315", "0.52769446", "0.52044743", "0.5188465", "0.5187804", "0.51621705", "0.5141759", "0.51407146", "0.5115483", "0.51150066", "0.5113324", "0.5108175", "0.5078271", "0.5050706", "0.5044886", "0.5043438", "0.5030981", "0.50292647", "0.5029029", "0.5026402", "0.5024359", "0.5020458", "0.5012819", "0.5002642", "0.49900573", "0.49794787", "0.4976493", "0.4971096", "0.49681374", "0.49518466", "0.49509433", "0.4945806", "0.49456728", "0.49400648", "0.49393347", "0.49319816", "0.4929493", "0.49287137", "0.490395", "0.4896917", "0.48914", "0.48825687", "0.4867754", "0.48640195", "0.486394", "0.48554567", "0.48554254", "0.4848087", "0.48393756", "0.48391426", "0.48312885", "0.4827699", "0.48228106", "0.48210883", "0.48179355", "0.48123613", "0.48120233", "0.48070085", "0.4802877", "0.48025095", "0.47969347", "0.47933567", "0.4791248", "0.47893664", "0.4782701", "0.47756618", "0.47692636", "0.47686765", "0.47583595", "0.47506368", "0.47482407" ]
0.5692869
6
Inflate the menu options from the res/menu/menu_editor.xml file. This adds menu items to the app bar.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_editor, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.editor_options_menu, menu);\n\n\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_editor, menu);\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_editor,menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.editor_menu, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.editor_menu, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_editorpage, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n // Inflate the menu options from the res/menu/menu_editor.xml file.\n // This adds menu items to the app bar.\n getMenuInflater().inflate(R.menu.menu_editor, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.actions_save, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.save_menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.edit, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.edit_item, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.edit_item, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.edit_item, menu);\n\t\treturn true;\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.stock_picking_options, menu);\n }", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n\t public boolean onCreateOptionsMenu(Menu menu) {\n\t getMenuInflater().inflate(R.menu.edit_menu, menu);\n\t return true;\n\t }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\tsuper.onCreateOptionsMenu(menu, inflater);\n\tinflater.inflate(R.menu.menu_main, menu);\n\tmenu.findItem(R.id.action_edit).setVisible(false);\n\tmenu.findItem(R.id.action_share).setVisible(false);\n\tmenu.findItem(R.id.action_settings).setVisible(true);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.language, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.administrator_appbar_buttons_add_edit_pet, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_create_edit, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.ficha_contenedor, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_principal, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.holiday_details_add, menu);\n }", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu)\n \t{\n \t\tgetMenuInflater().inflate(R.menu.edit_recipe, menu);\n \t\treturn true;\n \t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_edit, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_edit_item, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n\n\n\n\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.edit_menu, menu);\n return true;\n }", "private void createMenus() {\n\t\tJMenuBar menuBar = new JMenuBar();\n\n\t\tfileMenu = new JMenu(flp.getString(\"file\"));\n\t\tmenuBar.add(fileMenu);\n\n\t\tfileMenu.add(new JMenuItem(new ActionNewDocument(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionOpen(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionSave(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionSaveAs(flp, this)));\n\t\tfileMenu.addSeparator();\n\t\tfileMenu.add(new JMenuItem(new ActionExit(flp, this)));\n\t\tfileMenu.add(new JMenuItem(new ActionStatistics(flp, this)));\n\n\t\teditMenu = new JMenu(flp.getString(\"edit\"));\n\n\t\teditMenu.add(new JMenuItem(new ActionCut(flp, this)));\n\t\teditMenu.add(new JMenuItem(new ActionCopy(flp, this)));\n\t\teditMenu.add(new JMenuItem(new ActionPaste(flp, this)));\n\n\t\ttoolsMenu = new JMenu(flp.getString(\"tools\"));\n\n\t\titemInvert = new JMenuItem(new ActionInvertCase(flp, this));\n\t\titemInvert.setEnabled(false);\n\t\ttoolsMenu.add(itemInvert);\n\n\t\titemLower = new JMenuItem(new ActionLowerCase(flp, this));\n\t\titemLower.setEnabled(false);\n\t\ttoolsMenu.add(itemLower);\n\n\t\titemUpper = new JMenuItem(new ActionUpperCase(flp, this));\n\t\titemUpper.setEnabled(false);\n\t\ttoolsMenu.add(itemUpper);\n\n\t\tsortMenu = new JMenu(flp.getString(\"sort\"));\n\t\tsortMenu.add(new JMenuItem(new ActionSortAscending(flp, this)));\n\t\tsortMenu.add(new JMenuItem(new ActionSortDescending(flp, this)));\n\n\t\tmenuBar.add(editMenu);\n\t\tmenuBar.add(createLanguageMenu());\n\t\tmenuBar.add(toolsMenu);\n\t\tmenuBar.add(sortMenu);\n\n\t\tthis.setJMenuBar(menuBar);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflate = getMenuInflater();\n \tinflate.inflate(R.menu.options, menu);\n \t\n \t\n \treturn true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_runtime_editing, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu){\n getMenuInflater().inflate(R.menu.indi_menu, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add_snippet, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n boolean result = super.onCreateOptionsMenu(menu);\n menu.add(0, MENU_ADD_ID, 0, R.string.menu_category_add).setIcon(\n android.R.drawable.ic_menu_add);\n menu.add(0, MENU_VISUALIZE_ID, 0, R.string.menu_visualize)\n .setIcon(R.drawable.graph);\n menu.add(0, MENU_EDIT_ID, 0, R.string.menu_entry_edit).setIcon(\n android.R.drawable.ic_menu_edit);\n menu.add(0, MENU_PREFS_ID, 0, R.string.menu_app_prefs).setIcon(\n android.R.drawable.ic_menu_preferences);\n menu.add(0, MENU_HELP_ID, 0, R.string.menu_app_help).setIcon(\n android.R.drawable.ic_menu_help);\n return result;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_edit_taman, menu);\n return true;\n }", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.res_menu, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_editor, menu);\n //Hiding Delete Menu option for Add Item\n if (mCurrentItemInfoUri == null) {\n MenuItem deleteMenuItem = menu.findItem(R.id.action_delete);\n deleteMenuItem.setVisible(false);\n }\n return true;\n }", "@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.optionsbar, menu);\n \treturn super.onPrepareOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) \n{\n\tgetMenuInflater().inflate(R.menu.update_entry, menu);\n\treturn true;\n}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n\t\tinflater.inflate(R.menu.forecastfragment, menu );\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n // This method initialize the contents of the Activity's options menu.\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return true;\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.regioni, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater=getMenuInflater();\n inflater.inflate(R.menu.my_options_menu, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.toolbar, menu);\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu)\n\t{\n\t\tgetMenuInflater().inflate(R.menu.files, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\r\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.uptionsmenu, menu);\r\n\t\treturn true;\r\n\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.my_notes_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n MenuItem languageItem = menu.findItem(R.id.toolbar_ic_language);\n MenuItem currencyItem = menu.findItem(R.id.toolbar_ic_currency);\n MenuItem profileItem = menu.findItem(R.id.toolbar_edit_profile);\n MenuItem searchItem = menu.findItem(R.id.toolbar_ic_search);\n MenuItem cartItem = menu.findItem(R.id.toolbar_ic_cart);\n profileItem.setVisible(false);\n languageItem.setVisible(false);\n currencyItem.setVisible(false);\n searchItem.setVisible(false);\n cartItem.setVisible(false);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\tinflater=this.getActivity().getMenuInflater();\n\tSupportMenu menu_=(SupportMenu) menu;\n\tsuper.onCreateOptionsMenu(menu_, inflater);\n\tinflater.inflate(R.menu.event_adding, menu_);\n\t\t\n\t}", "@Override\n\t\t public boolean onCreateOptionsMenu(Menu menu) {\n\t\t getMenuInflater().inflate(R.menu.level, menu);\n\t\t return true;\n\t\t }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}" ]
[ "0.7637035", "0.7341045", "0.7313956", "0.7292154", "0.7292154", "0.72204506", "0.71050364", "0.696265", "0.6823543", "0.6823543", "0.67735726", "0.6748865", "0.6711968", "0.6694241", "0.6682911", "0.6682911", "0.6680641", "0.6680641", "0.6680641", "0.6676812", "0.6667627", "0.66593945", "0.66442746", "0.6631089", "0.6630054", "0.6620037", "0.6617942", "0.66082364", "0.66036576", "0.660144", "0.6599128", "0.6590296", "0.65851253", "0.65824085", "0.6582233", "0.6576458", "0.6570971", "0.6570683", "0.65678173", "0.6565845", "0.6560219", "0.6559298", "0.65523654", "0.65494066", "0.65427685", "0.6539757", "0.65365297", "0.6529845", "0.65281725", "0.65277916", "0.65267915", "0.65244925", "0.6523334", "0.65162235", "0.65066963", "0.65050685", "0.65049833", "0.6494434", "0.6494176", "0.64928055", "0.6482499", "0.6481367", "0.64813113", "0.6480326", "0.6479906", "0.6478959", "0.64712375", "0.6470619", "0.64672065", "0.6465687", "0.64627147", "0.6462143", "0.6460592", "0.64598835", "0.6458275", "0.64540017", "0.645271", "0.645271", "0.64484936", "0.6447163", "0.6446185", "0.6444798", "0.6444798", "0.6444798", "0.6444798", "0.64443064", "0.64410585", "0.6437386", "0.64373237", "0.64373237" ]
0.72706443
11
User clicked on a menu option in the app bar overflow menu
@Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { // Respond to a click on the "Save" menu option case R.id.action_save: // Save book to database saveData(); // Exit activity finish(); return true; // Respond to a click on the "Delete" menu option case R.id.action_delete: // Pop up confirmation dialog for deletion showDeleteConfirmationDialog(); return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onMenuItemClicked();", "void clickFmFromMenu();", "void clickAmFromMenu();", "public void menuClicked(MenuItem menuItemSelected);", "public void menuItemClicked( Menu2DEvent e );", "@Override\n public void onMenuClick() {\n Toast.makeText(activity.getApplicationContext(), \"Menu click\",\n Toast.LENGTH_LONG).show();\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu){\n super.onCreateOptionsMenu(menu);\n MenuItem helpButton = menu.findItem(R.id.menu1);\n helpButton.setVisible(true);\n return true;\n }", "private void optionSelected(MenuActionDataItem action){\n \t\tString systemAction = action.getSystemAction();\n \t\tif(!systemAction.equals(\"\")){\n \t\t\t\n \t\t\tif(systemAction.equals(\"back\")){\n \t\t\t\tonBackPressed();\n \t\t\t}else if(systemAction.equals(\"home\")){\n \t\t\t\tIntent launchHome = new Intent(this, CoverActivity.class);\t\n \t\t\t\tstartActivity(launchHome);\n \t\t\t}else if(systemAction.equals(\"tts\")){\n \t\t\t\ttextToSearch();\n \t\t\t}else if(systemAction.equals(\"search\")){\n \t\t\t\tshowSearch();\n \t\t\t}else if(systemAction.equals(\"share\")){\n \t\t\t\tshowShare();\n \t\t\t}else if(systemAction.equals(\"map\")){\n \t\t\t\tshowMap();\n \t\t\t}else\n \t\t\t\tLog.e(\"CreateMenus\", \"No se encuentra el el tipo de menu: \" + systemAction);\n \t\t\t\n \t\t}else{\n \t\t\tNextLevel nextLevel = action.getNextLevel();\n \t\t\tshowNextLevel(this, nextLevel);\n \t\t\t\n \t\t}\n \t\t\n \t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_settings) {\n Intent intent = new Intent(this, aboutApp.class);\n startActivity(intent);\n return true;\n }\n\n if (id == R.id.scrollView) {\n Intent intent1 = new Intent(this, aboutAuthers.class);\n startActivity(intent1);\n\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n ActivityOptionsService activityOptionsService = new ActivityOptionsService();\n activityOptionsService.openActivity(this ,id);\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n case MENU_HELP:\r\n help();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return ApplicationData.contextMenu(this, item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public void menuSelected(MenuEvent e) {\n \n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n super.onCreateOptionsMenu(menu);\n MenuItem helpButton = menu.findItem(R.id.menu1);\n helpButton.setVisible(true);\n return true;\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\n\t\t\tcase 1:\n\t\t\t\t//Toast msg = Toast.makeText(orgDetails.this, \"Menu 1\", Toast.LENGTH_LONG);\n\t\t\t\t//msg.show();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}", "@Override\n public boolean onMenuItemClick(MenuItem item) {\n return true;\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n return super.onOptionsItemSelected(item);\r\n }", "private void showActionOverflowMenu() {\n try {\n ViewConfiguration config = ViewConfiguration.get(this);\n Field menuKeyField = ViewConfiguration.class.getDeclaredField(\"sHasPermanentMenuKey\");\n if (menuKeyField != null) {\n menuKeyField.setAccessible(true);\n menuKeyField.setBoolean(config, false);\n }\n } catch (Exception e) {\n Log.d(TAG, e.getLocalizedMessage());\n }\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t\tswitch (item.getItemId()) {\r\n\t\t\tcase R.id.menu_panico:\r\n\t\t\t\tws.Panico();\r\n\t\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t getMenuInflater().inflate(R.menu.event_history, menu);\n\t \n\t if (ViewConfiguration.get(this).hasPermanentMenuKey()) {\n\t \t\n\t } else {\n\t new ShowcaseView.Builder(this, true)\n\t .setTarget(new ActionViewTarget(this, ActionViewTarget.Type.OVERFLOW))\n\t .setContentTitle(\"Täältä voit vaihtaa jaksoa\")\n\t .setContentText(\"Klikkaamalla tästä voit valita jakson, jonka suunnitelmat näytetään.\")\n\t .hideOnTouchOutside()\n\t .setStyle(R.style.ShowcaseView)\n\t .singleShot(CHANGE_SPRINT_HELP)\n\t .build();\n\t }\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tmenu.toggle();\r\n\t\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "public void clickOnMenu() {\n\t\tgetAndroidmenubtn().isPresent();\n\t\tgetAndroidmenubtn().click();\n\t\twaitForPageToLoad();\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n getMenuInflater().inflate(R.menu.main, menu);\r\n if (userType.equalsIgnoreCase(\"TSE\")) {\r\n MenuItem item = menu.findItem(R.id.home_button);\r\n item.setVisible(false);\r\n }\r\n return true;\r\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t\treturn onMenuItemSelected(item.getItemId());\r\n\t}", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == R.id.menu1) {\n alt.show();\n }\n return true;\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu)\n {\n /*Grabs the information from the overflow_menu resource in the menu folder and sets them\n to the action bar*/\n try {\n getMenuInflater().inflate(R.menu.overflow_menu, menu);\n return true;\n } catch ( Exception e ) {\n Toast.makeText(getApplicationContext(),\"EXCEPTION \" + e + \" occurred!\",Toast.LENGTH_SHORT).show();\n return false;\n }\n }", "@Override\n public void onMenuClick() {\n Toast.makeText(SearchActivity_.this, \"Menu click\", Toast.LENGTH_LONG).show();\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_Home) {\n Intent inte = new Intent(EquiationsSystems.this,MainActivity.class);\n startActivity(inte);\n }\n\n if (id == R.id.action_OneVariable) {\n Intent inte = new Intent(EquiationsSystems.this,OneVariable.class);\n startActivity(inte);\n }\n\n if (id == R.id.action_EquationsSystems) {\n return true;\n }\n\n if (id == R.id.action_Interpolation) {\n Intent inte = new Intent(EquiationsSystems.this,Interpolation.class);\n startActivity(inte);\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "default public void clickMenu() {\n\t\tremoteControlAction(RemoteControlKeyword.MENU);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n Intent i;\n switch (id) {\n case R.id.action_search:\n break;\n case R.id.overflow1:\n i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(\"http://advanced.shifoo.in/site/appterms-and-conditions\"));\n startActivity(i);\n break;\n case R.id.overflow2:\n i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(\"http://www.shifoo.in/site/privacy-policy\"));\n startActivity(i);\n break;\n default:\n return super.onOptionsItemSelected(item);\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n \n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onActionItemClicked(ActionMode mode, MenuItem item) {\n\n\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item){\n super.onOptionsItemSelected(item);\n return true;\n }", "public void pressMainMenu() {\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\n\t\tswitch (item.getItemId()) {\n\t\t\n\t\tdefault:\n\t\t\t\n\t\t\tbreak;\n\n\t\t}//switch (item.getItemId())\n\n\t\t\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n if (MainAct.longClicked) {\n DebugUtil.showDebug(\"MainAct.onCreateOptionsMenu(), when item longClicked\");\n getMenuInflater().inflate(R.menu.menu_main_long_clicked, menu);\n } else {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n }\n return true;\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == R.id.badges) {\n\t\t\tgoToBadges(item.getActionView());\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\r\npublic void menuSelected(MenuEvent arg0) {\n\t\r\n}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n super.onCreateOptionsMenu(menu);\n\n // MyApp myApp = MyApp.getInstance();\n\n MenuItem item = menu.findItem(R.id.action_matches);\n item.setVisible(false);\n\n return true;\n }", "@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\tmenu.setMouseClick(true);\n\t\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n //HouseKeeper handles menu item click event\n mHouseKeeper.onOptionsItemSelected(item);\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\r\n\t\tinflater.inflate(R.menu.main_activity_actions, menu);\r\n\r\n\r\n\t\tif(tv==null) {\r\n\t\t\tRelativeLayout badgeLayout = (RelativeLayout) menu.findItem(R.id.action_notification).getActionView();\r\n\t\t\ttv = (TextView) badgeLayout.findViewById(R.id.hotlist_hot);\r\n\t\t\ttv.setText(\"12\");\r\n\t\t}\r\n\r\n\t\t/*menu.findItem(R.id.action_notification).getActionView().setOnClickListener(new OnClickListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onClick(View v) {\r\n\r\n\t\t\t\t\tSystem.out.println(\"clicked\");\r\n\t\t\t\t\ttv.setEnabled(false);\r\n\t\t\t\t\ttv.setBackground(null);\r\n\t\t\t\t\ttv.setBackgroundDrawable(null);\r\n\t\t\t\t\ttv.setText(null);\r\n\t\t\t\t\tintent = new Intent(getApplicationContext(), Notification.class);\r\n\t\t\t\t\tstartActivity(intent);\r\n\r\n\t\t\t}\r\n\t\t});*/\r\n\t\t//getActionBar().setCustomView(R.layout.menu_example);\r\n\t\t//getActionBar().setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM | ActionBar.DISPLAY_SHOW_HOME | ActionBar.DISPLAY_HOME_AS_UP);\r\n\t\t//getActionBar().setIcon(android.R.color.transparent);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic boolean onMenuItemSelected(int featureId, MenuItem item) {\n\t\tOptionsMenu.selectItem(item,getApplicationContext());\n\t\treturn super.onMenuItemSelected(featureId, item);\n\t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetSupportMenuInflater().inflate(R.menu.activity_display_selected_scripture,\n \t\t\t\tmenu);\n \t\treturn true;\n \t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.home_page, menu);\n final MenuItem menuItem = menu.findItem(R.id.message);\n View actionView = menuItem.getActionView();\n textCartItemCount = (TextView) actionView.findViewById(R.id.cart_badge);\n setupBadge();\n\n actionView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n onOptionsItemSelected(menuItem);\n\n }\n });\n return true;\n }", "@FXML protected void MainMenuButtonClicked(ActionEvent event) {\n this.mainMenuCB.launchMainMenu();\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n \r\n \tint id = item.getItemId();\r\n switch (id) {\r\n case R.id.action_settings:\r\n \topenSettings();\r\n return true;\r\n case R.id.action_about:\r\n \topenAbout();\r\n \treturn true;\r\n case R.id.action_exit:\r\n \tExit();\r\n \treturn true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t case R.id.developer:\n\t openMyApps();\n\t return true;\t \n\t \n\t default:\n\t return super.onOptionsItemSelected(item);\n\t }\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tonSlideMenuFragmentEventListener.onSlideMenuFragmentEvent(MENU_HELP);\n\t\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_window, menu);\n MenuItem m = menu.add(2,4,9,\"Debug Service\");\n m.setCheckable(true);\n m.setChecked(GRClient.getInstance().isDebug());\n\n menu.add(3,9,1, (isSocalConnected) ? \"Sign Out\" : \"Sign In\");\n menu.add(3,8,100,\"Send Feedback\");\n return true;\n }", "@Override\n public void onClick(View view) {\n listener.menuButtonClicked(view.getId());\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected (MenuItem item)\n {\n int id = item.getItemId();\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == R.id.action_dial) {\n makePhoneCall();\n return true;\n }\n else if (id == R.id.action_browse_web) {\n showBlogSite();\n return true;\n }\n else if (id == R.id.action_browse_disk) {\n browseDisk();\n return true;\n }\n else if (id == R.id.action_indoor_map) {\n openInddorMap();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.action_settings:\n\n startActivity(new Intent(ListViewCompany.this, Help.class));\n\n return true;\n\n default:\n\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n return super.onOptionsItemSelected(item);\n }" ]
[ "0.76200897", "0.7457642", "0.7439332", "0.7341113", "0.73030597", "0.6998091", "0.690978", "0.68531036", "0.6852806", "0.68527097", "0.6815378", "0.67972094", "0.67972094", "0.67972094", "0.67972094", "0.67557955", "0.67524546", "0.67518044", "0.67437166", "0.67392856", "0.673776", "0.6724927", "0.672357", "0.6722637", "0.6719344", "0.6711347", "0.67032826", "0.6699142", "0.6699142", "0.66763574", "0.66705185", "0.6664064", "0.66590023", "0.66590023", "0.66590023", "0.66590023", "0.66590023", "0.66590023", "0.6652341", "0.66495585", "0.66494405", "0.6645898", "0.6634537", "0.6629377", "0.6629377", "0.6629377", "0.6629377", "0.6629377", "0.6629377", "0.6606926", "0.6603184", "0.6600624", "0.6599228", "0.6599228", "0.6599228", "0.65963787", "0.65929294", "0.6580575", "0.6574894", "0.6574882", "0.6574882", "0.65701073", "0.65701073", "0.65701073", "0.65701073", "0.65701073", "0.65701073", "0.65701073", "0.65701073", "0.6558804", "0.655732", "0.6553734", "0.6547789", "0.65445375", "0.65337306", "0.6531484", "0.65276766", "0.65249777", "0.6524355", "0.65237767", "0.6519384", "0.65174156", "0.65125686", "0.65121496", "0.65094984", "0.650573", "0.65017223", "0.64993733", "0.6498221", "0.64950293", "0.6495007", "0.6494085", "0.6487841", "0.6487841", "0.6485911", "0.6480641", "0.6480641", "0.6480641", "0.6480641", "0.6480641", "0.6480641" ]
0.0
-1
Create an AlertDialog.Builder and set the message, and click listeners for the positive and negative buttons on the dialog.
private void showDeleteConfirmationDialog() { AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setMessage(R.string.delete_dialog_msg); builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { // User clicked the "Delete" button, so delete the book. deleteBook(); } }); builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { // User clicked the "Cancel" button, so dismiss the dialog // and continue editing the book. if (dialog != null) { dialog.dismiss(); } } }); // Create and show the AlertDialog AlertDialog alertDialog = builder.create(); alertDialog.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void doDialogMsgBuilder() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(getResources().getString(R.string.OverAge))\n .setCancelable(false)\n .setPositiveButton(getResources().getString(R.string.ok),\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n finish();\n }\n });\n\n AlertDialog alert = builder.create();\n alert.show();\n }", "public void alertDialogBasico() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n\r\n // 2. Encadenar varios métodos setter para ajustar las características del diálogo\r\n builder.setMessage(R.string.dialog_message);\r\n\r\n\r\n builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {\r\n public void onClick(DialogInterface dialog, int id) {\r\n\r\n }\r\n });\r\n\r\n\r\n builder.show();\r\n\r\n }", "public void buildAndShow(String p_Message, String p_Title, String p_PositiveButton, String p_NegativeButton){\r\n AlertDialog.Builder builder = new AlertDialog.Builder(getParameter());\r\n builder.setMessage(p_Message)\r\n .setTitle(p_Title);\r\n builder.setPositiveButton(p_PositiveButton, new DialogInterface.OnClickListener() {\r\n public void onClick(DialogInterface dialog, int id) {\r\n onClickPositive();\r\n }\r\n });\r\n builder.setNegativeButton(p_NegativeButton, new DialogInterface.OnClickListener() {\r\n public void onClick(DialogInterface dialog, int id) {\r\n onClickNegative();\r\n }\r\n });\r\n AlertDialog dialog = builder.create();\r\n dialog.show();\r\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 }", "private void alertDialogBuilder(String message) {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\tbuilder.setMessage(message)\n\t\t\t\t.setCancelable(false)\n\t\t\t\t.setPositiveButton(\"Yes\",\n\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\n\t\t\t\t\t\t\t\tdbHelper.clearResults();\n\t\t\t\t\t\t\t\tfillData();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t.setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\n\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tAlertDialog alert = builder.create();\n\t\talert.show();\n\t}", "public AlertDialog createSimpleDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Code with love by\")\n .setMessage(\"Alvaro Velasco & Jose Alberto del Val\");\n return builder.create();\n }", "protected void showAlertDialog(@Nullable String title, @Nullable String message,\n @Nullable DialogInterface.OnClickListener onPositiveButtonClickListener,\n @NonNull String positiveText,\n @Nullable DialogInterface.OnClickListener onNegativeButtonClickListener,\n @NonNull String negativeText) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(title);\n builder.setMessage(message);\n builder.setPositiveButton(positiveText, onPositiveButtonClickListener);\n builder.setNegativeButton(negativeText, onNegativeButtonClickListener);\n mAlertDialog = builder.show();\n }", "private void createAndShowDialog(final String message, final String title) {\n final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity ());\n\n builder.setMessage(message);\n builder.setTitle(title);\n builder.create().show();\n }", "private void createAndShowDialog(final String message, final String title) {\n final AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n builder.setMessage(message);\n builder.setTitle(title);\n builder.create().show();\n }", "public void createAlertDialog(String msg) {\n\t\tAlertDialog.Builder alertbox = new AlertDialog.Builder(\n\t\t\t\tMainActivity.this);\n\t\talertbox.setTitle(\"Response Message\");\n\t\talertbox.setMessage(msg);\n\t\talertbox.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n\t\t\t// do something when the button is clicked\n\t\t\tpublic void onClick(DialogInterface arg0, int arg1) {\n\t\t\t}\n\t\t});\n\t\talertbox.show();\n\t}", "public AlertDialog createAlert(String title,String message) {\n Builder builder = new Builder(currentContext);\n builder.setTitle(title);\n builder.setMessage(message);\n builder.setCancelable(true);\n builder.setPositiveButton(ok, this.new OkOnClickListener());\n alertDialog = builder.create();\n alertDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n alertDialog.setCanceledOnTouchOutside(true);\n alertDialog.setCancelable(true);\n if (null != activity && !activity.isFinishing()) {\n alertDialog.show();\n }\n return alertDialog;\n }", "@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}", "@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflater = getActivity().getLayoutInflater();\n View rootView = inflater.inflate(R.layout.fragment_message_dialog, null);\n msg = rootView.findViewById(R.id.msg);\n submit = rootView.findViewById(R.id.msg_submit);\n final int code = getTargetRequestCode();\n builder.setView(rootView);\n builder.setTitle(\"Enter a message:\");\n\n submit.setOnClickListener(new View.OnClickListener(){\n @Override\n public void onClick(View view) {\n\n sendResult(code);\n dismiss();\n\n\n }\n\n });\n\n return builder.create();\n }", "private void alertDialog(int title, int message, int icon) {\n tst_Message.cancel();\n tst_Message = null;\n AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);\n builder.setTitle(title);\n builder.setMessage(message);\n builder.setIcon(icon);\n builder.setPositiveButton(R.string.dialog_pos_btn, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n reset();\n }\n });\n builder.show();\n }", "private void MessageDialog(String message, String pTitulo, String pLabelBoton){ // mostrar mensaje emergente\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()).setMessage(message).setTitle(pTitulo).setPositiveButton(pLabelBoton, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n return;\n }\n });\n AlertDialog dialog = builder.create();\n dialog.show();\n }", "private void createAlertDialog(String title, String message, final boolean shouldExit) {\n Collect.getInstance().getActivityLogger().logAction(this, \"createAlertDialog\", \"show\");\n mAlertDialog = new AlertDialog.Builder(this).create();\n mAlertDialog.setTitle(title);\n mAlertDialog.setMessage(message);\n DialogInterface.OnClickListener quitListener = new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int i) {\n switch (i) {\n case DialogInterface.BUTTON1: // ok\n Collect.getInstance().getActivityLogger().logAction(this, \"createAlertDialog\", \"OK\");\n // successful download, so quit\n if (shouldExit) {\n finish();\n }\n break;\n }\n }\n };\n mAlertDialog.setCancelable(false);\n mAlertDialog.setButton(getString(R.string.ok), quitListener);\n mAlertDialog.setIcon(android.R.drawable.ic_dialog_info);\n mAlertDialog.show();\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\n public Dialog onCreateDialog (Bundle savedInstanceState){\n Bundle messages = getArguments();\n Context context = getActivity();\n AlertDialog.Builder builder = new AlertDialog.Builder(context);\n\n builder.setPositiveButton(\"OKAY\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n\n if(messages != null) {\n //Add the arguments. Supply a default in case the wrong key was used, or only one was set.\n builder.setTitle(messages.getString(TITLE_ID, \"Error\"));\n builder.setMessage(messages.getString(MESSAGE_ID, \"There was an error.\"));\n }\n else {\n //Supply default text if no arguments were set.\n builder.setTitle(\"Error\");\n builder.setMessage(\"There was an error.\");\n }\n\n AlertDialog dialog = builder.create();\n return dialog;\n }", "public static void showAlert(String message, Activity context) {\n\n AlertDialog.Builder builder = new AlertDialog.Builder(context);\n builder.setMessage(message).setCancelable(false)\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n\n }\n });\n try {\n builder.show();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "private AlertDialog alertBuilder() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(\"Missing Arduino Unit, go to Settings?\").\n setCancelable(false).setPositiveButton(\n \"Yes\", new DialogInterface.OnClickListener() {\n\n public void onClick(DialogInterface dialog, int id) {\n //call qr scan intent\n Intent prefScreen = new Intent(TempMeasure.this, Preferences.class);\n startActivityForResult(prefScreen, 0);\n }\n }).setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }\n });\n AlertDialog alert = builder.create();\n return alert;\n }", "private void showDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);\n\n// 2. Chain together various setter methods to set the dialog characteristics\n builder.setMessage(\"Click the right dismiss button\")\n .setTitle(\"Do you hear, it? Isn't it great?\");\n\n\n builder.setPositiveButton(\"Left\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n audioServiceBinder.stopAudio();\n String deviceId = mDurationTimeEditText.getText().toString();\n new MyTurnIsOver().execute(deviceId);\n }\n });\n builder.setNegativeButton(\"Right\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n showDialog();\n }\n });\n\n// 3. Get the <code><a href=\"/reference/android/app/AlertDialog.html\">AlertDialog</a></code> from <code><a href=\"/reference/android/app/AlertDialog.Builder.html#create()\">create()</a></code>\n AlertDialog dialog = builder.create();\n dialog.show();\n }", "@Override\n\t\tpublic void onClick(DialogInterface arg0, int arg1) {\n\t\t\tAlertDialog fuck = builder.create();\n\t\t\tfuck.show();\n\t\t}", "void AlertaValidacion(String title, String message){\n AlertDialog.Builder builder = new AlertDialog.Builder(RegisterActivity.this);\n builder.setTitle(title);\n builder.setMessage(message).setPositiveButton(\"ACEPTAR\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n }", "@Override\n\t\tpublic final Dialog onCreateDialog(final Bundle savedInstanceState) {\n\t\t\tint title = getArguments().getInt(\"title\");\n\n\t\t\treturn new AlertDialog.Builder(getActivity())\n\t\t\t\t\t.setIcon(R.drawable.alert_dialog_icon)\n\t\t\t\t\t.setTitle(title)\n\t\t\t\t\t.setPositiveButton(R.string.alert_dialog_ok,\n\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\t\tpublic void onClick(\n\t\t\t\t\t\t\t\t\t\tfinal DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tfinal int whichButton) {\n\t\t\t\t\t\t\t\t\t((AddingActivity) getActivity())\n\t\t\t\t\t\t\t\t\t\t\t.doPositiveClick();\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\t\t\t\t\t.setNegativeButton(R.string.alert_dialog_cancel,\n\t\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\t\tpublic void onClick(\n\t\t\t\t\t\t\t\t\t\tfinal DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\tfinal int whichButton) {\n\t\t\t\t\t\t\t\t\t((AddingActivity) getActivity())\n\t\t\t\t\t\t\t\t\t\t\t.doNegativeClick();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}).create();\n\t\t}", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n //return super.onCreateDialog(savedInstanceState); // TODO: should we call it?\n final String title = getArguments().getString(\"TITLE\");\n final String msg = getArguments().getString(\"MESSAGE\");\n final String pos = getArguments().getString(\"POS\");\n final String neg = getArguments().getString(\"NEG\");\n final String neu = getArguments().getString(\"NEU\");\n // TODO - this is just an int... what about other ... Parcelable\n final int idx = getArguments().getInt(\"IDX\");\n final int iconid = getArguments().getInt(\"ICON_ID\");\n final float textsize = getArguments().getFloat(\"MSGSIZE\");\n\n if (savedInstanceState != null) {\n tag = savedInstanceState.getString(\"TAG\");\n }\n\n final DialogInterface.OnClickListener listener = new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialogInterface, int clickedButton) {\n ConfirmListener act = (ConfirmListener) getActivity();\n act.processConfirmation(clickedButton, tag, idx);\n }\n };\n\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity())\n .setTitle(title)\n .setMessage(msg);\n if (iconid != 0 && getResources().getResourceTypeName(iconid).equals(\"drawable\")) {\n // this must be a R.drawable.id, otherwise crash!\n // android.content.res.Resources$NotFoundException:\n builder.setIcon(iconid);\n }\n if (pos != null) {\n builder.setPositiveButton(pos, listener);\n }\n if (neg != null) {\n builder.setNegativeButton(neg, listener);\n }\n if (neu != null) {\n builder.setNeutralButton(neu, listener);\n }\n\n dialog = builder.create();\n if (textsize != 0) {\n dialog.show(); // need to call this to be able to get the TextView as non-null pointer\n TextView tv = (TextView) dialog.findViewById(android.R.id.message);\n if (tv != null) {\n tv.setTextSize(textsize);\n }\n }\n return dialog;\n }", "@Override\n protected Dialog onCreateDialog(int id) {\n if ((id == VM_RESPONSE_ERROR) || (id == VM_NOCHANGE_ERROR) ||\n (id == VOICEMAIL_DIALOG_CONFIRM)) {\n \n AlertDialog.Builder b = new AlertDialog.Builder(this);\n \n int msgId;\n int titleId = R.string.error_updating_title;\n switch (id) {\n case VOICEMAIL_DIALOG_CONFIRM:\n msgId = R.string.vm_changed;\n titleId = R.string.voicemail;\n // Set Button 2\n b.setNegativeButton(R.string.close_dialog, this);\n break;\n case VM_NOCHANGE_ERROR:\n // even though this is technically an error,\n // keep the title friendly.\n msgId = R.string.no_change;\n titleId = R.string.voicemail;\n // Set Button 2\n b.setNegativeButton(R.string.close_dialog, this);\n break;\n case VM_RESPONSE_ERROR:\n msgId = R.string.vm_change_failed;\n // Set Button 1\n b.setPositiveButton(R.string.close_dialog, this);\n break;\n default:\n msgId = R.string.exception_error;\n // Set Button 3, tells the activity that the error is\n // not recoverable on dialog exit.\n b.setNeutralButton(R.string.close_dialog, this);\n break;\n }\n \n b.setTitle(getText(titleId));\n b.setMessage(getText(msgId));\n b.setCancelable(false);\n AlertDialog dialog = b.create();\n \n // make the dialog more obvious by bluring the background.\n dialog.getWindow().addFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND);\n \n return dialog;\n }\n \n return null;\n }", "@Override\n\t\tpublic void onClick(View arg0) {\n\t\t\tAlertDialog fuck = builder.create();\n\t\t\tfuck.show();\n\t\t}", "public Dialog onCreateDialog(Bundle savedInstanceState){\n AlertDialog.Builder sample_builder = new AlertDialog.Builder(getActivity());\n sample_builder.setView(\"activity_main\");\n sample_builder.setMessage(\"This is a sample prompt. No new networks should be scanned while this prompt is up\");\n sample_builder.setCancelable(true);\n sample_builder.setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n listener.onDialogPositiveClick(StationFragment.this);\n }\n });\n sample_builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n listener.onDialogNegativeClick(StationFragment.this);\n }\n });\n return sample_builder.create();\n\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n builder.setMessage(msg)\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n return;\n }\n });\n\n Dialog dialog = builder.create();\n\n // Create the AlertDialog object and return it\n return dialog;\n }", "@Override\r\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\r\n \r\n LayoutInflater inflater = getActivity().getLayoutInflater();\r\n builder.setTitle(\"New Wallet\");\r\n \r\n\t final View view = inflater.inflate(R.layout.new_wallet_dialog, null);\r\n\t \r\n\t final EditText name = (EditText) view.findViewById(R.id.newWallet_text);\r\n\t \r\n builder.setPositiveButton(R.string.confirmRecord, new DialogInterface.OnClickListener() {\r\n \r\n \tpublic void onClick(DialogInterface dialog, int id) {\r\n \t\tlistener.comfirmPressed(name.getText().toString());\t\r\n \t\t}\r\n });\r\n builder.setNegativeButton(R.string.cancelRecord, new DialogInterface.OnClickListener() {\r\n \tpublic void onClick(DialogInterface dialog, int id) {\r\n \t\tlistener.cancelPressed();\r\n \t\t}\r\n \t});\r\n // Create the AlertDialog object and return it\r\n return builder.create();\r\n }", "@SuppressWarnings(\"deprecation\")\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tAlertDialog alertDialog = new AlertDialog.Builder(GameInitializerActivity.this).create();\n\t\t\t\tLayoutInflater factory = LayoutInflater.from(GameInitializerActivity.this);\n\t\t\t\tfinal View view = factory.inflate(R.layout.activity_about_popupwindow, null);\n\t\t\t\talertDialog.setView(view);\n\t\t\t\talertDialog.setButton3(\"OK. I Got this !!\", dialogClickListener);\n\t\t\t\talertDialog.show();\t\t\t\t\n\t\t\t\t\n\t\t\t}", "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 }", "@Override\n public Dialog onCreateDialog (Bundle SaveInstanceState) {\n\n /* Get context from current activity.*/\n Context context = getActivity();\n\n /* Create new dialog, and set message. */\n AlertDialog.Builder ackAlert = new AlertDialog.Builder(context);\n String message = getString(R.string.msg_about_us);\n ackAlert.setMessage(message);\n\n /* Create button in dialog. */\n ackAlert.setNeutralButton(R.string.btn_got_it, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n\n /* Set title and show dialog. */\n ackAlert.setTitle(\"About us\");\n ackAlert.create();\n\n return ackAlert.create();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(\"Limite mensal excedido! Na versão gratuita, o limite máximo de publicação de caronas mensais é 4 (quatro), atualize para a versão Pro e tenha publicações ilimitadas...\")\n .setPositiveButton(\"Ir\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n String url = \"https://play.google.com/store/apps/details?id=com.xetelas.nova\";\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n getContext().startActivity(i);\n }\n })\n .setNegativeButton(\"Voltar\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "@Override\n public Dialog onCreateDialog(final Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(this.title);\n if (this.type == 2) {\n final boolean back = this.backToPreviousActivity;\n builder.setMessage(this.msg)\n .setPositiveButton(this.positive, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n //Toast.makeText(mContext, \"Press positive\", Toast.LENGTH_SHORT).show();\n if (back) {\n getActivity().finish(); // finish actual activity\n }\n }\n })\n .setNegativeButton(this.negative, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n //Toast.makeText(mContext, \"Press negative\", Toast.LENGTH_SHORT).show();\n }\n });\n } else {\n builder.setMessage(this.msg)\n .setPositiveButton(this.positive, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n //Toast.makeText(mContext, \"Press positive\", Toast.LENGTH_SHORT).show();\n }\n });\n }\n // Create the AlertDialog object and return it\n return builder.create();\n }", "private void newDialog() {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\tbuilder.setTitle(getString(R.string.addmark));\n\t\tfinal EditText input = new EditText(this);\n\t\tinput.setHint(getString(R.string.pleasemark));\n\t\tbuilder.setView(input);\n\t\tbuilder.setPositiveButton(getString(R.string.yes),\n\t\t\t\tnew OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tif (input.getText().toString().trim().length() > 0) {\n\t\t\t\t\t\t\taddTag(input.getText().toString());\n\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\tToast.makeText(ArchermindReaderActivity.this,\n\t\t\t\t\t\t\t\t\tgetString(R.string.successaddmark),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tToast.makeText(ArchermindReaderActivity.this,\n\t\t\t\t\t\t\t\t\tgetString(R.string.pleasemark),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\tnewDialog();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tbuilder.setNegativeButton(getString(R.string.no),\n\t\t\t\tnew OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tbuilder.show();\n\t}", "public void createTwoBtnAlert(Context mContext, String title, String msg, String positiveBtn, String negativeBtn, booleanCallback callback) {\n //Create the dialogue\n AlertDialog.Builder builder = new AlertDialog.Builder(mContext);\n\n // Set the message and title of the dialogue\n builder.setMessage(msg).setTitle(title);\n\n //Set the buttons of the dialogue\n builder.setPositiveButton(positiveBtn, (dialog, id) -> {\n callback.onReturn(true, \"\");\n dialog.cancel();\n });\n builder.setNegativeButton(negativeBtn, (dialog, id) -> {\n callback.onReturn(false, \"\");\n dialog.cancel();\n });\n\n //Create the dialogue\n AlertDialog dialog = builder.create();\n\n //Show to dialogue\n dialog.show();\n\n //Set button positioning\n Button btnPositive = dialog.getButton(AlertDialog.BUTTON_POSITIVE);\n Button btnNegative = dialog.getButton(AlertDialog.BUTTON_NEGATIVE);\n\n LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) btnPositive.getLayoutParams();\n layoutParams.weight = 10;\n layoutParams.setMargins(10, 0, 10, 0);\n btnPositive.setLayoutParams(layoutParams);\n btnNegative.setLayoutParams(layoutParams);\n }", "public void getDialog(final Activity context, String message, int title) {\n\n AlertDialog.Builder builder = new AlertDialog.Builder(context);\n switch (title) {\n case 0:\n builder.setTitle(context.getString(R.string.alert_success));\n break;\n case 1:\n builder.setTitle(context.getString(R.string.alert_stop));\n break;\n default:\n builder.setTitle(context.getString(R.string.alert));\n break;\n }\n\n builder.setMessage(message);\n\n builder.setPositiveButton(context.getString(R.string.alert_ok), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n //Toast.makeText(context, context.getString(R.string.alert_toast), Toast.LENGTH_SHORT).show();\n }\n });\n\n builder.show();\n }", "@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(getArguments().getString(\"title\"))\n .setMessage(getArguments().getString(\"message\"))\n .setCancelable(false)\n .setPositiveButton(R.string.OK, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // FIRE ZE MISSILES!\n // call callback method\n // mListener.onInfoDialogOKClick(InfoDialog.this);\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "private static void showSingleOptionDialog(Context c, int titleID, int messageID, int buttonID, OnClickListener listener){\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(c);\n\t\tbuilder.setTitle(titleID)\n\t\t.setNegativeButton(buttonID, listener);\n\t\tif(messageID > -1){\n\t\t\tbuilder.setMessage(messageID);\n\t\t}\n\n\t\tbuilder.create().show();\n\t}", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(device.getName())\n \t\t.setTitle(R.string.bt_exchange_dialog_title)\n .setPositiveButton(R.string.bt_exchange_dialog_positive_btn, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n \t //Add BT Device Activity\n \t performBTKeyExchange(device);\n }\n })\n .setNegativeButton(R.string.bt_exchange_dialog_negative_btn, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n \t dismiss();\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "@Override\n public Dialog onCreateDialog(Bundle bundle) {\n AlertDialog.Builder builder =\n new AlertDialog.Builder(getActivity());\n builder.setMessage(\n getString(R.string.results,\n totalSuposicoes,\n (1000 / (double) totalSuposicoes)));\n\n // \"Resetar Questão\" Button\n builder.setPositiveButton(R.string.reset_quiz,\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog,\n int id) {\n resetQuiz();\n }\n }\n );\n\n return builder.create(); // retorna o AlertDialog\n }", "private AlertDialog createDialog(){\n final LayoutInflater inflater = QuizViewActivity.this.getLayoutInflater();\n View v = inflater.inflate(R.layout.add_new_quiz, null);\n\n final EditText et = (v.findViewById(R.id.enter_new_name));\n Toolbar toolbar = v.findViewById(R.id.enter_new_name_toolbar);\n toolbar.setTitle(R.string.new_name_dialog);\n\n if(et.getText().toString().compareTo(\"\")==0){\n et.setError(\"Quiz name can't be empty or same as any other quiz!\");\n }//sets the warning for the edit text in case it's empty\n\n AlertDialog.Builder builder = new AlertDialog.Builder(QuizViewActivity.this);\n builder.setView(v)\n // Add action buttons\n .setPositiveButton(\"Done\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n //add a quiz.\n String name = et.getText().toString();\n try {\n if (quizManager.saveQuiz(new Quiz(name, Services.getQuizPersistence().incrementQuizID(), CurrentUser.getCurrentUser()))) {\n adapter.clear();\n adapter.addAll(quizManager.getQuizList());\n adapter.notifyDataSetChanged();//notify changes to the adapter\n et.getText().clear();\n Toast.makeText(QuizViewActivity.this, \"New Quiz Added. Click To Edit\", Toast.LENGTH_LONG).show();\n }\n }catch(InvalidQuizException e){\n createDialog().show();//show the new name dialog again until a valid name is enterer\n //or the dialog is canceled\n e.printStackTrace();\n }\n }\n })//set positive button to add the quiz\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n }\n });//set negative button to cancel\n return builder.create();\n }", "protected void alertBuilder(){\n SettingsDialogFragment settingsDialogFragment = new SettingsDialogFragment();\n settingsDialogFragment.show(getSupportFragmentManager(), \"Settings\");\n }", "public static AlertDialog.Builder createDialog(Activity activity, int title, View v, DialogInterface.OnClickListener btn_pos){\n return new AlertDialog.Builder(activity)\n .setTitle(title)\n .setView(v)\n .setPositiveButton(activity.getResources().getString(R.string.btn_ok), btn_pos)\n .setNegativeButton(activity.getResources().getString(R.string.btn_cancel), null);\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(R.string.at_home_question)\n .setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n listener.onAlign(getDialog());\n }\n })\n .setNeutralButton(R.string.go_home, null) // See onResume\n .setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n listener.onCancel(getDialog());\n }\n }).setOnCancelListener(new DialogInterface.OnCancelListener() {\n @Override\n public void onCancel(DialogInterface dialog) {\n listener.onCancel(getDialog());\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "@Override\n\tpublic Dialog onCreateDialog(Bundle savedInstanceState) {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\t\tbuilder.setMessage(message).setTitle(\"Device's IP address :\")\n\t\t\t\t.setNeutralButton(\"OK\",\n\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\n\t\t\t\t\t\t\t\t// close the dialog\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t// Create the AlertDialog object and return it\n\t\treturn builder.create();\n\t}", "private void alert(String title, String msj){\n android.app.AlertDialog.Builder alertDialog = new android.app.AlertDialog.Builder(getActivity());\n alertDialog.setTitle(title);\n alertDialog.setMessage(msj);\n alertDialog.setPositiveButton(getString(R.string.alert_accept), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n }\n });\n alertDialog.show();\n }", "AlertDialog.Builder alertDialogBuilder(Context context) {\n AlertDialog.Builder builder = new AlertDialog.Builder(context);\n builder.setTitle(\"Verification Account Message\");\n builder.setMessage(R.string.resend_ver_email_message_req);\n builder.setIcon(R.drawable.ic_action_info);\n builder.setPositiveButton(\"Confirm\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n resendVerificationEmail();\n }\n });\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n builder.show();\n\n return builder;\n }", "private void startMealToDatabaseAlert() {\n AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(this);\n TextView dialogTitle = new TextView(this);\n int blackValue = Color.parseColor(\"#000000\");\n dialogTitle.setText(R.string.title_dialog_meal);\n dialogTitle.setGravity(Gravity.CENTER_HORIZONTAL);\n dialogTitle.setPadding(0, 30, 0, 0);\n dialogTitle.setTextSize(25);\n dialogTitle.setTextColor(blackValue);\n dialogBuilder.setCustomTitle(dialogTitle);\n View dialogView = getLayoutInflater().inflate(R.layout.dialog_add_meal, null);\n\n this.startEditTexts(dialogView);\n this.startLocationSpinner(dialogView);\n this.startAddPhotoButton(dialogView);\n this.startMealDialogButtonListeners(dialogBuilder);\n\n dialogBuilder.setView(dialogView);\n AlertDialog permission_dialog = dialogBuilder.create();\n permission_dialog.show();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n String mess = \"They decliened your invitation\";\n if(getArguments().getBoolean(\"hostDeclined\"))\n {\n mess = \"They canceled their invitation\";\n }\n builder.setMessage(mess)\n .setPositiveButton(\"Ok\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // FIRE ZE MISSILES!\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "private void mDialogShow() {\n alertDialog = new AlertDialog.Builder(this).create();\n alertDialog.setTitle(\"CyanMobile Warning!\");\n alertDialog.setMessage(\"Enable Pie Menu App Toggle to use this!\");\n alertDialog.setButton(DialogInterface.BUTTON_POSITIVE,\n getResources().getString(com.android.internal.R.string.ok),\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n updateValues();\n return;\n }\n });\n \n alertDialog.show();\n }", "@NonNull\n @Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(R.string.app_help_title);\n builder.setMessage(R.string.app_help_message)\n .setPositiveButton(R.string.app_help_ok, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n }\n });\n return builder.create();\n }", "protected AlertDialog.Builder createAlertDialog(@StringRes final int titleId, @StringRes final int messageId) {\n AlertDialog.Builder adBuilder = new AlertDialog.Builder(this);\n return adBuilder.setTitle(titleId).setMessage(messageId);\n }", "public void alert(String txtMsg, final String action, final View btn_view)\n {\n LayoutInflater inflator = LayoutInflater.from(BookingDetailsActivity.this);\n final View yourCustomView = inflator.inflate(R.layout.custom_dialog, null);\n //endregion\n\n //region (2) init dialogue\n final AlertDialog dialog = new AlertDialog.Builder(BookingDetailsActivity.this)\n .setTitle(\"Do you want to proceed ?\")//replace w \"txtMsg\"\n .setView(yourCustomView)\n .create();\n //endregion\n\n //region (3) set onClicks for custom dialog btns\n yourCustomView.findViewById(R.id.btn_yes).setOnClickListener(new View.OnClickListener()\n {\n @Override\n public void onClick(View view)\n {\n switch (action)\n {\n case \"save\":\n SaveAppoint(btn_view);\n break;\n case \"cancel\":\n CancelAppoint(btn_view);\n break;\n }\n }\n });\n yourCustomView.findViewById(R.id.btn_no).setOnClickListener(new View.OnClickListener()\n {\n @Override\n public void onClick(View view)\n {\n dialog.dismiss();\n }\n });\n //endregion\n\n //region (4) Display dialogue\n dialog.show();\n //endregion\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(R.string.dialog_leave_channel)\n .setPositiveButton(R.string.button_yes, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n Log.v(LOGTAG, \"YES clicked\");\n getGTracker().send(MapBuilder\n .createEvent(\"ui_action\", \"channel_dialog\", \"leave_yes\", null)\n .build()\n );\n mListener.onDialogLeaveChannelConfirm(LeaveChanDialog.this);\n }\n })\n .setNegativeButton(R.string.button_no, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n Log.v(LOGTAG, \"NO clicked\");\n getGTracker().send(MapBuilder\n .createEvent(\"ui_action\", \"channel_dialog\", \"leave_no\", null)\n .build()\n );\n }\n })\n .setTitle(R.string.dialog_signup_title);\n // Create the AlertDialog object and return it\n return builder.create();\n }", "private void showNegativeDialog(String title, String message) {\n\n final AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(this);\n dialogBuilder.setTitle(title);\n dialogBuilder.setMessage(message);\n dialogBuilder.setCancelable(false);\n dialogBuilder.setNegativeButton(android.R.string.ok,\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n finish();\n }\n });\n dialogBuilder.show();\n }", "public static AlertDialog showAlert(Context context, String title, String message, String buttonText) {\n AlertDialog alertDialog = new AlertDialog.Builder(new ContextThemeWrapper(context,\n R.style.AboutDialog)).create();\n\n alertDialog.setTitle(title);\n alertDialog.setMessage(message);\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, buttonText, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.getWindow()\n .setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n\n alertDialog.show();\n\n return alertDialog;\n }", "private Dialog recreateDialog() {\n final AlertDialog.Builder builder = new AlertDialog.Builder(OptionActivity.this);\n builder.setMessage(\"Do you want to change your profile?\")\n .setPositiveButton(\"Yah!\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n Intent intent = new Intent(OptionActivity.this, amountscreen.class);\n startActivity(intent);\n }\n })\n .setNegativeButton(\"Nope\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n }\n });\n // Create the AlertDialog object and return it\n return builder.create();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(R.string.dialog_fire_missiles)\n .setPositiveButton(R.string.fire, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n }\n });\n return builder.create();\n }", "AlertDialog.Builder alertDialogBuilderSentSuccessMessage(Context context) {\n AlertDialog.Builder builder = new AlertDialog.Builder(context);\n builder.setTitle(\"Verification Account Message\");\n builder.setMessage(R.string.resend_ver_email_message_success);\n builder.setIcon(R.drawable.ic_action_info);\n builder.setPositiveButton(\"ok\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n builder.show();\n\n return builder;\n }", "public static void showAlertDialogAction(Activity context, String msg, final IL il, String positiveBtnText, \n\t\t\tString negativeBtnText) {\n\t\ttry{\n\t\t\tAlertDialog.Builder alertDialogBuilder = getBuilder(context);\n\t\t\talertDialogBuilder.setMessage(msg);\n\t\t\talertDialogBuilder.setPositiveButton(positiveBtnText, new DialogInterface.OnClickListener() {\n\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\n\t\t\t\t\til.onSuccess();\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\talertDialogBuilder.setNegativeButton(negativeBtnText, new DialogInterface.OnClickListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\til.onCancel();\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\talertDialogBuilder.setOnKeyListener(new DialogInterface.OnKeyListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) {\n\t\t\t\t\tif (keyCode == KeyEvent.KEYCODE_BACK){\n\t\t\t\t\t\til.onCancel();\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t\tAlertDialog alertDialog = alertDialogBuilder.create(); // create alert dialog\n\t\t\talertDialog.show();\t\t\t\t\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "@Override\r\n\tpublic Dialog onCreateDialog(Bundle savedInstanceState) {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\r\n\r\n\t\t// Set up the layout inflater\r\n\t\tLayoutInflater inflater = getActivity().getLayoutInflater();\r\n\r\n\t\t// Set the title, message and layout of the dialog box\r\n\t\tbuilder.setView(inflater.inflate(R.layout.dialog_box_layout, null))\r\n\t\t\t\t.setTitle(R.string.dialog_title);\r\n\r\n\t\t// User accepts the thing in the dialog box\r\n\t\tbuilder.setPositiveButton(R.string.dialog_accpet,\r\n\t\t\t\tnew DialogInterface.OnClickListener() {\r\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\r\n\t\t\t\t\t\tToast.makeText(getActivity(),\r\n\t\t\t\t\t\t\t\t\"Thank you for your kiss ^.^\",\r\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t// User cancels the thing in the dialog box\r\n\t\tbuilder.setNegativeButton(R.string.dialog_cancel,\r\n\t\t\t\tnew DialogInterface.OnClickListener() {\r\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\r\n\t\t\t\t\t\tToast.makeText(getActivity(), \"Refuse my kiss??? >.<\",\r\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\treturn builder.create(); // return the AlertDialog object\r\n\t}", "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 Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n LayoutInflater inflater = requireActivity().getLayoutInflater();\n final View view = inflater.inflate(R.layout.on_click_dialog, null);\n builder.setView(view);\n\n\n\n\n\n\n\n\n return builder.create();\n }", "public TBasicAlertDialog(Activity mActivity, String title, String message, String leftText, String rightText,\n boolean cancelable, NBasicAlertDialogListener mNBasicAlertDialogListener) {\n if (mActivity == null) {\n TLog.e(TAG + \" constructor\", \"Activity is null\");\n return;\n }\n\n this.mActivity = mActivity;\n this.title = title;\n this.message = message;\n this.rightText = rightText;\n this.leftText = leftText;\n this.cancelable = cancelable;\n this.mNBasicAlertDialogListener = mNBasicAlertDialogListener;\n setDialog();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n Message msg = new Message();\n msg.what = 0;\n set_handler.sendMessage(msg);\n }", "public static void setDialogViewMessage(Context context, AlertDialog.Builder alert, String message1, String message2){\n// Log.e(\"setDialogViewMessage\", \"setDialogViewMessage\");\n LinearLayout ll=new LinearLayout(context);\n LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(\n LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);\n\n layoutParams.setMargins(20, 10, 20, 10);\n\n ll.setOrientation(LinearLayout.VERTICAL);\n ll.setLayoutParams(layoutParams);\n TextView messageView1 = new TextView(context);\n TextView messageView2 = new TextView(context);\n TextView messageView3 = new TextView(context);\n messageView1.setLayoutParams(layoutParams);\n messageView2.setLayoutParams(layoutParams);\n messageView3.setLayoutParams(layoutParams);\n messageView1.setText(message1);\n messageView2.setText(message2);\n PackageInfo pInfo = null;\n String version = \"\";\n try {\n pInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);\n version = pInfo.versionName;\n } catch (PackageManager.NameNotFoundException e) {\n e.printStackTrace();\n }\n\n messageView3.setText(\"Card Safe Version \" + version);\n ll.addView(messageView1);\n ll.addView(messageView2);\n ll.addView(messageView3);\n alert.setView(ll);\n\n }", "private void alertBox(String title, String message) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(\"GPS Anda tampaknya dinonaktifkan, apakah Anda ingin mengaktifkannya?\")\n .setCancelable(false)\n .setTitle(\"STATUS GPS\")\n .setPositiveButton(\n \"YA\",\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n /* this gonna call class of settings then dialog interface disappeared */\n Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);\n startActivity(intent);\n dialog.cancel();\n }\n }\n )\n .setNegativeButton(\"TIDAK\", new DialogInterface.OnClickListener() {\n public void onClick(final DialogInterface dialog, @SuppressWarnings(\"unused\") final int id) {\n dialog.cancel();\n }\n }\n );\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private static void showTripleOptionDialog(Context c, int titleID, int messageID, int posButtonID, int neutralButtonID, int negButtonID, OnClickListener posListener, OnClickListener neutralListener, OnClickListener negListener){\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(c);\n\t\tbuilder.setTitle(titleID)\n\t\t.setPositiveButton(posButtonID, posListener)\n\t\t.setNeutralButton(neutralButtonID, neutralListener)\n\t\t.setNegativeButton(negButtonID, negListener);\n\t\tif(messageID > -1){\n\t\t\tbuilder.setMessage(messageID);\n\t\t}\n\n\t\tbuilder.create().show();\n\t}", "public void openAlert(View view) {\n try {\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(getActivity());\n alertDialogBuilder.setTitle(\"Create New Project\");\n\n// set positive button: Yes message\n alertDialogBuilder.setPositiveButton(\"Create Project\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n// go to a new activity of the app\n/*Intent positveActivity = new Intent(getContext(), PositiveActivity.class);\nstartActivity(positveActivity);*/\n }\n });\n\n // set neutral button: Exit the app message\n alertDialogBuilder.setNeutralButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // exit the app and go to the HOME\n //AlertDialogActivity.this.finish();\n }\n });\n\n final EditText input = new EditText(getActivity());\n LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(\n LinearLayout.LayoutParams.MATCH_PARENT,\n LinearLayout.LayoutParams.MATCH_PARENT);\n input.setHint(\"Project Name\");\n input.setLayoutParams(lp);\n\n AlertDialog alertDialog = alertDialogBuilder.create();\n alertDialog.setView(input);\n alertDialog.show();\n\n\n } catch (Exception e) {\n Log.d(\"BaseManager\", \"openAlert(): \" + e);\n }\n }", "private void showAlertDialog(String message) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity())\n .setTitle(\"QR Scanner\")\n .setMessage(message)\n .setPositiveButton(\"OKAY\", (dialog, which) -> {\n dialog.dismiss();\n });\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void buildAlertMessageNoGps() {\n \t\tfinal AlertDialog.Builder builder = new AlertDialog.Builder(this);\n \t builder.setMessage(\"You GPS seems to be disabled, do you want to enable it?\")\n \t .setCancelable(false)\n \t .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n \t public void onClick(@SuppressWarnings(\"unused\") final DialogInterface dialog, @SuppressWarnings(\"unused\") final int id) {\n \t launchGPSOptions(); \n \t }\n \t })\n \t .setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n \t public void onClick(final DialogInterface dialog, @SuppressWarnings(\"unused\") final int id) {\n \t dialog.cancel();\n \t }\n \t });\n \t final AlertDialog alert = builder.create();\n \t alert.show();\n \t\t\n \t}", "private void showDialog(String msg) {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(msg)\n .setCancelable(false)\n .setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n }", "public void alertForOuitMessage() {\n final AlertDialog.Builder builder = new AlertDialog.Builder(context);\n final AlertDialog alert = builder.create();\n alert.getWindow().getAttributes().windowAnimations = R.style.alertAnimation;\n View view = alert.getLayoutInflater().inflate(R.layout.quiz_quit_alert, null);\n TextView title1 = (TextView) view.findViewById(R.id.title1);\n title1.setText(context.getString(R.string.quiz_quit_are));\n title1.setTypeface(VodafoneRg);\n TextView title2 = (TextView) view.findViewById(R.id.title2);\n title2.setText(context.getString(R.string.quiz_quit_progress));\n title2.setTypeface(VodafoneRg);\n TextView quiz_text = (TextView) view.findViewById(R.id.quit_text);\n quiz_text.setTypeface(VodafoneRg);\n LinearLayout quit_layout = (LinearLayout) view.findViewById(R.id.quit_layout);\n alert.setCustomTitle(view);\n TextView quit_icon = (TextView) view.findViewById(R.id.quit_icon);\n quit_icon.setTypeface(materialdesignicons_font);\n quit_icon.setText(Html.fromHtml(\"&#xf425;\"));\n quit_layout.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n alert.dismiss();\n finish();\n }\n });\n alert.show();\n }", "@Override\r\n protected void onCreate(Bundle savedInstanceState) {\r\n super.onCreate(savedInstanceState);\r\n requestWindowFeature(Window.FEATURE_NO_TITLE);\r\n setContentView(R.layout.messagesendpopup);\r\n //\td= new Dialog(getContext());\r\n\r\n OK = (Button) findViewById(R.id.ok);\r\n OK.setOnClickListener(this);\r\n\r\n\r\n }", "private void showHelp(){\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this,R.style.MyDialogTheme);\n alertDialogBuilder.setMessage(\"Welcome to NBA Manager 2019\\n\\n\" +\n \"The purpose of the application is to simulate a basketball manager game and draft a team.\\n\\n\" +\n \"You can view your current roster by pressing the right arrow in the top right corner.\\n\\n\" +\n \"*Not all players will have a height or a weight.\");\n alertDialogBuilder.setPositiveButton(\"Ok\",\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface arg0, int arg1) {\n }\n });\n AlertDialog alertDialog = alertDialogBuilder.create();\n alertDialog.show();\n }", "private void dialogBuilder(String title, String message, String displayText, final int mode) {\n final AlertDialog.Builder dialog = new AlertDialog.Builder(this);\n dialog.setTitle(title);\n dialog.setMessage(message);\n final EditText editText = new EditText(this);\n editText.setText(displayText);\n dialog.setView(editText);\n dialog.setPositiveButton(\"Update\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n String string = editText.getText().toString().trim();\n if (!string.isEmpty()) {\n switch (mode) {\n case nameUpdate:\n updateShopInDatabase(\"shopName\", string);\n break;\n case phoneUpdate:\n updateShopInDatabase(\"shopNumber\", string);\n break;\n case addressUpdate:\n updateShopInDatabase(\"shopAddress\", string);\n break;\n case descriptionUpdate:\n updateShopInDatabase(\"shopDescription\", string);\n break;\n case aboutUpdate:\n updateShopInDatabase(\"shopAbout\", string);\n break;\n }\n } else\n Toast.makeText(getApplicationContext(), \"Field cannot be empty\", Toast.LENGTH_SHORT).show();\n }\n });\n dialog.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n dialog.create();\n dialog.show();\n\n }", "private void showDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"User created successfully\");\n builder.setIcon(R.drawable.ic_shield);\n builder.setCancelable(true);\n builder.setPositiveButton(\n \"Continue\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n finish();\n }\n });\n AlertDialog alert11 = builder.create();\n alert11.show();\n Window window = alert11.getWindow();\n assert window != null;\n WindowManager.LayoutParams wlp = window.getAttributes();\n wlp.gravity = Gravity.CENTER;\n wlp.y = 270;\n wlp.flags &= ~WindowManager.LayoutParams.FLAG_DIM_BEHIND;\n window.setAttributes(wlp);\n }", "private void rejouer() {\n AlertDialog alertDialog = new AlertDialog.Builder(this).create();\n alertDialog.setTitle(getString(R.string.rejouer));\n alertDialog.setButton(AlertDialog.BUTTON_POSITIVE, getString(R.string.oui), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n initialisation();\n }\n });\n alertDialog.setButton(AlertDialog.BUTTON_NEGATIVE, getString(R.string.non), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n }\n });\n alertDialog.show();\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n Message msg = new Message();\n msg.what = 1;\n set_handler.sendMessage(msg);\n }", "public static void buildAlertMessage(Context context, String message) {\n\t\tfinal AlertDialog.Builder builder = new AlertDialog.Builder(context);\n\t\tbuilder.setMessage(message)\n\t\t\t\t.setCancelable(false)\n\t\t\t\t.setPositiveButton(R.string.ok,\n\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\tpublic void onClick(final DialogInterface dialog,\n\t\t\t\t\t\t\t\t\t\t\t\tfinal int id) {\n\n\t\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\tfinal AlertDialog alert = builder.create();\n\t\talert.show();\n\t}", "public static @CheckResult Builder buildAlert(final Context context, final int title, final int message) {\n\t\treturn buildAlert(context, title != 0 ? context.getText(title) : null, message != 0 ? context.getText(message) : null);\n\t}", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(\"Règle du jeu\");\n builder.setMessage(\"Je sais que tu as toujours voulu être un pêcheur ! Voici ta chance. Ton objectif est de pêcher 5 poissons.\\n\\n Comment pêcher :\\n\\n1- Place ton téléphone à l'horizontal, ton écran vers la gauche.\\n\\n2- Attend le poisson.\\n\\n3- Quand ton téléphone vibre, un poisson a mordu à l'hammeçon ! Passe rapidement ton téléphone à la verticale avec ton écran toujours sur la gauche.\\n\\n4-Recommence jusqu'à devenir le roi de la pêche !\\n\\nTips : On ne devient pas pêcheur en jouant à un jeu de pêche.\" );\n builder.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // rien à faire\n }\n });\n\n // Create the AlertDialog object and return it\n return builder.create();\n }", "private void showCheckDialog() {\n AlertDialog.Builder showAuditAlert = new AlertDialog.Builder(this); // Create Alert dialog\n showAuditAlert.setTitle(\"Total prize\"); // Set title\n showAuditAlert.setMessage(\"= \"+mydb.getResultDayAudit(year,month,day).intValue()+\"\"); // Set message\n\n showAuditAlert.setPositiveButton(\"Done\",\n new DialogInterface.OnClickListener()\n { // Can hear \"CLICK\"\n @Override\n public void onClick(DialogInterface dialog,int which)\n {\n \tdialog.dismiss(); // CLICK then disappear\n }\n }\n );\n showAuditAlert.show(); // Show dialog that created upper this line\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tnew AlertDialog.Builder(Portal.this)\n\t\t\t\t.setTitle(R.string.about_uol)\n\t\t\t\t.setMessage(R.string.about_uol_message)\n\t\t\t\t.setNeutralButton(R.string.close, new DialogInterface.OnClickListener() {\n\t\t\t\t\t\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\t\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.show();\n\t\t\t}", "AlertDialog getAlertDialog();", "private void createForumDialog() {\n AlertDialog.Builder dialog = new AlertDialog.Builder(Objects.requireNonNull(this),\n R.style.AlertDialogTheme);\n dialog.setTitle(R.string.add_new_forum_title);\n dialog.setMessage(R.string.add_new_forum_description);\n\n View newForumDialog = getLayoutInflater().inflate(R.layout.new_forum_dialog, null);\n dialog.setView(newForumDialog);\n\n AlertDialog alertDialog = dialog.create();\n setAddForumButtonListener(alertDialog, newForumDialog);\n\n alertDialog.show();\n }", "public void CustomAlertSave2(String msg) {\n\t\tfinal Dialog dialog = new Dialog(context);\r\n\t\t// hide to default title for Dialog\r\n\t\tdialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\r\n\t\t// inflate the layout dialog_layout.xml and set it as contentView\r\n\t\tLayoutInflater inflater = (LayoutInflater) context\r\n\t\t\t\t.getSystemService(Context.LAYOUT_INFLATER_SERVICE);\r\n\t\tView view = inflater.inflate(R.layout.dialog_layout, null, false);\r\n\t\tdialog.setCanceledOnTouchOutside(true);\r\n\t\tdialog.setContentView(view);\r\n\t\tdialog.getWindow().setBackgroundDrawable(new ColorDrawable(0));\r\n\t\tTextView txtTitle = (TextView) dialog\r\n\t\t\t\t.findViewById(R.id.txt_alert_message);\r\n\t\ttxtTitle.setText(msg);\r\n\r\n\t\tButton btn_ok = (Button) dialog.findViewById(R.id.btn_ok);\r\n\t\tbtn_ok.setOnClickListener(new android.view.View.OnClickListener() {\r\n\r\n\t\t\tpublic void onClick(View v) {\r\n\t\t\t\tdialog.dismiss();\r\n\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t\tdialog.show();\r\n\t}", "private void dialogCreateAppointment(){\n\n String day = spin_day.getSelectedItem().toString();//Get the text of the spinner\n String time = spin_start.getSelectedItem().toString()+ \" to \" +\n spin_end.getSelectedItem().toString();//Get the text of the spinner\n String fullTime = day + \" at \" + time;\n\n /**\n * Event of the dialog box (found on STACKOVERFLOW)\n */\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Appointment\");\n builder.setMessage(\"You sure you want to create an Appointment:\\n\" +\n fullTime);\n\n\n builder.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n getValidity();\n }\n });\n builder.setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(\"REGISTRO PODA\");\n builder.setMessage(\"USUARIO O CONTRASEÑA INCORRECTA\");\n final AlertDialog.Builder ok = builder.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // You don't have to do anything here if you just want it dismissed when clicked\n }\n });\n\n // Create the AlertDialog object and return it\n return builder.create();\n }", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n this.setCancelable(true);\n\n //NB! Må settes av kaller:\n Bundle bundle = this.getArguments();\n this.dialogTitle = bundle.getString(\"dialogTitle\");\n this.dialogText = bundle.getString(\"dialogText\");\n this.yesButtonText = bundle.getString(\"yesButtonText\");\n this.noButtonText = bundle.getString(\"noButtonText\");\n this.callback_id = bundle.getInt(\"callback_id\");\n int icon_drawable = bundle.getInt(\"icon_drawable\");\n\n //Bruker en styla dialog (se styles.xml):\n AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(this.getActivity(), R.style.AlertDialogCustom));\n builder.setTitle(this.dialogTitle);\n builder.setIcon(icon_drawable);\n\n // Get the layout inflater\n LayoutInflater inflater = getActivity().getLayoutInflater();\n View view = inflater.inflate(R.layout.fragment_yesno_dialog, null);\n\n TextView tvDialogText = (TextView) view.findViewById(R.id.tvDialogText);\n tvDialogText.setText(dialogText);\n\n // Inflate and set the layout for the dialog\n // Pass null as the parent view because its going in the dialog layout\n builder.setView(view)\n // Add action buttons\n .setPositiveButton(yesButtonText, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n //Lagre at tipset er sett...\n mListener.onDialogPositiveClick(YesNoDialog.this, callback_id);\n }\n })\n .setNegativeButton(noButtonText, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n mListener.onDialogNegativeClick(YesNoDialog.this, callback_id);\n }\n });\n\n //Opprett og vis dialogen:\n Dialog dialog = builder.create();\n return dialog;\n }", "public void showAlertDialog(String title, String message) {\n\n\t\t// Create an object of alert class for an activity\n\t\tAlertDialog alertDialog = new AlertDialog.Builder(objContext).create();\n\n\t\t// Setting Dialog Title\n\t\talertDialog.setTitle(title);\n\n\t\t// Setting Dialog Message\n\t\talertDialog.setMessage(message);\n\n\t\t// Setting Icon to Dialog\n\t\talertDialog.setIcon(R.drawable.ic_launcher);\n\n\t\talertDialog.setButton(DialogInterface.BUTTON_POSITIVE, \"Ok\", new DialogInterface.OnClickListener() {\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}\n\t\t});\n\t\talertDialog.show();\n\t}", "public void createStatusDialog(String title, String msg)\n {\n new AlertDialog.Builder(this)\n .setTitle(title)\n .setMessage(msg)\n // A null listener allows the button to dismiss the dialog and take no further action.\n .setNeutralButton(android.R.string.ok, null)\n .setIcon(android.R.drawable.ic_dialog_alert)\n .show();\n }", "private void showAlertDialog() {\n new AlertDialog.Builder(getActivity())\n .setMessage(R.string.feedback_sharing_data_alert)\n .setCancelable(false)\n .setPositiveButton(R.string.ok, (dialog, which) -> {\n sendFeedback();\n })\n .show();\n }", "private void showInputDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"App info\");\n builder.setMessage(message);\n builder.setPositiveButton(\" Done \", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.dismiss();\n }\n });\n builder.show();\n }", "static void showAlert(final Context con, final String title, final String msg){\n \tAlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(con);\n \n\t\t\t// set title\n\t\talertDialogBuilder.setTitle(title);\n\t\talertDialogBuilder.setMessage(msg).setCancelable(true)\n\t\t\t\t.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n\n\t\t @Override\n\t\t public void onClick(DialogInterface dialog, int which) {\n\t\t // TODO Auto-generated method stub\n\t\t // Do something\n\t\t dialog.dismiss();\n\t\t }\n\t\t });\n\t\t\n\t\tAlertDialog alertDialog = alertDialogBuilder.create();\n\t\talertDialog.show();\n }", "public void showWarningMessage(View view){\n\n //Show popup to warn user about the entered start and destiantion Addresses\n builder = new AlertDialog.Builder(this);\n //Setting message manually and performing action on button click\n builder.setMessage(\"Please insert a start and a destination address!\")\n .setCancelable(false)\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // finish();\n Toast.makeText(getApplicationContext(),\"you choose yes action for the warning popup\",\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(),\"you choose no action for for the warning popup\",\n Toast.LENGTH_SHORT).show();\n }\n } );*/\n //Creating dialog box\n AlertDialog alert = builder.create();\n //Setting the title manually\n alert.setTitle(\"WARNING!\");\n alert.show();\n }", "private void showAlert(String message) {\n //Builds an AlertDialog with message, title, if cancellable, and what the positive button does\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setMessage(message).setTitle(\"Response from Servers\")\n .setCancelable(false)\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // do nothing\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n// String errorMessage = null;\n// try {\n// JSONObject arr = new JSONObject(message);\n// errorMessage = arr.getString(\"error\");\n// } catch (JSONException e) {\n// e.printStackTrace();\n// }\n// Toast.makeText(getActivity(), errorMessage, Toast.LENGTH_LONG).show();\n\n }", "private void show_Alert(String msg) {\n ((TextView) dialog.findViewById(R.id.tv_text)).setText(msg);\n dialog.findViewById(R.id.tv_ok).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialog.dismiss();\n }\n });\n dialog.show();\n }", "private void popupCalibratingDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(R.string.motion_calibrating);\n builder.setCancelable(false);\n builder.setMessage(R.string.motion_calibrating_message);\n\n calibratingDialog = builder.create();\n calibratingDialog.show();\n }" ]
[ "0.757845", "0.7389222", "0.7307885", "0.720965", "0.71970844", "0.70984334", "0.69882345", "0.6953497", "0.694219", "0.6899177", "0.6898502", "0.6893149", "0.685361", "0.6795003", "0.677041", "0.67525446", "0.6694843", "0.66902155", "0.6689455", "0.66752523", "0.66394997", "0.6616928", "0.66001093", "0.656698", "0.6558852", "0.6558237", "0.65557957", "0.6526209", "0.6520693", "0.6502944", "0.64878756", "0.6465608", "0.64509773", "0.64428735", "0.64377964", "0.6435368", "0.6433951", "0.6415461", "0.6415164", "0.64042264", "0.63926333", "0.63902414", "0.63844925", "0.63826805", "0.6370869", "0.63591504", "0.63556486", "0.6349412", "0.6342857", "0.6313697", "0.63106155", "0.6305725", "0.6295206", "0.62912714", "0.62869066", "0.628239", "0.62744784", "0.62740767", "0.6272032", "0.62535596", "0.6253098", "0.6248109", "0.62422097", "0.62415963", "0.62391216", "0.62336195", "0.62326026", "0.62314755", "0.6221184", "0.6220312", "0.6216892", "0.6215792", "0.62117136", "0.62084746", "0.620056", "0.61952305", "0.6188043", "0.61831665", "0.6177975", "0.61764497", "0.6174087", "0.61727303", "0.6172371", "0.61712503", "0.6170909", "0.6164993", "0.61633146", "0.6155", "0.6152913", "0.6128312", "0.61269426", "0.6110919", "0.6108682", "0.61072195", "0.6106215", "0.61041886", "0.6102844", "0.609394", "0.60935897", "0.6088693", "0.60881156" ]
0.0
-1
User clicked the "Delete" button, so delete the book.
public void onClick(DialogInterface dialog, int id) { deleteBook(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void deleteBook() {\n readViews();\n final BookEntry bookEntry = new BookEntry(mNameString, mQuantityString, mPriceString, mSupplier, mPhoneString);\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n // Delete the book only if mBookId matches DEFAULT_BOOK_ID\n if (mBookId != DEFAULT_BOOK_ID) {\n bookEntry.setId(mBookId);\n mDb.bookDao().deleteBook(bookEntry);\n }\n finish();\n }\n });\n\n }", "@Override\n\tpublic void deleteBook() {\n\t\t\n\t}", "private void deleteBook() {\n // Only perform the delete if this is an existing book.\n if (currentBookUri != null) {\n // Delete an existing book.\n int rowsDeleted = getContentResolver().delete(currentBookUri, null,\n 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, R.string.delete_error, Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the delete was successful, display a toast.\n Toast.makeText(this, R.string.delete_successful, Toast.LENGTH_SHORT).show();\n }\n }\n // Exit the activity.\n finish();\n }", "private void deleteBook() {\n if (currentBookUri != null) {\n int rowsDeleted = getContentResolver().delete(currentBookUri, null, null);\n\n // Confirmation or failure message on whether row was deleted from database\n if (rowsDeleted == 0)\n Toast.makeText(this, R.string.editor_activity_book_deleted_error, Toast.LENGTH_SHORT).show();\n else\n Toast.makeText(this, R.string.editor_activity_book_deleted, Toast.LENGTH_SHORT).show();\n }\n finish();\n }", "void delete(Book book);", "@Override\n\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\tdeleteBook(position);\n\t\t\t\t\tcandelete =-1;\n\t\t\t\t}", "@Override\r\n\tpublic int deleteBook(int book_id) {\n\t\treturn 0;\r\n\t}", "@Override\n\tpublic int deleteBook(int bookID) {\n\t\treturn 0;\n\t}", "public void onClick(View v) {\n MySQLiteHelper.deleteBookByID(currentBookID);\n // Then go back to book list\n startActivity(new Intent(BookDetailActivity.this, BookListViewActivity.class));\n }", "@FXML\n private void handleBookDeleteOption(ActionEvent event) {\n Book selectedItem = tableViewBook.getSelectionModel().getSelectedItem();\n if (selectedItem == null) {\n AlertMaker.showErrorMessage(\"No book selected\", \"Please select book for deletion.\");\n return;\n }\n if (DatabaseHandler.getInstance().isBookAlreadyIssued(selectedItem)) {\n AlertMaker.showErrorMessage(\"Cant be deleted\", \"This book is already issued and cant be deleted.\");\n return;\n }\n //confirm the opertion\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setTitle(\"Deleting Book\");\n Stage stage = (Stage) alert.getDialogPane().getScene().getWindow();\n UtilitiesBookLibrary.setStageIcon(stage);\n alert.setHeaderText(null);\n alert.setContentText(\"Are u sure u want to Delete the book ?\");\n Optional<ButtonType> response = alert.showAndWait();\n if (response.get() == ButtonType.OK) {\n \n boolean result = dbHandler.deleteBook(selectedItem);\n if (result == true) {\n AlertMaker.showSimpleAlert(\"Book delete\", selectedItem.getTitle() + \" was deleted successfully.\");\n observableListBook.remove(selectedItem);\n } else {\n AlertMaker.showSimpleAlert(\"Failed\", selectedItem.getTitle() + \" unable to delete.\");\n\n }\n } else {\n AlertMaker.showSimpleAlert(\"Deletion Canclled\", \"Deletion process canclled.\");\n\n }\n\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tnew DeleteBook().setVisible(true);\n\t\t\t\tdispose();\n\t\t\t}", "void deleteButton_actionPerformed(ActionEvent e) {\n doDelete();\n }", "public void delete(Book book){\n try{\n String query = \"DELETE FROM testdb.book WHERE id=\" + book.getId();\n DbConnection.update(query);\n }\n catch(Exception e){\n e.printStackTrace();\n }\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString number=textFieldn.getText();\n\t\t\t\t\t\t\t\n\t\t\t\tBookModel bookModel=new BookModel();\n\t\t\t\tbookModel.setBook_number(number);\n\t\t\t\t\n\t\t\t\tBookDao bookDao=new BookDao();\n\t\t\t\t\n\t\t\t\tDbUtil dbUtil = new DbUtil();\n\t\t\t\tConnection con =null;\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\tcon = dbUtil.getCon();\n\t\t\t\t\tint db=bookDao.deletebook(con,bookModel);\n\t\t\t\t\t\n\t\t\t\t\tif(db==1) {\n\t\t\t\t\t JOptionPane.showMessageDialog(null, \"删除成功\");\n\t\t\t\t\t } \t\t\t\t\t\n\t\t\t\t}catch (Exception e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "public void onClick(DialogInterface dialog, int id) {\n deleteBook();\n finish();\n }", "public void deleteBook(int num)\n { \n bookList.remove(num); \n }", "public void onClick(DialogInterface dialog,int which) {\n new deleteBook().execute();\n }", "@Override\n\tpublic Response deleteOrder(BookDeleteRequest request) {\n\t\treturn null;\n\t}", "@FXML\n void deleteBooking(ActionEvent event) throws IOException, ClassNotFoundException {\n Booking selectedBooking = table.getSelectionModel().getSelectedItem();\n if (selectedBooking != null) {\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setTitle(\"Delete booking\");\n alert.setHeaderText(\"This will delete the booking permanently\");\n alert.setContentText(\"Are you sure you want to do this?\");\n Optional<ButtonType> result = alert.showAndWait();\n if (result.get() == ButtonType.OK) {\n for (Ticket ticket:selectedBooking.getTickets()) {\n for (Showing showing:Main.getShowings().getShowings()) {\n if (showing.getFilm().getTitle().equals(ticket.getShowing().getFilm().getTitle())&&showing.getShowingTimeFormatted().equals(ticket.getShowing().getShowingTimeFormatted())&&showing.getShowingDateFormatted(false).equals(showing.getShowingDateFormatted(false))) {\n String row = ticket.getSeat().getRowLetter();\n int number = ticket.getSeat().getSeatNumber();\n showing.getSeat(row, number).setBookingStatus(false);\n }\n }\n }\n Main.getBookings().removeBooking(selectedBooking);\n populateTableView();\n Main.getBookings().saveBookings();\n Main.getShowings().saveShowings();\n }\n }\n }", "@Override\n\tpublic boolean deleteBook(int idBook) throws DAOException {\n\t\treturn false;\n\t}", "public void onClick(DialogInterface dialog, int id) {\n deleteAllBooks();\n }", "private void actionDelete() {\r\n showDeleteDialog();\r\n }", "public void actionPerformed(ActionEvent e) {\n\t\tif (e.getSource() == cancel) {\n\t\t\tthis.dispose();\n\t\t}\n\t\tif (e.getSource() == delete) {\n\t\t\tReaderInfo reader = new ReaderInfo(numberField.getText());\n\t\t\tthis.dispose();\n\t\t\tif (op.deleteReaderCheck(numberField.getText()) != 0) {\n\t\t\t\tJOptionPane\n\t\t\t\t\t\t.showMessageDialog(\n\t\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\t\t\"删除失败,兄dei还书先\",\n\t\t\t\t\t\t\t\t\"Warning\", JOptionPane.INFORMATION_MESSAGE);\n\n\t\t\t} else {\n\t\t\t\tif (op.deleteReader(reader) == 1) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\"删除成功\", \"Information\",\n\t\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane\n\t\t\t\t\t\t\t.showMessageDialog(\n\t\t\t\t\t\t\t\t\tnull,\n\t\t\t\t\t\t\t\t\t\"无此人\",\n\t\t\t\t\t\t\t\t\t\"Warning\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void deleteEntry(String book1)\n{\n}", "public void delete() {\n\t\tTimelineUpdater timelineUpdater = TimelineUpdater.getCurrentInstance(\":mainForm:timeline\");\n\t\tmodel.delete(event, timelineUpdater);\n\n\t\tFacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, \"The booking \" + getRoom() + \" has been deleted\", null);\n\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\t}", "private void delete(ActionEvent e){\r\n if (client != null){\r\n ConfirmBox.display(\"Confirm Deletion\", \"Are you sure you want to delete this entry?\");\r\n if (ConfirmBox.response){\r\n Client.deleteClient(client);\r\n AlertBox.display(\"Delete Client\", \"Client Deleted Successfully\");\r\n // Refresh view\r\n refresh();\r\n \r\n }\r\n }\r\n }", "private void delete() {\n\t\tComponents.questionDialog().message(\"Are you sure?\").callback(answeredYes -> {\n\n\t\t\t// if confirmed, delete the current product PropertyBox\n\t\t\tdatastore.delete(TARGET, viewForm.getValue());\n\t\t\t// Notify the user\n\t\t\tNotification.show(\"Product deleted\", Type.TRAY_NOTIFICATION);\n\n\t\t\t// navigate back\n\t\t\tViewNavigator.require().navigateBack();\n\n\t\t}).open();\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tdelete();\n\t\t\t}", "private void btnDelete1ActionPerformed(java.awt.event.ActionEvent evt) throws IOException {// GEN-FIRST:event_btnDelete1ActionPerformed\n\t\t// TODO add your handling code here:\n\t\tint i = tblBollard.getSelectedRow();\n\t\tif (i >= 0) {\n\t\t\tint option = JOptionPane.showConfirmDialog(rootPane, \"Are you sure you want to Delete?\",\n\t\t\t\t\t\"Delete confirmation\", JOptionPane.YES_NO_OPTION);\n\t\t\tif (option == 0) {\n\t\t\t\tTableModel model = tblBollard.getModel();\n\n\t\t\t\tString id = model.getValueAt(i, 0).toString();\n\t\t\t\tif (tblBollard.getSelectedRows().length == 1) {\n\t\t\t\t\t\n\t\t\t\t\tdelete(id,client);\n\t\t\t\t\t\n\t\t\t\t\tDefaultTableModel model1 = (DefaultTableModel) tblBollard.getModel();\n\t\t\t\t\tmodel1.setRowCount(0);\n\t\t\t\t\tfetch(client);\n\t\t\t\t\t//client.stopConnection();\n\t\t\t\t\tclear();\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\talert(\"Please select a row to delete\");\n\t\t}\n\t}", "@Override\r\n\tpublic void remove(Book book) {\r\n\r\n\t}", "public void deleteButtonClicked(View view) {\n String inputText = johnsInput.getText().toString();\n dbHandler.deleteProduct(inputText);\n printDatabase();\n }", "@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\tdelete();\n\t\t}", "@FXML\n\tprivate void deleteButtonAction(ActionEvent clickEvent) {\n\t\t\n\t\tPart deletePartFromProduct = partListProductTable.getSelectionModel().getSelectedItem();\n\t\t\n\t\tif (deletePartFromProduct != null) {\n\t\t\t\n\t\t\tAlert alert = new Alert(Alert.AlertType.CONFIRMATION, \"Pressing OK will remove the part from the product.\\n\\n\" + \"Are you sure you want to remove the part?\");\n\t\t\n\t\t\tOptional<ButtonType> result = alert.showAndWait();\n\t\t\n\t\t\tif (result.isPresent() && result.get() == ButtonType.OK) {\n\t\t\t\n\t\t\t\tdummyList.remove(deletePartFromProduct);\n\n\t\t\t}\n\t\t}\n\t}", "int deleteByPrimaryKey(String bookId);", "private void confirmDelete(){\n\t\tAlertDialog.Builder dialog = new AlertDialog.Builder(this);\n\t\tdialog.setIcon(R.drawable.warning);\n\t\tdialog.setTitle(\"Confirm\");\n\t\tdialog.setMessage(\"Are you sure you want to Delete Selected Bookmark(s).?\");\n\t\tdialog.setCancelable(false);\n\t\tdialog.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdeleteBookmark();\n\t\t\t}\n\t\t});\n\t\tdialog.setNegativeButton(\"CANCEL\", new DialogInterface.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}\n\t\t});\n\t\t\n\t\t// Pack and show\n\t\tAlertDialog alert = dialog.create();\n\t\talert.show();\n\t}", "@Override\r\n\tpublic void deletebook(int seq) {\n\t\tsqlSession.delete(ns + \"deletebook\", seq);\r\n\t}", "public void deleteButtonPushed() {\r\n ObservableList<Student> allStudents;\r\n Student selectedRow;\r\n allStudents = tableView.getItems();\r\n \r\n // This gives us the row that was selected\r\n selectedRow = tableView.getSelectionModel().getSelectedItems().get(0);\r\n \r\n\r\n try {\r\n covidMngrService.deleteStudent(selectedRow);\r\n \r\n // Remove the Student object from the table\r\n allStudents.remove(selectedRow);\r\n } catch (RemoteException ex) {\r\n Logger.getLogger(SecretaryStudentsTableCntrl.class.getName()).\r\n log(Level.SEVERE, null, ex);\r\n }\r\n }", "public void onClick(DialogInterface dialog,int id) {\n \n\n bookMarkList.remove(selectedItem);\n iadapter.notifyDataSetChanged();\n // Toast.makeText(getApplicationContext(),\"delete\"+ valuebpage+ \" name is \"+ valuebname,Toast.LENGTH_LONG).show();\n // dialogBookmark.dismiss();\n dialog.cancel();\n }", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the pet.\n deleteBook();\n finish();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the book.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder to display a confirmation message about deleting the book\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.editor_activity_delete_message);\n builder.setPositiveButton(getString(R.string.editor_activity_delete_message_positive),\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Delete\"\n deleteBook();\n }\n });\n\n builder.setNegativeButton(getString(R.string.editor_activity_delete_message_negative),\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Cancel\"\n if (dialogInterface != null)\n dialogInterface.dismiss();\n }\n });\n\n // Create and show the dialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "public void clickedSpeakerDelete() {\n\t\tif(mainWindow.getSelectedRowSpeaker().length <= 0) ApplicationOutput.printLog(\"YOU DID NOT SELECT ANY PRESENTATION\");\n\t\telse if(mainWindow.getSelectedRowSpeaker().length > 1) ApplicationOutput.printLog(\"Please select only one presentation to edit\");\n\t\telse {\n\t\t\tint tmpSelectedRow = mainWindow.getSelectedRowSpeaker()[0];\n\t\t\tSpeakers tmpSpeaker = speakersList.remove(tmpSelectedRow);\t\t\t\n\t\t\tappDriver.hibernateProxy.deleteSpeaker(tmpSpeaker);\t\n\t\t\trefreshSpeakerTable();\t\t\t\n\t\t}\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSystem.out.println(\"btnDelete\");\n\t\t\t\tint i = table.getSelectedRow();\n\t\t\t\tif (i >= 0) {\n\t\t\t\t\tSystem.out.println(\"row-Delete\" + i);\n\t\t\t\t\tSystem.out.println(\"row-Delete\" + textSuppD.getText());\n\t\t\t\t\tint suppID = Integer.parseInt(textSuppD.getText().trim());\n\n\t\t\t\t\tDatabase db = new Database();\n\t\t\t\t\tSuppliersDAO suppDAO = new SuppliersDAO(db);\n\t\t\t\t\tSuppliersModel suppModel = new SuppliersModel();\n\t\t\t\t\tsuppModel.setSuppliers_id(suppID);\n\t\t\t\t\tsuppDAO.Delete(suppModel);\n\t\t\t\t\tdb.commit();\n\t\t\t\t\tdb.close();\n\n\t\t\t\t\tmodel.removeRow(i);\n\t\t\t\t} else {\n\t\t\t\t}\n\t\t\t}", "private void rSButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n int p=JOptionPane.showConfirmDialog(null,\"Are You Sure\",\"Delete\",JOptionPane.YES_NO_OPTION);\n if(p==0){\n String sql=\"delete from book where book_id=?\";\n try{\n pst=(OraclePreparedStatement) conn.prepareStatement(sql);\n pst.setString(1,jtext8.getText());\n pst.execute();\n JOptionPane.showMessageDialog(null,\"Deleted\");\n }catch(Exception e){\n JOptionPane.showMessageDialog(null, e);\n }\n }update();\n refresh2();\n }", "public void deleteSong(ActionEvent delEvent) {\r\n\t\tButton deleteButton = (Button) delEvent.getSource();\r\n\t\tif(deleteButton == delete) {\r\n\t\t\tSong deleteSong = listView.getSelectionModel().getSelectedItem();\r\n\t\t\tint temp = listView.getSelectionModel().getSelectedIndex();\r\n\t\t\tAlert deleteAlert = new Alert(AlertType.CONFIRMATION);\r\n\t\t\tdeleteAlert.setTitle(\"Confirmation:\");\r\n\t\t\tdeleteAlert.setHeaderText(\"Delete song?\");\r\n\t\t\tdeleteAlert.setContentText(\"Are you sure, you want to delete the following song?\\n\"\r\n\t\t\t\t\t+ \"Name: \" + deleteSong.getName() + \"\\n\" + \"Artsit: \"+ deleteSong.getArtist() + \"\\n\"\r\n\t\t\t\t\t+ \"Album: \" + deleteSong.getAlbum() + \"\\n\" + \"Year: \" + deleteSong.getYear() + \"\\n\");\r\n\t\t\tOptional<ButtonType> confirm = deleteAlert.showAndWait();\r\n\t\t\t\tif(confirm.get() == ButtonType.OK) {\r\n\t\t\t\t\tint listSize = songList.size();\r\n\t\t\t\t\tif(listSize == 1) {\r\n\t\t\t\t\t\tsongList.remove(temp);\r\n\t\t\t\t\t\tsaveToCatalog(songList);\r\n\t\t\t\t\t\tobsList.remove(temp);\r\n\t\t\t\t\t\tobsList = FXCollections.observableArrayList(songList);\r\n\t\t\t\t\t\tlistView.setItems(obsList);\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\tsongList.remove(temp);\r\n\t\t\t\t\t\tsaveToCatalog(songList);\r\n\t\t\t\t\t\tobsList.remove(temp);\r\n\t\t\t\t\t\tobsList = FXCollections.observableArrayList(songList);\r\n\t\t\t\t\t\tlistView.setItems(obsList);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(temp < (songList.size())) {\r\n\t\t\t\t\t\t\tlistView.getSelectionModel().select(temp);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tlistView.getSelectionModel().select(temp - 1);\r\n\t\t\t\t\t\t}\t\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t//do nothing\r\n\t\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n builder.setMessage(R.string.delete_book_warning);\r\n builder.setPositiveButton(R.string.delete_button, new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialogInterface, int i) {\r\n deletebook();\r\n }\r\n });\r\n builder.setNegativeButton(R.string.cancel_button, new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialogInterface, int i) {\r\n if (dialogInterface != null) {\r\n dialogInterface.dismiss();\r\n }\r\n }\r\n });\r\n\r\n //show alert dialog upon deletion\r\n AlertDialog alertDialog = builder.create();\r\n alertDialog.show();\r\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n if (bookItem.equals( getString(R.string.empty_list))) return;\n DataBaseHelper myDbHelper = new DataBaseHelper(getActivity());\n try {\n myDbHelper.createDataBase();\n } catch (IOException ioe) {\n throw new Error(\"Unable to create database\");\n }\n\n try {\n myDbHelper.openDataBase();\n } catch (SQLException sqle) {\n throw new Error(\"Unable to open database\");\n }\n\n if (!myDbHelper.deleteBook(bookItem)) {\n return;\n }\n\n myDbHelper.deleteBook(bookItem);\n myDbHelper.close();\n\n mBookList.remove(selectedItem);\n dataAdapter = new MySimpleCustomAdapter(getActivity(), R.layout.list_item, mBookList);\n listView.setAdapter(dataAdapter);\n if (dataAdapter.isEmpty())\n Toast.makeText(getActivity(), getString(R.string.empty), Toast.LENGTH_SHORT).show();\n\n }", "public void delete(int bookId){ \n dbmanager.open();\n try (DBIterator keyIterator = dbmanager.getDB().iterator()) {\n keyIterator.seekToFirst();\n\n while (keyIterator.hasNext()) {\n String key = asString(keyIterator.peekNext().getKey());\n String[] splittedString = key.split(\"-\");\n\n if(!\"book\".equals(splittedString[0])){\n keyIterator.next();\n continue;\n }\n\n String resultAttribute = asString(dbmanager.getDB().get(bytes(key)));\n JSONObject jauthor = new JSONObject(resultAttribute);\n\n if(jauthor.getInt(\"idBOOK\")==bookId){\n \n dbmanager.getDB().delete(bytes(key));\n break;\n }\n keyIterator.next(); \n }\n } catch(Exception ex){\n ex.printStackTrace();\n } \n dbmanager.close();\n }", "@FXML\r\n void onActionDelete(ActionEvent event) throws IOException {\r\n\r\n Appointment toDelete = appointmentsTable.getSelectionModel().getSelectedItem();\r\n\r\n\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION, \"Are you sure you want to delete appointment ID# \" + toDelete.getAppointmentID() + \" Title: \" + toDelete.getTitle()\r\n + \" Type: \" + toDelete.getType());\r\n Optional<ButtonType> result = alert.showAndWait();\r\n if (result.isPresent() && result.get() == ButtonType.OK) {\r\n\r\n DBAppointments.deleteAppointment(toDelete.getAppointmentID());\r\n\r\n stage = (Stage) ((Button) event.getSource()).getScene().getWindow();\r\n scene = FXMLLoader.load(getClass().getResource(\"/view/appointments.fxml\"));\r\n stage.setScene(new Scene(scene));\r\n stage.show();\r\n }\r\n }", "@Test\n\tpublic void testDeleteBook() {\n\t\t//System.out.println(\"Deleting book from bookstore...\");\n\t\tstore.deleteBook(b1);\n\t\tassertFalse(store.getBooks().contains(b1));\n\t\t//System.out.println(store);\n\t}", "public abstract void deleteAPriceBook(String priceBookName);", "public void delete(String book_id){\n\t\tmap.remove(book_id);\n\t\t\n\t}", "private void deleteAllBooks() {\n int rowsDeleted = getContentResolver().delete(BookEntry.CONTENT_URI, null, null);\n // Update the message for the Toast\n String message;\n if (rowsDeleted == 0) {\n message = getResources().getString(R.string.inventory_delete_books_failed).toString();\n } else {\n message = getResources().getString(R.string.inventory_delete_books_successful).toString();\n }\n // Show toast\n Toast.makeText(this, message, Toast.LENGTH_LONG).show();\n }", "public void remove()\r\n {\r\n if(bookCount>0)\r\n {\r\n bookCount-=1;\r\n }\r\n }", "private void handleDeletePressed() {\n if (mCtx == Context.CREATE) {\n finish();\n return;\n }\n\n DialogFactory.deletion(this, getString(R.string.dialog_note), () -> {\n QueryService.awaitInstance(service -> deleteNote(service, mNote.id()));\n }).show();\n }", "private void deleteRoutine() {\n String message = \"Are you sure you want to delete this routine\\nfrom your routine collection?\";\n int n = JOptionPane.showConfirmDialog(this, message, \"Warning\", JOptionPane.YES_NO_OPTION);\n if (n == JOptionPane.YES_OPTION) {\n Routine r = list.getSelectedValue();\n\n collection.delete(r);\n listModel.removeElement(r);\n }\n }", "private void delete() {\n DialogInterface.OnClickListener dialogClickListener = new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n switch (which){\n case DialogInterface.BUTTON_POSITIVE:\n setResult(RESULT_OK, null);\n datasource.deleteContact(c);\n dbHelper.commit();\n finish();\n break;\n\n case DialogInterface.BUTTON_NEGATIVE:\n //Do Nothing\n break;\n }\n }\n };\n\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(getString(R.string.confirm_delete) + (c==null?\"\":c.getName()) + \"?\").setPositiveButton(getString(R.string.yes), dialogClickListener)\n .setNegativeButton(getString(R.string.no), dialogClickListener).show();\n }", "@FXML\r\n public void onDelete() {\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\r\n alert.setTitle(\"Mensagem\");\r\n alert.setHeaderText(\"\");\r\n alert.setContentText(\"Deseja excluir?\");\r\n Optional<ButtonType> result = alert.showAndWait();\r\n if (result.get() == ButtonType.OK) {\r\n AlunoModel alunoModel = tabelaAluno.getItems().get(tabelaAluno.getSelectionModel().getSelectedIndex());\r\n\r\n if (AlunoDAO.executeUpdates(alunoModel, AlunoDAO.DELETE)) {\r\n tabelaAluno.getItems().remove(tabelaAluno.getSelectionModel().getSelectedIndex());\r\n alert(\"Excluido com sucesso!\");\r\n desabilitarCampos();\r\n } else {\r\n alert(\"Não foi possivel excluir\");\r\n }\r\n }\r\n }", "@FXML\n\tpublic void delete(ActionEvent event) throws IOException {\n\t\tMgr_du.remove_goods(g.getIndex());\n\t\tSeller_du.getShop().remove_goods(g.getIndex());\n\t\tMgr_du.save_shop();\n\t\tMgr_du.save_seller();\n\t\tStageMgr.STAGES.get(\"Goods_seller\").close();\n\t\tStageMgr.STAGES.remove(\"Goods_seller\");\n\t\t\n\t\tStageMgr.STAGES.remove(\"Seller_main\");\n\t\tLogin_du.load_seller(Seller_du.getUser_name());\n\t\tStage stage=new Stage();\n\t\tParent root = null;\n\t\troot = FXMLLoader.load(getClass().getResource(\"Seller_main.fxml\"));\n\t\tstage.setTitle(\"Seller\");\n\t\tStageMgr.STAGES.put(\"Seller_main\", stage);\n\t\tstage.setScene(new Scene(root));\n\t\tstage.show();\n\t}", "public void delete(int id) {\n\tListIterator<Book> listItr = list.listIterator();\n\twhile(listItr.hasNext()) {\n\t\tBook book2 = listItr.next();\n\t\tif(book2.id == id) {\n\t\t\tlistItr.remove();\n\t\t\tSystem.out.println(\"Successfully deleted: \"+id);\n\t\t\treturn;\n\t\t}\n\t}\n\tSystem.out.println(\"No such Book ID exists\");\n}", "int deleteByExample(BookExample example);", "@FXML\n private void handleDeleteRecordButton(ActionEvent e) {\n deleteRecord();\n }", "@DeleteMapping(\"/{username}/books/{bookId}\")\n public void deleteBookFromLibrary(@PathVariable String username,\n @PathVariable Long bookId) {\n userService.deleteBook(username, bookId);\n }", "@FXML private void handleAddProdDelete(ActionEvent event) {\n Part partDeleting = fxidAddProdSelectedParts.getSelectionModel().getSelectedItem();\n \n if (partDeleting != null) {\n //Display Confirm Box\n Alert confirmDelete = new Alert(Alert.AlertType.CONFIRMATION);\n confirmDelete.setHeaderText(\"Are you sure?\");\n confirmDelete.setContentText(\"Are you sure you want to remove the \" + partDeleting.getName() + \" part?\");\n Optional<ButtonType> result = confirmDelete.showAndWait();\n //If they click OK\n if (result.get() == ButtonType.OK) {\n //Delete the part.\n partToSave.remove(partDeleting);\n //Refresh the list view.\n fxidAddProdSelectedParts.setItems(partToSave);\n\n Alert successDelete = new Alert(Alert.AlertType.CONFIRMATION);\n successDelete.setHeaderText(\"Confirmation\");\n successDelete.setContentText(partDeleting.getName() + \" has been removed from product.\");\n successDelete.showAndWait();\n }\n } \n }", "@Override\r\n\tpublic void deleteObjectListener(ActionEvent e) {\n\t\t\r\n\t}", "private void delete_btnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_delete_btnActionPerformed\n // pull current table model\n DefaultTableModel model = (DefaultTableModel) remindersTable.getModel();\n if (remindersTable.getSelectedRow() == -1) {\n if (remindersTable.getRowCount() == 0) {\n dm.messageEmptyTable();\n } else {\n dm.messageSelectLine();\n }\n } else {\n int input = JOptionPane.showConfirmDialog(frame, \"Do you want to Delete!\");\n // 0 = yes, 1 = no, 2 = cancel\n if (input == 0) {\n model.removeRow(remindersTable.getSelectedRow());\n dm.messageReminderDeleted();// user message;\n saveDataToFile();// Save changes to file\n getSum(); // Update projected balance\n } else {\n // delete canceled\n }\n }\n }", "private void delete() {\n AltDatabase.getInstance().getAlts().remove(getCurrentAsEditable());\n if (selectedAccountIndex > 0)\n selectedAccountIndex--;\n updateQueried();\n updateButtons();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n switch (which) {\n case 0:\n downloadAndOpenPDFFile(mContext, clickedBook, bookView);\n break;\n case 1:\n pdfFile.delete();\n Utils.triggerGAEvent(mContext, \"Pdf_Delete\", productId, customerId);\n\n // Delete downloaded book details from database\n String query = \"DELETE FROM \" + DatabaseConstants.DatabaseEntry.DOWNLOADED_BOOKS_TABLE_NAME + \" WHERE product_id = \" + productId;\n DatabaseHelper.getInstance(LibraryActivity.this).deleteData(query);\n\n ImageView bookDepiction = (ImageView) bookView.findViewById(R.id.book_depiction);\n if (bookDepiction != null) {\n bookDepiction.setImageResource(R.drawable.cloud_icon);\n }\n if (productTypes.startsWith(\"downloaded_\")) {\n mDownloadedBooksAdapter.removeItem(clickedBook);\n int downloadedBooks = mDownloadedBooksAdapter.getItemCount();\n if (downloadedBooks == 0) {\n shouldSearchIconShow = false;\n libraryViewChange.setVisibility(View.INVISIBLE);\n libraryFlipper.setDisplayedChild(1);\n Drawable image = getResources().getDrawable(R.drawable.no_download_ebooks);\n String text = \"No Downloads Yet\";\n String subText = \"Download your eBooks by Clicking on it\\nTo Read without Internet Connection.\";\n String buttonText = \"My Books\";\n setLibraryViewWhenNoDataFound(image, text, subText, buttonText);\n\n invalidateOptionsMenu();\n }\n }\n break;\n case 2:\n dialog.cancel();\n break;\n }\n }", "public void deleteBook(String title)\n {\n for(int iterator = 0; iterator < bookList.size() ; iterator++)\n {\n if(bookList.get(iterator).getTitle().equals(title))\n {\n bookList.remove(iterator); \n }\n }\n }", "@FXML\n private void deleteUser(ActionEvent event) throws IOException {\n User selectedUser = table.getSelectionModel().getSelectedItem();\n\n boolean userWasRemoved = selectedUser.delete();\n\n if (userWasRemoved) {\n userList.remove(selectedUser);\n UsermanagementUtilities.setFeedback(event,selectedUser.getName().getFirstName()+\" \"+LanguageHandler.getText(\"userDeleted\"),true);\n } else {\n UsermanagementUtilities.setFeedback(event,LanguageHandler.getText(\"userNotDeleted\"),false);\n }\n }", "void deletePodcast(ActionEvent event){\n //removes context menu that was displaed\n cm.hide();\n //Creates and shows a pop-up that will prompt user to decide what happens to podcast\n Alert alert = new Alert(Alert.AlertType.NONE, \"Delete \"+this.podcast.getTitle()+\"?\", ButtonType.YES, ButtonType.NO, ButtonType.CANCEL);\n alert.showAndWait();\n\n //CASE: YES, deletes podcast\n if(alert.getResult() == ButtonType.YES){\n if(model.DEBUG)\n System.err.println(\"[LibCell] Deleting \"+this.podcast.getTitle());\n\n Main.model.deletePodcast(this.podcast);\n //CASE: NO, hides alert\n } else {\n alert.hide();\n }\n }", "@FXML\n private void handleDeleteFilm() {\n int selectedIndex = filmTable.getSelectionModel().getSelectedIndex();\n if (selectedIndex >= 0) {\n \tfilmTable.getItems().remove(selectedIndex);\n \tsave();\n } else {\n // Nothing selected.\n Dialogs.create()\n .title(\"No Selection\")\n .masthead(\"No Person Selected\")\n .message(\"Please select a person in the table.\")\n .showWarning();\n }\n }", "@FXML public void deleteBT_handler(ActionEvent e) {\n\t\tif(list.getSelectionModel().getSelectedIndex() == -1) {\n\t\t\tAlert error = new Alert(AlertType.ERROR, \"Nothing Selected.\\nPlease select correctly or add new User\", ButtonType.OK);\n\t error.showAndWait();\n\t\t}\n\t\telse {\n\t\t\tAlert warning = new Alert(AlertType.WARNING,\"Delete this User from list?\", ButtonType.YES, ButtonType.NO);\n\t warning.showAndWait();\n\t if(warning.getResult() == ButtonType.NO){\n\t return;\n\t }\n\t\n\t int idx = list.getSelectionModel().getSelectedIndex();\n\t if(list.getSelectionModel().getSelectedItem().getUserName().equals(\"stock\")) {\n\t \tAlert error = new Alert(AlertType.ERROR, \"You can't delete stock username\", ButtonType.OK);\n\t error.showAndWait();\n\t \treturn;\n\t }\n\t obs.remove(idx);\n\t mgUsr.arrList.remove(idx);\n\t\t}\n\t}", "private void deleteButtonClicked(){\n\t\tif (theDialogClient != null) theDialogClient.dialogFinished(DialogClient.operation.DELETEING);\n\t\tdispose();\n\t}", "private void deleteButtonActionPerformed(java.awt.event.ActionEvent evt) {// GEN\n // -\n // FIRST\n // :\n // event_deleteButtonActionPerformed\n int rowIndex = headerTable.getSelectedRow();\n if (rowIndex > -1) {\n removeRow(rowIndex);\n }\n }", "private void jbtn_deleteActionPerformed(ActionEvent evt) {\n\t\tDefaultTableModel RecordTable=(DefaultTableModel)jTable1.getModel();\n\t\tint Selectedrow=jTable1.getSelectedRow();\n\t\t\n\t\ttry\n\t\t{\n\t\t\tid=RecordTable.getValueAt(Selectedrow,0).toString();\n\t\t\tdeleteItem=JOptionPane.showConfirmDialog(this,\"Confirm if you want to delete the record\",\"Warning\",JOptionPane.YES_NO_OPTION);\n\t\t\t\n\t\t\tif(deleteItem==JOptionPane.YES_OPTION)\n\t\t\t{\n\t\t\t\tconn cc=new conn();\n\t\t\t\tpst=cc.c.prepareStatement(\"delete from medicine where medicine_name=?\");\n\t\t\t pst.setString(1,id);\n\t\t\t\tpst.executeUpdate();\n\t\t\t\tJOptionPane.showMessageDialog(this,\"Record Updated\");\n\t\t\t\tupDateDB();\n\t\t\t\ttxtblank();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\t\n\t}", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the book.\n deleteBook();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the book.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n // Set the message.\n builder.setMessage(R.string.delete_dialog_msg);\n\n // Handle the button clicks.\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the book.\n deleteBook();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the book\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }", "@FXML\n public void confirmStudentDelete(ActionEvent e) {\n Student s = handledStudent;\n DBhandler db = new DBhandler();\n String title =\"Confirm delete\";\n String HeaderText = \"Student will be permanently deleted\";\n String ContentText = \"Are you sure you want to delete this student?\";\n\n AlertHandler ah = new AlertHandler();\n\n if (ah.getConfirmation(title, HeaderText, ContentText) == ButtonType.OK) {\n System.out.println(\"Ok pressed\");\n db.deleteStudentFromDatabase(s);\n Cancel(new ActionEvent());\n } else {\n System.out.println(\"Cancel pressed\");\n }\n }", "public void delete() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"deleteButton\").click();\n\t}", "public void deleteHouse() {\n System.out.println(\"------Delete House------\");\n System.out.print(\"enter house id(-1 cancel) you want to delete: \");\n int delId = Utility.readInt();\n if (delId == -1) {\n System.out.println(\"cancel delete program\");\n return;\n }\n char choice = Utility.readConfirmSelection(); //loop\n if (choice == 'Y') {\n boolean b = houseService.removeHouse(delId);\n if (b) {\n System.out.println(\"id=\" + delId + \" house has been delete!\");\n } else {\n System.out.println(\"-----Failed to delete-----\");\n }\n } else {\n System.out.println(\"cancel delete program\");\n return;\n }\n System.out.println();\n }", "void onDeleteClicked();", "@FXML\n public void deleteSet(MouseEvent e) {\n //confirm first\n Alert confirmAlert = new Alert(AlertType.CONFIRMATION, \"\", ButtonType.YES, ButtonType.NO);\n confirmAlert.setHeaderText(\"Are you sure you want to delete this set?\");\n Optional<ButtonType> result = confirmAlert.showAndWait();\n if (result.get() == ButtonType.YES) {\n //delete from database\n try (\n Connection conn = dao.getConnection();\n PreparedStatement stmt = conn.prepareStatement(\"DELETE FROM Theory WHERE Title = ?\");\n ) {\n conn.setAutoCommit(false);\n stmt.setString(1, txtTitle.getText());\n stmt.executeUpdate();\n conn.commit();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n //delete from interface\n VBox vbxCards = (VBox) apnSetRow.getParent();\n vbxCards.getChildren().remove(apnSetRow);\n }\n }", "protected void deleteClicked(View view){\n PriceFinder pf = new PriceFinder();\n pf = this.itm.getItem(this.position);\n this.itm.removeItem(pf);\n try {\n save();\n } catch (IOException e) {\n e.printStackTrace();\n }\n finish();\n }", "private boolean actionDelete()\n {\n Debug.enter();\n onDeleteListener.onDelete();\n dismiss();\n Debug.leave();\n return true;\n }", "public int delete(int rb_seq) {\n\t\t\n\t\tint ret = readBookDao.delete(rb_seq);\n\t\treturn ret;\n\t}", "public void deleteTag(ActionEvent event) {\n\t\tObservableList<Tag> list;\n\t\tlist = TagListDisplay.getSelectionModel().getSelectedItems();\n\t\t\n\t\tif(list.isEmpty() == true) {\n\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\talert.setTitle(\"Error!\");\n\t\t\talert.setHeaderText(\"No Tag Selected\");\n\t\t\talert.setContentText(\"No tag selected. Delete Failed!\");\n\t\t\talert.showAndWait();\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t\tAlert alert2 = new Alert(AlertType.CONFIRMATION);\n\t\talert2.setTitle(\"Confirmation Dialog\");\n\t\talert2.setHeaderText(\"Confirm Action\");\n\t\talert2.setContentText(\"Are you sure?\");\n\t\tOptional<ButtonType> result = alert2.showAndWait();\n\t\t\n\t\tif(result.get() == ButtonType.OK) {\n\t\t\tTag tag = (Tag) TagListDisplay.getSelectionModel().getSelectedItem();\n\t\t\t\n\t\t\tImageView img = (ImageView) PhotoListDisplay.getSelectionModel().getSelectedItem();\n\t\t\tPhoto p = AccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum.getPhotoFromImage(img);\n\t\t\tArrayList<Tag> listTags = p.getTags();\n\t\t\t\n\t\t\tlistTags.remove(tag);\n\t\t\t\n\t\t\ttagObsList = FXCollections.observableList(listTags);\n\t\t\tTagListDisplay.setItems(tagObsList);\n\t\t}else {\n\t\t\treturn;\n\t\t}\n\t\n\t\ttry {\n\t\t\tserializeUsers(AccessibleUsersList.masterUserList);\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t/*\n\t\ttry {\n\t\t\tserializeUsers(AccessibleUsersList.masterUserList);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\t*/\n\t}", "private void delete()\n\t{\n\t\ttry\n\t\t{\n\t\t\tConnection con = Connector.DBcon();\n\t\t\tString query = \"select * from items where IT_ID=?\";\n\t\t\t\n\t\t\tPreparedStatement pst = con.prepareStatement(query);\n\t\t\tpst.setString(1, txticode.getText());\n\t\t\tResultSet rs = pst.executeQuery();\n\t\t\t\n\t\t\tint count = 0;\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\t\n\t\t\tif(count == 1)\n\t\t\t{\n\t\t\t\tint choice = JOptionPane.showConfirmDialog(null, \"Are you sure you want to delete selected item data?\", \"ALERT\", JOptionPane.YES_NO_OPTION);\n\t\t\t\tif(choice==JOptionPane.YES_OPTION)\n\t\t\t\t{\n\t\t\t\t\tquery=\"delete from items where IT_ID=?\";\n\t\t\t\t\tpst = con.prepareStatement(query);\n\t\t\t\t\t\n\t\t\t\t\tpst.setString(1, txticode.getText());\n\t\t\t\t\t\n\t\t\t\t\tpst.execute();\n\t\t\t\t\t\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Deleted Successfully\", \"RESULT\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tloadData();\n\t\t\t\t\n\t\t\t\trs.close();\n\t\t\t\tpst.close();\n\t\t\t\tcon.close();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Record Not Found!\", \"Alert\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\n\t\t\trs.close();\n\t\t\tpst.close();\n\t\t\tcon.close();\n\t\t\t\n\t\t} \n\t\tcatch (Exception e)\n\t\t{\n\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t}\n\t}", "@FXML\r\n private void deletePartAction() throws IOException {\r\n \r\n if (!partsTbl.getSelectionModel().isEmpty()) {\r\n Part selected = partsTbl.getSelectionModel().getSelectedItem();\r\n \r\n Alert message = new Alert(Alert.AlertType.CONFIRMATION);\r\n message.setTitle(\"Confirm delete\");\r\n message.setHeaderText(\" Are you sure you want to delete part ID: \" + selected.getId() + \", name: \" + selected.getName() + \"?\" );\r\n message.setContentText(\"Please confirm your selection\");\r\n \r\n Optional<ButtonType> response = message.showAndWait();\r\n if (response.get() == ButtonType.OK)\r\n {\r\n stock.deletePart(selected);\r\n partsTbl.setItems(stock.getAllParts());\r\n partsTbl.refresh();\r\n displayMessage(\"The part \" + selected.getName() + \" was successfully deleted\");\r\n }\r\n else {\r\n displayMessage(\"Deletion cancelled by user. Part not deleted.\");\r\n }\r\n }\r\n else {\r\n displayMessage(\"No part selected for deletion\");\r\n }\r\n }", "public void onDeleteButton(View view){\n if (db.getAllRecipes().size() <= 0) {\n Toast.makeText(this, \"There are no recipes in database!\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n // We have to add a confirmation here before delete all recipes.\n AlertDialog.Builder dialog = new AlertDialog.Builder(RecipesActivity.this);\n dialog.setTitle(\"Delete?\")\n .setMessage(\"Are you sure you want to delete ALL recipes?\")\n .setNegativeButton(\"Cancel\", null)\n .setPositiveButton(\"Delete\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialogInterface, int which) {\n /// Remove all recipes from database\n db.deleteAll();\n recipes.clear();\n adapter.notifyDataSetChanged();\n }\n })\n .setIcon(R.drawable.ic_dialog_alert)\n .show();\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\thid();\n\t\t\t\tDelOnlineShelf del = null;\n\t\t\t\tint optionType = JOptionPane.YES_NO_OPTION; // ��ť����\n\t\t\t\tint messageType = JOptionPane.WARNING_MESSAGE; // ͼ������\n\t\t\t\tint result = JOptionPane.showConfirmDialog(null,\"删除选中书架将清空书架内书籍,是否确认删除?\", \"消息\", optionType, messageType);\n\t\t\t\tif(result==JOptionPane.YES_OPTION)\n\t\t\t\t{\n\t\t\t\t\tdel=new DelOnlineShelf(nodeText);\n\t\t\t\t}\n\t\t\t}", "void deleteNotes(ActionEvent event){\n cm.hide();\n Alert alert = new Alert(Alert.AlertType.NONE, \"Delete notes for \"+this.podcast.getTitle()+\"?\", ButtonType.YES, ButtonType.NO, ButtonType.CANCEL);\n alert.showAndWait();\n\n if(alert.getResult() == ButtonType.YES){\n if(model.DEBUG)\n System.err.println(\"[LibCell] Deleting \"+this.podcast.getTitle()+\"\\'s notes\");\n\n this.podcast.setNotes(Main.model.DEFAULT_NOTES);\n } else {\n alert.hide();\n }\n\n }", "public void buttonDelete(ActionEvent event) {\n\t\tObservableList<Player> allProduct, SinglePlayer;\n\t\tallProduct = tableview.getItems();\n\t\tSinglePlayer = tableview.getSelectionModel().getSelectedItems();\n\t\tSinglePlayer.forEach(allProduct::remove);\n\t}", "@Override\n\tpublic void delete(String id) {\n\t\tString query=\"Delete from Book Where id='\"+id+\"'\";\n\t\texecuteQuery(query);\n\t\tnotifyAllObservers();\n\t\t\n\t}", "public void buttonDelete(View view) {\n\n AlertDialog.Builder builder = new AlertDialog.Builder(UserEditActivity.this);\n builder.setMessage(R.string.text_delete_confirmation)\n .setTitle(R.string.text_attention_title)\n .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // Delete the record confirmed\n deleteRecord();\n }\n })\n .setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n return;\n }\n });\n AlertDialog dialog = builder.create();\n dialog.show();\n }", "private void deleteButtonActionPerformed() {//GEN-FIRST:event_deleteButtonActionPerformed\r\n if (this.fileList.getSelectedIndex() >= 0) {\r\n this.controller.OnDeletePhoto(listFiles.get(fileList.getSelectedIndex()));\r\n } else {\r\n this.ShowErrorMessage(\"No file selected to delete\");\r\n }\r\n }", "@FXML\n public void handleDeleteButton(ActionEvent event) {\n if (cList.getItems().size() == 0) {\n alert(\"Error\", \"Invalid selection.\", \"The list is already empty.\");\n return;\n }\n\n String s = (String) cList.getSelectionModel().getSelectedItem();\n\n if (cList.getSelectionModel().getSelectedIndex() == -1) {\n alert(\"Error\", \"Invalid selection.\", \"Please select an item to delete.\");\n return;\n }\n\n String parts[] = s.split(\"=\");\n Tag delete = null;\n for (Tag t : tags) {\n if (t.getType().equals(parts[0]) && t.getValue().equals(parts[1])) {\n obsList.remove(s);\n }\n }\n tags.remove(delete);\n cList.setItems(obsList);\n\n\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tdelete();\n\t\t\t}", "public void pressOnDeleteBtn() {\n Network.sendMsg(\n new FileDeleteRequest(\n serverFilesList.getSelectionModel().getSelectedItem()));\n }", "public static EventHandler<MouseEvent> handelDelete(Book b, Label message, BorderPane border, Librarian librarian){\n return new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent event) {\n deleteBook(b, message, border, librarian);\n }\n };\n }" ]
[ "0.83142185", "0.8123056", "0.80699754", "0.80455554", "0.7651962", "0.75891197", "0.7522042", "0.74065024", "0.7380345", "0.73533255", "0.7275375", "0.71421254", "0.7074106", "0.7067625", "0.70561284", "0.69928914", "0.69362915", "0.6912459", "0.6906882", "0.686503", "0.68588215", "0.6852428", "0.6843461", "0.68306917", "0.6809341", "0.6789371", "0.6778471", "0.6738342", "0.6703391", "0.66704476", "0.6669606", "0.6666285", "0.66661733", "0.6646182", "0.6631324", "0.66282254", "0.66230386", "0.6574178", "0.6571107", "0.6571099", "0.6563742", "0.6553657", "0.65453446", "0.654277", "0.653894", "0.65303475", "0.6517892", "0.65116453", "0.64983445", "0.64927167", "0.6476762", "0.6475186", "0.64647496", "0.6454336", "0.6450721", "0.6448625", "0.64456385", "0.6439652", "0.6437151", "0.6431094", "0.6425087", "0.6418428", "0.64103544", "0.64085126", "0.6398921", "0.639087", "0.6389045", "0.6385861", "0.63762057", "0.6372696", "0.6364182", "0.63578993", "0.6353828", "0.6351229", "0.6342155", "0.6339893", "0.6335148", "0.63339263", "0.6330938", "0.63281375", "0.63280594", "0.63159543", "0.6308888", "0.6305271", "0.629677", "0.6291591", "0.6284099", "0.6281415", "0.62791115", "0.62778836", "0.62760824", "0.6274881", "0.62690175", "0.6266537", "0.6261208", "0.6248592", "0.6238224", "0.6225625", "0.62229514" ]
0.7284669
11
User clicked the "Cancel" button, so dismiss the dialog and continue editing the book.
public void onClick(DialogInterface dialog, int id) { if (dialog != null) { dialog.dismiss(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void cancel(){\n if(isFormEmpty()){\n finish();\n }else{\n // Confirmation dialog\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n builder.setTitle(getString(R.string.cancel_booking_creation_confirmation));\n // When users confirms dialog, end activity\n builder.setPositiveButton(android.R.string.ok, (dialog, which) -> {\n finish();\n });\n\n // Do nothing if cancel\n builder.setNegativeButton(android.R.string.cancel, null);\n\n AlertDialog dialog = builder.create();\n dialog.show();\n\n // Change button colors\n Button positiveButton = dialog.getButton(AlertDialog.BUTTON_POSITIVE);\n positiveButton.setTextColor(getColor(R.color.colorPrimary));\n Button negativeButton = dialog.getButton(AlertDialog.BUTTON_NEGATIVE);\n negativeButton.setTextColor(getColor(R.color.colorPrimary));\n }\n }", "private void onCancelEditing() {\n setResponsePage(responsePage);\n }", "@Override\n public void onCancel(DialogInterface dialog) {\n cancel(true);\n }", "@Override\n public void onCancel(DialogInterface arg0) {\n\n }", "public void handleCancel() {\n\t\tdialogStage.close();\n\t}", "public void cancelDialog() {dispose();}", "@Override\n\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\t\t\tcancel(true);\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}", "public void onCancelButtonClick() {\n close();\n }", "@Override\n\tpublic void onCancel(DialogInterface arg0) {\n\t\t\n\t}", "public void onCancelClicked(View view) {\n\n if(mEditMode){\n //remove the item from database\n getContentResolver().delete(SavingsContentProvider.CONTENT_URI, SavingsItemEntry._ID + \"=\" + mSavingsBean.getId(), null);\n Log.d(Constants.LOG_TAG, \"Edit Mode, delete existing savings item:\");\n Log.d(Constants.LOG_TAG, mSavingsBean.toString());\n //Go back to Dashboard\n Utils.gotoDashBoard(this);\n finish();\n }else{\n finish();\n }\n }", "@Override\r\n\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\r\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\t\t}", "void cancelButton_actionPerformed(ActionEvent e)\n\t{\n\t\tcloseDlg();\n }", "private void btnCancelActionPerformed(java.awt.event.ActionEvent evt) {\r\n if (dataChanged) {\r\n /* Ask for confirmation by the user to save the information entered\r\n * in the database */\r\n int resultConfirm = CoeusOptionPane.showQuestionDialog(\r\n coeusMessageResources.parseMessageKey(\r\n \"saveConfirmCode.1002\"),\r\n CoeusOptionPane.OPTION_YES_NO_CANCEL,\r\n CoeusOptionPane.DEFAULT_YES);\r\n if (resultConfirm == 0) {\r\n try {\r\n saveRolodexInfo();\r\n }catch(Exception e){\r\n releaseUpdateLock();\r\n CoeusOptionPane.showErrorDialog(e.getMessage());\r\n }\r\n }else if (resultConfirm == 1) {\r\n dataSaved = false;\r\n releaseUpdateLock();\r\n dlgWindow.dispose();\r\n }else {\r\n return;\r\n }\r\n }else{\r\n releaseUpdateLock();\r\n dlgWindow.dispose();\r\n }\r\n }", "@Override\n\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\n\t\t}", "@Override\n public void onCancel(DialogInterface dialog) {\n }", "public void handleCancelButton(ActionEvent e) {\n\t\tclose();\n\t}", "@Override\n\t\t\t\t\t\tpublic void doCancel() {\n\t\t\t\t\t\t\tcommonDialog.dismiss();\n\t\t\t\t\t\t}", "@Override\r\n\tpublic void dialogControyCancel() {\n\r\n\t}", "public void cancel() { Common.exitWindow(cancelBtn); }", "public void onCancelClicked() {\n close();\n }", "public void onCancelClick()\r\n {\r\n\r\n }", "@Override\n public void onBackPressed() {\n if (!bookHasChanged) {\n super.onBackPressed();\n return;\n }\n\n DialogInterface.OnClickListener discardButtonClickListener = new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n finish();\n }\n };\n\n showUnsavedChangesDialog(discardButtonClickListener);\n }", "@Override\n\t\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t}", "private void showCancelEditDialog() {\n AppDialog dialog = new AppDialog();\n Bundle args = new Bundle();\n args.putInt(AppDialog.DIALOG_ID, DIALOG_ID_CANCEL_EDIT);\n args.putString(AppDialog.DIALOG_TITLE, \"Quit?\");\n args.putString(AppDialog.DIALOG_MESSAGE, getString(R.string.cancelEditDiag_message));\n args.putInt(AppDialog.DIALOG_POSITIVE_RID, R.string.cancelEditDiag_positive_caption);\n args.putInt(AppDialog.DIALOG_NEGATIVE_RID, R.string.cancelEditDiag_negative_caption);\n dialog.setArguments(args);\n dialog.show(fragmentManager, null);\n }", "private void dataReservationTypeCancelHandle() {\n reservationController.dialogStage.close();\r\n }", "private void cancel(){\n\t\tSPSSDialog.instance = null;\n\t\thide();\n\t}", "@Override\n public void OnCancelButtonPressed() {\n }", "private void onCancelButtonPressed() {\r\n disposeDialogAndCreateNewGame(); // Reset board,\r\n game.setCanPlaceMarks(false); // But don't start a new game.\r\n }", "@FXML\n\tprivate void handleCancel() {\n\t\tdialogStage.close();\n\t\t\n\t\tif (acknowledgment.getANumber() == null) {\n\t\t\tmain.getDbHelper().deleteAcknowledgment(acknowledgment);\n\t\t}\n\t\t\n\t\tmain.getAcknowledgmentData().clear();\n\t\tmain.getAcknowledgmentData().addAll(main.getDbHelper().retrieveAcknowledgmentList());\n\t}", "@Override\n public void OnCancelButtonPressed() {\n }", "@Override\n public void onClick(View v)\n {\n begindialog.cancel();\n }", "@Override\n\t\t\t\tpublic void confirm() {\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}", "void onCancelClicked();", "@FXML\n\tprivate void handleCancel() {\n\t\tdialogStage.close();\n\t}", "@FXML\n\tprivate void handleCancel() {\n\t\tdialogStage.close();\n\t}", "@FXML\n\tprivate void handleCancel() {\n\t\tdialogStage.close();\n\t}", "@FXML\n\tprivate void handleCancel() {\n\t\tdialogStage.close();\n\t}", "@Override\r\n\tpublic void onCancel(DialogInterface dialog) {\n\r\n\t}", "public void onClickCancel()\n\t{\n\t\tsetVisible(false);\n\t\tdispose();\t\n\t}", "@Override\n public void onCancel(DialogInterface dialog) {\n\n }", "void onCancelButtonPressed();", "@Override\r\n\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\tUpdateActivity.this.finish();\r\n\t\t\t}", "@Override\n public void onClick(DialogInterface dialog,\n int which)\n {\n dialog.cancel();\n }", "@Override\n public void onCancel(DialogInterface dialog) {\n finish();\n }", "@FXML\r\n\tprivate void handleCancel() {\r\n\t\tdialogStage.close();\r\n\t}", "@Override\n public void onClick(DialogInterface dialog,\n int which)\n {\n dialog.cancel();\n }", "@FXML private void handleCancel() {\r\n\t\tvastaus = null;\r\n\t\tModalController.closeStage(textVastaus);\r\n\t}", "@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void onClick(\r\n\t\t\t\t\t\t\t\t\t\t\t\tDialogInterface dialog,\r\n\t\t\t\t\t\t\t\t\t\t\t\tint which) {\n\t\t\t\t\t\t\t\t\t\t\tdialog.cancel();\r\n\t\t\t\t\t\t\t\t\t\t}", "@Override\n public void onCancel(DialogInterface dialog) {\n Log.v(LOG_TAG, \"onCancel\");\n dismiss();\n }", "@FXML\r\n private void handleCancel() {\r\n dialogStage.close();\r\n }", "@FXML\r\n private void handleCancel() {\r\n dialogStage.close();\r\n }", "@FXML\r\n private void handleCancel() {\r\n dialogStage.close();\r\n }", "@FXML\r\n private void handleCancel() {\r\n dialogStage.close();\r\n }", "private void actionCancel() {\n\t\tselectedDownload.cancel();\n\t\tupdateButtons();\n\t}", "@Action\n public void acCancel() {\n setChangeObj(false);\n }", "@Action\n public void acCancel() {\n setChangeObj(false);\n }", "@Override\n public void onClick(DialogInterface dialog,\n int which) {\n dialog.cancel();\n }", "@Override\r\n public void onCancel(DialogInterface dialogInterface) {\n finish();\r\n }", "@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t}", "@Override\n public void onBackPressed() {\n if (!bookHasChanged) {\n super.onBackPressed();\n return;\n }\n\n // Otherwise if there are unsaved changes, setup a dialog to warn the user.\n // Create a click listener to handle the user confirming that changes should be discarded.\n DialogInterface.OnClickListener discardButtonClickListener =\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Discard\" button, exit the current activity.\n finish();\n }\n };\n\n // Show dialog that there are unsaved changes\n showUnsavedChangesDialog(discardButtonClickListener);\n }", "@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\n\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\n\t\t\t\t\tfinish();\n\t\t\t\t}", "@Override\n public void onClick(DialogInterface dialog, int arg1) {\n\t\t\t\t\t\t\t\tdialog.cancel();\n }", "@Override\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t\t}", "@Override\r\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\r\n\r\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }", "public void onCancelPressed(View view) {\n finish();\n }", "@FXML\r\n void actionCancelButton(ActionEvent event) throws IOException {\r\n\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\r\n alert.setTitle(\"Alert\");\r\n alert.setContentText(\"Do you want to cancel your changes and return to the main screen?\");\r\n Optional<ButtonType> result = alert.showAndWait();\r\n\r\n if (result.isPresent() && result.get() == ButtonType.OK) {\r\n returnToMainScreen(event);\r\n }\r\n }", "@Override\n public void onClick(DialogInterface dialog, int which)\n {\n dialog.cancel();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }", "public void onClick(DialogInterface dialog, int id) {\n deleteBook();\n finish();\n }", "public void tryCancel() throws Exception {\r\n\t\tif (! _displayOnly && isDataModified()) {\r\n\t\t\tscrollToMe();\r\n if (getValidator().getUseAlertsForErrors()) {\r\n addConfirmScript(_okToCancelQuestion, _okToCancelValue);\r\n }\r\n else {\r\n _validator.setErrorMessage(_okToCancelQuestion, null, -1, _okToCancel);\r\n }\r\n\t\t}\r\n else {\r\n\t\t\tdoCancel();\r\n }\r\n\t}", "@FXML\n private void handleCancel() {\n dialogStage.close();\n }", "@FXML\n private void handleCancel() {\n dialogStage.close();\n }", "@FXML\n private void handleCancel() {\n dialogStage.close();\n }", "private void cancelButtonActionPerformed(ActionEvent e) {\n }", "@Override\n\t\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t\t\t}", "void cancelButton_actionPerformed(ActionEvent e) {\n setUserAction(CANCELLED);\n setVisible(false);\n }", "private void jCancelBookingActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCancelBookingActionPerformed\n if(bookingNr != -1)\n bm.cancel(bookingNr);\n \n \n }", "private void cancel(ActionEvent e){\r\n // Clear textfields\r\n clearFields();\r\n // If coming from appt management screen, go back there\r\n if (fromAppt){\r\n goToManageApptScreen();\r\n }\r\n // Otherwise, set the current client to null and go to the landing page \r\n else {\r\n currClient = null;\r\n LandingPage.returnToLandingPage();\r\n }\r\n }", "public void onCancelPressed(View v) {\n finish();\n }", "public void onCancel(DialogInterface arg0) {\n mRemovePosition = -1;\n mRemoveConfirmDialog = null;\n }", "@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which)\n\t\t\t{\n\t\t\t\tdialog.cancel();\n\t\t\t}", "public void cancel() throws Exception {\n\t\tgetControl(\"cancelButton\").click();\n\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }", "@Override\n public void onClick(DialogInterface dialog, int whichButton) {\n \tdialog.cancel(); //Close this dialog box\n }", "@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.cancel();\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.cancel();\n\t\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.cancel();\n\t\t\t\t\t}", "@Override\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n }", "private void cancel() {\n setResult(RESULT_CANCELED, null);\n dbHelper.rollback();\n finish();\n }", "@Override\n public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n finish();\n }", "@Override\r\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.cancel();\r\n\t\t\t\t\t}", "@FXML\n\tprivate void handleCancel(){\n\t\tdialogStage.close();\n\t}", "public void onClick(DialogInterface dialog, int id) {\n dialog.cancel();\n Toast.makeText(getApplicationContext(),\"You Don't want to restore\",\n Toast.LENGTH_SHORT).show();\n }" ]
[ "0.72093266", "0.7158121", "0.7117079", "0.7026837", "0.7006901", "0.7005099", "0.7000542", "0.6990905", "0.69746506", "0.69726294", "0.69696903", "0.6965519", "0.6945606", "0.6924192", "0.6902754", "0.6899862", "0.68987507", "0.687996", "0.6852252", "0.68516105", "0.68317497", "0.68291783", "0.68213254", "0.68210423", "0.6806986", "0.6781132", "0.67732847", "0.676836", "0.6765031", "0.67587364", "0.67528003", "0.67470515", "0.6744032", "0.67347044", "0.6733242", "0.6733242", "0.6733242", "0.6733242", "0.6730423", "0.6729659", "0.6723278", "0.6714193", "0.6699516", "0.6674964", "0.6669156", "0.6648146", "0.66279113", "0.6619537", "0.6591189", "0.6591097", "0.65818757", "0.65818757", "0.65818757", "0.65818757", "0.6581406", "0.6578821", "0.6578821", "0.65783644", "0.65706736", "0.65659827", "0.65659827", "0.65659827", "0.6557874", "0.6557338", "0.65570176", "0.6552217", "0.65435565", "0.65433836", "0.65411305", "0.6541087", "0.65404785", "0.6539133", "0.65381676", "0.6537528", "0.65353405", "0.65353405", "0.65353405", "0.65311027", "0.65290266", "0.6528067", "0.65257406", "0.6522039", "0.6515475", "0.6511919", "0.6509097", "0.65087235", "0.65006167", "0.65006167", "0.65006167", "0.65006167", "0.65006167", "0.649622", "0.64931655", "0.64931655", "0.64864075", "0.64834964", "0.6481411", "0.64798224", "0.64725816", "0.6438842", "0.643748" ]
0.0
-1
Created by robertoveigajunior on 19/11/16.
public interface CarroAPI { @GET("/carros/tipo/{tipo}") Call<List<Carro>> findBy(@Path("tipo") String tipo); }
{ "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}", "@Override\n\tpublic void entrenar() {\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\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\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\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public final void mo51373a() {\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@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}", "private void poetries() {\n\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n void init() {\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@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 inizializza() {\n\n super.inizializza();\n }", "@Override\n protected void getExras() {\n }", "@Override\n public void init() {}", "@Override\n protected void init() {\n }", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "public void mo38117a() {\n }", "private void init() {\n\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\n public void initialize() { \n }", "@Override\n public void memoria() {\n \n }", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "private void m50366E() {\n }", "@Override\n public void init() {\n\n super.init();\n\n }", "@Override\n public void init() {\n }", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "private void kk12() {\n\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "Petunia() {\r\n\t\t}", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}" ]
[ "0.6268754", "0.6144022", "0.6135807", "0.60431516", "0.5991209", "0.5991209", "0.5982954", "0.59575915", "0.5936696", "0.59181", "0.58989334", "0.58888113", "0.5888661", "0.58883715", "0.5886441", "0.5885706", "0.5882954", "0.5838204", "0.5797215", "0.5797215", "0.5797215", "0.5797215", "0.5797215", "0.57907856", "0.57744277", "0.57689196", "0.57689196", "0.5764718", "0.5748391", "0.57478595", "0.5732121", "0.57270193", "0.57260096", "0.57180005", "0.57121396", "0.57121396", "0.57117504", "0.5709431", "0.56989497", "0.5677991", "0.56660515", "0.56644297", "0.56644297", "0.56644297", "0.56644297", "0.56644297", "0.56644297", "0.5655662", "0.5655662", "0.56539047", "0.56539047", "0.56539047", "0.5652151", "0.5652151", "0.5652151", "0.564783", "0.5640632", "0.56402975", "0.56367517", "0.56332004", "0.5629724", "0.5627825", "0.5614291", "0.5614291", "0.5614291", "0.560771", "0.5604379", "0.55934334", "0.55926996", "0.5581213", "0.55785805", "0.5573704", "0.55718744", "0.5568354", "0.5567192", "0.5560556", "0.555959", "0.5555339", "0.5533926", "0.55295527", "0.5520226", "0.5517994", "0.5505295", "0.5505295", "0.5494652", "0.5493245", "0.54623723", "0.545389", "0.54536456", "0.5453006", "0.5453006", "0.5440048", "0.5436375", "0.5435897", "0.54321027", "0.54299295", "0.5421371", "0.54157984", "0.54136574", "0.54120904", "0.5410927" ]
0.0
-1
Telemetry is the root type for all pieces of telemetry data.
public interface Telemetry {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void outputTelemetry() {\n }", "public org.auvua.utils.protobuffer.AUVprotocol.AUVState.TelemetryOrBuilder getTelemetryOrBuilder() {\n return telemetry_;\n }", "public org.auvua.utils.protobuffer.AUVprotocol.AUVState.Telemetry getTelemetry() {\n return telemetry_;\n }", "org.auvua.utils.protobuffer.AUVprotocol.AUVState.Telemetry getTelemetry();", "public boolean hasTelemetry() {\n return ((bitField0_ & 0x00000010) == 0x00000010);\n }", "public boolean hasTelemetry() {\n return ((bitField0_ & 0x00000010) == 0x00000010);\n }", "org.auvua.utils.protobuffer.AUVprotocol.AUVState.TelemetryOrBuilder getTelemetryOrBuilder();", "public org.auvua.utils.protobuffer.AUVprotocol.AUVState.TelemetryOrBuilder getTelemetryOrBuilder() {\n if (telemetryBuilder_ != null) {\n return telemetryBuilder_.getMessageOrBuilder();\n } else {\n return telemetry_;\n }\n }", "public org.auvua.utils.protobuffer.AUVprotocol.AUVState.Telemetry getTelemetry() {\n if (telemetryBuilder_ == null) {\n return telemetry_;\n } else {\n return telemetryBuilder_.getMessage();\n }\n }", "boolean hasTelemetry();", "void composeTelemetry() {\n telemetry.addAction(new Runnable() {\n @Override\n public void run() {\n // Acquiring the angles is relatively expensive; we don't want\n // to do that in each of the three items that need that info, as that's\n // three times the necessary expense.\n angles = imu.getAngularOrientation().toAxesReference(AxesReference.INTRINSIC).toAxesOrder(AxesOrder.ZYX);\n gravity = imu.getGravity();\n }\n });\n\n telemetry.addLine()\n .addData(\"status\", new Func<String>() {\n @Override public String value() {\n return imu.getSystemStatus().toShortString();\n }\n })\n .addData(\"calib\", new Func<String>() {\n @Override\n public String value() {\n return imu.getCalibrationStatus().toString();\n }\n });\n\n telemetry.addLine()\n .addData(\"headingCorrectorLeft \", new Func<String>() {\n @Override public String value() {\n return formatDouble(headingCorrectorLeft);\n }\n })\n .addData(\"headingCorrectorRight \", new Func<String>() {\n @Override\n public String value() {\n return formatDouble(headingCorrectorRight);\n }\n });\n telemetry.addLine()\n .addData(\"currentHeading \", new Func<String>() {\n @Override public String value() {\n return formatDouble(currentHeading);\n }\n })\n .addData(\"diffFromStartHeading \", new Func<String>() {\n @Override\n public String value() {\n return formatDouble(diffFromStartHeading);\n }\n });\n telemetry.addLine()\n .addData(\"heading\", new Func<String>() {\n @Override\n public String value() {\n return formatAngle(angles.angleUnit, angles.firstAngle);\n }\n })\n .addData(\"roll\", new Func<String>() {\n @Override public String value() {\n return formatAngle(angles.angleUnit, angles.secondAngle);\n }\n })\n .addData(\"pitch\", new Func<String>() {\n @Override public String value() {\n return formatAngle(angles.angleUnit, angles.thirdAngle);\n }\n });\n telemetry.addLine()\n .addData(\"Light1 Raw\", new Func<String>() {\n @Override public String value() {\n return formatDouble(lightSensor1.getRawLightDetected());\n }\n })\n .addData(\"Normal\", new Func<String>() {\n @Override public String value() {\n return formatDouble(lightSensor1.getLightDetected());\n }\n });\n telemetry.addLine()\n .addData(\"Motor Power Left1\", new Func<String>() {\n @Override public String value() {\n return formatDegrees(motorLeft1Power);\n }\n })\n .addData(\"Left2\", new Func<String>() {\n @Override\n public String value() {\n return formatDouble(motorLeft2Power);\n }\n })\n .addData(\"Right1\", new Func<String>() {\n @Override\n public String value() {\n return formatDouble(motorRight1Power);\n }\n })\n .addData(\"Right2\", new Func<String>() {\n @Override\n public String value() {\n return formatDouble(motorRight2Power);\n }\n });\n telemetry.addLine()\n .addData(\"Position Left\", new Func<String>() {\n @Override\n public String value() {\n return formatDouble(positionLeft);\n }\n })\n .addData(\"Right\", new Func<String>() {\n @Override public String value() {\n return formatDouble(positionRight);\n }\n });\n telemetry.addLine()\n .addData(\"Control Count\", new Func<String>() {\n @Override public String value() {\n return formatDouble(count);\n }\n });\n telemetry.addLine()\n .addData(\"currentState\", new Func<String>() {\n @Override\n public String value() {\n return currentState.name();\n }\n });\n telemetry.addLine()\n .addData(\"nextState\", new Func<String>() {\n @Override\n public String value() {\n return nextState.name();\n }\n });\n }", "private void sendTelemetry(HttpRecordable recordable) {\n }", "Properties defaultTelemetryConfig();", "public abstract MetricDataType getType();", "protected boolean isTelemetryEnabled() {\n if(!this.telemetryEnabled){\n InternalLogging.warn(TAG, \"Could not track telemetry item, because telemetry \" +\n \"feature is disabled.\");\n }\n return this.telemetryEnabled;\n }", "protected void updateTelemetry(){\n telemetry.addData(\"Runtime\", this.getRuntime());\n Robot.outputToTelemetry(this);\n telemetry.update();\n }", "public List<String> getTelemetryList() {\n List<String> telemetryList = new ArrayList<String>();\n if (this.getTelemetrys().isEmpty()) {\n TelemetryClient client = ProjectBrowserSession.get().getTelemetryClient();\n try {\n for (TelemetryChartRef chartRef : client.getChartIndex().getTelemetryChartRef()) {\n getTelemetrys().put(chartRef.getName(), client.getChartDefinition(chartRef.getName()));\n }\n }\n catch (TelemetryClientException e) {\n this.feedback = \"Exception when retrieving Telemetry chart definition: \" + e.getMessage();\n }\n }\n telemetryList.addAll(this.getTelemetrys().keySet());\n Collections.sort(telemetryList);\n return telemetryList;\n }", "private TelemetryMessageHandler(){\n super();\n messageList = new TelemetryMessageList();\n telemetryArrivalMap = new TelemetryArrivalMap();\n }", "private void composeAngleTelemetry(){\n telemetry.addData(\"Start Angle\", startAngles.firstAngle);\n telemetry.addData(\"Current Angle\", angles.firstAngle);\n telemetry.addData(\"Global Angle\", globalAngle);\n }", "public String getType()\r\n/* 11: */ {\r\n/* 12:10 */ return \"extrautils:slope\";\r\n/* 13: */ }", "public Builder clearTelemetry() {\n if (telemetryBuilder_ == null) {\n telemetry_ = org.auvua.utils.protobuffer.AUVprotocol.AUVState.Telemetry.getDefaultInstance();\n onChanged();\n } else {\n telemetryBuilder_.clear();\n }\n bitField0_ = (bitField0_ & ~0x00000010);\n return this;\n }", "protected TelemetryClient(boolean telemetryEnabled) {\n this.telemetryEnabled = telemetryEnabled;\n }", "private com.google.protobuf.SingleFieldBuilder<\n org.auvua.utils.protobuffer.AUVprotocol.AUVState.Telemetry, org.auvua.utils.protobuffer.AUVprotocol.AUVState.Telemetry.Builder, org.auvua.utils.protobuffer.AUVprotocol.AUVState.TelemetryOrBuilder> \n getTelemetryFieldBuilder() {\n if (telemetryBuilder_ == null) {\n telemetryBuilder_ = new com.google.protobuf.SingleFieldBuilder<\n org.auvua.utils.protobuffer.AUVprotocol.AUVState.Telemetry, org.auvua.utils.protobuffer.AUVprotocol.AUVState.Telemetry.Builder, org.auvua.utils.protobuffer.AUVprotocol.AUVState.TelemetryOrBuilder>(\n telemetry_,\n getParentForChildren(),\n isClean());\n telemetry_ = null;\n }\n return telemetryBuilder_;\n }", "public Builder setTelemetry(org.auvua.utils.protobuffer.AUVprotocol.AUVState.Telemetry value) {\n if (telemetryBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n telemetry_ = value;\n onChanged();\n } else {\n telemetryBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000010;\n return this;\n }", "@Override\n\tpublic Counter getMetricsTimeSeriesCounter() {\n\t\treturn null;\n\t}", "KafkaMetricMeterType() {\n }", "@Override\n public Class<PgStatGetWalSendersRecord> getRecordType() {\n return PgStatGetWalSendersRecord.class;\n }", "@Override\n\tpublic DataType dataType() {\n\n\t\treturn new StructType().\n\t\t\t\t// add(\"device_distr\",\n\t\t\t\t// DataTypes.createArrayType(DataTypes.createMapType(DataTypes.StringType,\n\t\t\t\t// DataTypes.FloatType, true)))\n\t\tadd(\"device_distribution\", DataTypes.StringType).add(\"time_spent\", DataTypes.LongType).add(\"video_start\",\n\t\t\t\tDataTypes.LongType);\n\n\t}", "public static Metrics root() {\n return ROOT;\n }", "@Override\n public void robotPeriodic() {\n putTelemetry();\n }", "public String getTrafficType() {\n return this.trafficType;\n }", "@Override\n\tpublic Serializable[] getData() {\n\t Double light = 0.0, temperature = 0.0;\n\t int packetType = 0;\n\t \n\t light = ((int) (Math.random() * 10000)) / 10.0;\n\t temperature = ((int) (Math.random() * 1000)) / 10.0;\n\t packetType = 2;\n\t\treturn new Serializable[] { packetType, temperature, light };\n\t}", "public TracerClassInstrumentation() {\n this(\"datadog.trace.api.Trace\", Collections.singleton(\"noop\"));\n }", "public WaterMeter()\r\n\t{\r\n\t\tsuper(DeviceTypeEnum.WATER_METER);\r\n\t}", "public MonitoredData() {}", "public ActuatorData()\n\t{\n\t\tsuper(); \n\t}", "@Override\n public byte getType() {\n return TYPE_DATA;\n }", "@Override\n public Optional<TypeContext<Reference>> typeContext() {\n return wrappedSerializationContext.typeContext();\n }", "public void logSensorData () {\n\t}", "@SuppressWarnings(\"restriction\")\npublic interface Meter {\n\n Collection<? extends Metric<?>> supportedMetrics();\n\n Collection<? extends Measure<?>> measureData(MonitoredVm vm);\n}", "@Override\n public Class<StatsRecord> getRecordType() {\n return StatsRecord.class;\n }", "public Builder mergeTelemetry(org.auvua.utils.protobuffer.AUVprotocol.AUVState.Telemetry value) {\n if (telemetryBuilder_ == null) {\n if (((bitField0_ & 0x00000010) == 0x00000010) &&\n telemetry_ != org.auvua.utils.protobuffer.AUVprotocol.AUVState.Telemetry.getDefaultInstance()) {\n telemetry_ =\n org.auvua.utils.protobuffer.AUVprotocol.AUVState.Telemetry.newBuilder(telemetry_).mergeFrom(value).buildPartial();\n } else {\n telemetry_ = value;\n }\n onChanged();\n } else {\n telemetryBuilder_.mergeFrom(value);\n }\n bitField0_ |= 0x00000010;\n return this;\n }", "public org.auvua.utils.protobuffer.AUVprotocol.AUVState.Telemetry.Builder getTelemetryBuilder() {\n bitField0_ |= 0x00000010;\n onChanged();\n return getTelemetryFieldBuilder().getBuilder();\n }", "public String getElementType()\n {\n return elementType;\n }", "@Override\n\tpublic void addInstrumentType(String type) {\n\t\t\n\t}", "private AzureDataLakeStoreDatasetTypeProperties innerTypeProperties() {\n return this.innerTypeProperties;\n }", "public RainCollectorSensor() {\r\n\t\trecalibrateData();\r\n\t\tmetric = true; \r\n\t}", "public TypesAxis() {\r\n\t\tsuper(AxisTypes.class);\r\n\t}", "public void analyseRoot(Resource root) {\n\t\tserTypes.put(root, new SerialziationTypeRefs());\r\n\t}", "@Override\n public LoggingObjectType getObjectType() {\n return LoggingObjectType.WORKFLOW;\n }", "protected void createTelemetryMetadata(SpaceSystemType spaceSystem)\n {\n spaceSystem.setTelemetryMetaData(factory.createTelemetryMetaDataType());\n }", "@Override\n public OpStatsData toOpStatsData() {\n return null;\n }", "@Override\n\tpublic int getType() {\n\t\treturn 1;\n\t}", "public final String getTopLevelType() {\n return this.type;\n }", "public Sensor() {\n if(this.rawData == null)\n this.rawData = new Vector<SensorData>();\n }", "public String getDataType() {\r\n return dataType;\r\n }", "@Override\n public byte getType() {\n return TYPE_MONETARY_SYSTEM;\n }", "@Override\n public int getType() {\n return R.id.root;\n }", "@Override\n public Class<WebhookTriggerSeriesRecord> getRecordType() {\n return WebhookTriggerSeriesRecord.class;\n }", "public String getDataType() {\n return dataType;\n }", "protected byte[] getMeasuredFloorTemperature() {return null;}", "@Override\n public Class<XmlReportKloezelRecord> getRecordType() {\n return XmlReportKloezelRecord.class;\n }", "public Integer getSensorType() {\n return sensorType;\n }", "private static void initialize_sensorTypeToWrapperDataFormat() {\n\t\tsensorTypeToWrapperDataFormat.put(\"weather\", \"XML/JSON\");\n\t\tsensorTypeToWrapperDataFormat.put(\"traffic\", \"XML\");\n\t\tsensorTypeToWrapperDataFormat.put(\"roadactivity\", \"XML\");\n\t\tsensorTypeToWrapperDataFormat.put(\"snowfall\", \"Text\");\n\t\tsensorTypeToWrapperDataFormat.put(\"snowdepth\", \"Text\");\n\t\tsensorTypeToWrapperDataFormat.put(\"webcam\", \"XML\");\n\t\tsensorTypeToWrapperDataFormat.put(\"radar\", \"XML\");\n\t\tsensorTypeToWrapperDataFormat.put(\"satellite\", \"XML\");\n\t\tsensorTypeToWrapperDataFormat.put(\"sealevel\", \"Text\");\n\t\tsensorTypeToWrapperDataFormat.put(\"cosm\", \"XML\");\n\t\tsensorTypeToWrapperDataFormat.put(\"bikehire\", \"XML\");\n\t\tsensorTypeToWrapperDataFormat.put(\"railwaystation\", \"XML\");\n\t\tsensorTypeToWrapperDataFormat.put(\"ADSBHub\", \"Stream\");\n\t}", "public DataBufferType getType()\r\n {\r\n return type;\r\n }", "@Override\r\n \tpublic int getElementType() {\r\n \t\treturn 0; \r\n \t}", "public RxTxMonitoringMsg(byte[] data) {\n super(data);\n amTypeSet(AM_TYPE);\n }", "@Override\n\tpublic Class<? extends IResource> getResourceType() {\n\t\treturn DiagnosticReport.class;\n\t}", "@Override\n public Class<AnalysisRecord> getRecordType() {\n return AnalysisRecord.class;\n }", "public SensorData() {\n\n\t}", "public String getInstrumentType() {\n return instrumentType;\n }", "public CalculatedPerformanceIndicators()\n {\n super();\n // TODO Auto-generated constructor stub\n }", "@Override\n public Class<EventOdpsStatRecord> getRecordType() {\n return EventOdpsStatRecord.class;\n }", "@Override public Type type() {\n return type;\n }", "public interface IMeter {\n\n String getName();\n\n String getType();\n}", "public BaseStatistics() {\n\t\tsuper();\n\t}", "@Override\r\n\tpublic String getType() {\n\t\treturn type;\r\n\t}", "public interface Trace\n extends Annotation\n{\n\n public static final String NULL = \"\";\n\n public abstract MetricCategory category();\n\n public abstract String metricName();\n\n public abstract boolean skipTransactionTrace();\n}", "public String trackingType() {\n return this.trackingType;\n }", "public DataType getType() {\n return type;\n }", "@Override\r\n\tpublic String getType() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String getType() {\n\t\treturn null;\r\n\t}", "@Override\n public void flatMap(MetricTrends t, Collector<Tuple8<String, String, String, String, String, Integer, Integer,String>> out) throws Exception {\n // if(t.getGroup().equals(\"Group_1\") && t.getService().equals(\"Service_1B\") && t.getEndpoint().equals(\"Hostname_4\") && t.getMetric().equals(\"Metric_B\")){\n int criticalstatus = this.opsMgr.getIntStatus(\"CRITICAL\");\n int warningstatus = this.opsMgr.getIntStatus(\"WARNING\");\n int unknownstatus = this.opsMgr.getIntStatus(\"UNKNOWN\");\n\n Timeline timeline = t.getTimeline();\n TimelineIntegrator timelineIntegrator = new TimelineIntegrator();\n int[] criticalstatusInfo = timelineIntegrator.countStatusAppearances(timeline.getSamples(), criticalstatus);\n int[] warningstatusInfo = timelineIntegrator.countStatusAppearances(timeline.getSamples(), warningstatus);\n int[] unknownstatusInfo = timelineIntegrator.countStatusAppearances(timeline.getSamples(), unknownstatus);\n\n ArrayList<String> tags = (ArrayList)this.mtagsMgr.getTags(t.getMetric()).clone();\n String tagInfo = \"\";\n for (String tag : tags) {\n if (tags.indexOf(tag) == 0) {\n tagInfo = tagInfo + tag;\n } else {\n tagInfo = tagInfo + \",\" + tag;\n }\n }\n \n Tuple8<String, String, String, String, String, Integer, Integer, String> tupleCritical = new Tuple8< String, String, String, String, String, Integer, Integer, String>(\n t.getGroup(), t.getService(), t.getEndpoint(), t.getMetric(), \"CRITICAL\", criticalstatusInfo[0], criticalstatusInfo[1], tagInfo);\n out.collect(tupleCritical);\n\n Tuple8<String, String, String, String, String, Integer, Integer, String> tupleWarning = new Tuple8< String, String, String, String, String, Integer, Integer, String>(\n t.getGroup(), t.getService(), t.getEndpoint(), t.getMetric(), \"WARNING\", warningstatusInfo[0], warningstatusInfo[1], tagInfo);\n out.collect(tupleWarning);\n\n Tuple8<String, String, String, String, String, Integer, Integer, String> tupleUnknown = new Tuple8< String, String, String, String, String, Integer, Integer, String>(\n t.getGroup(), t.getService(), t.getEndpoint(), t.getMetric(), \"UNKNOWN\", unknownstatusInfo[0], unknownstatusInfo[1], tagInfo);\n\n out.collect(tupleUnknown);\n }", "@Nonnull Class<? extends DataElement> getDataElementType();", "DataPointType createDataPointType();", "@Override\n\tpublic int getDataType()\n\t{\n\t\treturn dataType;\n\t}", "public CWLType getType() {\n return type;\n }", "public abstract MetricTreeNode getRoot();", "private void generateTelemetryForExceptionResponse(\n ProjectCommonException exception, Request request) {\n ProjectLogger.log(exception.getMessage(), exception, generateTelemetryInfoForError());\n // Generate a telemetry event of type API_ACCESS\n generateTelemetry(\n request,\n exception.getMessage(),\n String.valueOf(exception.getResponseCode()),\n TelemetryConstant.LOG_LEVEL_ERROR,\n generateStackTrace(exception.getStackTrace()));\n }", "public StoreProvider() {\n super(null,\n Map.of( Namespaces.GML, \"application/gml+xml\",\n Namespaces.CSW, \"application/vnd.ogc.csw_xml\",\n LegacyNamespaces.CSW, \"application/vnd.ogc.csw_xml\",\n LegacyNamespaces.GMD, \"application/vnd.iso.19139+xml\",\n LegacyNamespaces.GMI, \"application/vnd.iso.19139+xml\",\n LegacyNamespaces.GMI_ALIAS, \"application/vnd.iso.19139+xml\"),\n Map.of(\"MD_Metadata\", \"application/vnd.iso.19139+xml\"));\n // More types to be added in future versions.\n }", "@Override\r\n public double getBaseWeight() { return type.getWeight(); }", "public BasicSensor(Class<T> type, String name) {\n this(type, null, name, name);\n }", "@Override\n public Type getType() {\n return type;\n }", "@Override\n public Type getType() {\n return type;\n }", "public ZiplineLightData() {\n\t\tsamplePoints = new int[SAMPLE_POINTS];\n\t\tArrays.fill(samplePoints, -1);\n\t}", "public interface GaugeDataCollector {\n\n /**\n * Return a collection of @link {MeasurementBundle} objects. Each bundle can have one or more\n * View/Value pairs and zero or more metadata AttachmentKey/String pairs. There a 1:1\n * correspondence between MeasurementBundles returned and instantiation of MeasureMaps (and calls\n * to record).\n *\n * <p>If a class has no attachments to provide, then it's fine to include all samples in a single\n * MeasurementBundle, which will save calls to the metrics backend.\n *\n * @return collection of MeasurementBundles to be recorded.\n */\n Collection<MeasurementBundle> getGaugeData();\n}", "public String getSampleType() {\n return sampleType;\n }", "MetricOuterClass.MetricOrBuilder getMetricTreatmentOrBuilder();", "@Override\n public String getDataType() {\n return getPrimitiveType().name();\n }", "public interface MapVisualizationInfo\r\n{\r\n /**\r\n * Gets the DataTypeInfo for this visualization info.\r\n *\r\n * @return The {@link DataTypeInfo}.\r\n */\r\n DataTypeInfo getDataTypeInfo();\r\n\r\n /**\r\n * Gets the tile level controller.\r\n *\r\n * @return the tile level controller\r\n */\r\n TileLevelController getTileLevelController();\r\n\r\n /**\r\n * Gets the tile render properties for this data type if the type is a\r\n * IMAGE_TILE type image, or null if this type does not support tiles.\r\n *\r\n * @return the tile render properties or null.\r\n */\r\n TileRenderProperties getTileRenderProperties();\r\n\r\n /**\r\n * Gets the default visualization type.\r\n *\r\n * @return the default visualization type\r\n */\r\n MapVisualizationType getVisualizationType();\r\n\r\n /**\r\n * Gets the Z-Order for this Type.\r\n *\r\n * @return the order.\r\n */\r\n int getZOrder();\r\n\r\n /**\r\n * Checks if is image tile type.\r\n *\r\n * @return true, if is image tile type\r\n */\r\n boolean isImageTileType();\r\n\r\n /**\r\n * Checks if is motion imagery type.\r\n *\r\n * @return true, if is motion imagery type\r\n */\r\n boolean isMotionImageryType();\r\n\r\n /**\r\n * Checks if is image type.\r\n *\r\n * @return true, if is image type\r\n */\r\n boolean isImageType();\r\n\r\n /**\r\n * Checks if is z-orderable.\r\n *\r\n * @return true, if is z-orderable\r\n */\r\n boolean isZOrderable();\r\n\r\n /**\r\n * Sets the DataTypeInfo for this visualization info.\r\n *\r\n * @param dti - the {@link DataTypeInfo}\r\n */\r\n void setDataTypeInfo(DataTypeInfo dti);\r\n\r\n /**\r\n * Sets the visualization type. Cannot be null.\r\n *\r\n * @param visType the new visualization type\r\n */\r\n void setVisualizationType(MapVisualizationType visType);\r\n\r\n /**\r\n * Sets the Z-Order for this Type.\r\n *\r\n * @param order - the order\r\n * @param source - the calling object\r\n */\r\n void setZOrder(int order, Object source);\r\n\r\n /**\r\n * True if this DataTypeInfo utilizes {@link MapDataElement}s.\r\n *\r\n * @return true if uses, false if not\r\n */\r\n boolean usesMapDataElements();\r\n\r\n /**\r\n * Returns true if this data type uses visualization styles, false if not.\r\n *\r\n * @return true, if uses visualization styles.\r\n */\r\n boolean usesVisualizationStyles();\r\n}" ]
[ "0.62396115", "0.6066041", "0.60340136", "0.58738685", "0.5790321", "0.57598346", "0.56488305", "0.56116205", "0.55966055", "0.557325", "0.5461472", "0.5422463", "0.5292983", "0.5180698", "0.5138201", "0.5036336", "0.5019793", "0.4934912", "0.48859575", "0.48510867", "0.4743457", "0.47391552", "0.4725219", "0.47001004", "0.46421698", "0.4628469", "0.46052513", "0.4598088", "0.45888945", "0.45760813", "0.4568342", "0.453391", "0.44966334", "0.4494686", "0.44772524", "0.44560996", "0.4453131", "0.4444066", "0.4343491", "0.4341846", "0.433743", "0.43198675", "0.42768386", "0.4268732", "0.42671216", "0.42661136", "0.4263464", "0.42577648", "0.42517716", "0.42261574", "0.4221406", "0.4214812", "0.4212365", "0.42078304", "0.42073593", "0.42002517", "0.42000374", "0.41832086", "0.4179931", "0.41682476", "0.41645044", "0.41633478", "0.4162454", "0.41507643", "0.41494521", "0.4147944", "0.414615", "0.41334328", "0.41239905", "0.41149268", "0.41125435", "0.4109424", "0.41034827", "0.41027886", "0.40996006", "0.40918082", "0.4091447", "0.40902478", "0.40884644", "0.4085972", "0.4080462", "0.4080462", "0.40794945", "0.40786284", "0.40762445", "0.40743703", "0.40716714", "0.40690687", "0.40680322", "0.4067892", "0.40657413", "0.40600598", "0.40514252", "0.40514252", "0.40459928", "0.4045795", "0.40409106", "0.40391853", "0.40380207", "0.40361863" ]
0.575691
6
The background thread must be started for the time to be updated, and this method does just that. This is necessary because the WebContext must be gotten, and this can only be done in the context of a request from a client, so we couldn't have just had a static instance of the thread started from a static initializer, or something like that.
public void startPolling() { if (wContext == null) { wContext = WebContextFactory.get(); } if (t == null) { t = new DateUpdater(); t.setPriority(Thread.MIN_PRIORITY); t.setDaemon(true); t.start(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void run() {\n boolean run = true;\n while (run) {\n try {\n // Update time and \"log\" it.\n d = new Date();\n System.out.println(d);\n // Update all clients.\n String currentPage = wContext.getCurrentPage();\n Collection sessions = wContext.getScriptSessionsByPage(currentPage);\n Util utilAll = new Util(sessions);\n utilAll.setValue(\"divTest\", d.toString(), true);\n // Next update in one second.\n sleep(1000);\n } catch (Exception e) {\n // If anything goes wrong, just end, but also set pointer to this\n // thread to null in parent so it can be restarted.\n run = false;\n t = null;\n }\n }\n }", "private void backgroundExecution() {\n // This moves the time consuming operation to a child thread.\n Thread thread=new Thread(null, doBackgroundThreadProcessing, \"Background\");\n thread.start();\n }", "private void backgroundThreadProcessing() {\n // [ ... Time consuming operations ... ]\n }", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tsuper.run();\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(1000);\r\n\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\t// 获取当前要更新的数据\r\n\t\t\t\tList<Data> updateDataList = createUpdateData(currentPage,\r\n\t\t\t\t\t\tpageSize);\r\n\t\t\t\t// 需要更新的数据加入当前数据集合\r\n\t\t\t\tonLoadComplete.onLoadComplete(updateDataList);\r\n\r\n\t\t\t}", "public void requestBackgroundChange()\n\t\t{\n\t\t\tisBackgroundChangeRequested = true;\n\t\t\trequestRender();\n\t\t}", "private static void tickOnThread() {\n final Thread thread = new Thread(new Runnable(){\n @Override\n public void run() {\n tick(true);\n }\n });\n thread.start();\n }", "public void scheduledUpdate() {\n\n if (isUpdating.compareAndSet(false, true)) {\n\n if (getCurrentChannel() != null) {\n\n updateData();\n }\n }\n\n timer.cancel();\n timer.purge();\n\n timer = new Timer();\n timer.scheduleAtFixedRate(new UpdateTask(), 3600000,\n 3600000);\n\n }", "private void requestThread() {\n while (true) {\n long elapsedMillis = System.currentTimeMillis() - lastHeartbeatTime;\n long remainingMillis = heartbeatMillis - elapsedMillis;\n if (remainingMillis <= 0) {\n sendHeartbeats();\n } else {\n try {\n Thread.sleep(Math.max(remainingMillis, 3));\n } catch (InterruptedException e) {\n }\n }\n }\n }", "@Override\n\tpublic void run() {\n\t\tMyLog.Trace(\"UpdateThread:run:start.\");\n\t\twhile(true) {\n\t\t\ttry {\n\t\t\t\tThread.sleep(Config.update_time * 60 * 1000);\n\t\t\t\t//检查当前时间是否在交易时间内\n\t\t\t\t//交易时间段:9:30--11:30,1:00--3:00\n\t\t\t\t//排除周末\n\t\t\t\tDate time = new Date();\n\t\t\t\tCalendar c = Calendar.getInstance();\n\t\t\t\tc.setTime(time);\n\t\t\t\tif(Calendar.SATURDAY == c.get(Calendar.DAY_OF_WEEK) || \n\t\t\t\t\t\tCalendar.SUNDAY == c.get(Calendar.DAY_OF_WEEK) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tint hour = c.get(Calendar.HOUR_OF_DAY);\n\t\t\t\tint minute = c.get(Calendar.MINUTE);\n\t\t\t\tif( (hour >= 9 && hour <= 11)) {\n\t\t\t\t\tif((hour == 9 && minute < 30) || (hour == 11 && minute > 30)) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}else if(hour < 13 || hour > 15) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\tMyLog.Trace(\"UpdateThread:run:start update.\");\n\t\t\t\tStockCache.update(StockCache.UPDATE_TYPE_HQ);\n\t\t\t\t\n\t\t\t\t//提示更新\n\t\t\t\tsynchronized (lock) {\n\t\t\t\t\tMyLog.Trace(\"UpdateThread:run:notify lock.\");\n\t\t\t\t\tlock.notify();\n\t\t\t\t}\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\tMyLog.Error(\"UpdateThread:run:Exception \" + e.toString());\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "@Override\n public void run() {\n while (true) {\n try {\n final long start = Core.currentTimeMillis();\n performUpdates();\n final long end = Core.currentTimeMillis();\n final long runtime = end - start;\n if (runtime < CONFIG_UPDATE_INTERVAL) {\n Thread.sleep(CONFIG_UPDATE_INTERVAL - runtime);\n }\n } catch (InterruptedException e) {\n //We expect that this may happen and ignore it.\n } catch (Exception e) {\n logger.error(MARKER, \"Unexpected error in ConfigUpdateThread\", e);\n }\n }\n }", "@Override\r\n\t\tpublic void run() {\n\t\t\tSystem.out.println(\"updateThread\");\r\n\t\t\thandler.postDelayed(updateThread, 3000);\r\n\t\t}", "public void run()\r\n {\r\n debug(\"WatchListMonitorTask::run()\");\r\n if ( lastUpdate == null )\r\n {\r\n debug(\"WatchListMonitorTask::run() - Last Update is null\");\r\n return;\r\n }\r\n // Get the current time\r\n GregorianCalendar t1 = new GregorianCalendar();\r\n // Get the Displayed Tab index\r\n int index = WatchListTableModule.this.tabPane.getSelectedIndex();\r\n // calculate the time difference from the last time\r\n long diffTime = t1.getTimeInMillis() - lastUpdate.getTimeInMillis();\r\n // Is the panel even displayed???\r\n boolean moduleDisplayed = WatchListTableModule.this.getModulePanel().isShowing();\r\n\r\n if ((diffTime >= MAX_WAIT_TIME) && (moduleDisplayed))\r\n {\r\n System.out.println(\"WatchListMonitorTask::run() - Fired a startupOnWatchListTimers on Index\" + index);\r\n WatchListTableModule.this.startupWatchListTimers(index);\r\n }\r\n }", "@Override\n\tpublic void run() {\n\t\t\n\t // Inizializza nome thread\n\t Thread.currentThread().setName(\"Timer\");\n\t \n\t // Richiama procedura di gestione aggiornamento configurazione\n\t update();\n }", "@Override\n public void run() {\n while (LANSyncServer.IS_CLIENT_ALIVE) {\n try {\n LANSyncServer.smsserver.sendMessage(HandleProcess.REFRESH_REQUEST_MESSAGE);\n Thread.sleep(6000);\n } catch (InterruptedException ex) {\n Logger.getLogger(SyncRequestServer.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "@Override\r\n\tpublic void run() {\n\t\tstartFlag = true;\r\n\t\twhile (startFlag) {\r\n \t\ttry {\r\n \t\t\tThread.sleep(updateRate);\r\n \t\t} catch (InterruptedException e) {\r\n \t\t\tSystem.out.println(e.getMessage());\r\n \t\t}catch (RuntimeException e) {\r\n\t\t\t\t//System.out.print(e.getMessage());\r\n\t\t\t}\r\n \t} \t\t\r\n\t}", "public void start(){\n\n stopWatchStartTimeNanoSecs = magicBean.getCurrentThreadCpuTime();\n\n }", "public void run() {\n\n if (cancelUpdate(persistentEntity, entityAccess)) {\n return;\n }\n\n updateEntry(persistentEntity, updateId, e);\n firePostUpdateEvent(persistentEntity, entityAccess);\n }", "public void refreshAdvertisingInfoBackgroundThread() {\n AdvertisingId advertisingId;\n long timeInMillis = Calendar.getInstance().getTimeInMillis();\n AdvertisingId advertisingId2 = this.mAdInfo;\n GpsHelper.AdvertisingInfo fetchAdvertisingInfoSync = GpsHelper.fetchAdvertisingInfoSync(this.mAppContext);\n if (fetchAdvertisingInfoSync == null || TextUtils.isEmpty(fetchAdvertisingInfoSync.advertisingId)) {\n advertisingId = getAmazonAdvertisingInfo(this.mAppContext);\n } else {\n advertisingId = new AdvertisingId(fetchAdvertisingInfoSync.advertisingId, advertisingId2.mMopubId, fetchAdvertisingInfoSync.limitAdTracking, advertisingId2.mLastRotation.getTimeInMillis());\n }\n if (advertisingId != null) {\n String generateIdString = advertisingId2.isRotationRequired() ? AdvertisingId.generateIdString() : advertisingId2.mMopubId;\n if (!advertisingId2.isRotationRequired()) {\n timeInMillis = advertisingId2.mLastRotation.getTimeInMillis();\n }\n setAdvertisingInfo(advertisingId.mAdvertisingId, generateIdString, advertisingId.mDoNotTrack, timeInMillis);\n }\n rotateMopubId();\n }", "void backgroundRefresh();", "@Override\n public void run() {\n final JPPFClientConnectionStatus status = driver.getConnection().getStatus();\n if (status.isWorkingStatus()) StatsHandler.getInstance().requestUpdate(driver);\n }", "public synchronized void startUpdates(){\n mStatusChecker.run();\n }", "public void run() {\n long creationInterval = MILLISEC_PER_SEC / this.generationRate;\n\n int curIndex = 0;\n long startTime, endTime, diff, sleepTime, dur = this.test_duration;\n\n do {\n // startTime = System.nanoTime();\n startTime = System.currentTimeMillis();\n\n Request r = new DataKeeperRequest((HttpClient) this.clients[curIndex], this.appserverID, this.url);\n curIndex = (curIndex + 1) % clientsPerNode;\n this.requests.add(r);\n\n try {\n r.setEnterQueueTime();\n this.requestQueue.put(r);\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n\n // endTime = System.nanoTime();\n endTime = System.currentTimeMillis();\n diff = endTime - startTime;\n dur -= diff;\n sleepTime = creationInterval - diff;\n if (sleepTime < 0) {\n continue;\n }\n\n try {\n // Thread.sleep(NANO_PER_MILLISEC / sleepTime, (int) (NANO_PER_MILLISEC % sleepTime));\n Thread.sleep(sleepTime);\n } catch (InterruptedException e) {\n throw new RuntimeException(e);\n }\n\n dur -= sleepTime;\n } while (dur > 0);\n\n try {\n this.requestQueue.put(new ExitRequest());\n this.requestQueueHandler.join();\n } catch (InterruptedException e) {\n throw new RuntimeException(e);\n }\n }", "protected void onThreadStart() {\n\t\tparent.startLock.countDown();\n\t\t//wait for all other threads ready\n\t\ttry {\n\t\t\tparent.startLock.await();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tthreadStartTime = new Date();\n\t}", "void threadUpdateReceived(FeedItem feedItem);", "public void run() {\n\t\tDate curTime;\n\t\twhile(true) {\n\t\t\tcurTime = new Date();\n\t\t\t\n\t\t\t//System.out.println(\"currentTime: \"+ curTime.getTime() +\" prevTime: \"+ _prevPingRequestTime.getTime() +\" diff: \" + (curTime.getTime() - _prevPingRequestTime.getTime()) +\" interval: \"+ _scsynthPingInterval);\n\n\t\t\t//if the previous status request is still pending...\n\t\t\tif (_serverLive && (_prevPingRequestTime.getTime() > _prevPingResponseTime.getTime())) {\n\t\t\t\t//We've not yet heard back from the previous status request.\n\t\t\t\t//Have we timed out?\n\t\t\t\tif (curTime.getTime() - _prevPingRequestTime.getTime() > _serverResponseTimeout) {\n\t\t\t\t\t//We've timed out on the previous status request.\n\t\t\t\t\tSystem.out.println(\"Timed out on previous status request.\");\n\n\t\t\t\t\tif (_notifyListener != null) {\n\t\t\t\t\t\t_notifyListener.receiveNotification_ServerStopped();\n\t\t\t\t\t}\n\t\t\t\t\tif (_controlPanel != null && _controlPanel._statsDisplay != null) {\n\t\t\t\t\t\t_controlPanel._statsDisplay.receiveNotification_ServerStopped();\n\t\t\t\t\t\t_scsclogger.receiveNotification_ServerStopped();\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t\t_serverLive = false;\n\t\t\t\t\t_serverBooted = false;\n\t\t\t\t}\n\t\t\t\t//else we just keep waiting for a response or a timeout\n\t\t\t}\n\t\t\t//the previous status request is NOT still pending. Is it time to send another?\n\t\t\telse if (curTime.getTime() - _prevPingRequestTime.getTime() > _scsynthPingInterval) {\n\t\t\t\t//It's time to send another status request.\n\t\t\t\t\n\t\t\t\t//generally, ping with a /status message.\n\t\t\t\t//but, if we're live but not booted, query node 1 (the sign that init completed)\n\t\t\t\tif (_serverLive && !_serverBooted) { \n\t\t\t\t\tsendMessage(\"/notify\", new Object[] { 1 });\n\t\t\t\t\tsendMessage(\"/n_query\", new Object[]{_motherGroupID});\n\t\t\t\t\t//System.out.println(\"Querying SCSC mother node\");\n\t\t\t\t\t//debugPrintln(\"Querying SCSC mother node\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t//if the server's booted, request a status update.\n\t\t\t\t\tsendMessage(\"/status\"); \n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t_prevPingRequestTime = new Date();\n\t\t\t}\n\t\t\t//it's not time to send, and we're not watching \n\t\t\t//for a reply, so go to sleep until it's time to ping again\n\t\t\telse {\n\t\t\t\tlong sleeptime = Math.max(_scsynthPingInterval - (curTime.getTime() - _prevPingRequestTime.getTime()), 0);\n\t\t\t\t//System.out.println(\"sleep \" + sleeptime);\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(sleeptime);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t//NOTE this thread shouldn't get interrupted.\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t}", "@Override\n\tpublic void run() {\n\t\twhile (true) {\n\t\t\t// program loop\n\t\t\trender();\n\t\t\tif (tim.shouldCallHome()) {\n\t\t\t\t// check in with server and reset the timer so that it doesn't\n\t\t\t\t// check in until we need to\n\t\t\t\tnew Thread(Main.checkinRunnable).start();\n\t\t\t\ttim.resetCallHome();\n\t\t\t}\n\t\t\t// System.out.println(tim.getTime());\n\t\t}\n\n\t}", "@Override\n\tpublic void run() {\n\t\ttry {\n\t\t\twhile (true) {\n\t\t\t\tThread.sleep(1000);\n\t\t\t\tsetChanged();\n\t\t\t\tnotifyObservers(Events.CLOCK_TICKED_EVENT);\n\t\t\t}\n\t\t} catch (InterruptedException ie) {\n\t\t}\n\t}", "public void run() \r\n {\r\n timerStop(); // Clears existing timers.\r\n watchdogCounter++;\r\n//--DEBUG!!--\r\nLog.i(com.tumanako.ui.UIActivity.APP_TAG, \" ChargeNode -> Tick. Counter:\" + watchdogCounter ); \r\n if (watchdogCounter >= WATCHDOG_OVERFLOW)\r\n {\r\n // Nothing has happend for a while! Stop the timer and set status to 'Disconnected'.\r\n chargeStatus = STATUS_NOT_CHARGING;\r\n connectionStatus = STATUS_OFFLINE; // Give up.\r\nLog.i(com.tumanako.ui.UIActivity.APP_TAG, \" ChargeNode -> Watchdog Overflow. Stopping. \" ); \r\n }\r\n \r\n else\r\n {\r\n\r\n /***********************************************************************************************\r\n * HTTP Request Queue Management:\r\n *\r\n * Check the status of the first object in the HTTP request queue. \r\n * * If it hasn't started, start it.\r\n * * If it's running, do nothing. \r\n * * If it's finished, throw it away and start the next one!\r\n * \r\n */\r\n if ( (requestQueue != null) && (!requestQueue.isEmpty()) )\r\n {\r\n // There is at least one HTTP request in the queue: \r\n ChargerHTTPConn currentConn = requestQueue.peek(); // Get reference to current (first) item in the queue.\r\n if (currentConn.isStop()) \r\n {\r\n // Special \"STOP QUEUE\" entry: \r\n connectionStatus = STATUS_OFFLINE;\r\n currentConn = null;\r\n requestQueue.poll(); // Removes the \"stop\" item from the queue.\r\n }\r\n else\r\n {\r\n if (!currentConn.isAlive())\r\n {\r\n // Current item is not \"Alive\" (i.e. running). Has it started yet?\r\n if (currentConn.isRun())\r\n {\r\n //--DEBUG!!--- Log.i(com.tumanako.ui.UIActivity.APP_TAG, \" ChargeNode -> Thread Finished. Removing From Queue. \" ); \r\n // The thread has run, so it must have finished! \r\n currentConn = null;\r\n requestQueue.poll(); // Removes the item from the queue.\r\n }\r\n // NOW: If we still have a valid HTTP connection item from the queue, we know it needs to be started. \r\n if (currentConn != null) \r\n {\r\n //--DEBUG!!--- Log.i(com.tumanako.ui.UIActivity.APP_TAG, \" ChargeNode -> Starting HTTP Conn From Queue. \" ); \r\n currentConn.run(); \r\n }\r\n } // [if (!currentConn.isAlive())]\r\n } // [if (currentConn.isStop()) ... else...]\r\n } // [if (!requestQueue.isEmpty())]\r\n /***********************************************************************************************/\r\n \r\n \r\n switch (connectionStatus)\r\n {\r\n case STATUS_CONNECTING:\r\n // We are waiting for a response from the server:\r\n break;\r\n \r\n case STATUS_CONNECTED:\r\n // We are connected: Add to the Ping counter, and send a 'PING' if enough time has passed:\r\n pingCounter++;\r\n if (pingCounter >= SEND_PING_EVERY)\r\n {\r\n pingCounter = 0;\r\nLog.i(com.tumanako.ui.UIActivity.APP_TAG, \" ChargeNode -> Ping! \" );\r\n dashMessages.sendData( CHARGE_NODE, null, null, CHARGE_NODE_UPDATING_HTML, makeChargeData(connectionStatus,chargeStatus,0.0f,0.0f) );\r\n doPing();\r\n }\r\n break;\r\n \r\n default: \r\n } // [switch (status)]\r\n if (connectionStatus != STATUS_OFFLINE) timerStart(); // Restarts the timer. \r\n \r\n } // [if (watchdogCounter >= WATCHDOG_OVERFLOW)...else]\r\n \r\n }", "private synchronized void onUpdate() {\n if (pollingJob == null || pollingJob.isCancelled()) {\n int refresh;\n\n try {\n refresh = getConfig().as(OpenSprinklerConfig.class).refresh;\n } catch (Exception exp) {\n refresh = this.refreshInterval;\n }\n\n pollingJob = scheduler.scheduleWithFixedDelay(refreshService, DEFAULT_WAIT_BEFORE_INITIAL_REFRESH, refresh,\n TimeUnit.SECONDS);\n }\n }", "private void updateFromProvider() {\n if(isUpdating.get()){\n isHaveUpdateRequest.set(true);\n return;\n }\n mUpdateExecutorService.execute(new UpdateThread());\n }", "protected long requestProcessingStarted() {\n\t\trequestsInProcessing++;\n\t\treturn System.currentTimeMillis();\n\t}", "public void updatePeriodic() {\r\n }", "@Override\n public void run() {\n if (!this.m_running) {\n this.m_running = true;\n this.pollingLooper();\n }\n }", "synchronized void start()\n {\n if ( _log.isLoggable( Level.FINE ) )\n _log.fine(\n _worker.getName() +\n \":start:\" +\n _countdownValue );\n\t\tif (_countdownValue == 0 )\n\t\t\treturn;\n _clock.reschedule();\n }", "private void backgroundTimerHandler() {\n if (timer == null);\n timer = new Timer();\n\n TimerTask timerTask = new TimerTask() {\n @Override\n public void run() {\n ReportSender.sendReport();\n }\n };\n\n timer.schedule(timerTask, timerTime);\n }", "@Override\r\n\tpublic void run() {\n\t\twhile (true) {\r\n\t\t\tif (MatchReqPool.size() == 0) {\r\n\r\n\t\t\t\ttry {\r\n\r\n\t\t\t\t\tmatchReqDao = new MatchReqDaoImpl();\r\n\r\n\t\t\t\t\tList<MatchReq> list = matchReqDao.getAllNewReq();\r\n\r\n\t\t\t\t\tIterator<MatchReq> iterator = list.iterator();\r\n\t\t\t\t\tif (list.size() > 0) {\r\n\t\t\t\t\t\tLogger.info(\"Has New Request....\");\r\n\r\n\t\t\t\t\t\twhile (iterator.hasNext()) {\r\n\t\t\t\t\t\t\tMatchReq req = iterator.next();\r\n\t\t\t\t\t\t\treq.setPoint(\"[0:0]\");\r\n\t\t\t\t\t\t\treq.setStatus(MatchStatus.START);\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tmatchReqDao.update(list);\r\n\t\t\t\t\t\tMatchReqPool.put(list);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} catch (MatchException em) {\r\n\t\t\t\t\tem.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\tsleep(5000);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void run() {\n\t\t\t\ttry {Thread.sleep(1000000000);} catch (InterruptedException ie) {}\n\t\t\t}", "@Override\n public void teleopPeriodic()\n {\n Scheduler.getInstance().run();\n }", "@Override\n public void run() {\n super.run();\n while (!isPaused) {\n Message msg = mHandler.obtainMessage();\n msg.arg1 = REFRESH;\n mHandler.sendMessage(msg);\n try {\n Thread.sleep(REFRESHINTERVAL);\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n }", "@Override\n public void run() {\n schedule();\n }", "@Override\n\tpublic void run() {\n\t\tsuper.run();\n\t\twhile(isrun&&handler!=null){\n\t\t\ttry {\n\t\t\t\tMessage msg=handler.obtainMessage(timeupdate, new Date());\n\t\t\t\thandler.sendMessage(msg);\n\t\t\t\tThread.sleep(1000);\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}\n\t}", "@Override\n public void run() {\n syncToServer();\n }", "public void run() {\n try {\n Thread.sleep(1000000);\n } catch (InterruptedException ie) {\n }\n }", "public void run()\n {\n CallerContextManager ccm = (CallerContextManager) ManagerManager.getInstance(CallerContextManager.class);\n CallerContext cc = ccm.getCurrentContext();\n CCData data = getCCData(cc);\n if ((data != null) && (data.listeners != null)) data.listeners.notifyChange(event);\n }", "public void periodicUpdate();", "public void teleopPeriodic() {\r\n\t\tScheduler.getInstance().run();\r\n\t}", "private void sync() {\n float loopSlot = 1.0f/TARGET_FPS;\n double endTime = updateTimer.getLastRecordedTime() + loopSlot;\n while(updateTimer.getTime() < endTime) {\n try {\n Thread.sleep(1);\n } catch (InterruptedException ie) {\n ie.printStackTrace();\n Thread.currentThread().interrupt();\n }\n }\n }", "@Override\n public void threadStarted() {\n }", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n\tpublic void teleopPeriodic() {\n\t\tScheduler.getInstance().run();\n\t}", "public void teleopPeriodic() {\n Scheduler.getInstance().run();\n }", "public void teleopPeriodic() {\n Scheduler.getInstance().run();\n }", "public void teleopPeriodic() {\n Scheduler.getInstance().run();\n }", "public void teleopPeriodic() {\n Scheduler.getInstance().run();\n }", "@Override\n public void run() {\n while (!BodyWrapper.this.body.isActive() && BodyWrapper.this.body.isAlive()) {\n try {\n Thread.sleep(updateFrequence);\n } catch (InterruptedException e) {\n logger.error(\"The JMX notifications sender thread was interrupted\", e);\n }\n }\n \n // and once the body is activated, we can forward the\n // notifications\n while (BodyWrapper.this.body.isActive()) {\n try {\n Thread.sleep(updateFrequence);\n sendNotifications();\n } catch (InterruptedException e) {\n logger.error(\"The JMX notifications sender thread was interrupted\", e);\n }\n }\n }", "protected void speedRefresh() {\r\n\t\t\ttStartTime = System.currentTimeMillis();\r\n\t\t\ttDownloaded = 0;\r\n\t\t}", "private void startClientStatisticsThread() {\r\n\t\tnew Thread(clientStatistics).start();\r\n\t}", "public static void update() \r\n {\r\n lastTime = currentTime; \r\n currentTime = getTime(); \r\n }", "@Override\r\n\t\tpublic void contextInitialized(ServletContextEvent sce) {\r\n\t\t/*\twhile(true) {\r\n\t\t\t\r\n\t\t\t\texecutor = new Thread(new Runnable() {\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\tps.verifyStock();\r\n\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\texecutor.start();\r\n\t\t\ttry {\r\n\t\t\t\texecutor.sleep(5000);\r\n\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\r\n\t\t}*/\r\n\t\t}", "private void startPeriodicUpdates() {\n\n\t\tmLocationClient.requestLocationUpdates(mLocationRequest, this);\n\t\tmConnectionState.setText(R.string.location_requested);\n\t}", "@Override\n public void teleopPeriodic() {\n Scheduler.getInstance().run();\n \n }", "public void run() {\r\n\t\tboolean repeat = true;\r\n\t\tint count = 0;\r\n\t\twhile(repeat){\r\n\t\t\tcount ++;\r\n\t\t\t//updates currency rates every hour (count>60)\r\n\t\t\tif(count > 60){\r\n\t\t\t\tcurrencies.updateRates();\r\n\t\t\t\tcount = 1;\r\n\t\t\t}\r\n\t\t\tprintStatus();\r\n\t\t\ttry{\r\n\t\t\t\tThread.sleep(60000);\r\n\t\t\t}catch(InterruptedException ex){\r\n\t\t\t\trepeat = false;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void startBPUpdateAlarmThread() {\n\t\tbpUpdateAlarmThread=new Thread() {\n\t\t\tAlert oneMinuteAlert=new Alert(AlertType.WARNING,\"Data was not received from the BP monitor for at least one minute\",ButtonType.OK);\n\t\t\tboolean showing;\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\twhile(true) {\n\t\t\t\t\t\tDate lastUpdate=sampleFromSelectedMonitor[0].getPresentation_time();\n\t\t\t\t\t\tDate now=new Date();\n\t\t\t\t\t\tlong delta=now.getTime()-lastUpdate.getTime();\n\t\t\t\t\t\tSystem.err.println(\"BP update delta is \"+delta);\n\t\t\t\t\t\tif( delta > fiveMinutes) {\n\t\t\t\t\t\t\tstopEverything();\t//Calling stop everything will interrupt this thread.\n\t\t\t\t\t\t\treturn;\t//But return anyway.\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif( delta > oneMinute && ! showing) {\n\t\t\t\t\t\t\tSystem.err.println(\"More than one minute since last update - showing oneMinuteAlert\");\n\t\t\t\t\t\t\tjavafx.application.Platform.runLater(()-> {\n\t\t\t\t\t\t\t\toneMinuteAlert.show();\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tshowing=true;\n\t\t\t\t\t\t\toneMinuteAlert.resultProperty().addListener(new ChangeListener<ButtonType>() {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void changed(ObservableValue<? extends ButtonType> observable, ButtonType oldValue,\n\t\t\t\t\t\t\t\t\t\tButtonType newValue) {\n\t\t\t\t\t\t\t\t\tif(newValue.equals(ButtonType.OK)) {\n\t\t\t\t\t\t\t\t\t\tshowing=false;\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}\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\tsleep(5000);\n\t\t\t\t\t}\n\t\t\t\t} catch (InterruptedException ie) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tbpUpdateAlarmThread.start();\n\t}", "public void startPollingThread() {\n pool = ThreadUtil.startThread(polling);\n }", "protected void checkUpdate() {\n \t\t// only update from remote server every so often.\n \t\tif ( ( System.currentTimeMillis() - lastUpdated ) > refreshInterval ) return;\n \t\t\n \t\tClusterTask task = getSessionUpdateTask();\n \t\tObject o = CacheFactory.doSynchronousClusterTask( task, this.nodeId );\n \t\tthis.copy( (Session) o );\n \t\t\n \t\tlastUpdated = System.currentTimeMillis();\n \t}", "private void startThread()\n {\n if (workerThread == null || !workerThread.isLooping())\n {\n workerThread = new LiveViewThread(this);\n workerThread.start();\n }\n }", "@Override\n public void run () {\n boolean activateStatus;\n\n startUp(); \n if (loaded) {\n File fi = new File(fileLoadedFrom);\n clientSite = load_object(fileLoadedFrom);\n message(AX_PROGRESS,\"Client Site found: \" + clientSite);\n if (! fi.delete()) {\n message(AX_ERROR,\"Failed to delete temporary file: \" + fileLoadedFrom);\n }\n } else { \n clientSite = insertObjectFromActiveXModes(modes, hWndHandle);\n }\n if (clientSite == AX_NO_CLIENT_SITE) {\n // Just progress because the C code will handle communicating\n // this failure.\n message(AX_PROGRESS, \"Error: client site was null\");\n return;\n }\n NativeMethodBroker.registerProxy(clientSite, this);\n try {\n if((! loaded) || (wrapper.getActivateOnLoad()))\n wrapper.activate();\n if (loaded) {\n addAllActiveXListeners();\n restoreTransientEventSets(); \n }\n }\n catch (ActiveXException e) \n { \n e.printStackTrace();\n }\n while (true) {\n long timeBefore = 0;\n long timeAfter;\n int counter = 0;\n if (messagesWaiting.isEmpty()) {\n try {\n // if (wrapper.isOpenInWindow) {\n // We should want to only call update_stuff when isOpenInWindow\n // is true. However, the call to OnShowWindow, which the only\n // thing which changes the value of isOpenInWindow, obviously\n // must come before the control has shut down. Therefore,\n // we can't immediately stop listening at that point. Perhaps\n // it would work to continue to listen for a few seconds after\n // receiving the notification, or perhaps even not acting on\n // the notification for a few seconds. Either of those seem\n // enormously hacky, however, so for now, every object will\n // just poll constantly.\n \n if (traceTime)\n timeBefore = System.currentTimeMillis(); \n update_stuff();\n \n Thread.sleep(UPDATE_HEARTBEAT);\n\n if (traceTime) {\n timeAfter = System.currentTimeMillis();\n System.out.println(\"Update and sleep took \" + (timeAfter - timeBefore) +\n \"(millis)\");\n }\n } \n catch (InterruptedException e) {\n message(AX_ERROR, \"INTERRUPTED EXCEPTION. \");\n message(AX_DATA_DUMPS, \"(This should never happen.)\");\n } \n }\n notifyMessage = messagesWaiting.pop();\n \n\n if (notifyMessage != null) {\n \n synchronized (notifyMessage) { \n message(AX_PROGRESS, notifyMessage.toString());\n switch (notifyMessage.messageType) {\n case OTR_ERROR:\n message(AX_ERROR, \"ERROR: thread was activated without an action.\\n\");\n return;\n case DELETE:\n try {\n removeAllActiveXListeners();\n }\n catch (ActiveXException e)\n {\n }\n deleteObject(clientSite);\n break; \n case UPDATE: \n update_stuff();\n break;\n case ACTIVATE:\n activateStatus =\n activate_object(clientSite, hWndHandle,\n notifyMessage.top, notifyMessage.left,\n notifyMessage.bottom, notifyMessage.right,\n false);\n if (activateStatus) {\n resize(notifyMessage.top, notifyMessage.left,\n notifyMessage.bottom, notifyMessage.right);\n } else {\n message(AX_ERROR, \"ERROR: unable to activate object. Quitting thread.\");\n return;\n }\n break;\n case RENDER:\n render_object(clientSite, hWndHandle,\n notifyMessage.top, notifyMessage.left,\n notifyMessage.bottom, notifyMessage.right);\n break;\n case RESIZE:\n resize_object(clientSite,\n notifyMessage.top, notifyMessage.left,\n notifyMessage.bottom, notifyMessage.right);\n break;\n case COPY:\n copy_object(clientSite, \n notifyMessage.top, notifyMessage.left,\n notifyMessage.bottom, notifyMessage.right);\n break;\n case INVOKE:\n if (traceTime)\n timeBefore = System.currentTimeMillis();\n comInvokeWithinThread(notifyMessage);\n if (traceTime) {\n timeAfter = System.currentTimeMillis();\n System.out.println(\"Invoke within thread took \" + (timeAfter - timeBefore) +\n \"(millis)\");\n }\n break;\n case SAVE:\n notifyMessage.name = save_object(clientSite, notifyMessage.name);\n break;\n case CHECK_CAST:\n notifyMessage.returnCheck \n = check_cast(clientSite,\n notifyMessage.dispatchPointer,\n notifyMessage.classID);\n break;\n case GET_CLSID:\n notifyMessage.returnClsid = \n get_clsid(clientSite,\n notifyMessage.dispatchPointer);\n break;\n case EVENT_LISTEN:\n event_listen(clientSite, \n notifyMessage.dispatchPointer, \n notifyMessage.classID,\n notifyMessage.add);\n break;\n case EVENT:\n forwardActiveXEvent1(notifyMessage.classID,\n notifyMessage.dispid,\n notifyMessage.eventName,\n notifyMessage.eventArguments);\n break;\n case MARSHAL_INTERFACE:\n notifyMessage.dispatchPointer = \n marshal_interface(clientSite, notifyMessage.dispatchPointer);\n break;\n case GET_MARSHALED_INTERFACE:\n notifyMessage.dispatchPointer = get_marshaled_interface(clientSite, notifyMessage.dispatchPointer);\n break;\n default:\n message(AX_ERROR, \"ERROR: unknown action:\" + notifyMessage);\n } \n notifyMessage.finished = true;\n notifyMessage.notifyAll();\n if ((notifyMessage.messageType == DELETE) ||\n (notifyMessage.messageType == DIE))\n {\n message(AX_PROGRESS, \"*** STOPING ***\");\n return;\n }\n \n }\n }\n }\n }", "public final void start(){\n cpt = 0;\n inProgress = true;\n init();\n UpdateableManager.addToUpdate(this);\n }", "public void run() {\n isRunningTime = true;\n\n coolDownTime.put(target, coolDownTime.get(target) - 1);\n\n if(coolDownTime.get(target) <= 0) {\n coolDownTime.remove(target);\n\n target.sendMessage(DwD + ChatColor.GOLD + \"Your Dark Cloud cooldown has expired.\");\n\n isRunningTime = false;\n\n taskCoolDownToCancel.cancel();\n }\n }", "private void startUpdateTimer() {\n\t\tif (completionUpdateTimer == null) {\n\t\t\tcompletionUpdateTimer = new Timer(UPDATE_TIMER_NAME);\n\n\t\t\tscheduleUpdateTimer();\n\t\t}\n\t}", "private void startTime() {\n Task<Void> task = new Task<Void>() {\n @Override\n protected Void call() throws Exception {\n while (player.getCurrentTime().lessThanOrEqualTo(player.getStopTime()) && player.getStatus() != Status.PAUSED) {\n if (player.getStatus() == Status.STOPPED) {\n eventBus.emit(new CurrentTimeEvent(0, Duration.ZERO));\n cancel();\n }\n // Convert the current time to a percentage\n double timePercentage = player.getCurrentTime().toSeconds() / player.getStopTime().toSeconds();\n // Get the current time as a Duration\n Duration timeDuration = player.getCurrentTime();\n eventBus.emit(new CurrentTimeEvent(timePercentage, timeDuration));\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n cancel();\n }\n }\n return null;\n }\n };\n\n timeThread = new Thread(task);\n timeThread.setDaemon(true);\n timeThread.start();\n }", "public void startBackgroundThread() {\n this.backgroundThread = new HandlerThread(\"DepthDecoderThread\");\n this.backgroundThread.start();\n this.backgroundHandler = new Handler(backgroundThread.getLooper());\n }", "public void run ()\r\n\t{\r\n\t\twhile(true)\r\n\t\t{\r\n\t\t\tif(activeSessions.size() == 0)\r\n\t\t\t{\r\n\t\t\t\ttry \r\n\t\t\t\t{\r\n\t\t\t\t\tthis.sleep(20);\r\n\t\t\t\t} catch (InterruptedException e) \r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tfor(int i = 0; i < activeSessions.size(); i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tupdateActiveSession(activeSessions.get(i));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "public void sync() {\n new Thread(new Runnable() {\n public void run() {\n\n try {\n syncWeatherData();\n } catch (IOException e) {\n Log.i(\"sync\", \"error syncing weather data\");\n e.printStackTrace();\n }\n try {\n syncEnergyData();\n } catch (IOException e) {\n Log.i(\"sync\", \"error syncing energy data\");\n e.printStackTrace();\n }\n\n Date now = new Date();\n lastUpdated = now.getTime();\n SharedPreferences sharedPref = context.getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE);\n SharedPreferences.Editor e = sharedPref.edit();\n e.putLong(\"lastUpdated\", lastUpdated);\n e.commit();\n DateFormat df = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\n df.setTimeZone(SimpleTimeZone.getTimeZone(\"US/Central\"));\n\n Log.i(\"sync\", \"consumption \" + getLiveDemand());\n Log.i(\"sync\", \"windmill1 \" + getLiveProduction(1));\n Log.i(\"sync\", \"temp \" + getCurrentTemperature());\n Log.i(\"sync\", \"wind \" + getCurrentWindSpeed());\n }\n }).start();\n\n }", "@Override\n public void run() {\n if (timerValidFlag)\n gSeconds++;\n Message message = new Message();\n message.what = 1;\n handler.sendMessage(message);\n }", "@Override\n\tpublic void contextInitialized(ServletContextEvent sce) {\n\t\tCalendar calendar = Calendar.getInstance();\n\t\t/************** Update at 3:00 everyday *********************/\n\t\tcalendar.set(Calendar.HOUR_OF_DAY, 3);\n\t\tcalendar.set(Calendar.MINUTE, 0);\n\t\tcalendar.set(Calendar.SECOND, 0);\n\t\tDate date = calendar.getTime();\t//第一次执行定时任务的时间\n\t\t\n\t\t//如果第一次执行定时任务的时间早于当前的时间\n //此时要在第一次执行定时任务的时间上加一天,以便此任务在下个时间点执行。如果不加一天,任务会立即执行。循环执行的周期则以当前时间为准\n if (date.before(new Date())) {\n date = this.addDay(date, 1); //后延一天\n System.out.println(date);\n }\n \n\t\tTimer timer = new Timer();\n\t\tUpdate task = new Update();\n\t\t//安排指定的任务在指定的时间开始进行重复的固定延迟执行。\n\t\ttimer.schedule(task, date, PERIOD_DAY);\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\twhile(mActivityPauseFlag != 1)\n\t\t\t\t{\n\n\t\t\t\t\tint mins = getSleepTimeValue();\n\t\t\t\t\tmSleepTimeHour = mins / 60;\n\t\t\t\t\tmSleepTimeMin = mins % 60;\n\t\t\t\t\t\n\t\t\t\t\tif(quickmenu.isShowing())\n\t\t\t\t\t{\n\t\t\t\t\t\thandler.sendEmptyMessage(MSG_REFRESH_TIMER);\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(5000);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}", "private void setWSClientToKeepSeparateContextPerThread() {\n ((BindingProvider) movilizerCloud).getRequestContext()\n .put(THREAD_LOCAL_CONTEXT_KEY, \"true\");\n }", "private void startBackgroundThread() {\n mThread = new HandlerThread(getString(R.string.app_name));\n mThread.start();\n Timber.d(\"Background thread started successfully\");\n mHandler = new Handler(mThread.getLooper());\n }", "public void update () {\n synchronized (this) {\n messagesWaiting.add\n (new OleThreadRequest(UPDATE,\n 0, 0, 0, 0));\n notify();\n }\n }", "public void teleopPeriodic()\n\t{\n\t\tScheduler.getInstance().run();\n\t}", "@Override\n public void run() {\n messageUpdater.run();\n // Re-run it after the update interval\n mHandler.postDelayed(this, UPDATE_INTERVAL);\n }", "@Override public void run() {\n\t\t\t\tsaveLogCache();\n\t\t\t\tserverToken = null;\n\t\t\t\toffline = true;\n\t\t\t}", "@Override\n\tpublic void run() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\t//while runniing\n\t\t//store a value in the class representing the\n\t\t//current frame\n\t\t//calculated by the system clock\n\t\t//and frame_rate\n\t\tlong oldTime = date.getTime();\n\t\tlong newTime;\n\t\tlong time_cum = 0;\n\t\t\n\t\twhile(true)\n\t\t{\n\t\t\tnewTime = date.getTime();\n\t\t time = oldTime - newTime;\n\t\t\toldTime = newTime;\n\t\t\t\n\t\t\ttime_cum += time;\n\t\t\t\n\t\t\tif (time_cum > frame_rate)\n\t\t\t{\n\t\t\t\t//surpassed the frame rate\n\t\t\t\t//fire a frame event\n\t\t\t\tMessage message = new Message();\n\t\t\t\t//actions that occur at every frame\n\t\t\t\tmessage.mflag = EEventMachine.EM_FRAME_TICK;\n\t\t\t\t//MessageManager.EnqueueMessage(message);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//actions that occur at every tick\n\t\t\t\tMessage message = new Message();\n\t\t\t\tmessage.mflag = EEventMachine.EM_CLOCK_TICK;\n\t\t\t\t//MessageManager.EnqueueMessage(message);\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i=0;i<CScheduler.priorityTaskList.size(); i++)\n\t\t\t{\n\t\t\t\t//scheduled for messages for events that are\n\t\t\t\t//not top priority\n\t\t\t\tMessage temp_message =new Message();\n\t\t\t\ttemp_message.mflag = EEventMachine.EM_BOOTSTRAP;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (time_cum >= temp_message.frame_rate)\n\t\t\t\t{\n\t\t\t\t\t/*CMessagePool.EnqueueMessage(temp_message);*/\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic void run() {\n\t\twhile (threadFlag) {\n\t\t\tlong startTime = System.currentTimeMillis();\n\t\t\tdrawSelf();\n\t\t\tlong endTime = System.currentTimeMillis();\n\t\t\ttry {\n\t\t\t\tif (endTime - startTime < 500)\n\t\t\t\t\tThread.sleep(500 - (endTime - startTime));\n\t\t\t} catch (InterruptedException err) {\n\t\t\t\terr.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void Start(long startTime){\n // Your code here\n this.startTime = startTime;\n Thread t = new Thread(this);\n t.start();\n //run();\n }", "@Override\n public void teleopPeriodic() {\n\tupdateDiagnostics();\n\tScheduler.getInstance().run();\n }", "@Override\n public synchronized void update(int deltaTime) {\n }", "protected void refresh()\n {\n refresh(System.currentTimeMillis());\n }", "@Override\n\t\tprotected Void doInBackground(Void... params)\n\t\t{\n\t\t\t//Get the current thread's token\n\t\t\tsynchronized (this)\n\t\t\t{\n\t\t\t\tMyApplication app = (MyApplication) getApplication();\n\t\t\t\twhile(app.getSyncStatus());\n\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "@Override\n public void run() {\n handler.postDelayed(runnableCode, apiCallFrequency);\n\n //Initiates reload of forceLoad() in TickerLoader\n reload();\n }", "public void run() {\n ServiceCallback<BuildsCurrentResponse> callback = new AsyncExampleServiceCallback();\n\n try {\n buildsOperations.getBuildsCurrentAsync(callback);\n }\n catch(Exception e)\n {\n System.err.println(\"Call to Embedded Social failed with exception: \" + e.getMessage());\n }\n }", "@Override\r\n\tpublic void run() {\n\t\tmLocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,\r\n\t\t\t\tConstants.GPS_MIN_TIME_MIL_SEC,\r\n\t\t\t\tConstants.GPS_MIN_DISTANCE_METER, myLocationListener);\r\n\t}", "private void createAndStartReconnectionThread() {\n reconnectionThread = new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n Thread.sleep(waitTimeBeforeReconnection);\n\n synchronized (globalLock) {\n if (isRunning) {\n webSocketConnection = new WebSocketConnection();\n createAndStartConnectionThread();\n }\n }\n } catch (InterruptedException e) {\n // Expected behavior when the WebSocket connection is closed\n }\n }\n });\n reconnectionThread.start();\n }", "@Override\n\tpublic void run() {\n\t\tsuper.run();\n\t\twhile(true) {\n\t\t\ttry {\n\t\t\t\tThread.sleep(500);\n\t\t\t}catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public static void startWorker(Context context) {\n if (Application.workHandler != null && Application.worker != null && Application.worker.getState() != Thread.State.TERMINATED) {\n // Clear any instance of tickerRunnable to avoid duplicate\n // and initialize to make sure ticker is running as intended.\n if (Application.workHandler != null) {\n Application.workHandler.removeCallbacks(Application.tickerRunnable);\n }\n Application.tickerRunnable = null;\n Application.tickerRunnable = new TickerRunnable(context, Application.workHandler);\n Application.tickerRunnable.tick();\n return;\n }\n Application.worker = new WorkerThread();\n Application.worker.start();\n\n Application.workHandler = Application.worker.getHandler();\n\n Application.tickerRunnable = new TickerRunnable(context, Application.workHandler);\n Application.tickerRunnable.tick();\n }", "private void peek_server_update(){\n java.util.Timer timer = new java.util.Timer(true);\n TimerTask taskPeek = new TimerTask() {\n public void run() {\n try {\n String user_id = RegistrationManager.getUserId();\n if (user_id == null || user_id.length() == 0) {\n return;\n }\n// WifiManager wifi = (WifiManager) getSystemService(WIFI_SERVICE);\n// if (wifi.getWifiState() == WifiManager.WIFI_STATE_ENABLED) {\n// JsonManager.peek_request(user_id);\n// }\n JsonManager.peek_request(user_id);\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }\n };\n JsonManager.getServerConfig();\n int periodPeek = Config.PEEK_TIMER() * 1000;\n timer.schedule(taskPeek, periodPeek, periodPeek);\n }", "protected void updateLoading()\n {\n scheduled = false;\n\n if (!valid)\n return;\n\n while (loading.size() < numConnections) {\n updateActiveStats();\n\n final TileInfo tile;\n synchronized (toLoad) {\n if (toLoad.isEmpty())\n break;\n tile = toLoad.last();\n if (tile != null) {\n toLoad.remove(tile);\n }\n }\n if (tile == null) {\n break;\n }\n\n tile.state = TileInfoState.Loading;\n synchronized (loading) {\n if (!loading.add(tile)) {\n Log.w(\"RemoteTileFetcher\", \"Tile already loading: \" + tile.toString());\n }\n }\n\n if (debugMode)\n Log.d(\"RemoteTileFetcher\",\"Starting load of request: \" + tile.fetchInfo.urlReq);\n\n // Set up the fetching task\n tile.task = client.newCall(tile.fetchInfo.urlReq);\n\n if (tile.isLocal) {\n // Try reading the data in the background\n new CacheTask(this,tile).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR,(Void)null);\n } else {\n startFetch(tile);\n }\n }\n\n updateActiveStats();\n }", "private void follow_updates() {\n new Thread() {\n public void run() {\n while(true) {\n try {\n Thread.sleep(1000);\n GUI.setUps(upd_count);\n upd_count = 0;\n }\n catch(Exception e) {\n e.printStackTrace();\n }\n }\n }\n }.start();\n }" ]
[ "0.6303798", "0.6048659", "0.6025919", "0.58661366", "0.5813624", "0.58042574", "0.57576615", "0.57253486", "0.57018346", "0.5647217", "0.5645845", "0.5494743", "0.5477457", "0.5477359", "0.54684055", "0.54291785", "0.5406902", "0.5391428", "0.53773665", "0.53410447", "0.53279036", "0.53228384", "0.52790976", "0.5272762", "0.5256075", "0.524765", "0.52363914", "0.5223209", "0.522211", "0.5209694", "0.52017", "0.51759505", "0.51685804", "0.51682055", "0.5161895", "0.51561964", "0.5146514", "0.5132141", "0.5126141", "0.5113525", "0.51131713", "0.5110028", "0.5099684", "0.508842", "0.5074855", "0.50743145", "0.50681794", "0.5064762", "0.5061643", "0.5061643", "0.5061643", "0.50601494", "0.50601494", "0.50601494", "0.50601494", "0.5057172", "0.50544274", "0.50520164", "0.50499797", "0.5048205", "0.50460315", "0.50352013", "0.5023049", "0.50195205", "0.5017588", "0.50122285", "0.50051165", "0.5004935", "0.5003398", "0.49961278", "0.49926913", "0.4990804", "0.49903652", "0.4988682", "0.49854556", "0.4983748", "0.4981538", "0.49737766", "0.49676254", "0.49654728", "0.49631742", "0.49603692", "0.49573597", "0.4956842", "0.49555176", "0.4950633", "0.49482435", "0.49454814", "0.49393094", "0.4934587", "0.49321228", "0.49311522", "0.49277532", "0.4926292", "0.4921488", "0.4920716", "0.4920438", "0.4920067", "0.49144247", "0.49090195" ]
0.69174933
0
The thread's run() method. Updates the time and all the DWR clients currently "connected" to the server.
public void run() { boolean run = true; while (run) { try { // Update time and "log" it. d = new Date(); System.out.println(d); // Update all clients. String currentPage = wContext.getCurrentPage(); Collection sessions = wContext.getScriptSessionsByPage(currentPage); Util utilAll = new Util(sessions); utilAll.setValue("divTest", d.toString(), true); // Next update in one second. sleep(1000); } catch (Exception e) { // If anything goes wrong, just end, but also set pointer to this // thread to null in parent so it can be restarted. run = false; t = null; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void run()\n {\n try\n {\n logger.debug(\"Starting server-side thread\");\n while (active)\n {\n List<Node> nodesFromQuery = null;\n if (clients.size() > 0)\n {\n nodesFromQuery = BeanLocator.getRouterService().findNodesWithNumberOfMessages(routerId);\n logger.debug(\"Number of nodesFromQuery for this routerId :\" + routerId + \" is:\" + nodesFromQuery.size());\n\n for (Node node : nodesFromQuery)\n {\n // if node exists in map\n if (this.nodes.get(node.getId()) != null)\n {\n logger.debug(\"Node already in map\");\n // check if something has been updated on the node - using hashcode\n\n logger.debug(this.nodes.get(node.getId()).getNumberOfMessagesHandled().toString());\n logger.debug(node.getNumberOfMessagesHandled().toString());\n boolean hasNumberOfMessagesChanged = !this.nodes.get(node.getId()).getNumberOfMessagesHandled().equals(node.getNumberOfMessagesHandled());\n if (hasNumberOfMessagesChanged)\n {\n logger.debug(\"Fire update event..\");\n // if something has changed fire update event\n this.nodes.put(node.getId(), node);\n fireNodeUpdatedEvent(node);\n } else\n {\n // nothing changed - ignore and log\n logger.info(\"Nothing changed on node :\" + node.getId());\n }\n } else\n {\n // else if node does not exist store the node in the map\n logger.debug(\"Storing node in map\");\n this.nodes.put(node.getId(), node);\n fireNodeUpdatedEvent(node);\n }\n }\n } else\n {\n logger.info(\"Thread running but no registered clients\");\n }\n Thread.sleep(CALLBACK_INTERVALL);\n }\n logger.debug(\"Stopping server-side thread. Clearing nodes and clients.\");\n clients.clear();\n nodes.clear();\n }\n catch (InterruptedException ex)\n {\n logger.warn(\"Thread interrupted.\", ex);\n }\n }", "public void run()\n {\n try {\n clientSocket = serverSocket.accept();\n System.out.println(\"Client connected.\");\n clientOutputStream = new PrintWriter(clientSocket.getOutputStream(), true);\n clientInputStream = new BufferedReader( new InputStreamReader(clientSocket.getInputStream()));\n\n while(isRunning)\n {\n try {\n serverTick(clientSocket, clientOutputStream, clientInputStream);\n } catch (java.net.SocketException e)\n {\n //System.out.println(\"Network.Client closed connection. Ending server\");\n this.closeServer();\n }\n }\n } catch (Exception e1) {\n // TODO Auto-generated catch block\n e1.printStackTrace();\n }\n\n /***Legacy Code for allowing multiple users. No point in spending time implementing\n * When this is just suppose to be one way communication\n\n try {\n acceptClients.join();\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n closeServer();\n */ }", "@Override\n\tpublic void run()\n\t{\n\t\tThread serverWorker = new Thread(tcpServer); \n\t\tserverWorker.start(); \n\t\t\n\t\tThread clientManagerWorker = new Thread(clientManager);\n\t\tclientManagerWorker.start();\n\t\t\n\t\twhile(true)\n\t\t{\n\t\t\tif (tcpServer.newPlayer() == true)\n\t\t\t{\n\t\t\t\tnewClients = tcpServer.getNewClients();\n\t\t\t\tfor (Client client : newClients)\n\t\t\t\t{\n\t\t\t\t\tlog.log(\"GameEngine: Adding new client #\" + clients.size());\n\t\t\t\t\tgameState.addPlayer(client); \n\t\t\t\t\tclients.add(client); \n\t\t\t\t}\n\t\t\t\tnewClients.clear();\n\t\t\t}\n\t\t\t\n\t\t\tgameState.updatePlayers(clientManager.getPending()); \n\t\t\tgameState.update();\n\t\t\t\n\t\t\tString gameString = gameState.toJson();\n\t\t\t//System.out.println(gameString);\n\t\t\t//System.out.println(\"gameString length: \" + gameString.length());\n\t\t\ttry {\n\t\t\t\tsendUpdate(gameString, gameState.sequenceNumber);\n\t\t\t} catch (IOException e1) {\n\t\t\t\tlog.log(\"Failed to send update to clients\");\n\t\t\t\te1.printStackTrace();\n\t\t\t} \n\t\t\t\n\t\t\ttry \n\t\t\t{\n\t\t\t\tThread.sleep(15);\n\t\t\t} \n\t\t\tcatch (InterruptedException e) \n\t\t\t{\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void run() {\n\t\ttry {\n\t\t\tfor (;;) {\n\t\t\t\t/**\n\t\t\t\t * Sends notifications at timeout intervals every timeout\n\t\t\t\t */\n\t\t\t\tThread.sleep(NOTIFICATION_TIMEOUT);\n\n\t\t\t\t/** Do nothing if the session map is not initialized */\n\t\t\t\tif (EventWebSocketAdapter_R.sessions == null) {\n\t\t\t\t\tlogger.info(\"The sessions map is 'null ... do nothing.\\n\");\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tlogger.info(\"The sessions map length is '%d'\\n\", EventWebSocketAdapter_R.sessions.size());\n\n\t\t\t\t/** Do nothing if there is no connection */\n\t\t\t\tif (EventWebSocketAdapter_R.sessions.size() == 0) {\n\t\t\t\t\tlogger.info(\"The sessions map length is '%d' ... do nothing.\\n\",\n\t\t\t\t\t\t\tEventWebSocketAdapter_R.sessions.size());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t/** Sends notifications to all connected clients */\n\t\t\t\tfor (Map.Entry<Integer, Session> entry : EventWebSocketAdapter_R.sessions.entrySet()) {\n\t\t\t\t\tentry.getValue().getRemote().sendString(String.format(\"'%tT' from server '%s'\",\n\t\t\t\t\t\t\tCalendar.getInstance().getTime(), entry.getValue().getLocalAddress()));\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Throwable T) {\n\t\t\t/** Trace error */\n\t\t\tlogger.catching(T);\n\t\t} finally {\n\t\t\t/** Trace info */\n\t\t\tlogger.info(String.format(\"Thread '%s' shutdown ... \\n\", Thread.currentThread().getName()));\n\t\t}\n\t}", "@Override\n public void run() {\n while (LANSyncServer.IS_CLIENT_ALIVE) {\n try {\n LANSyncServer.smsserver.sendMessage(HandleProcess.REFRESH_REQUEST_MESSAGE);\n Thread.sleep(6000);\n } catch (InterruptedException ex) {\n Logger.getLogger(SyncRequestServer.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "public void run(){\n while(thread != null){\n try{\n clientSocket = serverSocket.accept();\n System.out.println(\"Client Connected\");\n ClientHandler client = new ClientHandler(clientSocket, clientArray, this);\n clientArray.add(client);\n client.start();\n currentItem = item.get(Index);\n displayItem();\n }\n\n catch(IOException ioExc){\n ioExc.printStackTrace();\n }\n //Starts the time and rests it\n if(newTimer){\n startTimer();\n newTimer = false;\n }\n }\n }", "@Override\r\n\t\tpublic void run()\r\n\t\t{\r\n\r\n\t\t\t\r\n\t\t\twhile(clientsocket.isConnected())\r\n\t\t\t{\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\t// get type for update. 1 for object update, 2 for new attack object\r\n\t\t\t\t\tint type = rdata.readInt();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(type == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tString playerupdatestr = rdata.readUTF();\r\n\t\t\t\t\t\tJsonObject jsonObject = server.gson.fromJson(playerupdatestr, JsonObject.class);\r\n\t\t\t\t\t\tint index = findlistindex(jsonObject.get(\"ID\").getAsInt());\r\n\t\t\t\t\t\tArrayList<CollideObject> templist = server.cdc.collideObjectManager[mode].collideObjectList;\r\n\t\t\t\t\t\tCollideObject obj = server.gson.fromJson(jsonObject, templist.get(index).getClass());\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\ttemplist.set(index,obj);\r\n\t\t\t\t\t\tif(obj.getFlag())\r\n\t\t\t\t\t\t\tserver.cdc.calculatecollide(mode);\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tserver.broacast_update(mode , obj);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tString classname = rdata.readUTF();\r\n\t\t\t\t\t\tint id = rdata.readInt();\r\n\t\t\t\t\t\tint index = findlistindex(id);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tserver.cdc.collideObjectManager[mode].addAttackObject(collideObjecctClass.valueOf(classname), server.idcount[mode], server.randposition(),(Character) server.cdc.collideObjectManager[mode].collideObjectList.get(index));\r\n\t\t\t\t\t\t++server.idcount[mode];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t\tcatch (Exception e)\r\n\t\t\t\t{\r\n\t\t\t\t\t// TODO: handle exception\r\n\t\t\t\t\t//e.printStackTrace();\r\n\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}", "public void run() {\n\t\twhile (true) {\n\t\t\tSocket clientSocket = null;\n\t\t\ttry {\n\t\t\t\tclientSocket = server.accept();\n\t\t\t\tview.writeLog(\"New client connected\");\n\t\t\t\tClientThread client = new ClientThread(clientSocket, this);\n\t\t\t\t(new Thread(client)).start();\n\t\t\t} catch (IOException e) {e.printStackTrace();}\n\t\t}\n\t}", "@Override\n\t\tpublic void run() {\n\t\t\tint clients = connectedClients.get();\n\t\t\tdouble standardDeviation = 0;\n\t\t\tdouble mean = 0;\n\t\t\tInteger total = 0;\n\t\t\tsynchronized (currentClients) {\n\t\t\t\tfor (Map.Entry<String, Integer> entry : currentClients.entrySet())\n\t\t\t\t\ttotal += entry.getValue();\n\n\t\t\t\tif (clients != 0) {\n\t\t\t\t\tmean = total / clients;\n\n\t\t\t\t\tfor (Map.Entry<String, Integer> entry : currentClients.entrySet()) {\n\t\t\t\t\t\tString k = entry.getKey();\n\t\t\t\t\t\tInteger v = entry.getValue();\n\n\t\t\t\t\t\tstandardDeviation += Math.pow(v - mean, 2);\n\t\t\t\t\t\tcurrentClients.put(k, 0);\n\t\t\t\t\t}\n\t\t\t\t\tstandardDeviation = Math.sqrt(standardDeviation / clients - 1);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tmean = 0;\n\t\t\t}\n\n\t\t\tif (Double.isNaN(standardDeviation))\n\t\t\t\tstandardDeviation = 0;\n\n\t\t\tSystem.out.printf(\"[%s] Server Throughput: %d messages/s, \" +\n\t\t\t\t\t\t\t\"Active Client Connections: %d, \" +\n\t\t\t\t\t\t\t\"Mean Per-client Throughput: %f messages/s, \" +\n\t\t\t\t\t\t\t\"Std. Dev. Of Per-client Throughput: %f messages/s%n\",\n\t\t\t\t\tnew Timestamp(System.currentTimeMillis()),\n\t\t\t\t\ttotal,\n\t\t\t\t\tclients,\n\t\t\t\t\tmean,\n\t\t\t\t\tstandardDeviation\n\t\t\t\t\t);\n\n\n\t\t\t//reset variables for next output\n\t\t\tmessagesSent.set(0);\n\t\t\tmessagesReceived.set(0);\n\n\n\t\t}", "public void run() {\n\t\tthis.checkConnectedList();\n\t}", "public void run() {\n while (true) {\n try {\n // Poll server for snapshots and update client\n GameSnapshot snapshot = this.server.getSnapshot();\n client.updateDisplay(snapshot);\n Thread.sleep(250);\n } catch (InterruptedException e) {\n return;\n } catch (RemoteException e) {\n // Find a new master if current master is down\n GameServer newMaster = this.client.findNewMaster();\n if (newMaster != null)\n this.server = newMaster;\n else\n return;\n } catch (NotMasterException e) {\n // Find new master; if it can't, update its master manually\n GameServer newMaster = this.client.findNewMaster();\n if (newMaster != null)\n this.server = newMaster;\n else\n return;\n }\n }\n }", "@Override\n\t\tpublic void run() {\n\t\t\tsuper.run();\n\t\t\tThread thisThread = currentThread();\n\t\t\ttry {\n\t\t\t\tLog.i(\"con\", \"worked3\");\n\t\t\t\tconnectToServer();\n\t\t\t\tif (connected) {\n\t\t\t\t\tsetUpStreams();\n\t\t\t\t\tsendProfile();\n\t\t\t\t\tLog.i(\"con\", \"worked8\");\n\t\t\t\t\twhile (blinker == thisThread) {\n\t\t\t\t\t\tstartListening();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\tLog.e(\"cl\", \"Found IO Exception!: \" + e);\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\tLog.e(\"cl\", \"Found class not found exception!: \" + e);\n\t\t\t}\n\n\t\t}", "public void run() {\r\n\t\twhile (true) {\r\n\t\t\ttry {\r\n\t\t\t\tThread.sleep(750);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t}\r\n\t\t\t// use the repain method to print the info coming from the server on the screen\r\n\t\t\trepaint();\r\n\t\t}\r\n\t}", "public void run() {\n\t\ttry {\n\t\t\ttryToConnect();\n\t\t\tif(!fromServer.equals(null) && fromServer.equals(\"VALIDATED\")){\n\t\t\t\tmsg(\"Connected Successfully and was Validated\");\n\t\t\t\tClient.updateConnectedClients(id);\n\t\t\t\tmsg(\"connectedClients array index = \" +id+ \" \" +Client.connectedClients[id]);\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\tmsg(\"Waiting for another session to connect\");\n\t\t\t\twhile(!fromServer.equals(\"VALIDATED\")) tryToConnect();\n\t\t\t}\n\t\t\t\n\t\t\t//validated threads should continue\n\t\t\tfromServer = in.readLine();\n\t\t\twhile(!fromServer.equals(null)){\n\t\t\t\tif(fromServer.equals(\"sorry\"))return; //it's the end of the day, go home\n\t\t\t\tif(fromServer.equals(\"MOVIEPLAYING\")){\n\t\t\t\t\tmsg(\"Am watching movie now.\");\n\t\t\t\t}\n\t\t\t\tif(fromServer.equals(\"done\"))return;\n\t\t\t\tfromServer = in.readLine();\n\t\t\t}\n\t\t\t\t\n\t\n\t\t}catch (UnknownHostException 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}", "@Override\n public void run() {\n syncToServer();\n }", "@Override\n\tpublic void run() {\n\n\t\treceiveClients();\n\n\t\tbeginLogging();\n\t}", "@Override\n\tpublic void run() {\n\t while (true) {\n\t try {\n\t\t\t\tsocket = serverSocket.accept();\n\n\t \tClient client = new Client(socket);\n\t \tclientList.add(client);\n\t \tSystem.out.println(\"New user connected.\");\n\n\t \tthreadProc = new Thread(client);\n\t \tthreadProc.start();\n\t \n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t }\n\t}", "public void run() {\r\n try {\r\n while (true) {\r\n Socket serverClient = serverSocket.accept(); //server accept the contentServerId connection request\r\n ServerClientThread sct = new ServerClientThread(serverClient, lamportClock, feeds, timers); //send the request to a separate thread\r\n sct.start();\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "@Override\n public void run() {\n try{\n System.out.println(\"A new client is trying to connect\");\n inputFromClient = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n outputFromServer = new PrintWriter(socket.getOutputStream(),true);\n retrievingClientInformation(); // Identifies clients\n sendPreviousMessagesToClient(); // Sends last 15 messages to new comers\n while (clientConnected) // It will execute until client sends a signal to disconnect\n {\n readMessagesFromClients(); // Reads a client inputs then sends them to other clients\n }\n }catch (IOException ioException)\n {\n \tSystem.out.println(username + \" has left the chat.\"); // Announce client's disconnection on server\n }finally {\n try\n {\n socket.close();\n }catch (IOException ioException)\n {\n \tSystem.out.println(username + \" has left the chat.\"); // Announce client's disconnection on server\n }\n }\n }", "public void run()\r\n {\r\n try\r\n {\r\n //Create a ObjectInputStream for communication; the client\r\n // is using a ObjectOutputStream to write to us\r\n ObjectInputStream objectIn = new ObjectInputStream(socket.getInputStream());\r\n //Over and over forever\r\n while (true)\r\n {\r\n //Adds new Gson instance\r\n Gson gson = new Gson();\r\n \r\n //Read all traffic entries \r\n TrafficEntry entry = gson.fromJson(objectIn.readObject().toString(), TrafficEntry.class);\r\n // if the entry exists then log it and send it on.\r\n if (entry != null)\r\n {\r\n System.out.println(\"Received Traffic Entry from \" + entry.stationLocationID);\r\n server.sendObjectToAll(entry);\r\n System.out.println(entry.convertToString());\r\n }\r\n }\r\n } catch (Exception ie)\r\n {\r\n System.out.println(ie.getMessage());\r\n }\r\n finally{\r\n //The connection is closed for one reason or another,\r\n // so have the server dealing with it\r\n server.removeConnection( socket ); \r\n }\r\n }", "public void run() {\n try {\n socketIn = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n socketOut = new ObjectOutputStream(socket.getOutputStream());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n readFromClient();\n pingToClient();\n }", "@Override\n public void run() {\n // When we read from the input stream, broadcast it to all client observers to relay to the clients via the respective socket.\n try {\n Object dataFromClient = inputFromClient.readObject();\n while (dataFromClient != null) {\n setChanged();\n if(dataFromClient instanceof Integer){\n Integer clientID = (Integer) dataFromClient;\n // This client sent its client id to be added to or removed from registered users. So, send the updated list to all observers to push to ALL clients.\n if(registeredUsers.contains(clientID)){\n removeClient(clientID);\n clientData.remove(clientID);\n }else {\n registeredUsers.add((Integer)dataFromClient); // Add the new client's future ID to the list of registered users. ID sent\n }\n System.out.println(\"Server sending \" + registeredUsers);\n notifyObservers(registeredUsers);\n }else if (dataFromClient instanceof Group){\n System.out.println(\"Server received \" + dataFromClient);\n Group group = (Group)dataFromClient;\n if(group.getGroupID() == -1){ // Indicates group is asking for proper id.\n group.setGroupID(currentGroupNumber);\n System.out.println(\"Here ya go, number \" + currentGroupNumber);\n currentGroupNumber++;\n }\n notifyObservers(group);\n }else{\n notifyObservers(dataFromClient);\n }\n System.out.println(\"Server sent \" + dataFromClient);\n dataFromClient = inputFromClient.readObject();\n }\n } catch (IOException | ClassNotFoundException e) {\n System.out.println(\"Could not read data from client\");\n }\n }", "@Override\n\tpublic void run()\n\t{\n\t\tSocket clientSocket;\n\t\tMemoryIO serverIO;\n\t\t// Detect whether the listener is shutdown. If not, it must be running all the time to wait for potential connections from clients. 11/27/2014, Bing Li\n\t\twhile (!super.isShutdown())\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// Wait and accept a connecting from a possible client residing on the coordinator. 11/27/2014, Bing Li\n\t\t\t\tclientSocket = super.accept();\n\t\t\t\t// Check whether the connected server IOs exceed the upper limit. 11/27/2014, Bing Li\n\t\t\t\tif (MemoryIORegistry.REGISTRY().getIOCount() >= ServerConfig.MAX_SERVER_IO_COUNT)\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\t// If the upper limit is reached, the listener has to wait until an existing server IO is disposed. 11/27/2014, Bing Li\n\t\t\t\t\t\tsuper.holdOn();\n\t\t\t\t\t}\n\t\t\t\t\tcatch (InterruptedException e)\n\t\t\t\t\t{\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// If the upper limit of IOs is not reached, a server IO is initialized. A common Collaborator and the socket are the initial parameters. The shared common collaborator guarantees all of the server IOs from a certain client could notify with each other with the same lock. Then, the upper limit of server IOs is under the control. 11/27/2014, Bing Li\n//\t\t\t\tserverIO = new MemoryIO(clientSocket, super.getCollaborator(), ServerConfig.COORDINATOR_PORT_FOR_MEMORY);\n\t\t\t\tserverIO = new MemoryIO(clientSocket, super.getCollaborator());\n\t\t\t\t// Add the new created server IO into the registry for further management. 11/27/2014, Bing Li\n\t\t\t\tMemoryIORegistry.REGISTRY().addIO(serverIO);\n\t\t\t\t// Execute the new created server IO concurrently to respond the client requests in an asynchronous manner. 11/27/2014, Bing Li\n\t\t\t\tsuper.execute(serverIO);\n\t\t\t}\n\t\t\tcatch (IOException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void run() {\n while (true) {\n try {\n /* Get string from client */\n String fromClient = this.in.readLine();\n \n /* If null, connection is closed, so just finish */\n if (fromClient == null) {\n for (int x=0; x<clientlist.size(); x++) {\n if (this == clientlist.get(x)){ clientlist.get(x).out.println(\"Client \" + this.id + \" disconnected\"); }\n }\n this.in.close();\n this.out.close();\n this.socket.close();\n return;\n }\n \n /* If the client said \"bye\", close the connection */\n if (fromClient.equals(\"bye\")) {\n for (int x=0; x<clientlist.size(); x++) {\n if (this != clientlist.get(x)){ clientlist.get(x).out.println(\"Client \" + this.id + \" said bye, disconnecting\"); }\n }\n this.in.close();\n this.out.close();\n this.socket.close();\n return;\n }\n\n if(fromClient.startsWith(\"/id \")) {\n String oldID=this.id;\n String msg = this.changeID(fromClient.substring(4));\n if (msg.equals(\"\")) {\n for (int x=0; x<clientlist.size(); x++) {\n if (this != clientlist.get(x)){ clientlist.get(x).out.println(\"Client \" + oldID + \" changed his/her name to \" + this.id); }\n }\n }\n else {\n this.out.println(msg);\n }\n }\n else if(fromClient.startsWith(\"/whisper \")){\n String msg = this.whisper(fromClient.substring(9, StringUtils.ordinalIndexOf(fromClient, \" \", 2)));\n String user = fromClient.substring(9, StringUtils.ordinalIndexOf(fromClient, \" \", 2));\n for (int x=0; x<clientlist.size(); x++) {\n if (user.equalsIgnoreCase(clientlist.get(x).id) && !user.equalsIgnoreCase(this.id)){\n clientlist.get(x).out.println(this.id + \" whispered : \" + (fromClient.substring(StringUtils.ordinalIndexOf(fromClient, \" \", 2)+1)).toUpperCase() );\n }\n }\n if(!msg.equalsIgnoreCase(\"\")){ this.out.println(msg); }\n }\n else if(fromClient.startsWith(\"/room \")){\n String msg = this.roomChange(fromClient.substring(6));\n String roomName = fromClient.substring(6);\n for (int x=0; x<rooms.size(); x++) {\n if (rooms.get(x).title.equalsIgnoreCase(roomName)) {\n for (int y = 0; y < clientlist.size(); y++) {\n if (rooms.get(x).hasClient(clientlist.get(y).id) && !clientlist.get(y).id.equalsIgnoreCase(this.id)) {\n clientlist.get(y).out.println(this.id + \" has joined room \" + roomName);\n }\n }\n }\n }\n this.out.println(msg);\n\n room aRoom = new room(\"x\");\n for(room theRoom : rooms){\n ArrayList<String> members = theRoom.getMembers();\n for(String member : members) {\n if (member.equalsIgnoreCase(this.id)) {\n aRoom = theRoom;\n }\n }\n }\n\n this.out.print(\"The admins in the group are: \");\n for(String admin: aRoom.getAdmins()){\n this.out.print(admin + \" \");\n }\n this.out.println(\"\");\n this.out.println(\"The topic of the room is \" + aRoom.topic);\n }\n else if(fromClient.startsWith(\"/+admin \")){\n if (!this.isAdmin()){\n this.out.println(\"You don't have permission to use that command\");\n }\n String roomName=\"\";\n room aRoom = new room(\"x\");\n String user = fromClient.substring(8);\n for(room theRoom : rooms){\n ArrayList<String> admins = theRoom.getAdmins();\n for(String admin : admins) {\n if (admin.equalsIgnoreCase(this.id)) {\n roomName = theRoom.title;\n aRoom = theRoom;\n }\n }\n }\n this.addAdmin(user, roomName);\n for (int x=0; x<clientlist.size(); x++) {\n if (aRoom.getMembers().contains(clientlist.get(x).id) && !user.equalsIgnoreCase(this.id)){\n clientlist.get(x).out.println(user + \" was made an admin of \" + roomName);\n }\n }\n }\n else if(fromClient.startsWith(\"/-admin \")){\n if (!this.isAdmin()){\n this.out.println(\"You don't have permission to use that command\");\n }\n String roomName=\"\";\n room aRoom = new room(\"x\");\n String user = fromClient.substring(8);\n for(room theRoom : rooms){\n ArrayList<String> admins = theRoom.getAdmins();\n for(String admin : admins) {\n if (admin.equalsIgnoreCase(this.id)) {\n roomName = theRoom.title;\n aRoom = theRoom;\n }\n }\n }\n this.removeAdmin(user);\n for (int x=0; x<clientlist.size(); x++) {\n if (aRoom.getMembers().contains(clientlist.get(x).id) && !user.equalsIgnoreCase(this.id)){\n clientlist.get(x).out.println(clientlist.get(x).id + \" was removed from the admin position in \" + roomName);\n }\n }\n }\n else if(fromClient.startsWith(\"/kick \")){\n if (!this.isAdmin()){\n this.out.println(\"You don't have permission to use that command\");\n }\n String user = fromClient.substring(6);\n String roomName=\"\";\n room aRoom = new room(\"x\");\n for(room theRoom : rooms){\n ArrayList<String> admins = theRoom.getAdmins();\n for(String admin : admins) {\n if (admin.equalsIgnoreCase(this.id)) {\n roomName = theRoom.title;\n aRoom = theRoom;\n }\n }\n }\n for (int x=0; x<clientlist.size(); x++) {\n if (aRoom.getMembers().contains(clientlist.get(x).id) && !user.equalsIgnoreCase(this.id) && !clientlist.get(x).id.equalsIgnoreCase(user)){\n clientlist.get(x).out.println(user + \" was kicked from \" + roomName);\n }\n else if (aRoom.getAdmins().contains(user) && clientlist.get(x).id.equalsIgnoreCase(this.id) ){\n this.out.println(\"You cannot kick an admin of the group\");\n }\n else if (aRoom.getMembers().contains(clientlist.get(x).id) && clientlist.get(x).id.equalsIgnoreCase(user)) {\n clientlist.get(x).out.println(\"You are being kicked from \" + roomName + \" by \" + this.id + \", and being placed in Lobby.\");\n this.kick(user);\n }\n }\n }\n else if(fromClient.startsWith(\"/topic \")){\n if (!this.isAdmin()){\n this.out.println(\"You don't have permission to use that command\");\n }\n String topic = fromClient.substring(7);\n String roomName=\"\";\n\n for(room theRoom : rooms){\n ArrayList<String> members = theRoom.getMembers();\n for(String member : members) {\n if (member.equalsIgnoreCase(this.id)) {\n roomName = theRoom.title;\n }\n }\n }\n\n this.addTopic(topic);\n for (int x=0; x<rooms.size(); x++) {\n if (rooms.get(x).title.equalsIgnoreCase(roomName)) {\n for (int y = 0; y < clientlist.size(); y++) {\n if (rooms.get(x).hasClient(clientlist.get(y).id) && !clientlist.get(y).id.equalsIgnoreCase(this.id) && rooms.get(x).getAdmins().contains(this.id)) {\n clientlist.get(y).out.println(this.id + \" changed the topic of the room to \" + topic);\n }\n }\n }\n }\n }\n \n /* Otherwise send the text to the server*/\n\n else {\n for (int y=0; y < rooms.size(); y++) {\n for (int x = 0; x < clientlist.size(); x++) {\n if (this != clientlist.get(x)) {\n if(rooms.get(y).hasClient(this.id) && rooms.get(y).hasClient(clientlist.get(x).id)) {\n clientlist.get(x).out.println(\"Client \" + this.id + \" said: \" + fromClient);\n }\n }\n }\n }\n }\n \n } catch (IOException e) {\n /* On exception, stop the thread */\n System.out.println(\"IOException: \" + e);\n return;\n }\n }\n }", "@Override\n public void run() {\n synchronized(_registries) {\n _udpServer.bcast(resp, _registries);\n }\n\n // Update each of the registration lists to remove outdated listeners\n updateRegistrations(_poseListeners);\n updateRegistrations(_imageListeners);\n updateRegistrations(_cameraListeners);\n updateRegistrations(_velocityListeners);\n updateRegistrations(_waypointListeners);\n synchronized(_sensorListeners) {\n for (Map<SocketAddress, Integer> sensorListener : _sensorListeners.values())\n updateRegistrations(sensorListener);\n }\n }", "@Override\n\t\tpublic void run() {\n\t\t\ttry {\n\t\t\t\tLog.v(TAG,\"connect to server...\");\n\t\t\t\tsocket=new Socket(\"140.116.246.200\",4000+id);\n\t\t\t\tout=socket.getOutputStream();\n\t\t\t\tin=socket.getInputStream();\n\t\t\t\tLog.v(TAG,\"connect!!\");\n\t\t\t\n\t\t\t\tsendData(\"ask#\");\n\t\t\t\tUIHr.post(refreshUI); \t\n\t\t\t\tresult=new Integer(readData());\n\t\t\t\tUIHr.post(refreshUI); \t\t\n\t\t\t\tsendData(\"over#\");\n\t\t\t\tsocket.close();\n\t\t\t} catch (UnknownHostException e) {e.printStackTrace();} \n\t\t\tcatch (IOException e) {e.printStackTrace();}\n\t\t}", "@Override\n public void run() {\n EndpointServer random = Preferences.getEndpointServer(mContext);\n\n /** no server found -- notify to user */\n if (random == null) {\n Log.i(TAG, \"no list to pick a random server from - aborting\");\n\n // notify to UI\n if (mListener != null)\n mListener.nodata();\n\n return;\n }\n\n try {\n // TODO\n /*\n mConnection = new ClientHTTPConnection(null, mContext, random, null);\n Protocol.ServerList data = mConnection.serverList();\n if (data != null) {\n // write down to cache\n OutputStream out = new FileOutputStream(getCachedListFile(mContext));\n data.writeTo(out);\n out.close();\n }\n\n // parse cached list :)\n sCurrentList = parseList(data);\n if (mListener != null)\n mListener.updated(sCurrentList);\n\n // restart message center\n MessageCenterService.restartMessageCenter(mContext.getApplicationContext());\n */\n throw new IOException();\n }\n catch (IOException e) {\n if (mListener != null)\n mListener.error(e);\n }\n finally {\n mConnection = null;\n }\n }", "public void run() {\n\t\t\twhile(true){\n\t\t\t\t//recieve new state\n\t \t \t\t//StoryFactory.getInstance().setAllLogs((ArrayList<ArrayList<UserStory>>) inputFromServer.readObject());\n\t\t\t}\t\t \n\t\t}", "@Override\r\n\tpublic void run() {\n\t\trunClient();\r\n\t}", "public void run() {\n\n // Start threadPool\n for (int i = 0; i < nbThreads; i++) {\n ThreadClient threadClient = new ThreadClient(listSocketDevice, String.valueOf(i), handler);\n arrayThreadClients.add(threadClient);\n threadClient.start();\n }\n\n while (true) {\n try {\n if (v) Log.d(TAG, \"Server is waiting on accept...\");\n ISocket isocket = acceptISocket();\n\n if (v) Log.d(TAG, isocket.getRemoteSocketAddress() + \" accepted\");\n listSocketDevice.addSocketClient(isocket);\n\n // Notify handler\n handler.obtainMessage(Service.CONNECTION_PERFORMED,\n isocket.getRemoteSocketAddress()).sendToTarget();\n\n } catch (SocketException e) {\n handler.obtainMessage(Service.LOG_EXCEPTION, e).sendToTarget();\n break;\n } catch (IOException e) {\n handler.obtainMessage(Service.LOG_EXCEPTION, e).sendToTarget();\n break;\n }\n }\n }", "public void run() {\n\t\tInputStream istream = null;\n\t\ttry {\n\t\t\tistream = (this.socket).getInputStream();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t DataInputStream dstream = new DataInputStream(istream);\n\t \n\t username = null;\n\t try {\n\t \tusername = dstream.readLine();\n\t \tSystem.out.println(username + \" on server side! (username)\");\n\t \tthis.masterServer.addUserName(username);\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 // pause thread to read in from client.\n\t\tString friendUsername = null;\n\t try {\n\t \tfriendUsername = dstream.readLine();\n\t \tSystem.out.println(friendUsername + \" on server side!!!!! (friendUsername)\");\n\t \tfindFriendsThread(friendUsername);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t try {\n\t\t\tdstream.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t try {\n\t\t\tistream.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t //this.masterServer.addUserName(username);\n\t \n\t}", "@Override\n public void run() {\n this.running.set(true);\n Socket socket = null;\n // if flag is set to listen, keep listening for client connection request and keep accepting connections\n while (this.running.get()) {\n try {\n if (connectionCount.get() < Constants.MAX_CLIENT_CONNECTIONS) {\n socket = serverSocket.accept();\n socket.setSoTimeout(30000); // timeout set to 30,000 ms\n socket.setKeepAlive(true);\n log.info(\"Connection Accepted: Local Add {} Remote Add {}\", socket.getLocalAddress(),\n socket.getRemoteSocketAddress());\n // add the connected socket to the list\n socketList.add(socket);\n // Pass the socket to the RequestHandler thread for processing\n IncomingMessageHandler messageHandler = new IncomingMessageHandler(socket, logWriter, fileWriterQueue,\n periodicReportingService, orderShutdown);\n messageHandler.start();\n connectionCount.getAndIncrement();// increment connection count\n log.debug(\"Current number of connections {}\", connectionCount.get());\n } else {\n if(maxConnWarnCount < 4) {\n log.warn(\"Reached maximum connection limit {}; Stopping to accept more client connections\"\n , connectionCount.get());\n maxConnWarnCount++;\n }\n }\n } catch (IOException e) {\n log.error(\"Error in accepting connections\", e);\n if (e instanceof SocketException) {\n log.error(\"SocketException for remote connection\");\n }\n }\n }\n }", "public void run() {\n\t\t// TODO Auto-generated method stub\n\t\twhile(true){\n\t\t\t\n\t\t\tif (DEBUG){\n\t\t\t\tSystem.out.println(\"Server_thread\");\n\t\t\t}\n\t\t\t\n\t\t\ttry{\t\n\t\t\t\trun_list.add(new ClientHandler(serversocket.accept()));\n\t\t\t\tnew Thread (run_list.get(run_list.size()-1)).start();;\n\t\t\t\n\t\t\t\n\t\t}\t\n\t\tcatch (IOException ex){\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\ttry{\n\t\t\tThread.sleep(10);\n\t\t}\n\t\tcatch (InterruptedException ex){\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t}\n\t}", "@SuppressWarnings(\"unchecked\")\n\t\t\t\tpublic void run()\n\t\t\t\t{\n\t\t\t\t\tSocket cliente = null;\n\t\t\t\t\tArrayList<Data> dataReceived;\n\t\t\t\t\tlong initialTime = System.currentTimeMillis();\n\t\t\t\t\twhile(!observer.isClosed())\n\t\t\t\t\t{\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(\"esperando atualizacao do Subject: \");\n\t\t\t\t\t\t\tcliente = observer.accept();\n\t\t\t\t\t\t\tSystem.out.println(\"Observer conectado: \"+cliente.getInetAddress().getHostAddress());\n\t\t\t\t\t\t\tObjectInputStream input = new ObjectInputStream(cliente.getInputStream());\n\t\t\t\t\t\t\ttry \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdataReceived= (ArrayList<Data>) input.readObject();\n\t\t\t\t\t\t\t\tSystem.out.println(\"Tempo decorrido desde a ultima \"\n\t\t\t\t\t\t\t\t\t\t+ \"atualizacao \" + (System.currentTimeMillis()-initialTime));\n\t\t\t\t\t\t\t\tinitialTime = System.currentTimeMillis();\n\t\t\t\t\t\t\t\tinput.close();\n\t\t\t\t\t\t\t\tcliente.close();\n\t\t\t\t\t\t\t\tfor(Data it:dataReceived) {\n\t\t\t\t\t\t\t\t\tCliente.this.point(it.getFramePos(), it.getPosX(), it.getPosY(),\n\t\t\t\t\t\t\t\t\t\t\tit.getColor(), it.getSize());\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} catch (ClassNotFoundException 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} catch (IOException e1) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tcliente.close();\n\t\t\t\t\t\t\t\tthis.run();\n\t\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\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\te1.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "public void run() {\n sendServerRegistrationMessage();\n if (serviceConnectedListener != null) {\n serviceConnectedListener.onServiceConnected(serviceDevice);\n }\n\n isRegistered = true;\n }", "public void run() {\n sendMessageToClient(\"Connexion au serveur réussie\");\n\n while (isActive) {\n try {\n String input = retrieveCommandFromClient();\n handleCommand(input);\n } catch (ServerException e) {\n System.out.println(e.getMessage());\n sendMessageToClient(e.getMessage());\n } catch (ClientOfflineException e) {\n System.out.println(\"Client # \" + clientId + \" deconnecte de facon innattendue\");\n deactivate();\n }\n }\n\n close();\n }", "@Override\n\tpublic void run() {\n\n\t\tURLConnection connection = null;\n\t\ttry {\n\t\t\tIterator<String> iterator = targetSensor.iterator();\n\t\t\tfor (int i = 0; i < targetSensor.size(); i++) {\n\t\t\t\tString sensorName = iterator.next();\n\n\t\t\t\tURL oracle = new URL(\"http://localhost:8081/fakeDataSource/sensors/\" + sensorName + \"/data\");\n\t\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(oracle.openStream()));\n\t\t\t\tString inputLine;\n\n\t\t\t\tString res = \"\";\n\n\t\t\t\twhile ((inputLine = in.readLine()) != null) {\n//System.out.println(\"Received\" + inputLine);\n\t\t\t\t\tres += inputLine;\n\t\t\t\t}\n\t\t\t\tSystem.out.printf(\"Thread [%s] - Tracking sensor %s and received %s\\n\", this.getName(), sensorName, res);\n\n\t\t\t\tin.close();\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void run() {\n try {\n BufferedReader serverInput = new BufferedReader(\n new InputStreamReader(connectionSock.getInputStream()));\n while (running) {\n // Get data sent from the server\n String serverText = serverInput.readLine();\n if (serverInput != null) {\n //System.out.println(\"CLIENT DEBUG: \" + serverText);\n parseResponse(serverText);\n }\n }\n } catch (Exception e) {\n System.out.println(\"Error: \" + e.toString());\n }\n }", "public void run() {\n while (!interrupted) {\n try {\n if (doDelay) {\n getLogger().debug(\"waiting for \" + reconnectionDelay\n + \" milliseconds before reconnecting.\");\n sleep(reconnectionDelay);\n }\n doDelay = true;\n getLogger().debug(\"Attempting connection to \" + host);\n Socket s = new Socket(host, port);\n setSocket(s);\n getLogger().debug(\n \"Connection established. Exiting connector thread.\");\n break;\n } catch (InterruptedException e) {\n getLogger().debug(\"Connector interrupted. Leaving loop.\");\n return;\n } catch (java.net.ConnectException e) {\n getLogger().debug(\"Remote host {} refused connection.\", host);\n } catch (IOException e) {\n getLogger().debug(\"Could not connect to {}. Exception is {}.\",\n host, e);\n }\n }\n }", "@Override\n public void run() {\n try {\n //Connect to socket\n Socket socket = new Socket(host, port);\n System.out.println(\"Client connected\");\n\n //Create reader and writer\n PrintWriter pw = new PrintWriter(new OutputStreamWriter(socket.getOutputStream()));\n BufferedReader br = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n\n if(command.equals(\"POST /time\")){\n toSend = \"POST /time \" + enabled + \" \" + openTime + \" \" + closeTime;\n } else {\n toSend = command;\n }\n //Send the command to the server\n pw.println(toSend);\n pw.flush();\n\n //Get the response and save it\n String serverResponse = br.readLine();\n\n if (command.equals(\"GET /Time\")){\n responseData = serverResponse.split(\",\");\n } else {\n currentPosition = serverResponse;\n }\n System.out.println(\"Current position = \" + currentPosition);\n\n //Close everything\n br.close();\n pw.close();\n socket.close();\n return;\n } catch (Exception e){ // exit cleanly for any Exception (including IOException, DisconnectedException)\n System.out.println(\"Ooops on connection: \" + e.getMessage());\n }\n }", "@Override\r\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tRecieveSocketOfClient(SocketForClient);\r\n\t\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t\t// TODO: handle exception\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}", "@Override\n public void run() {\n //Create server socket\n try (ServerSocket serverSocket = new ServerSocket(serverPort))\n {\n //In loop to continuously accept connections from client\n //main thread doing this\n while (true)\n {\n System.out.println(\"Waiting for client(s) to connect..\");\n //Socket represents connection to client\n Socket clientSocket = serverSocket.accept();\n System.out.println(\"Accepted connection from \" + clientSocket);\n //Message to write to client when connected via outputstream\n OutputStream outputStream = clientSocket.getOutputStream();\n outputStream.write((\"You have connected. Please write: login <username> to login!\\n\" + \"Write <help> for list of additional commands!\\n\").getBytes());\n //Server worker, handles communication with client socket\n ServerWorker worker = new ServerWorker(this, clientSocket);\n //Adding worker to workerlist\n workerList.add(worker);\n //Starting thread worker\n worker.start();\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void run() {\n while (!isClosed) {\n System.out.println(\"reconnecting\");\n int status = reconnect();\n if (status == ServiceConstant.CONNECT_STATE_SUCCESS) {\n isConnecting = false;\n break;\n } else {\n try {\n Thread.sleep(getReconnectInterval());\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\twhile (!client.isClosed()) {\n\t\t\t\t\tSystem.out.println(\"is socket connected\" + client.isConnected());\n\t\t\t\t\tInputStreamReader reader;\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\treader = new InputStreamReader(client.getInputStream());\n\t\t\t\t\t\tBufferedReader buf = new BufferedReader(reader);\n\t\t\t\t\t\tString msg = buf.readLine();\n\t\t\t\t\t\tif (msg != null) {\n\t\t\t\t\t\t\tSystem.out.println(\"server:\" + msg.toString());\n\t\t\t\t\t\t\tString ContextMsg = \"来自被连接的回复:\" + client.getInetAddress() + \"\\n\" + msg.toString();\n\t\t\t\t\t\t\ttextList.add(ContextMsg);\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}", "@Override\n public void run() {\n final JPPFClientConnectionStatus status = driver.getConnection().getStatus();\n if (status.isWorkingStatus()) StatsHandler.getInstance().requestUpdate(driver);\n }", "public void run() {\n\t\t\twhile (true) {// 保持连接直到异常发生或套接字返回\n\t\t\t\ttry {\n\t\t\t\t\tif (serverSocket != null) {\n\t\t\t\t\t\tmTempSocket = serverSocket.accept(); // 如果一个连接同意\n\t\t\t\t\t}\n\t\t\t\t\t// If a connection was accepted\n\t\t\t\t\tif (mTempSocket != null) {\n\t\t\t\t\t\t// Do work to manage the connection (in a separate\n\t\t\t\t\t\t// thread)\n\t\t\t\t\t\tmanageConnectedSocket(); // 管理一个已经连接的RFCOMM通道在单独的线程。\n\t\t\t\t\t\tserverSocket.close();\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "@Override\n public void run() {\n try {\n registerWithServer();\n initServerSock(mPort);\n listenForConnection();\n\t} catch (IOException e) {\n Logger.getLogger(Server.class.getName()).log(Level.SEVERE, null, e);\n setTextToDisplay(\"run(): \" + e.getMessage());\n setConnectedStatus(false);\n\t}\n }", "@Override public void run() {\n\t\t\t\tsaveLogCache();\n\t\t\t\tserverToken = null;\n\t\t\t\toffline = true;\n\t\t\t}", "@Override\n\tpublic void run() {\n\t\twhile(!Server.killServer){\n\t\t\ttry {\n\t\t\t\tThread.sleep(Constants.BROADCAST_BATTLEFIELD_PERIOD_TO_CLIENTS);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t//send to EACH client\n\t\t\tfor(Node client : Server.getClientList().keySet()){\n\t\t\t\t//get client's RMI instance\n\t\t\t\tClientServer clientComm = null;\n\t\t\t\tclientComm = Server.getClientReg(client); \n\t\t\t\t//create Message\n\t\t\t\tClientServerMessage sendBattlefieldMessage = new ClientServerMessage(\n\t\t\t\t\t\t\tMessageType.GetBattlefield,\n\t\t\t\t\t\t\tthis.serverOwner.getName(),\n\t\t\t\t\t\t\tthis.serverOwner.getIP(),\n\t\t\t\t\t\t\tclient.getName(),\n\t\t\t\t\t\t\tclient.getIP());\n\t\t\t\tsendBattlefieldMessage.setBattlefield(Server.getBattlefield());\n\t\t\t\t\n\t\t\t\tif(clientComm==null){\n\t\t\t\t\tSystem.out.println(\"clientComm is null\");\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//System.out.println(\"Server: Battlefield sent\");\n\n\t\t\t\ttry {\n\t\t\t\t\tclientComm.onMessageReceived(sendBattlefieldMessage);\n\t\t\t\t} catch (RemoteException e) {\n\t\t\t\t\t//e.printStackTrace();\n\t\t\t\t} catch (NotBoundException e) {\n\t\t\t\t\t//e.printStackTrace();\n\t\t\t\t}\n\n\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "@Override\n public void run()\n {\n lock = new Lock();\n messenger = new Messenger(notifier);\n clientList = new ClientList(notifier, messenger, connectionLimit);\n publisher = new Publisher(lock, clientList);\n\n try\n {\n notifier.sendToConsole(\"Server Started\");\n LOGGER.info(\"Server Started\");\n\n // Set up networking\n socketFactory = (SSLServerSocketFactory) SSLServerSocketFactory\n .getDefault();\n serverSocket = (SSLServerSocket) socketFactory\n .createServerSocket(port);\n serverSocket.setEnabledCipherSuites(enabledCipherSuites);\n\n int idCounter = 1;\n\n // Now repeatedly listen for connections\n while (true)\n {\n // Blocks whilst waiting for an incoming connection\n socket = (SSLSocket) serverSocket.accept();\n\n conn = new ClientConnection(socket, idCounter, notifier, lock,\n publisher, clientList, password);\n new Thread((Runnable) conn).start();\n\n LOGGER.info(\"Someone connected: \" + idCounter);\n idCounter++;\n }\n\n } catch (final SocketException e)\n {\n LOGGER.severe(\"Socket Exception: Server closed?\");\n notifier.sendToConsole(\"Server Stopped\");\n } catch (final IOException e)\n {\n LOGGER.severe(e.getMessage());\n notifier.sendError(e);\n } finally\n {\n kill();\n }\n }", "@Override\r\n\tpublic void run() {\n\t\twhile(true){\r\n\t\t\tlog.info(\"***** 连接池监控 *****\");\r\n\t\t\ttry {\r\n\t\t\t\tmonitor();\r\n\t\t\t\tThread.sleep(1000 * 60L);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void run()\n {\n try\n {\n String ack = \"You are online!\";\n DatagramPacket outPacket = new DatagramPacket(ack.getBytes(), ack.getBytes().length, clientAddress, udpPort);\n DatagramSocket outSocket = new DatagramSocket();\n outSocket.send(outPacket);\n clients.add(new Client(inMsg.split(\",\")[1], clientAddress));\n System.out.println(LocalDateTime.now() + \n \"\\nClient \" + inMsg.split(\",\")[1] + \" connected!\" +\n \"\\nClient address is : \" + clientAddress + \" (\" + clientUDPPort + \")\" +\n \"\\n============================================\");\n }\n catch(SocketException e)\n {\n System.out.println(\"SocketException in ConnectionAccepter : \" +\n \"\\n\" + e + \n \"\\n============================================\");\n }\n catch(IOException e)\n {\n System.out.println(\"IOException in ConnectionAccepter : \" +\n \"\\n\" + e + \n \"\\n============================================\");\n }\n }", "@Override\n\tpublic void run()\n\t{\n\t\tif (MyServer.flag)\n\t\t{\n\t\t\tTool.getPrintWriter()\n\t\t\t\t\t.println(\"Accept : 3D is online . \\nServer : \" + MyServer.getU3DSocket().size() + \" Connect . \");\n\t\t\twhile (true)\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tThread.sleep(2000);\n\t\t\t\t} catch (InterruptedException e)\n\t\t\t\t{\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// return;\n\t\t} else\n\t\t{\n\t\t\tTool.getPrintWriter().println(\"Accept : Server : \" + MyServer.getSocketList().size() + \" Connect . \");\n\t\t\tTool.getPrintWriter().println(\"Accept : 用户端非3d连接.\");\n\t\t\tTool.getPrintWriter().println(\"Accept : 测试是否空 : \" + (client == null));\n\t\t\tnew Client(client);\n\t\t}\n\t}", "public void run()\n\t\t{\twhile(true)\n\t\t\t{\tString s = ChatServer.message.get();\n\t\t\t\tsynchronized(ChatServer.sessions)\n\t\t\t\t{\tfor(int i = 0; i < ChatServer.size; ++i)\n\t\t\t\t\t\tif(ChatServer.sessions[i] != null)\n\t\t\t\t\t\t\tChatServer.sessions[i].println(s);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "@Override\n public void run() {\n try {\n boolean autoFlush = true;\n fromClient = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));\n toClient = new PrintWriter(clientSocket.getOutputStream(), autoFlush);\n } catch (IOException ioe) {\n throw new UncheckedIOException(ioe);\n }\n for (String entry : communicationWhenStarting) {\n sendMsg(entry);\n }\n while (connected) {\n try {\n Message msg = new Message(fromClient.readLine());\n updateClientAction(msg);\n } catch (IOException ioe) {\n disconnectClient();\n throw new MessageException(ioe);\n }\n }\n }", "public void run() {\n\t\t\twhile (running) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tsocket = mmServerSocket.accept();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\tbluetooth_show_message(\"Bluetooth Error! Accepting a connection failed. Reason:\" + e);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// If a connection was accepted\r\n\t\t\t\t// Do work to manage the connection (in a separate thread)\r\n\t\t\t\tif (socket != null) {\r\n\t\t\t\t\t//System.out.println(\"=========> Bluetooth Connected as Server <===========\");\r\n\t\t\t\t\tdata_thread = new Data_Thread(socket);\r\n\t\t\t\t\tdata_thread.start();\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tmmServerSocket.close();\r\n\t\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tbluetooth.this.server_connect_thread = null;\r\n\t\t}", "public void run() {\n readFromClient();\n }", "@Override\n\tpublic void run()\n\t{\n\t\tif(socket != null && !socket.isClosed() && socket.isConnected())\n\t\t{\n\t\t\tSendMessage(ApplicationManager.Instance().GetName(), MessageType.clientData);\n\t\t\tApplicationManager.textChat.writeGreen(\"Connected to \" + connectionInfo.ServerAdress);\n\t\t\t\n\t\t\ttry \n\t\t\t{\n\t\t\t\twhile (IsConnected) \n\t\t {\n\t\t Message message = (Message) in.readObject();\n\t\t\t\t\t\n\t\t if(!IsConnected)\n\t\t \tbreak;\n\t\t \t\n\t\t if(message == null)\n\t\t {\n\t\t \tIsConnected = false;\n\t\t \tbreak;\n\t\t }\n\t\t \n\t\t HandleMessage(message); \n\t\t }\n\t\t\t \n\t\t\t} \n\t\t\tcatch (SocketException | EOFException e) {\n\t\t\t\tif(IsConnected)\n\t\t\t\tApplicationManager.textChat.writeGreen(\"Server go down!\");\n\t\t\t}\n\t\t\tcatch (IOException | ClassNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tApplicationManager.Instance().Disconnect();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tApplicationManager.textChat.writeGreen(\"Cannot connect!\");\n\t\t\tApplicationManager.Instance().Disconnect();\n\n\t\t}\n\t}", "public void run() {\n int c;\n\n // Run forever, which is common for server style services\n while (true) {\n\n // Wait until someone connects, and indicate this to the user.\n try {\n Socket clientSocket = serverSocket.accept();\n System.out.println(\"Accepted connection from client.\");\n\n // Grab the input/output streams so we can write/read directly to/from them\n OutputStream os = clientSocket.getOutputStream();\n DataInputStream is = new DataInputStream(clientSocket.getInputStream());\n\n // While there is valid input to be read...\n while ( (c = is.read()) != -1) {\n // Write that input back into the output stream, and send it all immediately.\n os.write(c);\n os.flush();\n }\n\n // Close the streams/client socket since we're done.\n System.out.println(\"Closing client connection\");\n os.close();\n is.close();\n clientSocket.close();\n } catch(Exception e) {\n e.printStackTrace();\n }\n }\n }", "public void run() {\r\n String request = \"\";\r\n\r\n try {\r\n /**\r\n * The ClientConnectionHandler constantly waits for requests from the client. Requests are the initial message\r\n * that the client sends. This initial message determines how the server receives the messages that come after\r\n * it (if there are any).\r\n */\r\n while (isOpen) {\r\n request = readMessage();\r\n processRequest(request);\r\n }\r\n clientSocket.close();\r\n System.out.println(\"Client #\" + clientNumber + \" has closed\");\r\n } catch (Exception e) {}\r\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\twhile (true) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tSocket socket = serverSocket.accept();\n\t\t\t\t\t\tclients.add(new Client(socket));\n\t\t\t\t\t\tSystem.out.println(\"[클라이언트 접속] \" + socket.getRemoteSocketAddress() + \": \"\n\t\t\t\t\t\t\t\t+ Thread.currentThread().getName());\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\t\tif (!serverSocket.isClosed()) {\n\t\t\t\t\t\t\tstopServer();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "@Override\n\tpublic void run() {\n\n\t\tServerSocket sSocket;\n\t\ttry {\n\t\t\tsSocket = new ServerSocket(15001);\n\t\t\tSystem.out.println(\"server listening at \" + sSocket.getLocalPort());\n\t\t\twhile (true) {\n\t\t\t\t// this is an unique socket for each client\n\t\t\t\tSocket socket = sSocket.accept();\n\t\t\t\tSystem.out.println(\"Client with port number: \" + socket.getPort() + \" is connected\");\n\t\t\t\t// start a new thread for handling requests from the client\n\t\t\t\tClientRequestHandler requestHandler = new ClientRequestHandler(sketcher, socket, scene, playerMap);\n\t\t\t\tnew Thread(requestHandler).start();\n\t\t\t\t// start a new thread for handling responses for the client\n\t\t\t\tClientResponseHandler responseHandler = new ClientResponseHandler(socket, scene, playerMap);\n\t\t\t\tnew Thread(responseHandler).start();\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t}\n\t}", "public static void update() {\n\t\tnew Thread() {\n\t\t\tpublic void run() {\n\n\t\t\t\ttry {\n\t\t\t\t\tserverSocket2 = new ServerSocket(50000);\n\t\t\t\t\twhile (yes) {\n\t\t\t\t\t\tSocket connection = serverSocket2.accept();\n\n\t\t\t\t\t\tString out = \"\";\n\t\t\t\t\t\tDataOutputStream output = new DataOutputStream(\n\t\t\t\t\t\t\t\tconnection.getOutputStream());\n\t\t\t\t\t\tfor (int j = 0; j < count; j++) {\n\t\t\t\t\t\t\tout += j + \"::\" + b[j].getText() + \" /:\"; // (index,username)\n\t\t\t\t\t\t}\n\t\t\t\t\t\toutput.writeBytes(out + \"\\n\");\n\t\t\t\t\t\tconnection.close();\n\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}.start();\n\t}", "public void run() {\n\t\t\n\t\ttry \n\t\t{\n\t\t\twhile(true)\n\t\t\t{\n\t\t\t\tsocket = socketserver.accept();\n\t\t\t\twriteListIdEmployee();\n\t socket.close();\n\t }\n\t \n\t\t} \n\t\tcatch (IOException e) \n\t\t{\n\t\t\ttry \n\t\t\t{\n\t\t\t\tsocketserver.close();\n\t\t\t} \n\t\t\tcatch (IOException e2) \n\t\t\t{\n\t\t\t\te2.printStackTrace();\n\t\t\t}\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void run ()\r\n\t{\r\n\t\twhile(true)\r\n\t\t{\r\n\t\t\tif(activeSessions.size() == 0)\r\n\t\t\t{\r\n\t\t\t\ttry \r\n\t\t\t\t{\r\n\t\t\t\t\tthis.sleep(20);\r\n\t\t\t\t} catch (InterruptedException e) \r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tfor(int i = 0; i < activeSessions.size(); i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tupdateActiveSession(activeSessions.get(i));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "public void run() {\n\t\tDate curTime;\n\t\twhile(true) {\n\t\t\tcurTime = new Date();\n\t\t\t\n\t\t\t//System.out.println(\"currentTime: \"+ curTime.getTime() +\" prevTime: \"+ _prevPingRequestTime.getTime() +\" diff: \" + (curTime.getTime() - _prevPingRequestTime.getTime()) +\" interval: \"+ _scsynthPingInterval);\n\n\t\t\t//if the previous status request is still pending...\n\t\t\tif (_serverLive && (_prevPingRequestTime.getTime() > _prevPingResponseTime.getTime())) {\n\t\t\t\t//We've not yet heard back from the previous status request.\n\t\t\t\t//Have we timed out?\n\t\t\t\tif (curTime.getTime() - _prevPingRequestTime.getTime() > _serverResponseTimeout) {\n\t\t\t\t\t//We've timed out on the previous status request.\n\t\t\t\t\tSystem.out.println(\"Timed out on previous status request.\");\n\n\t\t\t\t\tif (_notifyListener != null) {\n\t\t\t\t\t\t_notifyListener.receiveNotification_ServerStopped();\n\t\t\t\t\t}\n\t\t\t\t\tif (_controlPanel != null && _controlPanel._statsDisplay != null) {\n\t\t\t\t\t\t_controlPanel._statsDisplay.receiveNotification_ServerStopped();\n\t\t\t\t\t\t_scsclogger.receiveNotification_ServerStopped();\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t\t_serverLive = false;\n\t\t\t\t\t_serverBooted = false;\n\t\t\t\t}\n\t\t\t\t//else we just keep waiting for a response or a timeout\n\t\t\t}\n\t\t\t//the previous status request is NOT still pending. Is it time to send another?\n\t\t\telse if (curTime.getTime() - _prevPingRequestTime.getTime() > _scsynthPingInterval) {\n\t\t\t\t//It's time to send another status request.\n\t\t\t\t\n\t\t\t\t//generally, ping with a /status message.\n\t\t\t\t//but, if we're live but not booted, query node 1 (the sign that init completed)\n\t\t\t\tif (_serverLive && !_serverBooted) { \n\t\t\t\t\tsendMessage(\"/notify\", new Object[] { 1 });\n\t\t\t\t\tsendMessage(\"/n_query\", new Object[]{_motherGroupID});\n\t\t\t\t\t//System.out.println(\"Querying SCSC mother node\");\n\t\t\t\t\t//debugPrintln(\"Querying SCSC mother node\");\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t//if the server's booted, request a status update.\n\t\t\t\t\tsendMessage(\"/status\"); \n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t_prevPingRequestTime = new Date();\n\t\t\t}\n\t\t\t//it's not time to send, and we're not watching \n\t\t\t//for a reply, so go to sleep until it's time to ping again\n\t\t\telse {\n\t\t\t\tlong sleeptime = Math.max(_scsynthPingInterval - (curTime.getTime() - _prevPingRequestTime.getTime()), 0);\n\t\t\t\t//System.out.println(\"sleep \" + sleeptime);\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(sleeptime);\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t//NOTE this thread shouldn't get interrupted.\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tsynchronized (OnlineObjectsContainer.this.onlineObjects) {\n\t\t\t\t\tIterator<OnlineObject> iterator = OnlineObjectsContainer.this.recentlyAddedObjects.iterator();\n\t\t\t\t\twhile (iterator.hasNext()) {\n\t\t\t\t\t\tfinal OnlineObject anObject = iterator.next();\n\t\t\t\t\t\tif (anObject.getSeenAt().getTime() + OnlineObjectsContainer.RECENT_TIMEOUT < System.currentTimeMillis()) {\n\t\t\t\t\t\t\titerator.remove();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\titerator = OnlineObjectsContainer.this.recentlyRemovedObjects.iterator();\n\t\t\t\t\twhile (iterator.hasNext()) {\n\t\t\t\t\t\tfinal OnlineObject anObject = iterator.next();\n\t\t\t\t\t\tif (anObject.getSeenAt().getTime() + OnlineObjectsContainer.RECENT_TIMEOUT < System.currentTimeMillis()) {\n\t\t\t\t\t\t\titerator.remove();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "@Override\n\tpublic void run() {\n\t\twhile (true) {\n\t\t\t// program loop\n\t\t\trender();\n\t\t\tif (tim.shouldCallHome()) {\n\t\t\t\t// check in with server and reset the timer so that it doesn't\n\t\t\t\t// check in until we need to\n\t\t\t\tnew Thread(Main.checkinRunnable).start();\n\t\t\t\ttim.resetCallHome();\n\t\t\t}\n\t\t\t// System.out.println(tim.getTime());\n\t\t}\n\n\t}", "public void run(){\n\t\ttry{\n\t\t\t// Get client socket.\n\t\t\tSocket client = server.getClientSocket();\n\t\t\t// Get the inputstream from the socket\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(client.getInputStream()));\n\t\t\tString line;\n\t\t\twhile(true){\n\t\t\t\tif(client.isClosed()){\n\t\t\t\t\tSystem.out.println(\"The client is offline. Chat finished.\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tline= reader.readLine();\n\t\t\t\t\tif(line.equals(\"bye\")){\n\t\t\t\t\t\tSystem.out.println(line);\n\t\t\t\t\t\tSystem.out.println(\"Chat finished.\");\n\t\t\t\t\t\tclient.close();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tSystem.out.println(\"Client: \");\n\t\t\t\t\t\tSystem.out.println(line);\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\treader.close();\n\t\t}catch(IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\tpublic void run() {\n\t\ttry\n\t\t{\n\t\t\tPath path = Paths.get(\"C:\\\\Users\\\\SKANDA GURUANAND\\\\workspace\\\\Accel\\\\logdata.txt\");\n\t\t\tFile file = new File(path.toString());\n\t\t\tfile.delete();\n\t\t\tFileWriter fw = new FileWriter(file, true);\n\t\t\t//Server is running always. This is done using this while(true) loop\n\t\t\tBufferedReader rd = new BufferedReader(new InputStreamReader(csocket.getInputStream()));\n\t\t\tString str;\n\n\t\t\twhile((str = rd.readLine())!=null) \n\t\t\t{\t\n\t\t\t//\tSystem.out.println(str);\n\t\t\t\tfw.write(str);\n\t\t\t\tfw.flush();\n\t\t\t\tfw.write(\"\\n\");\n\t\t\t}\n\t\t\trd.close();\n\t\t\tfw.close();\n\t\t\tcsocket.close();\n\t\t//\tdoProcessing();\n\t\t}\n\t\tcatch (Exception e) \n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void run() {\n // to loop until LOGOUT\n boolean keepGoing = true;\n while (keepGoing) {\n // read a String (which is an object)\n try {\n msg = (String) sInput.readObject();\n } catch (IOException e) {\n //exception message displayed and then loop broken\n displayEvent(username + \" Exception reading Streams: \" + e);\n break; \n } catch(ClassNotFoundException e2) {\n //exception handling, loop broken\n break;\n }\n\n // Switch on the type of message received\n if (msg.equals(\"LOGOUT\")) {\n //logout message displayed in events section of server\n displayEvent(username + \" disconnected with a LOGOUT message. \\n \\n\");\n //goodbye message displayed client side\n writeMsg(\"Goodbye \" +username + \"! \\n \\n\");\n //client disconnected\n keepGoing = false;\n } else if (msg.equals(\"WHOISIN\")) { \n //message displayed client side with date\n writeMsg(\"List of the users connected at \" + sdf.format(new Date()) +\n \"\\n\");\n \n //arraylist scanned for clients connected, \n //message displayed client side with clients' names & the date connected\n for (int i = 0; i < al.size(); ++i) {\n ClientThread ct = al.get(i);\n writeMsg((i+1) + \") \" + ct.username + \" since \" + ct.date);\n }\n } else {\n //all other messages from client displayed client side\n broadcast(username + \" : \" + msg);\n }\n }\n //remove this client from arrayList\n remove(id);\n close();\n }", "public void run(){\n\t\t\t\tupdateList();\r\n\t\t\t}", "@Override\n\tpublic void run() {\n\t\ttry {\n\t\t\twhile (true) {\n\t\t\t\tThread.sleep(1000);\n\t\t\t\tsetChanged();\n\t\t\t\tnotifyObservers(Events.CLOCK_TICKED_EVENT);\n\t\t\t}\n\t\t} catch (InterruptedException ie) {\n\t\t}\n\t}", "@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)\n public void run() {\n\n mBluetoothAdapter.cancelDiscovery();\n Log.i(\"Client\", \"trying to connect to server\");\n try {\n mSocket.connect();\n Log.i(\"Client\", \"connected\");\n\n isConnected = mSocket.isConnected();\n\n } catch (IOException connectException) {\n Log.i(\"Client\", \"fail io connect\");\n isConnected = false;\n\n try {\n mSocket.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return;\n }\n //manageConnectedSocket(mSocket);\n if (isConnected()) {\n mTransferThread = new TransferThread(mSocket);\n mTransferThread.start();\n }else{\n makeToast(\"Please try connecting again\",Toast.LENGTH_LONG);\n }\n }", "public void run() {\n\t\twhile (flag) {\n\t\t\ttry {\n\t\t\t\tnewdata = false;\n\t\t\t\tFile folder = new File(storagePath);\n\t\t\t\tif (!folder.exists())\n\t\t\t\t\tfolder.mkdirs();\n\t\t\t\t// System.out.println(\"SERVER IS:\" + server);\n\t\t\t\t// System.out.println(\"PORT IS:\" + port);\n\t\t\t\tconnection = new Socket(server, port);\n\t\t\t\tconnection.setSoTimeout(180000);\n\t\t\t\tois = new ObjectInputStream(connection.getInputStream());\n\t\t\t\toos = new ObjectOutputStream(connection.getOutputStream());\n\t\t\t\tboolean result = namespace();\n\t\t\t\t// System.out.println(\"NAMESPACE RESULT : \" + result);\n\t\t\t\tif (result)\n\t\t\t\t\tresult = update();\n\t\t\t\t// System.out.println(\"UPDATE RESULT : \" + result);\n\t\t\t\tif (result)\n\t\t\t\t\tresult = pull();\n\t\t\t\t// System.out.println(\"PULL RESULT : \" + result);\n\t\t\t\tif (result) {\n\t\t\t\t\tif (!newdata)\n\t\t\t\t\t\tdh.changeLockStatus(\"PENDING\", \"LOCKED\");\n\t\t\t\t\tresult = push();\n\t\t\t\t}\n\t\t\t\t// System.out.println(\"PUSH RESULT : \" + result);\n\t\t\t\tif (result) {\n\t\t\t\t\tend();\n\t\t\t\t}\n\t\t\t\tconnection.close();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tint x = 0;\n\t\t\t\twhile (x < 5) {\n\t\t\t\t\t// System.out.println(\"THREAD IS SLEEPING NOW!!! \"\n\t\t\t\t\t// + System.currentTimeMillis() + \" \" + x);\n\t\t\t\t\tsleep(60000);\n\t\t\t\t\tx++;\n\t\t\t\t}\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t// System.out.println(\"EXITING THREAD NOW!!!\");\n\t}", "public void run() {\n try {\n Log.i(tag, \"Reconnection attempt #\" + reconnectionAttempts);\n reconnectionAttempts++;\n mmSocket.connect();\n showToast(\"Connected to controller\");\n } catch (IOException connectException) {\n Log.e(tag, \"Unable to connect socket\");\n\n RetryConnectionDialog dialog = new RetryConnectionDialog();\n dialog.setContext(main);\n dialog.setListener(btHandler);\n dialog.show(main.getFragmentManager(), dialog.getTag());\n\n try {\n mmSocket.close();\n } catch (IOException closeException) {\n\n }\n\n return;\n }\n\n // When a connection has been set up successfully, start ConnectedThread and\n // set isConnected to true.\n mConnectedThread = new ConnectedThread(mmSocket);\n mConnectedThread.start();\n isConnected = true;\n }", "public void run() {\n mBluetooth.cancelDiscovery();\n\n try {\n // Connect the device through the socket. This will block\n // until it succeeds or throws an exception\n mmSocket.connect();\n } catch (IOException connectException) {\n // Unable to connect; close the socket and get out\n try {\n mmSocket.close();\n } catch (IOException closeException) { }\n return;\n }\n\n // Do work to manage the connection (in a separate thread)\n connectedSocket(mmSocket);\n }", "public void run() {\n\t\tString fromServer = null;\r\n\t\ttry {\r\n\t\t\twhile((fromServer = reader.readLine()) != null) {\r\n\t\t\t\tSystem.out.println(fromServer);\r\n\t\t\t}\r\n\t\t}catch(IOException e) {\r\n\t\t\t//TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\n public void run() {\n postGetRoom();\n updateLocsHandler.postDelayed(mStatusChecker, updateLocsInterval);\n }", "public void run() {\n\t\t\tbtAdapter.cancelDiscovery();\n\n\t\t\ttry {\n\t\t\t\t// Connect the device through the socket. This will block\n\t\t\t\t// until it succeeds or throws an exception\n\t\t\t\tmmSocket.connect();\n\t\t\t} catch (IOException connectException) {\n\t\t\t\t// Unable to connect; close the socket and get out\n\t\t\t\ttry {\n\t\t\t\t\tmmSocket.close();\n\t\t\t\t} catch (IOException closeException) { }\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Do work to manage the connection (in a separate thread)\n\t\t\tmHandler.obtainMessage(SUCCESS_CONNECT, mmSocket).sendToTarget();\n\t\t\tisConnected = true;\n\t\t\tConnectedThread connectedThread = new ConnectedThread((BluetoothSocket) mmSocket);\n\n\t\t}", "public void run()\n\t{\n\t\tint state = 1;\n\t\t\n\t\ttry \n\t\t{\n\t\t\t_socket = new Socket(_hostname, Integer.parseInt(_portnum));\n\t\t\t\t\t\t\n\t\t\t_sendBuf = new byte[_socket.getSendBufferSize()];\n\t\t\t_recBuf = new byte[_socket.getReceiveBufferSize()];\n\t\t\t\n\t\t\t_address = _socket.getInetAddress();\n\t\t\t_port = _socket.getPort();\n\t\t\t_user = new User(_myName, _address, _port);\n\t\t\t\n\t\t\t_sendBuf = toByteArray(_user);\n\t\t\t_socket.getOutputStream().write(Message.USER);\n\t\t\t_socket.getOutputStream().write(_sendBuf);\n\t\t\t_socket.getOutputStream().flush();\n\t\t\t\n\t\t\tstate = _socket.getInputStream().read();\n\t\t\t\n\t\t\twhile (state == 200)\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Username already is use!\");\n\t\t\t\tbuildRelog();\n\t\t\t\tstate = _socket.getInputStream().read();\n\t\t\t\tSystem.out.println(state);\n\t\t\t\t_relogFrame.dispose();\n\t\t\t\t\n\t\t\t\tif (state != 200)\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tClient._mainFrame.setTitle(\"Cr@p Talk: \" + _myName);\n\t\t\tClient._mainFrame.setVisible(true);\n\t\t\t\n\t\t\t\n\t\t\twhile(true)\n\t\t\t{\n\t\t\t\tMessage rec = new Message();\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tstate = _socket.getInputStream().read();\n\t\t\t\t}\n\t\t\t\tfinally\n\t\t\t\t{\n\t\t\t\t\tif (state == Message.HASHSET)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"doing hashset\");\n\t\t\t\t\t\t_socket.getInputStream().read(_recBuf);\n\t\t\t\t\t\tObject[] online = (Object[]) toObject(_recBuf);\n\t\t\t\t\t\tString[] onlineList = new String[online.length];\n\t\t\t\t\t\tfor (int i = 0; i < online.length; i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tonlineList[i] = (String) online[i];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tClient._userList.setListData(onlineList);\n\t\t\t\t\t}\n\t\t\t\t\telse if (state == Message.LOBBY)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"doing lobby\");\n\t\t\t\t\t\t_socket.getInputStream().read(_recBuf);\n\t\t\t\t\t\trec = (Message) toObject(_recBuf);\n\t\t\t\t\t\t\n\t\t\t\t\t\tClient._chatLog.append(\"[\" + rec.getOrigin() +\"]: \" + rec.getMessage() + \"\\n\");\n\t\t\t\t\t}\n\t\t\t\t\telse if (state == Message.WHISPER)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"doing whisper\");\n\t\t\t\t\t\t_socket.getInputStream().read(_recBuf);\n\t\t\t\t\t\trec = (Message) toObject(_recBuf);\n\t\t\t\t\t\t\n\t\t\t\t\t\tClient._chatLog.append(\"[\" + rec.getOrigin() +\"(whisp)]: \" + rec.getMessage() + \"\\n\");\n\t\t\t\t\t}\n\t\t\t\t\telse if (state == Message.SHARED)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"doing shared\");\n\t\t\t\t\t\tArrayList<String> files = new ArrayList<String>();\n\t\t\t\t\t\tScanner file = new Scanner(new File(\"shared.txt\"));\n\t\t\t\t\t\t\n\t\t\t\t while(file.hasNextLine()) \n\t\t\t\t {\n\t\t\t\t String line = file.nextLine();\n\t\t\t\t files.add(line);\n\t\t\t\t }\n\t\t\t\t _sendBuf = toByteArray(files.toArray());\n\t\t\t\t _socket.getOutputStream().write(Message.TEXT);\n\t\t\t\t _socket.getOutputStream().write(_sendBuf);\n\t\t\t\t\t\t_socket.getOutputStream().flush();\n\t\t\t\t\t\tSystem.out.println(\"sent data\");\n\t\t\t\t \n\t\t\t\t\t}\n\t\t\t\t\telse if (state == Message.RESULTS)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"doing results\");\n\t\t\t\t\t\t_socket.getInputStream().read(_recBuf);\n\t \t\t\tObject[] lines = (Object[]) toObject(_recBuf);\n\t \t\t\t\n\t \t\t\tString[] mal = new String[lines.length];\n\t \t\t\t\n\t \t\t\tfor (int i = 0; i < lines.length; i++)\n\t \t\t\t{\n\t \t\t\t\tmal[i] = (String) lines[i];\n\t \t\t\t}\n\t \t\t\tbuildResultGUI(mal);\n\t\t\t\t\t}\n\t\t\t\t\telse if (state == Message.TEST)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"doing test\");\n\t\t\t\t\t\t_socket.getInputStream().read(_recBuf);\n\t\t\t\t\t\trec = (Message) toObject(_recBuf);\n\t\t\t\t\t\t\n\t\t\t\t\t\tString[] data = rec.getMessage().split(\"\\\\&\\\\&\");\n\t\t\t\t\t\t\n\t\t\t\t\t\t_person = data[0];\n\t\t\t\t\t\t_fileName = data[1];\n\t\t\t\t\t\t_filePath = data[2];\n\t\t\t\t\t\t_comPort = Integer.parseInt(data[3]);\n\t\t\t\t\t\tSystem.out.println(\"*******SENDER PORT: \" + _comPort);\n\t\t\t\t\t\t_fileKey = data[4];\n\n\t\t\t\t\t\tString prompt = \"Upload \" + _fileName + \" to \" + _person + \"?\";\n\t\t\t\t\t\tint reply = JOptionPane.showConfirmDialog(null, prompt, \"Upload confirmation\", JOptionPane.YES_NO_OPTION);\n\t\t\t\t \n\t\t\t\t\t\tif (reply == JOptionPane.YES_OPTION)\n\t\t\t\t {\t\t\t\t \n\t\t\t\t\t\t\tFile file = new File(_filePath);\n\t\t\t\t\t\t\tlong fileSize = file.length();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tArrayList<String> metaData = new ArrayList<String>();\n\t\t\t\t\t\t\tmetaData.add(\"\" + _comPort);\n\t\t\t\t\t\t\tmetaData.add(\"\" + fileSize);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t_sendBuf = toByteArray(metaData.toArray());\n\t\t\t\t\t\t\t\n\t\t\t\t \tSystem.out.println(\"accepted\");\n\t\t\t\t \t_socket.getOutputStream().write(Message.ACCEPT);\n\t\t\t\t\t\t\t_socket.getOutputStream().flush();\n\t\t\t\t\t\t\t\n\t\t\t\t \t_socket.getOutputStream().write(_sendBuf);\n\t\t\t\t\t\t\t_socket.getOutputStream().flush();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tClient._sending = new SenderThread(_fileName, _filePath, _comPort, _fileKey);\n\t\t\t\t\t\t\tClient._sending.start();\n\t\t\t\t }\n\t\t\t\t else \n\t\t\t\t {\n\t\t\t\t \tSystem.out.println(\"declined\");\n\t\t\t\t \t_socket.getOutputStream().write(Message.DECLINE);\n\t\t\t\t\t\t\t_socket.getOutputStream().flush();\n\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t\telse if (state == Message.ACCEPT)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"doing accept\");\n\t\t\t\t\t\tlong fileSize = 0;\n\t\t\t\t\t\tint port = -1;\n\t\t\t\t\t\t\n\t\t\t\t\t\t_fileKey = Client._key;\n\t\t\t\t\t\t_socket.getInputStream().read(_recBuf);\n\t \t\t\tObject[] data = (Object[]) toObject(_recBuf);\n\t \t\t\t\n\t \t\t\tport = Integer.parseInt((String) data[0]);\n\t \t\t\tfileSize = Long.parseLong((String) data[1]);\n\t \t\t\t\n\t \t\t\tSystem.out.println(\"*******RECV PORT: \" + port);\n\t \t\t\t\n\t \t\t\tClient._receiving = new ReceiverThread(_fileName, _hostname, port, _fileKey, fileSize);\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tThread.sleep(300);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (InterruptedException e)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tClient._receiving.start();\n\t\t\t\t\t}\n\t\t\t\t\telse if (state == Message.DECLINE)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"doing decline\");\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"File transfer denied.\");\n\t\t\t\t\t}\n\t\t\t\t\telse if (state == Message.DC)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"doing dc\");\n\t\t\t\t\t\t_socket.getInputStream().read(_recBuf);\n\t\t\t\t\t\trec = (Message) toObject(_recBuf);\n\t\t\t\t\t\t\n\t\t\t\t\t\tClient._chatLog.append(rec.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\telse if (state == Message.SERVERDOWN)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"doing serverdown\");\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Server has gone down...\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t\telse if (state == Message.ERROR)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"doing error\");\n\t\t\t\t\t\t_socket.getInputStream().read(_recBuf);\n\t\t\t\t\t\trec = (Message) toObject(_recBuf);\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"It's bad to talk to yourself...\");\n\t\t\t\t\t}\n\t\t\t\t\telse if (state == Message.REMOVED)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"doing doing removed\");\n\t\t\t\t\t\t_socket.getInputStream().read(_recBuf);\n\t\t\t\t\t\trec = (Message) toObject(_recBuf);\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (SocketException e) \n\t\t{\n\t\t\tJOptionPane.showMessageDialog(null, \"Server is not responding\");\n\t\t\tSystem.exit(0);\n\t\t} \n\t\tcatch (IOException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t} \n\t\tcatch (ClassNotFoundException e) \n\t\t{\n\t\t\te.printStackTrace();\n\t\t} \n\t}", "public void run() {\n\t\t\tPrintWriter out = null;\n\t\t\ttry {\n\n\t\t\t\t/*\n\t\t\t\t * byte[] buf = new byte[2048]; DatagramPacket packet = new\n\t\t\t\t * DatagramPacket(buf, buf.length);\n\t\t\t\t * System.out.print(\"Server: Receiving\\n\");\n\t\t\t\t * incomingUDP.receive(packet);\n\t\t\t\t * \n\t\t\t\t * System.out.print(\"Receiving successful packet with :\" +\n\t\t\t\t * packet.getLength() + \"kb\");\n\t\t\t\t */\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t\tout = new PrintWriter(new OutputStreamWriter(\n\t\t\t\t\t\tincoming.getOutputStream()));\n\n\t\t\t\t// inform the server of this new client\n\t\t\t\tServerNMS.this.addClient(out);\n\n\t\t\t\tout.print(\"Welcome to AndyChat! \");\n\t\t\t\tout.println(\"Enter BYE to exit.\");\n\t\t\t\tout.flush();\n\n\t\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(\n\t\t\t\t\t\tincoming.getInputStream()));\n\t\t\t\tfor (;;) {\n\t\t\t\t\tString msg = in.readLine();\n\t\t\t\t\tif (msg == null) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (msg.trim().equals(\"BYE\"))\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tSystem.out.println(\"Received: \" + msg\n\t\t\t\t\t\t\t\t+ \"With size is: \" + msg.getBytes().length\n\t\t\t\t\t\t\t\t+ \"bytes\");\n\t\t\t\t\t\t// broadcast the receive message\n\t\t\t\t\t\tServerNMS.this.broadcast(msg);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tincoming.close();\n\n\t\t\t\tServerNMS.this.removeClient(out);\n\t\t\t} catch (Exception e) {\n\t\t\t\tif (out != null) {\n\t\t\t\t\tServerNMS.this.removeClient(out);\n\t\t\t\t}\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}", "public void run() {\n\t\ttry {\r\n\t\t\tInetAddress localHost = InetAddress.getLocalHost();\r\n\t\t\tString ip_address = localHost.getHostAddress().trim();\r\n\t\t\tSocket socket = new Socket(this.ip_address_server, this.port_server);\r\n\t\t\twhile (socket.isClosed() == true) {\r\n\t\t\t\tsocket = new Socket(this.ip_address_server, this.port_server);\r\n\t\t\t}\r\n\t\t\tString request = \"HELLO \" + ip_address + \" \" + socket \r\n\t\t\t\t\t+ \" \" + this.client_id;\r\n\t\t\tOutputStream output = socket.getOutputStream();\r\n\t\t\tPrintWriter writer = new PrintWriter(output, true);\t\r\n\t\t\t// while <300 send request\r\n\t\t\tint requests = 0;\r\n\t\t\tlong sum=0;\r\n\t\t\twhile (requests < 300) {\r\n\t\t\t\tlong startTime = System.currentTimeMillis();\r\n\t\t\t\twriter.println(request);\r\n\t\t\t\tDataInputStream reader = new DataInputStream(new BufferedInputStream(socket.getInputStream()));\r\n\t\t\t\treader.readUTF();\r\n\t\t\t\tint length = reader.readInt();\r\n\t\t\t\tif(length>0){\r\n\t\t\t\t\tbyte[] payload = new byte[length];\r\n\t\t\t\t reader.readFully(payload, 0, payload.length); // read the message\r\n\t\t\t\t}\r\n\t\t\t\trequests++;\r\n\t\t\t\tlong endTime = System.currentTimeMillis();\r\n\t\t\t\tlong time = endTime - startTime;\r\n\t\t\t\tsum+=time;\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"Client \" + this.client_id + \" has finished after \"\r\n\t\t\t\t\t+ requests + \" requests\");\r\n\t\t\tdouble averTime = sum / 300;\r\n\t\t\tString text = \"Average Communication Latency (\" + this.client_id + \"): \" + averTime + \"\\n\";\r\n\t\t\tFiles.write(Paths.get(this.latencyTimes.getName()), text.getBytes(), StandardOpenOption.APPEND);\r\n\t\t\tsocket.close();\t\r\n\t\t} catch (UnknownHostException ex) {\r\n\t\t\tSystem.out.println(\"Server not found: \" + ex.getMessage());\r\n\t\t\tex.printStackTrace();\r\n\t\t} catch (IOException ex) {\r\n\t\t\tSystem.out.println(\"I/O error: \" + ex.getMessage());\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}", "public void run() {\n while(!serverSocket.isClosed()) {\n try {\n Socket newClient = serverSocket.accept();\n PrintWriter pw = new PrintWriter(newClient.getOutputStream());\n if(connections.size() < MAX_CONNECTIONS) {\n synchronized(this) {\n connections.addElement(newClient);\n writers.addElement(pw);\n pw.print(\"TelnetAppender v1.0 (\" + connections.size()\n\t\t + \" active connections)\" + EOL + EOL);\n pw.flush();\n }\n } else {\n pw.print(\"Too many connections.\" + EOL);\n pw.flush();\n newClient.close();\n }\n } catch(Exception e) {\n if (e instanceof InterruptedIOException || e instanceof InterruptedException) {\n Thread.currentThread().interrupt();\n }\n if (!serverSocket.isClosed()) {\n LogLog.error(\"Encountered error while in SocketHandler loop.\", e);\n }\n break;\n }\n }\n\n try {\n serverSocket.close();\n } catch(InterruptedIOException ex) {\n Thread.currentThread().interrupt();\n } catch(IOException ex) {\n }\n }", "@Override\n\tpublic void run(){\n\t\tInetAddress IPAddress = serverTcpSocket.getInetAddress();\n\t\tfor (ClientObj c: clients)\n\t\t\tif (c.getId() == client.getId()){\n\t\t\t\tSystem.out.print(IPAddress + \" Client already connected!\");\n\t\t\t\treturn;\n\t\t\t}\n\t\ttry{\n\t\t\t// Check handshake received for correctness\n\t\t\t//(connect c->s) [herader | \"JUSTIN\\0\" | connection port] (udp)\n\t\t\t//(connect response s->c) [header | client id | port] (udp)\n\t \n\t // open the connection\n\t\t clientSocket = null;\n\t\t Socket clientListener = null;\n\t\t // wait for client connection on tcp port\n\t\t //serverTcpSocket.setSoTimeout(5000);\n\t \tSystem.out.println (\" Waiting for tcp connection.....\");\n\t \tclientSocket = serverTcpSocket.accept();\n\t \tclientListener = serverTcpSocket.accept();\n\t \tclient.setListenerSocket(clientListener);\n\t\t\tIPAddress = clientSocket.getInetAddress();\n\t\t\tint recv_port = clientSocket.getPort();\n\t\t\tSystem.out.println(IPAddress + \": Client connected @ port \" + recv_port);\n\n\t\t // handle tcp connection\n\t\t\tclientSocket.setSoTimeout(Constants.ACK_TIMEOUT);\n\t\t out = new BufferedOutputStream(clientSocket.getOutputStream());\n\t\t\tin = new BufferedInputStream(clientSocket.getInputStream());\n\t\t\tclient.setAddress(clientSocket.getInetAddress());\n\t\t\tclient.setPort(clientSocket.getPort());\n\t\t clients.add(client);\n\t\t\t\n\t\t // handle requests\n\t\t\twhile (!shutdown_normally) {\n\t\t\t\t// read just the header, then handle the req based on the info in the header\n\t\t\t\tif ((buf = Utility.readIn(in, Constants.HEADER_LEN)) == null)\n\t\t\t\t\tbreak;\n\t\t\t\tint flag = buf.getInt(0);\n\t\t\t\tint len2 = buf.getInt(4);\n\t\t\t\tint id = buf.getInt(8);\n\t\t\t\t\n\t\t\t\t// check for correctness of header\n\t\t\t\t\n\t\t\t\tif (flag < Constants.OPEN_CONNECTION || \n\t\t\t\t\t\tflag > Constants.NUM_FLAGS || \n\t\t\t\t\t\tid != client.getId() || \n\t\t\t\t\t\tlen2 < 0){\n\t\t\t\t\tout.close(); \n\t\t\t\t\tin.close(); \n\t\t\t\t\tclientSocket.close(); \n\t\t\t\t\tserverTcpSocket.close();\n\t\t\t\t\tclients.remove(client);\n\t\t\t\t\tthrow new RuntimeException(\n\t\t\t\t\t\t\t\"Connection - FAILURE! (malformed header)\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// read payload\n\t\t\t\tif ((buf = Utility.readIn(in, Utility.getPaddedLength(len2))) == null)\n\t\t\t\t\tthrow new IOException(\"read failed.\");\n\t\t\t\t// update address (necessary?)\n\t\t\t\tclients.get(clients.indexOf(client)).setAddress(clientSocket.getInetAddress());\n\t\t\t\tclient.setAddress(clientSocket.getInetAddress());\n\t\t\t\tswitch (flag){\n\t\t\t\t\tcase Constants.ACK:\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Constants.VIEW_REQ:\n\t\t\t\t\t\tSystem.out.println(client.getAddress() + \n\t\t\t\t\t\t\t\t\": Processing view request...\");\n\t\t\t\t\t\tViewFiles(buf);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Constants.DOWNLOAD_REQ:\n\t\t\t\t\t\tSystem.out.println(client.getAddress() + \n\t\t\t\t\t\t\t\t\": Processing download request...\");\n\t\t\t\t\t\tDownload(buf);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Constants.UPLOAD_REQ:\n\t\t\t\t\t\tSystem.out.println(client.getAddress() + \n\t\t\t\t\t\t\t\t\": Processing upload request...\");\n\t\t\t\t\t\tUpload(buf);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Constants.DOWNLOAD_ACK:\n\t\t\t\t\t\tSystem.out.println(client.getAddress() + \n\t\t\t\t\t\t\t\t\": Processing download acknowledgment...\");\n\t\t\t\t\t\tDownloadCompleted(buf);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Constants.CLOSE_CONNECTION:\n\t\t\t\t\t\tshutdown_normally = true;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// close all open sockets\n\t\t out.close(); \n\t\t in.close(); \n\t\t clientSocket.close(); \n\t\t serverTcpSocket.close();\n\t\t} catch (SocketTimeoutException e) {\n\t\t\tSystem.err.println(IPAddress + \": Timeout waiting for response.\");\n\t\t} catch (UnknownHostException e) {\n\t\t\t// IPAdress unknown\n\t\t\tSystem.err.println(\"Don't know about host \" + IPAddress);\n\t\t} catch (IOException e) {\n\t\t\t// Error in communication\n\t\t\tSystem.err.println(\"Couldn't get I/O for the connection to \" +\n\t\t\t\t\tIPAddress);\n\t\t} catch (RuntimeException e){\n\t\t\t// Malformed Header or payload most likely\n\t\t\tSystem.err.println(IPAddress + \": Connection - FAILURE! (\" + e.getMessage() + \")\");\n\t\t} finally {\n\t\t\t// remove this client from active lists, close all (possibly) open sockets\n\t\t\tSystem.out.println(IPAddress + \": Connection - Closing!\");\n\t\t\tclients.remove(client);\n\t\t\ttry {\n\t\t\t\tSocket clientConnection = client.getListenerSocket();\n\t\t\t\tOutputStream out_c = new BufferedOutputStream(clientConnection.getOutputStream());\n\t\t\t\tbuf = Utility.addHeader(Constants.CLOSE_CONNECTION, 0, client.getId());\n\t\t\t\tout_c.write(buf.array());\n\t\t\t\tout_c.flush();\n\t\t\t\tout_c.close();\n\t\t\t\tclientConnection.close();\n\n\t\t\t\tif (out != null)\n\t\t\t\t\tout.close();\n\t\t\t\tif (in != null)\n\t\t\t\t\tin.close();\n\t\t\t\tif (!clientSocket.isClosed())\n\t\t\t\t\tclientSocket.close();\n\t\t\t\tif (!serverTcpSocket.isClosed())\n\t\t\t\t\tserverTcpSocket.close();\n\t\t\t} catch (IOException e){\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n }", "public void run() {\r\n while (!serverSocket.isClosed()) {\r\n try {\r\n Socket socket = serverSocket.accept();\r\n if (socket.isConnected()) {\r\n clientConnections.add(new ConnectionHandler(socket));\r\n }\r\n } catch (SocketException e) {\r\n System.out.println(\"Socket ist nicht verfügbar\");\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "final public void run() {\n connectionEstablished();\n\n // The message from the server\n int msg;\n\n // Loop waiting for data\n\n try {\n // messageTimer.schedule(new TimerTask() {\n // @Override\n // public void run() {\n // try {\n // sendFromMessageQueue();\n // } catch (IOException e) {}\n // }\n // }, 0, 100);\n while (!readyToStop) {\n // Get data from Server and send it to the handler\n // The thread waits indefinitely at the following\n // statement until something is received from the server\n\n try { // added in version 2.31\n\n // String cur = input.readLine();\n // handleBig5String(cur + \"\\n\");\n readByte();\n\n } catch (RuntimeException ex) { // thrown by handleMessageFromServer\n\n connectionException(ex);\n }\n }\n } catch (Exception exception) {\n if (!readyToStop) {\n try {\n closeAll();\n } catch (Exception ex) {\n }\n\n clientReader = null;\n connectionException(exception);\n }\n } finally {\n\n clientReader = null;\n connectionClosed(); // moved here in version 2.31\n }\n }", "public void run() {\n\n while (true) {\n System.out.println(this);\n // updateGraph takes in seconds and this.TIMEBETWEENFRAMES is given in milliseconds.\n this.updateBoard(this.TIMEBETWEENFRAMES / 1000);\n try {\n Thread.sleep((long) (this.TIMEBETWEENFRAMES));\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n checkRep();\n }\n }", "public void run() {\n // Create a socket to wait for clients.\n try {\n //Set up all the security needed to run an SSLServerSocket for clients to connect to.\n SSLContext context = SSLContext.getInstance(\"TLS\");\n KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance(\"SunX509\");\n KeyStore keyStore = KeyStore.getInstance(\"JKS\");\n\n keyStore.load(new FileInputStream(\"./keystore.txt\"), \"storepass\".toCharArray());\n keyManagerFactory.init(keyStore, \"keypass\".toCharArray());\n context.init(keyManagerFactory.getKeyManagers(), null, null);\n\n SSLServerSocketFactory factory = context.getServerSocketFactory();\n SSLServerSocket sslServerSocket = (SSLServerSocket) factory.createServerSocket(conf.SERVER_PORT);\n threads = new HashSet<>();\n\n while (true) {\n //Just keep running until the end of times (or until you're stopped.)\n // Wait for an incoming client-connection request (blocking).\n SSLSocket socket = (SSLSocket) sslServerSocket.accept();\n\n // When a new connection has been established, start a new thread.\n ClientThreadPC ct = new ClientThreadPC(this, socket);\n threads.add(ct);\n new Thread(ct).start();\n System.out.println(\"Num clients: \" + threads.size());\n\n // Simulate lost connections if configured.\n if (conf.doSimulateConnectionLost()) {\n DropClientThread dct = new DropClientThread(ct);\n new Thread(dct).start();\n }\n }\n } catch (IOException | KeyManagementException | KeyStoreException | UnrecoverableKeyException |\n NoSuchAlgorithmException | CertificateException e) {\n e.printStackTrace();\n }\n }", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\ttry {\r\n\t\t\t\t\tusers.add(socket);\r\n\t\t\t\t\t\r\n\t\t\t\t\tBufferedReader mBuf = new BufferedReader(new InputStreamReader(socket.getInputStream()));\r\n\t\t\t\t\twhile (socket.isConnected()) {\r\n\t\t\t\t\t\tString msg = mBuf.readLine();\r\n\t\t\t\t\t\tcastChatMsg(msg);\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\te.getStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}", "public void run() {\n mBluetoothAdapter.cancelDiscovery();\n \n try {\n // Connect the device through the socket. This will block\n // until it succeeds or throws an exception\n mmSocket.connect();\n while(!mmSocket.isConnected()){}\n Painter.paintSocketConnected = true;\n Log.d(tag, \"\" + mmSocket.isConnected());\n mOutputStream = mmSocket.getOutputStream(); \n mInputStream = mmSocket.getInputStream();\n\t\t\t\n } catch (IOException connectException) {\n try {\n\t\t\t\t\tmmSocket.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n return;\n }\n }", "public void run() {\n // Initial connect request comes in\n Request request = getRequest();\n\n if (request == null) {\n closeConnection();\n return;\n }\n\n if (request.getConnectRequest() == null) {\n closeConnection();\n System.err.println(\"Received invalid initial request from Remote Client.\");\n return;\n }\n\n ObjectFactory objectFactory = new ObjectFactory();\n Response responseWrapper = objectFactory.createResponse();\n responseWrapper.setId(request.getId());\n responseWrapper.setSuccess(true);\n responseWrapper.setConnectResponse(objectFactory.createConnectResponse());\n responseWrapper.getConnectResponse().setId(id);\n\n // Return connect response with our (statistically) unique ID.\n if (!sendMessage(responseWrapper)) {\n closeConnection();\n System.err.println(\"Unable to respond to connect Request from remote Client.\");\n return;\n }\n\n // register our thread with the server\n Server.register(id, this);\n\n // have handler manage the protocol until it decides it is done.\n while ((request = getRequest()) != null) {\n\n Response response = handler.process(this, request);\n\n if (response == null) {\n continue;\n }\n\n if (!sendMessage(response)) {\n break;\n }\n }\n\n // client is done so thread can be de-registered\n if (handler instanceof IShutdownHandler) {\n ((IShutdownHandler) handler).logout(Server.getState(id));\n }\n Server.unregister(id);\n\n // close communication to client.\n closeConnection();\n }", "public void run() {\n\t\tfor(int i = 0;i < seconds;i++) {\n\t\t\ttry\n\t\t\t{\n\t\t\t Thread.sleep(1000);\t\t//Ping every 1 second\n\t\t\t dataset.addToDataset(pinger.pingIpAddress(), Integer.toString(pinger.getPingCount()));\n\t\t\t chart.paintAgain(chart, dataset.getDataset(),ip);\n\t\t\t}\n\t\t\tcatch(InterruptedException e)\n\t\t\t{\n\t\t\t Thread.currentThread().interrupt();\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void run()\n {\n while(running)\n {\n try\n {\n Thread.sleep(5000);\n }\n catch (InterruptedException e) { e.printStackTrace(); }\n\n System.out.println(\"-----------------------------------------------------------------------\");\n\n sendStatsToServer(coordinator.computeStats());\n\n if(backupBuffer.size() > 0)\n {\n List<List<Statistic>> copyList = copyList(backupBuffer);\n backupBuffer.clear();\n\n for (List<Statistic> l: copyList)\n {\n long timestamp = l.stream().filter((Statistic s) -> s.getNodeID().equals(\"Coord\"))\n .mapToLong(Statistic::getTimestamp).toArray()[0];\n\n System.out.println(\"COORDINATOR - Sending buffered stats computed at \" + timestamp);\n sendStatsToServer(l);\n }\n }\n System.out.println(\"-----------------------------------------------------------------------\");\n }\n }", "@Override\r\n\t\tpublic void run() {\r\n\t\t\tString[] line;\r\n\t\t\tString msg = \"\";\r\n\t\t\ttry {\r\n\t\t\t\tString time1 = dispTime.format(System.currentTimeMillis());\r\n\t\t\t\t// parse the time to the date format\r\n\t\t\t\tdate1 = dispTime.parse(time1);\r\n\t\t\t\t/*\r\n\t\t\t\t * check for the whole message line and split it with : the\r\n\t\t\t\t * first element is username the second is connect/disconnect\r\n\t\t\t\t * message and if the client clicks on connect button it sends\r\n\t\t\t\t * connect message and if client hits disconnect button it sends\r\n\t\t\t\t * disconnect message all the messages are splitted with :,if\r\n\t\t\t\t * the message is to broadcast all current users then :Chat is\r\n\t\t\t\t * used at the end read the inputstream\r\n\t\t\t\t */\r\n\t\t\t\twhile ((msg = in.readLine()) != null) {\r\n\t\t\t\t\t// split the line with :\r\n\t\t\t\t\tline = msg.split(\":\");\r\n\t\t\t\t\tString usern = line[1];// get username\r\n\r\n\t\t\t\t\tif (line[3].equals(\"Connect\")) {\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * if the request is connect then add the username to\r\n\t\t\t\t\t\t * arraylist users\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tusers.add(usern);\r\n\t\t\t\t\t} else if (line[3].equals(\"Disconnect\")) {\r\n\t\t\t\t\t\ttextarea.append(usern + \" has disconnected.\\n\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// else if (line[3].equals(\"Chat\"))\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * the message coming from server is in HTTP format then\r\n\t\t\t\t\t\t * extract the message only and display it on users\r\n\t\t\t\t\t\t * window\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\ttextarea.append(line[1] + line[2] + \"\\n\");\r\n\t\t\t\t\t\ttextarea.setCaretPosition(textarea.getDocument().getLength());\r\n\t\t\t\t\t}\r\n\t\t\t\t} // try\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}", "public void run() {\n\t\t\tbluetooth_adapter.cancelDiscovery();\r\n\t\t\tif(socket == null) return;\r\n\t\t\t\r\n\t\t\t// Connect the device through the socket. This will block\r\n\t\t\t// until it succeeds or throws an exception\r\n\t\t\ttry {\r\n\t\t\t\tsocket.connect();\r\n\t\t\t\tdata_thread = new Data_Thread(socket);\r\n\t\t\t\tdata_thread.start();\r\n\t\t\t\t//System.out.println(\"==============> Bluetooth Connected <===================\");\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tsocket.close();\r\n\t\t\t\t} catch (IOException closeException) {\r\n\t\t\t\t\tcloseException.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tString message = \"Error: \" + e;\r\n\t\t\t\tif(device != null) {\r\n\t\t\t\t\tmessage += \" Device: \"+device.getName();\r\n\t\t\t\t}\r\n\t\t\t\tbluetooth_show_message(message);\r\n\t\t\t}\r\n\t\t\r\n\t\t\tclient_connect_thread = null;\r\n\t\t}", "@Override\n public void run()\n {\n close(false);\n try\n {\n if (!isConnected())\n connectMS(msServer.getIp(), msServer.getPort());\n }\n catch (Exception e)\n {\n Log.e(\"Dudu_SDK\",\n \"getServer ...failed ...user default server... \");\n }\n }", "@Override\n\tpublic void run() {\n\t\tlog(\"Running on port \" + serverSocket.getLocalPort());\n\t\twhile(true) {\n\t\t\ttry {\n\t\t\t\t// accept incomming connections\n\t\t\t\tSocket clientSocket = serverSocket.accept();\n\t\t\t\t//log(\"New connection from \" + client_socket.getRemoteSocketAddress());\n\t\t\t\t// create a new connection handler and run in a separate thread\n\t\t\t\tTrackerRequestHandler handler = new TrackerRequestHandler(this, clientSocket);\n\t\t\t\texecutor.execute(handler);\n\t\t\t} catch (IOException e) {\n\t\t\t\tlog(\"Problem accepting a connection\");\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void run() {\n\n startPingTimer();\n String read = \"\";\n\n try {\n while ((read = in.readLine()) != null){\n\n //System.out.println(\"[CLIENT] Received: \" + read);\n messageHandler(read);\n\n }\n closeConnection();\n\n }catch (IOException e){\n\n System.out.println(\"[CLIENT] \" + e.getMessage());\n System.out.println(\"[CLIENT] Connection closed.\");\n\n }\n\n }", "public void run() {\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\tSystem.out.println(\"accepting new connection\");\n\t\t\t\tSocket clientSocket = this.serverSocket.accept();\n\t\t\t\tSystem.out.println(\"this.base: \" + this.base.toString());\n\t\t\t\tConnection connection = new Connection(clientSocket,this.base, new HTTP());\n\t\t\t\tthis.fixedThreadPool.execute(connection);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\tthis.serverSocket.close();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}" ]
[ "0.6856705", "0.68481576", "0.68027985", "0.67698056", "0.6742289", "0.673489", "0.672706", "0.66863835", "0.6666702", "0.6654191", "0.66537344", "0.6639182", "0.66060185", "0.65935796", "0.65928835", "0.6590911", "0.65659094", "0.65525675", "0.65411484", "0.65315217", "0.6517785", "0.6507029", "0.64980835", "0.64627266", "0.64595586", "0.644127", "0.6433427", "0.64202523", "0.6419996", "0.63906705", "0.6380197", "0.6377801", "0.6365621", "0.6336634", "0.63366044", "0.63354707", "0.63231313", "0.63199985", "0.6317599", "0.6316038", "0.6311515", "0.63097095", "0.6305658", "0.6292582", "0.62878376", "0.626473", "0.626467", "0.6260377", "0.6245021", "0.6239947", "0.6219005", "0.6207893", "0.62062895", "0.62006587", "0.6196472", "0.61943746", "0.61931735", "0.61899585", "0.61858", "0.61844337", "0.6179389", "0.61735916", "0.61706173", "0.61652434", "0.6160295", "0.61552227", "0.61483693", "0.6136531", "0.6129068", "0.61199576", "0.61144096", "0.61140746", "0.61032456", "0.6095578", "0.6093588", "0.60930794", "0.6090275", "0.6087019", "0.6085369", "0.6081684", "0.60814726", "0.6081272", "0.6080355", "0.6072513", "0.60701466", "0.6069742", "0.60665274", "0.60549", "0.60525775", "0.6049711", "0.6049141", "0.60374856", "0.6035372", "0.603127", "0.603098", "0.6025481", "0.6022925", "0.60188884", "0.6015868", "0.60138303" ]
0.69054055
0
Check that the signatures all match to ensure that it was not tampered with. This also checks that all amounts are positive.
@Override public boolean isValid() { final BlockChainInt outputHash = getOutputHash(); return inputs.stream().map(input -> input.verifySignature(outputHash)).reduce(true, (a, b) -> a && b) && outputs.stream().map(output -> output.getAmount() >= 0).reduce(true, (a, b) -> a && b) && getTransactionFee() >= 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean checkSigns() {\n\t\tfor (int i = 0; i < signs.size(); i++) {\n\t\t\tif (signs.get(i).isInRange(player.pos, player.direction)) {\n\t\t\t\tsetSign(signs.get(i));\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean verifiySignature() {\n\t\tString data = StringUtil.getStringFromKey(sender) + StringUtil.getStringFromKey(reciepient)\n\t\t\t\t+ Float.toString(value);\n\t\treturn StringUtil.verifyECDSASig(sender, data, signature);\n\t}", "public static boolean isSigned_receivets() {\n return true;\n }", "private void verifyCadesSignature(byte[] signature, byte[] data)\n throws CmsCadesException, TspVerificationException, CMSSignatureException {\n CadesSignature cadesSig = new CadesSignature(signature, data);\n int signerInfoLength = cadesSig.getSignerInfos().length;\n\n System.out.println(\"Signature contains \" + signerInfoLength + \" signer infos\");\n\n for (int j = 0; j < signerInfoLength; j++) {\n cadesSig.verifySignatureValue(j);\n System.out.println(\"Signer \" + (j + 1) + \" signature value is valid.\");\n\n // tsp verification\n SignatureTimeStamp[] timestamps = cadesSig.getSignatureTimeStamps(j);\n for (SignatureTimeStamp tst : timestamps) {\n System.out.println(\"Signer info \" + (j + 1) + \" contains a signature timestamp.\");\n tst.verifyTimeStampToken(null);\n System.out.println(\"Signer info \" + (j + 1) + \" signature timestamp is valid.\");\n }\n }\n }", "private void validateFermatPacketSignature(FermatPacket fermatPacketReceive){\n\n System.out.println(\" WsCommunicationVPNClient - validateFermatPacketSignature\");\n\n /*\n * Validate the signature\n */\n boolean isValid = AsymmectricCryptography.verifyMessageSignature(fermatPacketReceive.getSignature(), fermatPacketReceive.getMessageContent(), vpnServerIdentity);\n\n System.out.println(\" WsCommunicationVPNClient - isValid = \" + isValid);\n\n /*\n * if not valid signature\n */\n if (!isValid){\n throw new RuntimeException(\"Fermat Packet received has not a valid signature, go to close this connection maybe is compromise\");\n }\n\n }", "public boolean verifySignature() {\n\n String data = StringUtil.getStringFromKey(sender) + StringUtil.getStringFromKey(recipient) + Float.toString(value);\n return StringUtil.verifyECDSASig(sender, data, signature);\n }", "@Override\n public boolean verifySignature(byte[] signature) {\n try {\n Element[] sig = derDecode(signature);\n CL04SignPublicPairingKeySerParameter pk = (CL04SignPublicPairingKeySerParameter) pairingKeySerParameter;\n Pairing pairing = PairingFactory.getPairing(pairingKeySerParameter.getParameters());\n Element a = sig[0];\n Element b = sig[1];\n Element c = sig[2];\n List<Element> A = IntStream.range(3, 3 + messages.size()).mapToObj(i -> sig[i]).collect(Collectors.toList());\n List<Element> B = IntStream.range(3 + messages.size(), 3 + 2 * messages.size()).mapToObj(i -> sig[i]).collect(Collectors.toList());\n return aFormedCorrectly(pairing, a, A, pk) && bFormedCorrectly(pairing, a, b, A, B, pk) && cFormedCorrectly(pairing, a, b, c, B, pk);\n } catch (IOException e) {\n e.printStackTrace();\n }\n return false;\n\n }", "@Override\n\tpublic void validateTimestamps() {\n\n\t\t/*\n\t\t * This validates the content-timestamp tokensToProcess present in the signature.\n\t\t */\n\t\tfor (final TimestampToken timestampToken : getContentTimestamps()) {\n\n\t\t\tfinal byte[] timestampBytes = getContentTimestampData(timestampToken);\n\t\t\ttimestampToken.matchData(timestampBytes);\n\t\t}\n\n\t\t/*\n\t\t * This validates the signature timestamp tokensToProcess present in the signature.\n\t\t */\n\t\tfor (final TimestampToken timestampToken : getSignatureTimestamps()) {\n\n\t\t\tfinal byte[] timestampBytes = getSignatureTimestampData(timestampToken, null);\n\t\t\ttimestampToken.matchData(timestampBytes);\n\t\t}\n\n\t\t/*\n\t\t * This validates the SigAndRefs timestamp tokensToProcess present in the signature.\n\t\t */\n\t\tfor (final TimestampToken timestampToken : getTimestampsX1()) {\n\n\t\t\tfinal byte[] timestampBytes = getTimestampX1Data(timestampToken, null);\n\t\t\ttimestampToken.matchData(timestampBytes);\n\t\t}\n\n\t\t/*\n\t\t * This validates the RefsOnly timestamp tokensToProcess present in the signature.\n\t\t */\n\t\tfor (final TimestampToken timestampToken : getTimestampsX2()) {\n\n\t\t\tfinal byte[] timestampBytes = getTimestampX2Data(timestampToken, null);\n\t\t\ttimestampToken.matchData(timestampBytes);\n\t\t}\n\n\t\t/*\n\t\t * This validates the archive timestamp tokensToProcess present in the signature.\n\t\t */\n\t\tfor (final TimestampToken timestampToken : getArchiveTimestamps()) {\n\n\t\t\tfinal byte[] timestampData = getArchiveTimestampData(timestampToken, null);\n\t\t\ttimestampToken.matchData(timestampData);\n\t\t}\n\t}", "@Test\n public void testValidSig() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1 with Bob's kp, which is incorrect\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpBob.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n\n // Sign for tx1 with Alice's kp, which is now correct\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig2);\n tx1.finalize();\n\n assertTrue(txHandler.isValidTx(tx1));\n }", "private void verifyCadesSignatureStream(InputStream signature, InputStream data)\n throws CmsCadesException, TspVerificationException, CMSSignatureException {\n CadesSignatureStream cadesSig = new CadesSignatureStream(signature, data);\n int signerInfoLength = cadesSig.getSignerInfos().length;\n\n System.out.println(\"Signature contains \" + signerInfoLength + \" signer infos\");\n\n for (int j = 0; j < signerInfoLength; j++) {\n cadesSig.verifySignatureValue(j);\n System.out.println(\"Signer \" + (j + 1) + \" signature value is valid.\");\n\n // tsp verification\n SignatureTimeStamp[] timestamps = cadesSig.getSignatureTimeStamps(j);\n for (SignatureTimeStamp tst : timestamps) {\n System.out.println(\"Signer info \" + (j + 1) + \" contains a signature timestamp.\");\n tst.verifyTimeStampToken(null);\n System.out.println(\"Signer info \" + (j + 1) + \" signature timestamp is valid.\");\n }\n }\n }", "protected void checkParams(Signature signature, CriteriaSet trustBasisCriteria) throws SecurityException {\n\n if (signature == null) {\n throw new SecurityException(\"Signature was null\");\n }\n if (trustBasisCriteria == null) {\n throw new SecurityException(\"Trust basis criteria set was null\");\n }\n if (trustBasisCriteria.isEmpty()) {\n throw new SecurityException(\"Trust basis criteria set was empty\");\n }\n }", "boolean isValid() {\n for (int i = 0; i < SIGNATURE.length; i++) {\n if (mem.getByte(i) != SIGNATURE[i]) {\n // Invalid signature\n return false;\n }\n }\n final int specRev = mem.getByte(6);\n if ((specRev != 0x01) && (specRev != 0x04)) {\n // Invalid specification revision\n return false;\n }\n return true;\n }", "boolean checkSignature(long sig0, long sig1, long sig2) throws Exception {\n Integer[] sig = new Integer[3];\n\t /* Get signature */\n readSignature(sig);\n\t /* Compare signature */\n if (sig[0] != sig0 || sig[1] != sig1 || sig[2] != sig2) {\n throw new Exception(\"Signature does not match selected device! \");\n }\n return true; // Indicate supported command.\n }", "private void validateSendAmount() {\n try {\n if (new BigDecimal(sanitizeNoCommas(sendNanoAmount))\n .compareTo(new BigDecimal(sanitizeNoCommas(NumberUtil.getRawAsLongerUsableString(accountBalance.toString())))) > 0) {\n RxBus.get().post(new SendInvalidAmount());\n }\n } catch (NumberFormatException e) {\n ExceptionHandler.handle(e);\n }\n }", "protected AcceptStatus checkPayloads(Collection<byte[]> candidate) {\n if (candidate.size() == payloadToMatch.size()){\n //TODO: check the byte arrays are the same\n Iterator<byte[]> toMatchIter = payloadToMatch.iterator();\n //check each of the byte arrays, in order\n for (byte[] candBytes : candidate) {\n //if one is a mismatch, then return false\n if (Arrays.equals(candBytes, toMatchIter.next()) == false){\n return AcceptStatus.NO;\n }\n }\n //we've verified all the bytes\n return AcceptStatus.YES;\n } else {\n return AcceptStatus.NO;\n }\n }", "private void verifyLiquidAmount(List<Liquid> liquids) {\n if (liquids.isEmpty())\n throw new ValidationException(\"A cocktail needs at least one liquid.\");\n }", "protected void checkParamsRaw(byte[] signature, byte[] content, String algorithmURI, CriteriaSet trustBasisCriteria)\n throws SecurityException {\n\n if (signature == null || signature.length == 0) {\n throw new SecurityException(\"Signature byte array was null or empty\");\n }\n if (content == null || content.length == 0) {\n throw new SecurityException(\"Content byte array was null or empty\");\n }\n if (DatatypeHelper.isEmpty(algorithmURI)) {\n throw new SecurityException(\"Signature algorithm was null or empty\");\n }\n if (trustBasisCriteria == null) {\n throw new SecurityException(\"Trust basis criteria set was null\");\n }\n if (trustBasisCriteria.isEmpty()) {\n throw new SecurityException(\"Trust basis criteria set was empty\");\n }\n }", "@Override\n public boolean isLegal(List<Integer> selectedCards)\n {\n //checks if the two cards selected added together equal 13\n if(selectedCards.size() == 2)\n {\n if(containsSum13(selectedCards))\n {\n \treturn true;\n }\n }\n \n //checks if the selected card is a K\n if(selectedCards.size() == 1)\n {\n \treturn containsK(selectedCards);\n }\n return false;\n \n }", "public void verify_only(Transaction t) {\n verify_transaction(t);\n }", "@Test\n\tpublic void validateSignatureBlock()\n\t{\n\t\tDBSet databaseSet = DBSet.createEmptyDatabaseSet();\n\t\t\t\t\n\t\t//PROCESS GENESISBLOCK\n\t\tGenesisBlock genesisBlock = new GenesisBlock();\n\t\tgenesisBlock.process(databaseSet);\n\t\t\t\t\n\t\t//CREATE KNOWN ACCOUNT\n\t\tbyte[] seed = Crypto.getInstance().digest(\"test\".getBytes());\n\t\tbyte[] privateKey = Crypto.getInstance().createKeyPair(seed).getA();\n\t\tPrivateKeyAccount generator = new PrivateKeyAccount(privateKey);\n\t\t\t\t\t\t\n\t\t//PROCESS GENESIS TRANSACTION TO MAKE SURE GENERATOR HAS FUNDS\n\t\tTransaction transaction = new GenesisTransaction(generator, BigDecimal.valueOf(1000).setScale(8), NTP.getTime());\n\t\ttransaction.process(databaseSet);\n\t\t\t\t\n\t\t//GENERATE NEXT BLOCK\n\t\tBlockGenerator blockGenerator = new BlockGenerator();\n\t\tBlock newBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tbyte[] transactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF SIGNATURE VALID\n\t\tassertEquals(true, newBlock.isSignatureValid());\n\t\t\n\t\t//INVALID TRANSACTION SIGNATURE\n\t\ttransactionsSignature = new byte[64];\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK IF SIGNATURE INVALID\n\t\tassertEquals(false, newBlock.isSignatureValid());\n\t\t\n\t\t//INVALID GENERATOR SIGNATURE\n\t\tnewBlock = BlockFactory.getInstance().create(newBlock.getVersion(), newBlock.getReference(), newBlock.getTimestamp(), newBlock.getGeneratingBalance(), generator, new byte[32]);\n\t\ttransactionsSignature = Crypto.getInstance().sign(generator, newBlock.getGeneratorSignature());\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t///CHECK IF SIGNATURE INVALID\n\t\tassertEquals(false, newBlock.isSignatureValid());\n\t\t\n\t\t//VALID TRANSACTION SIGNATURE\n\t\tnewBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\t\n\t\t//ADD TRANSACTION\n\t\tAccount recipient = new Account(\"XUi2oga2pnGNcZ9es6pBqxydtRZKWdkL2g\");\n\t\tlong timestamp = newBlock.getTimestamp();\n\t\tbyte[] signature = PaymentTransaction.generateSignature(databaseSet, generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp);\n\t\tTransaction payment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(100).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tnewBlock.addTransaction(payment);\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\ttransactionsSignature = blockGenerator.calculateTransactionsSignature(newBlock, generator);\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK VALID TRANSACTION SIGNATURE\n\t\tassertEquals(true, newBlock.isSignatureValid());\t\n\t\t\n\t\t//INVALID TRANSACTION SIGNATURE\n\t\tnewBlock = blockGenerator.generateNextBlock(databaseSet, generator, genesisBlock);\t\n\t\t\n\t\t//ADD TRANSACTION\n\t\tpayment = new PaymentTransaction(generator, recipient, BigDecimal.valueOf(200).setScale(8), BigDecimal.valueOf(1).setScale(8), timestamp, generator.getLastReference(databaseSet), signature);\n\t\tnewBlock.addTransaction(payment);\n\t\t\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\ttransactionsSignature = blockGenerator.calculateTransactionsSignature(newBlock, generator);\n\t\tnewBlock.setTransactionsSignature(transactionsSignature);\n\t\t\n\t\t//CHECK INVALID TRANSACTION SIGNATURE\n\t\tassertEquals(false, newBlock.isSignatureValid());\t\n\t}", "protected void acceptedPaymentVerification() {\n BillingSummaryPage.tableBillingGeneralInformation.getRow(1)\n .getCell(\"Current Due\").waitFor(cell -> !cell.getValue().equals(\"Calculating...\"));\n\n assertThat(BillingSummaryPage.tableBillingGeneralInformation.getRow(1))\n .hasCellWithValue(\"Current Due\", BillingHelper.DZERO.toString())\n .hasCellWithValue(\"Total Due\", BillingHelper.DZERO.toString())\n .hasCellWithValue(\"Total Paid\", modalPremiumAmount.get().toString());\n\n assertThat(BillingSummaryPage.tableBillsAndStatements.getRow(1).getCell(\"Status\")).valueContains(PAID_IN_FULL);\n\n assertThat(BillingSummaryPage.tablePaymentsOtherTransactions)\n .with(POLICY_NUMBER, masterPolicyNumber.get())\n .with(TYPE, PAYMENT)\n .with(TableConstants.BillingPaymentsAndTransactionsGB.AMOUNT, String.format(\"(%s)\", modalPremiumAmount.get().toString()))\n .containsMatchingRow(1);\n\n }", "private boolean validateTxns(final Transaxtion txnList[]) throws TaskFailedException {\n\t\tif (txnList.length < 2)\n\t\t\treturn false;\n\t\tdouble dbAmt = 0;\n\t\tdouble crAmt = 0;\n\t\ttry {\n\t\t\tfor (final Transaxtion element : txnList) {\n\t\t\t\tfinal Transaxtion txn = element;\n\t\t\t\tif (!validateGLCode(txn))\n\t\t\t\t\treturn false;\n\t\t\t\tdbAmt += Double.parseDouble(txn.getDrAmount());\n\t\t\t\tcrAmt += Double.parseDouble(txn.getCrAmount());\n\t\t\t}\n\t\t} finally {\n\t\t\tRequiredValidator.clearEmployeeMap();\n\t\t}\n\t\tdbAmt = ExilPrecision.convertToDouble(dbAmt, 2);\n\t\tcrAmt = ExilPrecision.convertToDouble(crAmt, 2);\n\t\tif (LOGGER.isInfoEnabled())\n\t\t\tLOGGER.info(\"Total Checking.....Debit total is :\" + dbAmt + \" Credit total is :\" + crAmt);\n\t\tif (dbAmt != crAmt)\n\t\t\tthrow new TaskFailedException(\"Total debit and credit not matching. Total debit amount is: \" + dbAmt\n\t\t\t\t\t+ \" Total credit amount is :\" + crAmt);\n\t\t// return false;\n\t\treturn true;\n\t}", "public static boolean isSigned_entries_receiveEst() {\n return false;\n }", "public void checkAuctions() {\n\n checkDutchAuctions();\n checkSecondPriceAuctions();\n }", "@Suspendable\n @Override\n protected void checkTransaction(SignedTransaction stx) throws FlowException {\n }", "boolean verifySignature(byte[] message, byte[] signature, PublicKey publicKey) throws IOException;", "@Test\n\tpublic void validateSignatureGenesisBlock()\n\t{\n\t\tLOGGER.info(\"getGeneratorSignature \" + gb.getSignature().length\n\t\t\t\t+ \" : \" + gb.getSignature());\n\n\t\tassertEquals(true, gb.isSignatureValid());\n\t\t\n\t\t//ADD TRANSACTION SIGNATURE\n\t\tLOGGER.info(\"getGeneratorSignature \" + gb.getSignature());\n\n\t\t//ADD a GENESIS TRANSACTION for invalid SIGNATURE\n\t\tList<Transaction> transactions = gb.getTransactions();\n\t\ttransactions.add( new GenesisTransferAssetTransaction(\n\t\t\t\tnew Account(\"7R2WUFaS7DF2As6NKz13Pgn9ij4sFw6ymZ\"), 1l, BigDecimal.valueOf(1).setScale(8)));\n\t\tgb.setTransactions(transactions);\n\t\t\n\t\t// SIGNATURE invalid\n\t\tassertEquals(false, gb.isSignatureValid());\t\t\n\n\t\tassertEquals(true, gb.isValid(db));\n\n\t}", "protected boolean validateCapturedParameters(Map<String, String> params, String referenceTid) {\n\n // Validate amount\n if (!params.get(\"amount\").equals(\"SUBSCRIPTION_STOP\") && params.get(\"amount\").equals(\"\") || params.get(\"amount\") == null) {\n displayMessage(\"Novalnet callback received. Amount not valid\");\n return false;\n }\n\n // Validate reference TID\n if (referenceTid.length() != 17) {\n displayMessage(\"Novalnet callback received. Reference TID not valid\");\n return false;\n }\n return true;\n }", "private void verify(@NonNull byte[] dig, @NonNull byte[] sig, @NonNull WpcCrt crt) throws GeneralSecurityException {\n try {\n SafFkt.verSig(dig, sig, crt.getPublicKey()); // Verify the signature\n } catch (GeneralSecurityException err) { // An error occurred during the signature verification\n WpcLog.logErr(\"Wrong signature\"); // Log wrong signature\n throw err; // Report no successful signature verification\n }\n }", "public void validate() {\n for (Map.Entry<Integer, List<Message>> messagesOneId : messagesMap.entrySet()) {\n //get bank client\n int clientId = messagesOneId.getKey();\n BankClient bankClient = bankDatabase.get(clientId);\n\n //loop for each message with this ID\n for (Message messageData : messagesOneId.getValue()) {\n //check if this message is verified\n boolean isVerified = SignatureVerification.checkIsVerified(bankClient, messageData);\n //check if the request amount exceed limitation\n boolean isValid = checkIsValid(bankClient, messageData);\n //set the corresponding fields of message\n messageData.setVerified(isVerified);\n messageData.setValid(isValid);\n }\n }\n }", "protected boolean isTransferTransactionValidEx(StateTransferTransaction tr) {\n\t\tString fromAddressPublicKey = ((StateTransferTransaction)tr).from;\n\t\tString toAddressPublicKey = ((StateTransferTransaction)tr).to;\t\t\t\t\n\t\tdouble amount = ((StateTransferTransaction)tr).amount;\n\t\tint nonce = ((StateTransferTransaction)tr).getNonce();\n\t\t\t\n\t\t// getting the fromAccount to be modified\n\t\tAccountInterface accountFromModify = null;\n\t\tint accountFromModifyFound = 0;\n\t\tboolean accountFromIsGood = false;\n\t\tfor(AccountInterface account: accounts) {\n\t\t\tif (account.getAddress().equals(fromAddressPublicKey)){\n\t\t\t\taccountFromModify = account;\n\t\t\t\taccountFromModifyFound ++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (accountFromModifyFound > 1) {\n\t\t\t// more than one account is found ?? -> raise error\n\t\t\tServiceBus.logger.log(\"more than one matching account has been found at transfer transaction TrID : \" + tr.getTransctionId());\n\t\t\treturn false;\n\t\t}\n\t\telse if (accountFromModifyFound == 1) {\n\t\t\tif (tr.getNonce() != accountFromModify.getNonce() + 1) {\n\t\t\t\t// error -> nonce not matching -> pssible replay attack\n\t\t\t\tServiceBus.logger.log(\"Nonce is not valid at transaction, possible replay aatack\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse {\t\t\t\t\n\t\t\t\tif (accountFromModify.getBalance() < amount){\n\t\t\t\t\t// not enoguh fund on the account\n\t\t\t\t\tServiceBus.logger.log(\"Not enoguh fund on the account at transfer transaction TrID : \" + tr.getTransctionId());\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t// all cool but still not return because the second account has to be checked as well\n\t\t\t\telse {\n\t\t\t\t\taccountFromIsGood = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t}else if (accountFromModifyFound == 0) {\n\t\t\t// error, if the account does not exist, you can not transfer money from that\n\t\t\tServiceBus.logger.log(\"The account from which you want to transfer the fund does not exist, TrID : \" + tr.getTransctionId());\n\t\t\treturn false;\n\t\t}\n\t\t\n\n\t\t// getting the toAccount to be modified\n\t\tAccountInterface accountToModify = null;\n\t\tint accountToModifyFound = 0;\n\t\tboolean accountToIsGood = false;\n\t\tfor(AccountInterface account: accounts) {\n\t\t\tif (account.getAddress().equals(toAddressPublicKey)){\n\t\t\t\taccountToModify = account;\n\t\t\t\taccountToModifyFound ++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (accountToModifyFound > 1) {\n\t\t\t// more than one account is found ?? -> raise error\n\t\t\tServiceBus.logger.log(\"More than one account is found at matching the transfer transaction TrID : \" + tr.getTransctionId());\n\t\t\treturn false;\n\t\t}\n\t\telse if (accountToModifyFound == 1) {\n\t\t\taccountToIsGood = true;\n\t\t\t\t\n\t\t}else if (accountToModifyFound == 0) {\n\t\t\t// to account can be added to the state, asset type logic is questionable\n\t\t\t\n\t\t\tAccountBase account = new AccountBase(\n\t\t\t\t\t((StateTransferTransaction)tr).from,\n\t\t\t\t\t((StateTransferTransaction)tr).getNonce(),\n\t\t\t\t\t\"\",\n\t\t\t\t\t((StateTransferTransaction)tr).amount,\n\t\t\t\t\taccountFromModify.getAssetType());\t\n\t\t\taccounts.add(account);\n\t\t\t\n\t\t\taccountToIsGood = true;\n\t\t}\n\t\t\n\t\t// transfer is only possible if the asset type is the same, otherwise it is an exchange\n\t\tif (!accountToModify.getAssetType().equals(accountFromModify.getAssetType())){\n\t\t\t// error, from and to asset type must be the same\n\t\t\tServiceBus.logger.log(\"From and to asset type must be the same, TrID : \" + tr.getTransctionId(), Severity.WARNING);\n\t\t\treturn false;\t\t\t\n\t\t}\n\t\t\t\t\n\t\t// final check if all good return true\n\t\tif (accountFromIsGood && accountToIsGood){\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// default value\n\t\treturn false;\t\t\t\n\t}", "private void verifyCounterSignatureAttribute(AttributeTable signedAttrTable)\n throws CMSException\n {\n if (signedAttrTable != null\n && signedAttrTable.getAll(CMSAttributes.counterSignature).size() > 0)\n {\n throw new CMSException(\"A countersignature attribute MUST NOT be a signed attribute\");\n }\n\n AttributeTable unsignedAttrTable = this.getUnsignedAttributes();\n if (unsignedAttrTable != null)\n {\n ASN1EncodableVector csAttrs = unsignedAttrTable.getAll(CMSAttributes.counterSignature);\n for (int i = 0; i < csAttrs.size(); ++i)\n {\n Attribute csAttr = Attribute.getInstance(csAttrs.get(i));\n if (csAttr.getAttrValues().size() < 1)\n {\n throw new CMSException(\"A countersignature attribute MUST contain at least one AttributeValue\");\n }\n\n // Note: We don't recursively validate the countersignature value\n }\n }\n }", "@Test\n public void testValidBalance() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 100 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(100, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "@Test\n public void testNoDoubleSpending() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 20 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Alice wants double spending: transfers 10 coins to Bob, 20 to Cal again\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(20, kpCal.getPublic());\n\n // Sign for tx1: input 0\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n\n // Sign for tx1: input 1\n byte[] sig2 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig2 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(1).addSignature(sig2);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "protected boolean isTransferTransactionValid(StateTransferTransaction tr) {\n\t\tString fromAddressPublicKey = ((StateTransferTransaction)tr).from;\n\t\tString toAddressPublicKey = ((StateTransferTransaction)tr).to;\t\t\t\t\n\t\tdouble amount = ((StateTransferTransaction)tr).amount;\n\t\tint nonce = ((StateTransferTransaction)tr).getNonce();\n\t\t\t\n\t\t// getting the fromAccount to be modified\n\t\tAccountInterface accountFromModify = null;\n\t\tint accountFromModifyFound = 0;\n\t\tboolean accountFromIsGood = false;\n\t\tfor(AccountInterface account: accounts) {\n\t\t\tif (account.getAddress().equals(fromAddressPublicKey)){\n\t\t\t\taccountFromModify = account;\n\t\t\t\taccountFromModifyFound ++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (accountFromModifyFound > 1) {\n\t\t\t// more than one account is found ?? -> raise error\n\t\t\tServiceBus.logger.log(\"more than one matching account has been found at transfer transaction TrID : \" + tr.getTransctionId());\n\t\t\treturn false;\n\t\t}\n\t\telse if (accountFromModifyFound == 1) {\n\t\t\tif (tr.getNonce() != accountFromModify.getNonce() + 1) {\n\t\t\t\t// error -> nonce not matching -> pssible replay attack\n\t\t\t\tServiceBus.logger.log(\"Nonce is not valid at transaction, possible replay aatack\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse {\t\t\t\t\n\t\t\t\tif (accountFromModify.getBalance() < amount){\n\t\t\t\t\t// not enoguh fund on the account\n\t\t\t\t\tServiceBus.logger.log(\"Not enoguh fund on the account at transfer transaction TrID : \" + tr.getTransctionId());\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t// all cool but still not return because the second account has to be checked as well\n\t\t\t\telse {\n\t\t\t\t\taccountFromIsGood = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t}else if (accountFromModifyFound == 0) {\n\t\t\t// error, if the account does not exist, you can not transfer money from that\n\t\t\tServiceBus.logger.log(\"The account from which you want to transfer the fund does not exist, TrID : \" + tr.getTransctionId());\n\t\t\treturn false;\n\t\t}\n\t\t\n\n\t\t// getting the toAccount to be modified\n\t\tAccountInterface accountToModify = null;\n\t\tint accountToModifyFound = 0;\n\t\tboolean accountToIsGood = false;\n\t\tfor(AccountInterface account: accounts) {\n\t\t\tif (account.getAddress().equals(toAddressPublicKey)){\n\t\t\t\taccountToModify = account;\n\t\t\t\taccountToModifyFound ++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (accountToModifyFound > 1) {\n\t\t\t// more than one account is found ?? -> raise error\n\t\t\tServiceBus.logger.log(\"More than one account is found at matching the transfer transaction TrID : \" + tr.getTransctionId());\n\t\t\treturn false;\n\t\t}\n\t\telse if (accountToModifyFound == 1) {\n\t\t\taccountToIsGood = true;\n\t\t\t\t\n\t\t}else if (accountToModifyFound == 0) {\n\t\t\t// error, if the account does not exist, you can not transfer money from that\n\t\t\tServiceBus.logger.log(\"The to account does not exist, TrID : \" + tr.getTransctionId());\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// transfer is only possible if the asset type is the same, otherwise it is an exchange\n\t\tif (!accountToModify.getAssetType().equals(accountFromModify.getAssetType())){\n\t\t\t// error, from and to asset type must be the same\n\t\t\tServiceBus.logger.log(\"From and to asset type must be the same, TrID : \" + tr.getTransctionId(), Severity.WARNING);\n\t\t\treturn false;\t\t\t\n\t\t}\n\t\t\t\t\n\t\t// final check if all good return true\n\t\tif (accountFromIsGood && accountToIsGood){\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// default value\n\t\treturn false;\t\t\t\n\t}", "private boolean validateTxns(final Transaxtion txnList[], final DataCollection dc) throws TaskFailedException {\n\t\tif (txnList.length < 2) {\n\t\t\tdc.addMessage(\"exilWrongTrxn\");\n\t\t\treturn false;\n\t\t}\n\t\tdouble dbAmt = 0;\n\t\tdouble crAmt = 0;\n\t\ttry {\n\t\t\tfor (final Transaxtion element : txnList) {\n\t\t\t\tfinal Transaxtion txn = element;\n\t\t\t\tif (!validateGLCode(txn, dc))\n\t\t\t\t\treturn false;\n\t\t\t\tdbAmt += Double.parseDouble(txn.getDrAmount());\n\t\t\t\tcrAmt += Double.parseDouble(txn.getCrAmount());\n\t\t\t}\n\t\t} catch (final NumberFormatException e) {\n\t\t\tdc.addMessage(EXILRPERROR, e.toString());\n\t\t\tLOGGER.error(e.getMessage(), e);\n\t\t\tthrow new TaskFailedException();\n\t\t}\n\t\tdbAmt = ExilPrecision.convertToDouble(dbAmt, 2);\n\t\tcrAmt = ExilPrecision.convertToDouble(crAmt, 2);\n\t\tif (dbAmt != crAmt) {\n\t\t\tdc.addMessage(\"exilAmountMismatch\");\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "private boolean verifySignature(String packageName, String signature) {\n try {\n final boolean signatureValid = signature.isEmpty()\n || mPackageManager.hasSigningCertificate(packageName,\n HexEncoding.decode(signature), CERT_INPUT_SHA256);\n\n if (!signatureValid) {\n Slog.w(TAG, packageName + \" did not have expected signature: \" + signature);\n }\n return signatureValid;\n } catch (IllegalArgumentException e) {\n Slog.w(TAG, \"Unable to verify signature \" + signature + \" for \" + packageName, e);\n return false;\n }\n }", "private boolean isValidTransaction(double remainingCreditLimit, double transactionAmount){\n return transactionAmount <= remainingCreditLimit;\n }", "public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }", "public VerifyAgreementResult checkAgreement(List<Message> store) {\n byte[] pubkey = null;\n String data = \"\";\n for (Message e : store){\n if (e instanceof PrevoteMessage) {\n data = new String(((PrevoteMessage) e).data);\n pubkey = ((PrevoteMessage) e).pubkey;\n } else if (e instanceof VoteMessage) {\n data = new String(((VoteMessage) e).data);\n pubkey = ((VoteMessage) e).pubkey;\n } else {\n logger.error(\"Needs type PrevoteMessage or VoteMessage.\");\n throw new IllegalArgumentException(\"Needs type PrevoteMessage or VoteMessage.\");\n }\n int count = 0;\n// logger.info(\"<<<< data: \" + data + \", \\n pubkey:\" + pubkey);\n for (Message i : store){\n if ( (i instanceof PrevoteMessage && data.equals(new String(((PrevoteMessage) i).data)))\n || (i instanceof VoteMessage && data.equals(new String(((VoteMessage) i).data))) ){\n count++;\n }\n }\n logger.info(\"need count more than \" + muchMoreThenHalf() + \", agreement count: \" + count);\n if (count > muchMoreThenHalf()){\n return new VerifyAgreementResult(true, data, pubkey);\n }\n }\n return new VerifyAgreementResult(false, data, pubkey);\n }", "public static boolean blindSignatureVerification(BigInteger message, BigInteger signature, RSAPublicKey key) {\n\t\tBigInteger e = key.getPublicExponent();\n\t\tBigInteger N = key.getModulus();\n\n\t\tBigInteger clearText = signature.modPow(e, N);\n\n\t\treturn clearText.equals(message);\n\t}", "public void validate(SignForm signForm) {\n }", "@Override\n\tpublic int checkBill(MarketTransaction t) {\n\t\treturn 0;\n\t}", "protected boolean verifySignature(Signature signature, Credential credential) {\n SignatureValidator validator = new SignatureValidator(credential);\n try {\n validator.validate(signature);\n } catch (ValidationException e) {\n log.debug(\"Signature validation using candidate validation credential failed\", e);\n return false;\n }\n \n log.debug(\"Signature validation using candidate credential was successful\");\n return true;\n }", "public boolean steamFailure() {\n double steam = this.steamMessage.getDoubleParameter();\n if (steam < 0) {\n return true;\n }\n if (steam > this.configuration.getMaximualSteamRate()) {\n return true;\n }\n return false;\n }", "@Override\n\tprotected boolean isImplementationValid()\n\t{\n\t\treturn (this.amount > 0);\n\t}", "public boolean verifySignature() {\r\n\t\t\r\n\t\tString data;\r\n\t\t\r\n\t\tif(isTypeCreation){\r\n\t\t\t\r\n\t\t\tdata = StringUtil.getStringFromKey(creator) + name +\r\n\t\t\t\t\tdescription + begin + end+end_subscription+\r\n\t\t\t\t\tlocation+min_capacity+max_capacity;\r\n\t\t\treturn StringUtil.verifyECDSASig(creator, data, signature);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tdata = StringUtil.getStringFromKey(subscriber)+id_event;\r\n\t\t\treturn StringUtil.verifyECDSASig(subscriber, data, signature);\r\n\t\t}\r\n//\t\tSystem.out.println(\"signature \"+signature);\r\n\t\t\r\n\t}", "public static boolean validateWithoutRevocations(\n String signedData,\n byte[] signature,\n PublicKey publicKey) {\n\n byte[] adjSignature = new byte[0];\n // check minimum length (taskinfo + R + S)\n if (signature.length < (36 + 48 + 48)) {\n return false;\n }\n try {\n // first 36 bytes are always the taskInfo\n byte[] taskInfo = Arrays.copyOfRange(signature, 0, 36);\n\n // adjust the signed data\n // data-to-verify format is: [ task-info | nonce (optional) | data ]\n // First 36 bytes of signature is the taskinfo. This value must be prepended\n // to the signedData\n ByteArrayOutputStream adjSignedData = new ByteArrayOutputStream();\n adjSignedData.write(taskInfo);\n adjSignedData.write(signedData.getBytes());\n\n adjSignature = convertSignature(signature, taskInfo);\n\n Signature sig = Signature.getInstance(\"SHA384withECDSA\");\n sig.initVerify(publicKey);\n sig.update(adjSignedData.toByteArray());\n return sig.verify(adjSignature);\n } catch (Exception ex) {\n return false;\n }\n }", "private void checkSafety() {\n\t\tSet<VariableTerm> bindingVariables = new HashSet<>();\n\t\tSet<VariableTerm> nonbindingVariables = new HashSet<>();\n\n\t\t// Check that all negative variables occur in the positive body.\n\t\tfor (Atom posAtom : bodyAtomsPositive) {\n\t\t\tbindingVariables.addAll(posAtom.getBindingVariables());\n\t\t\tnonbindingVariables.addAll(posAtom.getNonBindingVariables());\n\t\t}\n\n\t\tfor (Atom negAtom : bodyAtomsNegative) {\n\t\t\t// No variables in a negated atom are binding.\n\t\t\tnonbindingVariables.addAll(negAtom.getBindingVariables());\n\t\t\tnonbindingVariables.addAll(negAtom.getNonBindingVariables());\n\t\t}\n\n\t\t// Rule heads must be safe, i.e., all their variables must be bound by the body.\n\t\tif (!isConstraint()) {\n\t\t\tnonbindingVariables.addAll(headAtom.getBindingVariables());\n\t\t\tnonbindingVariables.addAll(headAtom.getNonBindingVariables());\n\t\t}\n\n\t\t// Check that all non-binding variables are bound in this rule.\n\t\tnonbindingVariables.removeAll(bindingVariables);\n\n\t\tif (nonbindingVariables.isEmpty()) {\n\t\t\treturn;\n\t\t}\n\n\t\tthrow new RuntimeException(\"Encountered unsafe variable \" + nonbindingVariables.iterator().next().toString() + \" in rule: \" + toString()\n\t\t\t\t+ System.lineSeparator() + \"Notice: A rule is considered safe if all variables occurring in negative literals, builtin atoms, and the head of the rule also occur in some positive literal.\");\n\t}", "boolean checkVerification();", "public boolean checkEntryInputs() {\n\t\tboolean isValid = true;\n\t\tif(sampleNumberTF.getText().equals(\"\")) {\n\t\t\tisValid = false;\n\t\t}\n\t\t\n\t\tif(materialDescriptionTF.getText().equals(\"\")) {\n\t\t\tisValid = false;\n\t\t}\n\t\t\n\t\tif(Double.valueOf(bacteroidesConcentrationTF.getText())==null) {\n\t\t\tisValid = false;\n\t\t}\n\t\treturn isValid;\n\t}", "protected int checkForAllErrors(Order order) {\r\n int returnValue = checkIfGiftCardsAreBeingPurchased(order);\r\n \r\n if (returnValue == NO_ERRORS) {\r\n returnValue = checkGiftCardValues(order.getProfileId());\r\n }\r\n if (returnValue == NO_ERRORS) {\r\n returnValue = checkForDuplicateGiftCards(order);\r\n }\r\n if (returnValue == NO_ERRORS) {\r\n returnValue = checkAllCardsAppliedHaveZeroBalance();\r\n }\r\n \r\n return returnValue;\r\n }", "private void performSanityCheckForInput(NumericChoice[] correctNumericChoices)\n throws IllegalArgumentException {\n\n if (correctNumericChoices.length != 1) {\n throw new IllegalArgumentException(\"cannot have more than 1 correct option\");\n }\n }", "@Test\n public void holdTest() {\n\n PaymentDto paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String firstPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status AUTHORIZED\", PaymentStatus.AUTHORIZED, paymentDto.getStatus());\n\n\n //init and authorize second payment, but there is 700 cents of 1000 withhold - ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = initPayment(inAccountId, outAccountId, \"700\");\n\n final String secondPaymentId = paymentDto.getId();\n\n paymentDto = authorizePayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n\n //confirm first payment - OK\n\n paymentDto = confirmPayment(firstPaymentId, 200);\n\n assertEquals(\"Payment status CONFIRMED\", PaymentStatus.CONFIRMED, paymentDto.getStatus());\n\n\n //confirm second payment, which was filed on authorization - still got ERROR: WITHDRAW_NO_FUNDS\n\n paymentDto = confirmPayment(secondPaymentId, 200);\n\n assertEquals(\"Payment status ERROR\", PaymentStatus.ERROR, paymentDto.getStatus());\n\n assertEquals(\"Error reason WITHDRAW_NO_FUNDS\", new Integer(ErrorCode.WITHDRAW_NO_FUNDS.getCode()), paymentDto.getErrorReason());\n\n }", "public void verifySignature(SignatureVerifier verifier) {\n\t\tverifier.verify(signingInput(), crypto);\n \t}", "private boolean doVerify(boolean completeOnly) {\n\n if (status == DataStatus.VERIFIED) {\n return true;\n } else if (completeOnly && status != DataStatus.COMPLETE) {\n return false;\n }\n\n // if any of this chunk's storage units doesn't exist,\n // then it's neither complete nor verified\n for (StorageUnit unit : units) {\n if (unit.size() == 0) {\n return false;\n }\n }\n\n Range allData = getRange(0, size);\n MessageDigest digest;\n try {\n digest = MessageDigest.getInstance(\"SHA-1\");\n } catch (NoSuchAlgorithmException e) {\n // not going to happen\n throw new BtException(\"Unexpected error\", e);\n }\n\n // do not block readers when checking data integrity\n readWriteLock.readLock().lock();\n try {\n if (status == DataStatus.VERIFIED) {\n return true;\n }\n\n allData.visitFiles((unit, off, lim) -> {\n\n int step = 2 << 22; // 8 MB\n long remaining = lim - off;\n if (remaining > Integer.MAX_VALUE) {\n throw new BtException(\"Too much data -- can't read to buffer\");\n }\n do {\n digest.update(unit.readBlock(off, Math.min(step, (int) remaining)));\n remaining -= step;\n off += step;\n } while (remaining > 0);\n });\n\n boolean verified = Arrays.equals(checksum, digest.digest());\n if (verified) {\n status = DataStatus.VERIFIED;\n }\n // TODO: reset the piece if verification is unsuccessful?\n return verified;\n\n } finally {\n readWriteLock.readLock().unlock();\n }\n }", "public boolean isSignatureValid(final byte[] bytes, final byte[] signature) {\n return isSignatureValid(bytes, signature, UUID.randomUUID().toString());\n }", "@Test\n public void testDuplicateConditionsAndFulfillments() {\n final ThresholdSha256Condition condition = ThresholdSha256Condition.from(\n 2, Lists\n .newArrayList(subcondition1, subcondition1, subcondition2, subcondition3)\n );\n\n // Escrow Only (insufficient)\n ThresholdSha256Fulfillment fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition1, subcondition2, subcondition3),\n Lists.newArrayList(subfulfillment1)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(false));\n\n // Escrow Only (sufficient)\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition2, subcondition3),\n Lists.newArrayList(subfulfillment1, subfulfillment1)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(true));\n\n // Escrow+Party2\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition1, subcondition3),\n Lists.newArrayList(subfulfillment1, subfulfillment2)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(true));\n\n // Escrow+Party3\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition1, subcondition2),\n Lists.newArrayList(subfulfillment1, subfulfillment3)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(true));\n\n // Party2+Party3\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(subcondition1, subcondition1),\n Lists.newArrayList(subfulfillment2, subfulfillment3)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(true));\n\n // Party2+Party3 (w\\o escrow condition)\n fulfillment = ThresholdSha256Fulfillment.from(\n Lists.newArrayList(),\n Lists.newArrayList(subfulfillment2, subfulfillment3)\n );\n assertThat(fulfillment.verify(condition, new byte[0]), is(false));\n }", "public void testDangerSigns() {\n \t// 1. Execute the Classification rule engine to determine patient classifications\n \t// 2. Execute the Treatment rule engine to determine patient treatments\n \texecuteRuleEngines();\n \n // 3. Has the correct number of classifications been determined?\n assertEquals(\"the actual number of patient classifications does not match the expected number\",\n \t\t 2, CcmRuleEngineUtilities.calculateStandardClassificationNumber(getPatientAssessment().getDiagnostics()));\n \n // 4. Have the correct classifications been determined?\n assertEquals(\"incorrect classification assessed\", true, CcmRuleEngineUtilities.classificationPresent(getPatientAssessment().getDiagnostics(), \"Cough for 21 Days or more\"));\n assertEquals(\"incorrect classification assessed\", true, CcmRuleEngineUtilities.classificationPresent(getPatientAssessment().getDiagnostics(), \"Not Able to Drink or Feed Anything\"));\n \n // 5. Have the correct treatments been determined?\n assertEquals(\"incorrect treatment assessed\", true, CcmRuleEngineUtilities.treatmentPresent(getPatientAssessment().getDiagnostics(), \"REFER URGENTLY to health facility\"));\n assertEquals(\"incorrect treatment assessed\", true, CcmRuleEngineUtilities.treatmentPresent(getPatientAssessment().getDiagnostics(), \"Explain why child needs to go to health facility\"));\n assertEquals(\"incorrect treatment assessed\", true, CcmRuleEngineUtilities.treatmentPresent(getPatientAssessment().getDiagnostics(), \"Advise to keep child warm, if 'child is NOT hot with fever'\"));\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \n assertEquals(\"incorrect treatment assessed\", true, CcmRuleEngineUtilities.treatmentPresent(getPatientAssessment().getDiagnostics(), \"Write a referral note\"));\n assertEquals(\"incorrect treatment assessed\", true, CcmRuleEngineUtilities.treatmentPresent(getPatientAssessment().getDiagnostics(), \"Arrange transportation and help solve other difficulties in referral\"));\n }", "private void verifyPrice(SearchResultsPage searchResultsPage) throws Exception {\n\t\tString sPriceSearchResults = searchResultsPage.getSavedPrice(); // the price of the selected flights from the Search Results page\n\t\tWebElement pricePaymentElement = getElement(pricePayment, \"ID\");\n\t\tString sPricePayment = pricePaymentElement.getText().trim(); // string will be similar to: \"$###.##\"\n\n\t\tif (sPricePayment.equals(sPriceSearchResults)) {\n\t\t\tlog.debug(\"Payment price matches\");\n\t\t} \n\t\telse {\n\t\t\tlog.debug(\"Payment price MISmatch\");\n\t\t}\n\t\tlog.info(\"verifyPrice() completed\");\n\t}", "public double calculateExpectedDisagreement();", "public boolean isTransactionValidEx(TransactionInterface tr) {\n\t\tif (!tr.verifySignature()) {\n\t\t\tServiceBus.logger.log(\"Signature is not valid, Id : \" + tr.getTransctionId(), Severity.ERROR);\n\t\t\treturn false;\n\t\t}\t\t\n\t\t\n\t\tif (tr instanceof StateDataTransaction) {\n\t\t\treturn this.isDataTransactionValidEx((StateDataTransaction)tr);\n\t\t}\n\t\telse if (tr instanceof StateTransferTransaction) {\n\t\t\treturn this.isTransferTransactionValidEx((StateTransferTransaction)tr);\n\t\t}\n\t\telse if (tr instanceof StateRuleTransaction) {\n\t\t\treturn this.isRuleTransactionValidEx((StateRuleTransaction)tr);\n\t\t}\n\t\telse {\n\t\t\tServiceBus.logger.log(\"Unknown transaction, Id : \" + tr.getTransctionId() , Severity.WARNING);\n\t\t}\n\t\treturn false;\n\t}", "public boolean appliesTo(ISignature signature) {\n\t\tif (NUMBER_EXPECTED_PARAMETERS != signature.getNumberParameters()) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t// check that parameters are not null\r\n\t\tfor (int i = 0; i < NUMBER_EXPECTED_PARAMETERS; i++) {\r\n\t\t\tif (null == signature.get(i)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// check types of parameters\r\n\t\tif (!WasPackage.Literals.WAS_NODE_UNIT\r\n\t\t\t\t.isSuperTypeOf(signature.get(NODE_UNIT_PARAMETER_INDEX))) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (!WasPackage.Literals.WAS_NODE_UNIT.isSuperTypeOf(signature\r\n\t\t\t\t.get(DMGR_NODE_UNIT_PARAMETER_INDEX))) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}", "@Test\n public void testTrustPolicyDocumentWithSigNoNs() throws IOException, CertificateException, ParserConfigurationException, SAXException, MarshalException, XMLSignatureException {\n isValid(\"/documents/5/trustpolicy_1_signed.xml\",\"/documents/5/certificate.pem\");\n isValid(\"/documents/5/trustpolicy_4_edited.xml\",\"/documents/5/certificate.pem\");\n isValid(\"/documents/5/trustpolicy_5_edited.xml\",\"/documents/5/certificate.pem\");\n }", "private boolean validateAmountFormat(String amount,\n HttpServletRequest req, HttpServletResponse resp) throws IOException {\n if(!amount.matches(wholeNumber)\n && !amount.matches(fraction)\n && !amount.matches(trailingZeroFraction)\n && !amount.matches(leadingZeroFraction)\n ){\n page.redirectTo(\"/account\", resp, req,\n \"errorMessage\", \"Transaction amount format invalid!\");\n return false;\n }\n return true;\n }", "private boolean checkValidations() {\n double originalPrice = 0.0, newPrice = 0.0;\n try {\n originalPrice = Double.parseDouble(etOriginalPrice.getText().toString());\n newPrice = Double.parseDouble(tvNewPrice.getText().toString());\n } catch (NumberFormatException ne) {\n ne.printStackTrace();\n }\n if (TextUtils.isEmpty(etTitle.getText().toString().trim())) {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.empty_title_war));\n return false;\n } else if (TextUtils.isEmpty(etDescription.getText().toString().trim())) {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.empty_description_war));\n return false;\n } else if (TextUtils.isEmpty(etTotalItems.getText().toString())) {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.empty_total_items));\n return false;\n } else if (Integer.parseInt(etTotalItems.getText().toString()) < 1) {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.empty_total_items));\n return false;\n } else if (TextUtils.isEmpty(etOriginalPrice.getText().toString())) {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.empty_original_price));\n return false;\n } else if (Double.parseDouble(etOriginalPrice.getText().toString().trim()) < 1) {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.zero_original_price));\n return false;\n } else if (TextUtils.isEmpty(tvNewPrice.getText().toString())) {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.empty_new_price));\n return false;\n } else if (originalPrice < newPrice) {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.new_price_cant_greater));\n return false;\n } else if (TextUtils.isEmpty(etBeginTime.getText().toString())) {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.empty_begin_time));\n return false;\n } else if (TextUtils.isEmpty(etEndTime.getText().toString())) {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.empty_end_time));\n return false;\n } else if (appUtils.isBeforeCurrentTime(etBeginTime.getText().toString())) {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.start_time_cant_be_less));\n return false;\n } else if (!checktimings(etBeginTime.getText().toString(), etEndTime.getText().toString())) {\n appUtils.showSnackBar(mActivity.findViewById(android.R.id.content), getString(R.string.end_time_cant_less));\n return false;\n } else\n return true;\n }", "@Test\n public void TxHandlerTestForth() throws NoSuchAlgorithmException, SignatureException, InvalidKeyException {\n // generate key pairs, simulate initial tx from scrooge to alice\n System.out.println(\"-----------------------------------------------------------------\");\n System.out.println(\"Test if the TxHandler can reject invalid signature\");\n KeyPair pkScrooge = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkAlice = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n KeyPair pkBob = KeyPairGenerator.getInstance(\"RSA\").generateKeyPair();\n\n Transaction tx0 = new Transaction();\n tx0.addOutput(25, pkScrooge.getPublic());\n\n byte[] initHash = null;\n tx0.addInput(initHash, 0);\n tx0.signTx(pkScrooge.getPrivate(), 0);\n\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(tx0.getHash(), 0);\n utxoPool.addUTXO(utxo, tx0.getOutput(0));\n\n // tx1: scrooge to alice 20 coins\n Transaction tx1 = new Transaction();\n tx1.addInput(tx0.getHash(), 0);\n tx1.addOutput(20, pkAlice.getPublic());\n tx1.signTx(pkScrooge.getPrivate(), 0);\n\n TxHandler txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx1) returns: \" + txHandler.isValidTx(tx1));\n assertTrue(\"tx1:add one valid transaction\", txHandler.handleTxs(new Transaction[]{tx1}).length == 1);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx1:one UTXO's created.\", utxoPool.getAllUTXO().size() == 1);\n\n // tx2: alice to bob 20coins[signed by bob]\n Transaction tx2 = new Transaction();\n tx2.addInput(tx1.getHash(), 0);\n tx2.addOutput(20, pkBob.getPublic());\n tx2.signTx(pkBob.getPrivate(), 0);\n\n txHandler = new TxHandler(utxoPool);\n\n System.out.println(\"txHandler.isValidTx(tx2) returns: \" + txHandler.isValidTx(tx2));\n assertTrue(\"tx2:add one invalid transaction\", txHandler.handleTxs(new Transaction[]{tx2}).length == 0);\n // update utxo pool\n utxoPool = txHandler.getHandledUtxoPool();\n assertTrue(\"tx2:one UTXO's remained.\", utxoPool.getAllUTXO().size() == 1);\n\n// System.out.println(\"tx1.hashCode returns: \" + tx1.hashCode());\n// System.out.println(\"tx2.hashCode returns: \" + tx2.hashCode());\n }", "private boolean validateParams(int amount) {\n\t\tString paramArray[] = {param1,param2,param3,param4,param5,param6};\r\n\t\tfor(int i = 0; i < amount; i++) {\r\n\t\t\tif(paramArray[i] == null) {\r\n\t\t\t\t//Error\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "Entry<StatusType, String> verifyExternalSignature(Document document, Document signature);", "boolean hasPlainRedeem();", "public boolean istrianglevalid(double semiPer) {\n //declare variables\n boolean checkA = true;\n boolean checkB = true;\n boolean checkC = true;\n \n if (semiPer >= sideA && semiPer >= sideB && semiPer >= sideC) {\n return true;\n } else {\n return false;\n }\n }", "private void checkAmount() throws IOException {\n //System.out.println(\"The total amount in the cash machine is: \" + amountOfCash);\n for (int i : typeOfCash.keySet()) {\n Integer r = typeOfCash.get(i);\n if (r < 20) {\n sendAlert(i);\n JOptionPane.showMessageDialog(null, \"$\" + i + \"bills are out of stock\");\n }\n }\n }", "static void checkSignatures() {\n Reader stringReader;\n StringBuffer out;\n FreecellOperations<?> model = FreecellModelCreator.create(\n FreecellModelCreator.GameType.MULTIMOVE);\n\n checkNewModel(\n FreecellModelCreator.create(FreecellModelCreator.GameType\n .MULTIMOVE),\n FreecellModelCreator.create(FreecellModelCreator.GameType.MULTIMOVE)\n .getDeck());\n stringReader = new StringReader(\"C1 8 F1 q\");\n out = new StringBuffer();\n checkNewController(\n FreecellModelCreator.create(FreecellModelCreator.GameType.SINGLEMOVE),\n FreecellModelCreator.create(FreecellModelCreator.GameType.SINGLEMOVE)\n .getDeck(),\n new FreecellController(stringReader, out));\n checkNewController(\n FreecellModelCreator.create(FreecellModelCreator.GameType.MULTIMOVE),\n FreecellModelCreator.create(FreecellModelCreator.GameType.MULTIMOVE)\n .getDeck(),\n new FreecellController(stringReader, out));\n\n }", "private void checkRep() {\n for (Ball ball : balls) {\n assert ball.getPosition().d1 >= 0\n && ball.getPosition().d1 <= WIDTH - 1;\n assert ball.getPosition().d2 >= 0\n && ball.getPosition().d2 <= HEIGHT - 1;\n }\n for (Gadget gadget : gadgets) {\n assert gadget.getPosition().d1 >= 0\n && gadget.getPosition().d1 <= WIDTH - 1;\n assert gadget.getPosition().d2 >= 0\n && gadget.getPosition().d2 <= HEIGHT - 1;\n }\n\n assert GRAVITY > 0 && MU2 > 0 && MU > 0;\n }", "public boolean verifyMessage(ATMMessage atmMessage){\n if(!(this.currTimeStamp < atmMessage.getTimeStamp())) error (\"Time stamp does not match\");\r\n if(!(parameterGenerator.getPreviousNonce() == atmMessage.getResponseNonce())) error (\"Nonce does not match\");\r\n return true;\r\n \r\n }", "Entry<StatusType, String> verifyInternalSignature(final Document document);", "public List<Message> verifyTransaction(Transaction t) {\n LOG.debug(\"verifyTransaction() started\");\n\n // List of error messages for the current transaction\n List<Message> errors = new ArrayList();\n\n // Check the chart of accounts code\n if (t.getChart() == null) {\n errors.add(new Message(kualiConfigurationService.getPropertyValueAsString(OLEKeyConstants.ERROR_CHART_NOT_FOUND), Message.TYPE_FATAL));\n }\n\n // Check the account\n if (t.getAccount() == null) {\n errors.add(new Message(kualiConfigurationService.getPropertyValueAsString(OLEKeyConstants.ERROR_ACCOUNT_NOT_FOUND), Message.TYPE_FATAL));\n }\n\n // Check the object type\n if (t.getObjectType() == null) {\n errors.add(new Message(kualiConfigurationService.getPropertyValueAsString(OLEKeyConstants.ERROR_OBJECT_TYPE_NOT_FOUND), Message.TYPE_FATAL));\n }\n\n // Check the balance type\n if (t.getBalanceType() == null) {\n errors.add(new Message(kualiConfigurationService.getPropertyValueAsString(OLEKeyConstants.ERROR_BALANCE_TYPE_NOT_FOUND), Message.TYPE_FATAL));\n }\n\n // Check the fiscal year\n if (t.getOption() == null) {\n errors.add(new Message(kualiConfigurationService.getPropertyValueAsString(OLEKeyConstants.ERROR_UNIV_FISCAL_YR_NOT_FOUND), Message.TYPE_FATAL));\n }\n\n // Check the debit/credit code (only if we have a valid balance type code)\n if (t.getTransactionDebitCreditCode() == null) {\n errors.add(new Message(kualiConfigurationService.getPropertyValueAsString(OLEKeyConstants.ERROR_DEDIT_CREDIT_CODE_NOT_BE_NULL), Message.TYPE_FATAL));\n }\n else {\n if (t.getBalanceType() != null) {\n if (t.getBalanceType().isFinancialOffsetGenerationIndicator()) {\n if ((!OLEConstants.GL_DEBIT_CODE.equals(t.getTransactionDebitCreditCode())) && (!OLEConstants.GL_CREDIT_CODE.equals(t.getTransactionDebitCreditCode()))) {\n errors.add(new Message(kualiConfigurationService.getPropertyValueAsString(OLEKeyConstants.MSG_DEDIT_CREDIT_CODE_MUST_BE) + \" '\" + OLEConstants.GL_DEBIT_CODE + \" or \" + OLEConstants.GL_CREDIT_CODE + kualiConfigurationService.getPropertyValueAsString(OLEKeyConstants.MSG_FOR_BALANCE_TYPE), Message.TYPE_FATAL));\n }\n }\n else {\n if (!OLEConstants.GL_BUDGET_CODE.equals(t.getTransactionDebitCreditCode())) {\n errors.add(new Message(kualiConfigurationService.getPropertyValueAsString(OLEKeyConstants.MSG_DEDIT_CREDIT_CODE_MUST_BE) + OLEConstants.GL_BUDGET_CODE + kualiConfigurationService.getPropertyValueAsString(OLEKeyConstants.MSG_FOR_BALANCE_TYPE), Message.TYPE_FATAL));\n }\n }\n }\n }\n\n // KULGL-58 Make sure all GL entry primary key fields are not null\n if ((t.getSubAccountNumber() == null) || (t.getSubAccountNumber().trim().length() == 0)) {\n errors.add(new Message(kualiConfigurationService.getPropertyValueAsString(OLEKeyConstants.ERROR_SUB_ACCOUNT_NOT_BE_NULL), Message.TYPE_FATAL));\n }\n if ((t.getFinancialObjectCode() == null) || (t.getFinancialObjectCode().trim().length() == 0)) {\n errors.add(new Message(kualiConfigurationService.getPropertyValueAsString(OLEKeyConstants.ERROR_OBJECT_CODE_NOT_BE_NULL), Message.TYPE_FATAL));\n }\n if ((t.getFinancialSubObjectCode() == null) || (t.getFinancialSubObjectCode().trim().length() == 0)) {\n errors.add(new Message(kualiConfigurationService.getPropertyValueAsString(OLEKeyConstants.ERROR_SUB_OBJECT_CODE_NOT_BE_NULL), Message.TYPE_FATAL));\n }\n if ((t.getUniversityFiscalPeriodCode() == null) || (t.getUniversityFiscalPeriodCode().trim().length() == 0)) {\n errors.add(new Message(kualiConfigurationService.getPropertyValueAsString(OLEKeyConstants.ERROR_FISCAL_PERIOD_CODE_NOT_BE_NULL), Message.TYPE_FATAL));\n }\n if ((t.getFinancialDocumentTypeCode() == null) || (t.getFinancialDocumentTypeCode().trim().length() == 0)) {\n errors.add(new Message(kualiConfigurationService.getPropertyValueAsString(OLEKeyConstants.ERROR_DOCUMENT_TYPE_NOT_BE_NULL), Message.TYPE_FATAL));\n }\n if ((t.getFinancialSystemOriginationCode() == null) || (t.getFinancialSystemOriginationCode().trim().length() == 0)) {\n errors.add(new Message(kualiConfigurationService.getPropertyValueAsString(OLEKeyConstants.ERROR_ORIGIN_CODE_NOT_BE_NULL), Message.TYPE_FATAL));\n }\n if ((t.getDocumentNumber() == null) || (t.getDocumentNumber().trim().length() == 0)) {\n errors.add(new Message(kualiConfigurationService.getPropertyValueAsString(OLEKeyConstants.ERROR_DOCUMENT_NUMBER_NOT_BE_NULL), Message.TYPE_FATAL));\n }\n \n // Don't need to check SequenceNumber because it sets in PosterServiceImpl, so commented out\n// if (t.getTransactionLedgerEntrySequenceNumber() == null) {\n// errors.add(new Message(kualiConfigurationService.getPropertyValueAsString(OLEKeyConstants.ERROR_SEQUENCE_NUMBER_NOT_BE_NULL), Message.TYPE_FATAL));\n// }\n \n if (t.getBalanceType() != null && t.getBalanceType().isFinBalanceTypeEncumIndicator() && !t.getObjectType().isFundBalanceIndicator()){\n if (t.getTransactionEncumbranceUpdateCode().trim().equals(GeneralLedgerConstants.EMPTY_CODE)){\n errors.add(new Message(kualiConfigurationService.getPropertyValueAsString(OLEKeyConstants.ERROR_ENCUMBRANCE_UPDATE_CODE_CANNOT_BE_BLANK_FOR_BALANCE_TYPE) + \" \" + t.getFinancialBalanceTypeCode(), Message.TYPE_FATAL));\n }\n }\n\n // The encumbrance update code can only be space, N, R or D. Nothing else\n if ((StringUtils.isNotBlank(t.getTransactionEncumbranceUpdateCode())) && (!\" \".equals(t.getTransactionEncumbranceUpdateCode())) && (!OLEConstants.ENCUMB_UPDT_NO_ENCUMBRANCE_CD.equals(t.getTransactionEncumbranceUpdateCode())) && (!OLEConstants.ENCUMB_UPDT_REFERENCE_DOCUMENT_CD.equals(t.getTransactionEncumbranceUpdateCode())) && (!OLEConstants.ENCUMB_UPDT_DOCUMENT_CD.equals(t.getTransactionEncumbranceUpdateCode()))) {\n errors.add(new Message(\"Invalid Encumbrance Update Code (\" + t.getTransactionEncumbranceUpdateCode() + \")\", Message.TYPE_FATAL));\n }\n\n \n\n return errors;\n }", "public boolean canSigning() {\n if (canAddAnnot()) return true;\n if (canFillForm()) return true;\n if (canModifyContents()) return true;\n return false;\n }", "@Test\n public void testNullRandom() {\n String sha = \"SHA-256\";\n String mgf = \"MGF1\";\n int saltLen = 32;\n int keySizeInBits = 2048;\n int samples = 8;\n Signature signer;\n PrivateKey priv;\n try {\n String algorithm = getAlgorithmName(sha, mgf);\n KeyPairGenerator keyGen = KeyPairGenerator.getInstance(\"RSA\");\n keyGen.initialize(keySizeInBits);\n KeyPair keypair = keyGen.genKeyPair();\n priv = keypair.getPrivate();\n signer = Signature.getInstance(algorithm);\n PSSParameterSpec params = getPssParameterSpec(sha, mgf, sha, saltLen, 1);\n signer.setParameter(params);\n } catch (GeneralSecurityException ex) {\n TestUtil.skipTest(\"RSA key generation is not supported.\" + ex);\n return;\n }\n Set<String> signatures = new HashSet<String>();\n byte[] messageBytes = new byte[8];\n for (int i = 0; i < samples; i++) {\n byte[] signature;\n try {\n signer.initSign(priv, null);\n signer.update(messageBytes);\n signature = signer.sign();\n } catch (GeneralSecurityException ex) {\n fail(\"Failed to sign. \" + ex);\n return;\n }\n String hex = TestUtil.bytesToHex(signature);\n assertTrue(\"Same signature computed twice\", signatures.add(hex));\n }\n }", "@Disabled\n @Test\n void processDepositValidatorPubkeysDoesNotContainPubkeyAndMinEmptyValidatorIndexIsNegative() {\n }", "public boolean checkAns() {\n\t\tfor (int i = 0; i < ansArray.length; i++) {\n\t\t\tif (playerArray[i] != ansArray[i]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "protected boolean validateSignature(SignedJWT jwtToken) {\n boolean valid = false;\n if (JWSObject.State.SIGNED == jwtToken.getState()) {\n LOG.debug(\"JWT token is in a SIGNED state\");\n if (jwtToken.getSignature() != null) {\n LOG.debug(\"JWT token signature is not null\");\n try {\n JWSVerifier verifier = new RSASSAVerifier(publicKey);\n if (jwtToken.verify(verifier)) {\n valid = true;\n LOG.debug(\"JWT token has been successfully verified\");\n } else {\n LOG.warn(\"JWT signature verification failed.\");\n }\n } catch (JOSEException je) {\n LOG.warn(\"Error while validating signature\", je);\n }\n }\n }\n return valid;\n }", "public final void testValidTransaction() {\n assertTrue(testTransaction1.isValidTransaction());\n assertFalse(testTransaction2.isValidTransaction());\n }", "private void checkSignAndVerifyWithKeyManager(\n KeyTool pemManager,\n CryptoKeyPair cryptoKeyPair,\n KeyTool verifyKeyTool,\n CryptoSuite cryptoSuite) {\n for (int i = 0; i < 10; i++) {\n String message = cryptoSuite.hash(\"abcd----\" + Integer.toString(i));\n SignatureResult signature = cryptoSuite.sign(message, cryptoKeyPair);\n Assert.assertTrue(\n cryptoSuite.verify(\n cryptoKeyPair.getHexPublicKey(), message, signature.convertToString()));\n\n Assert.assertTrue(\n cryptoSuite.verify(\n cryptoKeyPair.getHexPublicKey(),\n Hex.decode(message),\n Hex.decode(signature.convertToString())));\n\n String invalidMessage = cryptoSuite.hash(\"abcde----\" + Integer.toString(i));\n Assert.assertTrue(\n !cryptoSuite.verify(\n cryptoKeyPair.getHexPublicKey(),\n invalidMessage,\n signature.convertToString()));\n }\n for (int i = 0; i < 10; i++) {\n String message = cryptoSuite.hash(\"abcd----\" + Integer.toString(i));\n String signature = cryptoSuite.sign(pemManager, message);\n Assert.assertTrue(cryptoSuite.verify(verifyKeyTool, message, signature));\n Assert.assertTrue(\n cryptoSuite.verify(\n verifyKeyTool, Hex.decode(message), Hex.decode(signature)));\n String invalidMessage = cryptoSuite.hash(\"abcde----\" + Integer.toString(i));\n Assert.assertTrue(!cryptoSuite.verify(verifyKeyTool, invalidMessage, signature));\n }\n }", "@Override\n\tpublic void verifyRateQuestionEnabledWithEveryQuestion() {\n\t\t\n\t}", "public static boolean isSigned_p_sendts() {\n return true;\n }", "public boolean verifyChecksum() {\n\t\tChecksum cs = new Checksum();\n\t\tlong remaining = size - Tran.HEAD_SIZE;\n\t\tint pos = adr;\n\t\twhile (remaining > 0) {\n\t\t\tByteBuffer buf = stor.buffer(pos);\n\t\t\t// safe as long as chunk size < Integer.MAX_VALUE\n\t\t\tint n = (int) Math.min(buf.remaining(), remaining);\n\t\t\tcs.update(buf, n);\n\t\t\tremaining -= n;\n\t\t\tpos = stor.advance(pos, n);\n\t\t}\n\t\tcs.update(zero_tail);\n\t\treturn cksum == cs.getValue();\n\t}", "public static boolean verifyProposeSign(ProposeMessage msg){\n if (Crypto.verifySignature(msg.data, msg.sign, msg.pubkey)) {\n logger.info(\"verifyProposeSign success.\");\n return true;\n } else {\n logger.error(\"verifyProposeSign failed.\");\n return false;\n }\n }", "public static boolean verifySignature(byte[] data, byte[] signature) {\n try {\n if (!isTinkRegistered) {\n SignatureConfig.register();\n isTinkRegistered = true;\n }\n\n KeysetHandle publicKey = CleartextKeysetHandle.read(JsonKeysetReader.withInputStream(\n CheckSignatureWithTink.class.getClassLoader().getResourceAsStream(\"crypto/publicKey.pub\")));\n\n PublicKeyVerify verifier = publicKey.getPrimitive(PublicKeyVerify.class);\n verifier.verify(signature, data);\n return true;\n } catch (Exception e) {\n return false;\n }\n }", "private static boolean verify(BigInteger number, PublicKey pubKey, byte[] sigbytes) throws Exception {\r\n\t\tSignature sig = Signature.getInstance(\"SHAwithDSA\");\r\n\t\tsig.initVerify(pubKey);\r\n\t\tbyte[] data = bigIntToByteArray(number);\r\n\t\tsig.update(data);\r\n\t\treturn sig.verify(sigbytes);\r\n \t}", "public void verifyBusinessRules(Coin Coin) throws Exception {\n\t}", "@Value.Check\n default void checkPreconditions()\n {\n RangeCheck.checkIncludedInInteger(\n this.feedback(),\n \"Feedback\",\n RangeInclusiveI.of(0, 7),\n \"Valid feedback values\");\n\n RangeCheck.checkIncludedInInteger(\n this.transpose(),\n \"Transpose\",\n RangeInclusiveI.of(-24, 24),\n \"Valid transpose values\");\n\n RangeCheck.checkIncludedInInteger(\n this.pitchEnvelopeR1Level(),\n \"Pitch R1 Level\",\n RangeInclusiveI.of(0, 99),\n \"Valid levels\");\n\n RangeCheck.checkIncludedInInteger(\n this.pitchEnvelopeR1Rate(),\n \"Pitch R1 Rate\",\n RangeInclusiveI.of(0, 99),\n \"Valid rates\");\n\n RangeCheck.checkIncludedInInteger(\n this.pitchEnvelopeR2Level(),\n \"Pitch R2 Level\",\n RangeInclusiveI.of(0, 99),\n \"Valid levels\");\n\n RangeCheck.checkIncludedInInteger(\n this.pitchEnvelopeR2Rate(),\n \"Pitch R2 Rate\",\n RangeInclusiveI.of(0, 99),\n \"Valid rates\");\n\n RangeCheck.checkIncludedInInteger(\n this.pitchEnvelopeR3Level(),\n \"Pitch R3 Level\",\n RangeInclusiveI.of(0, 99),\n \"Valid levels\");\n\n RangeCheck.checkIncludedInInteger(\n this.pitchEnvelopeR3Rate(),\n \"Pitch R3 Rate\",\n RangeInclusiveI.of(0, 99),\n \"Valid rates\");\n\n RangeCheck.checkIncludedInInteger(\n this.pitchEnvelopeR4Level(),\n \"Pitch R4 Level\",\n RangeInclusiveI.of(0, 99),\n \"Valid levels\");\n\n RangeCheck.checkIncludedInInteger(\n this.pitchEnvelopeR4Rate(),\n \"Pitch R4 Rate\",\n RangeInclusiveI.of(0, 99),\n \"Valid rates\");\n\n RangeCheck.checkIncludedInInteger(\n this.lfoPitchModulationDepth(),\n \"LFO Pitch Modulation Depth\",\n RangeInclusiveI.of(0, 99),\n \"Valid pitch modulation depth values\");\n\n RangeCheck.checkIncludedInInteger(\n this.lfoPitchModulationSensitivity(),\n \"LFO Pitch Modulation Sensitivity\",\n RangeInclusiveI.of(0, 7),\n \"Valid pitch modulation sensitivity values\");\n\n RangeCheck.checkIncludedInInteger(\n this.lfoAmplitudeModulationDepth(),\n \"LFO Amplitude Modulation Depth\",\n RangeInclusiveI.of(0, 99),\n \"Valid amplitude modulation depth values\");\n\n RangeCheck.checkIncludedInInteger(\n this.lfoSpeed(),\n \"LFO Speed\",\n RangeInclusiveI.of(0, 99),\n \"Valid LFO speed values\");\n\n RangeCheck.checkIncludedInInteger(\n this.lfoDelay(),\n \"LFO Delay\",\n RangeInclusiveI.of(0, 99),\n \"Valid LFO delay values\");\n }", "private boolean verifyTotal(ArrayList<Integer> oneSetOfChoices, ArrayList<Integer> listAllIntegers, int target) {\n\t\t\tboolean matchFound = false;\n\t\t\tint currentTotal = 0;\n\t\t\tint valueInList = 0;\n\t\t\t for (Integer positionInteger: oneSetOfChoices) {\n\t\t\t\t valueInList = listAllIntegers.get(positionInteger.intValue()).intValue();\n\t\t\t\t currentTotal += valueInList;\n\t\t\t }\n\t\t\t\n\t\t\t if (target == currentTotal) {\n\t\t\t\t matchFound = true;\n\t\t\t }\n\t\t\treturn matchFound;\n\t}", "private void verifyAllValues(AllValues allValues, int offset) {\n\t\tfor (int i = offset; i < allValues.size(); i++) {\n\t\t\tif (i % 2 == 0) {\n\t\t\t\tassertTrue(\"OneValue at index \" + i + \" should be of type OneResult\", allValues.get(i) instanceof OneResult);\n\t\t\t\tassertEquals(\"Value at index \" + i + \" should be equal to \" + i, i, allValues.get(i).getValue());\n\t\t\t} else {\n\t\t\t\tassertTrue(\"OneValue at index \" + i + \" should be of type OneReject\", allValues.get(i) instanceof OneReject);\n\t\t\t\tassertTrue(\"Value at index \" + i + \" should be of type IndexedRuntimeException\", allValues.get(i).getValue() instanceof IndexedRuntimeException);\n\t\t\t}\n\t\t}\n\t}", "private boolean verifyRadios( XPropertySet[] radios, short[] expectedStates, String errorMessage ) throws com.sun.star.uno.Exception\n {\n\t\tshort[] actualStates = new short[radios.length];\n\n\t\t// collect all current states. This is just to be able to emit them, in case of a failure\n for ( int i = 0; i<radios.length; ++i )\n {\n\t\t\tactualStates[i] = ((Short)radios[i].getPropertyValue( \"State\" )).shortValue();\n }\n\n\t\t// now actually check the states\n for ( int i = 0; i<radios.length; ++i )\n {\n\t\t\tif ( actualStates[i] != expectedStates[i] )\n\t\t\t{\n\t\t\t\tfailed( errorMessage + \" (expected: \" + stateString( expectedStates ) + \", found: \" + stateString( actualStates ) + \")\" );\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n return true;\n }", "public boolean verify();", "private boolean CheckAllRequiredFields() {\n\t\tboolean res = true;\n\t\tres &= CheckParkSelection();\n\t\tres &= CheckDateSelection();\n\t\tres &= CheckVisitorHour();\n\t\tres &= CheckEmail();\n\t\tres &= CheckPhoneNumber();\n\t\treturn res;\n\t}", "public static boolean isSigned_sum_e() {\n return true;\n }", "protected int checkAllCardsAppliedHaveZeroBalance() {\r\n boolean allCardsValuesAreZero = true;\r\n Iterator giftCardIterator = getGiftCardList().iterator();\r\n GiftCard tempGiftCard = null;\r\n int numBlankCards = 0;\r\n \r\n while (giftCardIterator.hasNext()) {\r\n tempGiftCard = (GiftCard) giftCardIterator.next();\r\n if (!tempGiftCard.getIsBlank() && tempGiftCard.getAmountAvailable() != 0.0d) {\r\n return NO_ERRORS;\r\n }\r\n if (tempGiftCard.getIsBlank()) {\r\n numBlankCards++;\r\n }\r\n }\r\n \r\n if (numBlankCards == getMaxNumGiftCards() || numBlankCards == getGiftCardList().size()) {\r\n return NO_ERRORS;\r\n }\r\n \r\n return ALL_CARDS_ARE_ZERO;\r\n }", "private boolean allVolumeSizesMatch(List<Long> currentVolumeSizes) {\n // If the storage systems match then check all current sizes of the volumes too, any mismatch\n // will lead to a calculation check\n List<Long> currentVolumeSizesCopy = new ArrayList<Long>();\n currentVolumeSizesCopy.addAll(currentVolumeSizes);\n for (Long currentSize : currentVolumeSizes) {\n for (Long compareSize : currentVolumeSizesCopy) {\n if (currentSize.longValue() != compareSize.longValue()) {\n return false;\n }\n }\n }\n\n _log.info(\"All volumes are of the same size. No need for capacity calculations.\");\n return true;\n }" ]
[ "0.6200884", "0.617404", "0.60497814", "0.60124016", "0.59632593", "0.59617347", "0.5934042", "0.5848371", "0.58060384", "0.569039", "0.564846", "0.5526814", "0.54653233", "0.5418595", "0.54175645", "0.54032", "0.536851", "0.53271705", "0.53270894", "0.53178716", "0.53134435", "0.52973425", "0.52903956", "0.527566", "0.5267867", "0.5266947", "0.5241037", "0.523566", "0.52167827", "0.52144045", "0.5213268", "0.5206143", "0.52021515", "0.5194888", "0.51883906", "0.5182825", "0.5181716", "0.5173396", "0.51565397", "0.5134968", "0.5124364", "0.51235664", "0.51202255", "0.51159596", "0.5107563", "0.5102296", "0.50965923", "0.5082107", "0.50709313", "0.5063017", "0.5060251", "0.50590587", "0.50577784", "0.50531566", "0.5043947", "0.5040845", "0.5038901", "0.50356317", "0.5032754", "0.5030187", "0.50280565", "0.5022972", "0.50173235", "0.50117505", "0.50017846", "0.50006306", "0.49955747", "0.49864906", "0.497787", "0.4975944", "0.49756426", "0.49725577", "0.4962952", "0.49621412", "0.49442905", "0.49361187", "0.49304926", "0.49295628", "0.49243414", "0.49237502", "0.49218848", "0.49207878", "0.49171707", "0.49145466", "0.4910051", "0.49054492", "0.4903815", "0.48966524", "0.48909163", "0.48877013", "0.4887438", "0.48850068", "0.4877826", "0.48725763", "0.4869662", "0.4866521", "0.48655236", "0.4864056", "0.4863615", "0.48587307" ]
0.6759555
0
Check how this transaction affects the balances of each wallet.
public Map<PublicKey, Long> getEffects() { Map<PublicKey, Long> effects = new HashMap<>(); for (CurrencyTransactionInput input : inputs) { effects.merge(input.getSourcePublicKey(), -input.getAmount(), (x, y) -> x + y); } for (CurrencyTransactionOutput output : outputs) { effects.merge(output.getDestPublicKey(), output.getAmount(), (x, y) -> x + y); } return effects; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void checkBalance()\n\t{\n\t\tList<Account> accounts = Main.aDao.getAllAccounts(this.loggedIn.getUserId());\n\t\tdouble accountsTotal = 0;\n\t\t\n\t\tfor(Account a : accounts)\n\t\t{\n\t\t\taccountsTotal += a.getBalance();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Total funds available across all accounts:\\n\" + accountsTotal);\n\t}", "@Override\n\tpublic void checkBalance() {\n\t\tSystem.out.println(\"balance is checked\");\n\t}", "public void testAutoBalanceTransactions(){\n\t\tsetDoubleEntryEnabled(false);\n\t\tmTransactionsDbAdapter.deleteAllRecords();\n\n\t\tassertThat(mTransactionsDbAdapter.getRecordsCount()).isEqualTo(0);\n\t\tString imbalanceAcctUID = mAccountsDbAdapter.getImbalanceAccountUID(Currency.getInstance(CURRENCY_CODE));\n\t\tassertThat(imbalanceAcctUID).isNull();\n\n\t\tvalidateTransactionListDisplayed();\n\t\tonView(withId(R.id.fab_create_transaction)).perform(click());\n\t\tonView(withId(R.id.fragment_transaction_form)).check(matches(isDisplayed()));\n\n\t\tonView(withId(R.id.input_transaction_name)).perform(typeText(\"Autobalance\"));\n\t\tonView(withId(R.id.input_transaction_amount)).perform(typeText(\"499\"));\n\n\t\t//no double entry so no split editor\n\t\t//TODO: check that the split drawable is not displayed\n\t\tonView(withId(R.id.menu_save)).perform(click());\n\n\t\tassertThat(mTransactionsDbAdapter.getRecordsCount()).isEqualTo(1);\n\t\tTransaction transaction = mTransactionsDbAdapter.getAllTransactions().get(0);\n\t\tassertThat(transaction.getSplits()).hasSize(2);\n\t\timbalanceAcctUID = mAccountsDbAdapter.getImbalanceAccountUID(Currency.getInstance(CURRENCY_CODE));\n\t\tassertThat(imbalanceAcctUID).isNotNull();\n\t\tassertThat(imbalanceAcctUID).isNotEmpty();\n\t\tassertTrue(mAccountsDbAdapter.isHiddenAccount(imbalanceAcctUID)); //imbalance account should be hidden in single entry mode\n\n\t\tassertThat(transaction.getSplits()).extracting(\"mAccountUID\").contains(imbalanceAcctUID);\n\n\t}", "@Override\r\n\tpublic boolean withdraw(WithdrawBean wb, double amount) throws WalletException {\n\t\tboolean isValid = true;\r\n\t\tfor (CustomerBean cb : customerList) {\r\n\t\t\tif(cb.getPhoneNum()==wb.getPhoneNum()) {\r\n\t\t\t\tif(wb.getBalance()>amount) {\r\n\t\t\t\twb.setBalance(wb.getBalance()-amount);\r\n\t\t\t\twb.setDate(LocalDateTime.now());\r\n\t\t\t\tisValid = true;\r\n\t\t\t\tWalletTransactions transac = new WalletTransactions();\r\n\t\t\t\ttransac.setAmount(amount);\r\n\t\t\t\ttransac.setBalance(wb.getBalance());\r\n\t\t\t\ttransac.setDate(wb.getDate());\r\n\t\t\t\ttransac.setPhoneNum(wb.getPhoneNum());\r\n\t\t\t\ttransac.setType(\"withdraw\");\r\n\t\t\t\ttransacList.add(transac);\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthrow new WalletException();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\treturn isValid;\r\n\t}", "void checkBalance() {\n\t\tSystem.out.println(\"Account balance: \" + balance);\n\t}", "public boolean isBalanced ();", "public void balance(){\n\t\tnamesTree.balance();\n\t\taccountNumbersTree.balance();\n\t}", "public boolean withdraw(CashTransaction transaction)throws IOException {\n if (transaction.getAmount() % 5 != 0)\n {\n JOptionPane.showMessageDialog(null, \"Invalid input\");\n return false;\n }\n\n HashMap<Integer, Integer> billsRetrieved = obtainBills(transaction.getAmount()*-1);\n if (billsRetrieved == null)\n {\n checkAmount();\n return false;\n }\n if (transaction.parse())\n {\n for (int denomination: billsRetrieved.keySet())\n {\n typeOfCash.put(denomination, typeOfCash.get(denomination) - billsRetrieved.get(denomination));\n }\n checkAmount();\n return true;\n }\n return false;\n }", "public void showBalance(){\n for(Player player: players){\n System.out.println(player + \"'s balance: \" + player.getWallet());\n }\n System.out.println();\n dealer.showProfit();\n System.out.println();\n }", "@Test\n\tpublic void testWithdraw(){\n\t\t\n\t\t// Arrange\n\t\tBigDecimal amountToWithdraw = new BigDecimal(10.00);\n\t\tBigDecimal expectedBalance = new BigDecimal(110.5);\n\t\tdouble delta = 1e-3;\n\t\t// Act\n\t\tcurrentAccount.withdraw(amountToWithdraw);\n\t\tBalance actualBalance = currentAccount.checkBalance();\n\t\t\n\t\t// Assert\n\t\tassertEquals(expectedBalance.doubleValue(), actualBalance.getAmount().doubleValue(), delta);\n\t}", "protected boolean applyTransferTransaction(StateTransferTransaction tr) {\n\t\tString fromAddress = ((StateTransferTransaction)tr).from;\n\t\tString toAddress = ((StateTransferTransaction)tr).to;\t\t\t\t\n\t\tDouble amount = ((StateTransferTransaction)tr).amount;\n\n\t\tfor(AccountInterface account: accounts) {\n\t\t\tif (account.getAddress().equals(fromAddress)){\n\t\t\t\taccount.decreaseBalance(amount);\n\t\t\t\taccount.decreaseBalance(amount);\t\t\t\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t\tfor(AccountInterface account: accounts) {\n\t\t\tif (account.getAddress().equals(toAddress)){\n\t\t\t\taccount.decreaseBalance(amount);\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean withdrawAmount(TransactionDTO transaction) {\n CustomerDetails customerDetails=this.viewAccount(transaction.getUserName()); \n if(customerDetails.getAccountBalance()>=transaction.getAmount()){\n customerDetails.setAccountBalance(customerDetails.getAccountBalance()-transaction.getAmount());\n customerRepository.save(customerDetails);\n return true;\n }\n else{\n return false;\n }\n }", "@Override\n public long totalBalances() {\n long total = 0;\n for(Account account : accounts.values()){\n total += account.balance();\n }\n return total;\n }", "public abstract boolean isBalanced();", "@Override\n\tpublic void stateCheck() {\n\t\tif(balance<0 && balance>=-1000)\n\t\t{\n\t\t\tacc.setState(new YellowState(this));\n\t\t}\n\t\telse if(balance<-1000)\n\t\t{\n\t\t\tacc.setState(new RedState(this));\n\t\t}\n\t}", "@Override\n\tpublic void transferBalnace() {\n\t\tSystem.out.println(\"balance is transferd\");\n\t}", "public boolean checkBalance() {\n checkBalanceHelper(root);\n if (unbalanced == null) {\n return true;\n } else {\n return false;\n }\n }", "public void printBalance() {\n logger.info(\"Wallet balance : \" + total_bal);\n }", "public void applyAllTransactions(Iterable<WalletTransaction> iwt) {\n clearBalances();\n\n for (WalletTransaction wtx : iwt) {\n // WalletTransaction.Pool pool = wtx.getPool();\n Transaction tx = wtx.getTransaction();\n boolean avail = !tx.isPending();\n TransactionConfidence conf = tx.getConfidence();\n ConfidenceType ct = conf.getConfidenceType();\n\n // Skip dead transactions.\n if (ct != ConfidenceType.DEAD) {\n\n // Traverse the HDAccounts with all outputs.\n List<TransactionOutput> lto = tx.getOutputs();\n for (TransactionOutput to : lto) {\n long value = to.getValue().longValue();\n try {\n byte[] pubkey = null;\n byte[] pubkeyhash = null;\n Script script = to.getScriptPubKey();\n if (script.isSentToRawPubKey())\n pubkey = script.getPubKey();\n else\n pubkeyhash = script.getPubKeyHash();\n for (HDAccount hda : mAccounts)\n hda.applyOutput(pubkey, pubkeyhash, value, avail);\n } catch (ScriptException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n\n // Traverse the HDAccounts with all inputs.\n List<TransactionInput> lti = tx.getInputs();\n for (TransactionInput ti : lti) {\n // Get the connected TransactionOutput to see value.\n TransactionOutput cto = ti.getConnectedOutput();\n if (cto == null) {\n // It appears we land here when processing transactions\n // where we handled the output above.\n //\n // mLogger.warn(\"couldn't find connected output for input\");\n continue;\n }\n long value = cto.getValue().longValue();\n try {\n byte[] pubkey = ti.getScriptSig().getPubKey();\n for (HDAccount hda : mAccounts)\n hda.applyInput(pubkey, value);\n } catch (ScriptException e) {\n // This happens if the input doesn't have a\n // public key (eg P2SH). No worries in this\n // case, it isn't one of ours ...\n }\n }\n }\n }\n\n // This is too noisy\n // // Log balance summary.\n // for (HDAccount acct : mAccounts)\n // acct.logBalance();\n }", "public Double getBalance(){\n Double sum = 0.0;\n // Mencari balance dompet dari transaksi dengan cara menghitung total transaksi\n for (Transaction transaction : transactions) {\n sum += transaction.getAmount().doubleValue();\n }\n return sum;\n }", "public void update() {\n\t\n\tif(getBalance() > 0) {\n\t\tcanWithdraw = true;\n\t}else {canWithdraw = false;}//end else statement\n}", "public void updateAccount() {\r\n\t\t\r\n\t\t//update all totals\r\n\t\ttotalYouOwe = 0.0;\r\n\t\ttotalOwedToYou = 0.0;\r\n\t\tbalance = 0.0;\r\n\t\tnetBalance = 0.0;\r\n\t\t\r\n\t\t//totalYouOwe and totalOwedToYou\r\n\t\tfor (Event e : events) {\r\n\t\t\tif (e.isParticipantByGID(GID)) {\r\n\t\t\t\tif (e.getParticipantByGID(GID).getBalance() > 0) {\r\n\t\t\t\t\ttotalOwedToYou = totalOwedToYou + e.getParticipantByGID(GID).getBalance(); \r\n\t\t\t\t} else {\r\n\t\t\t\t\ttotalYouOwe = totalYouOwe + (-e.getParticipantByGID(GID).getBalance());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//netBalance/balance - the same in current implementation\r\n\t\tnetBalance = totalOwedToYou - totalYouOwe;\r\n\t\tbalance = totalOwedToYou - totalYouOwe;\r\n\t\t\r\n\t\tupdatePastRelations();\r\n\t}", "public String myAfterBalanceAmount() {\r\n\t\tint count=0;\r\n\t\tList<SavingAccount> acc = null;\r\n\t\ttry {\r\n\t\t\tSystem.out.println(\"Before Repeat\");\r\n\t\t\tacc = getSavingAccountList();\r\n\r\n\t\t\tfor (SavingAccount savingAcc : acc) {\r\n\t\t\t\tif (!(\"0\".equals(savingAcc.getState()))) {\r\n\t\t\t\t\tif (savingAcc.getState().equals(\"active\")) {\r\n\t\t\t\t\t\tint maxRepeat = Integer.parseInt(savingAcc\r\n\t\t\t\t\t\t\t\t.getRepeatable());\r\n\r\n\t\t\t\t\t\tDate date = new Date();\r\n\t\t\t\t\t\tDate systemDate = savingAccSer\r\n\t\t\t\t\t\t\t\t.convertStringToDateDDmmYYYY(savingAccSer\r\n\t\t\t\t\t\t\t\t\t\t.convertDateToStringDDmmYYYY(date));\r\n\r\n\t\t\t\t\t\tDate dateEnd = savingAccSer\r\n\t\t\t\t\t\t\t\t.convertStringToDateDDmmYYYY(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t.getDateEnd());\r\n\r\n\t\t\t\t\t\tif (systemDate.getTime() == dateEnd.getTime()) {\r\n\t\t\t\t\t\t\tDate newEndDate = DateUtils.addMonths(systemDate,\r\n\t\t\t\t\t\t\t\t\tsavingAcc.getInterestRateId().getMonth());\r\n\r\n\t\t\t\t\t\t\tfloat balance = savingAcc.getBalanceAmount();\r\n\t\t\t\t\t\t\tfloat interest = savingAcc.getInterestRateId()\r\n\t\t\t\t\t\t\t\t\t.getInterestRate();\r\n\r\n\t\t\t\t\t\t\tint month = savingAcc.getInterestRateId()\r\n\t\t\t\t\t\t\t\t\t.getMonth();\r\n\t\t\t\t\t\t\tint days = Days\r\n\t\t\t\t\t\t\t\t\t.daysBetween(\r\n\t\t\t\t\t\t\t\t\t\t\tnew DateTime(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsavingAccSer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.convertStringToDate(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getDateStart())),\r\n\t\t\t\t\t\t\t\t\t\t\tnew DateTime(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsavingAccSer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.convertStringToDate(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getDateEnd())))\r\n\t\t\t\t\t\t\t\t\t.getDays();\r\n\t\t\t\t\t\t\tfloat amountAll = balance\r\n\t\t\t\t\t\t\t\t\t+ (balance * ((interest / (100)) / 360) * days);\r\n\t\t\t\t\t\t\tsavingAcc.setDateStart(savingAccSer\r\n\t\t\t\t\t\t\t\t\t.convertDateToString(systemDate));\r\n\t\t\t\t\t\t\tsavingAcc.setDateEnd(savingAccSer\r\n\t\t\t\t\t\t\t\t\t.convertDateToString(newEndDate));\r\n\t\t\t\t\t\t\tsavingAcc.setBalanceAmount(amountAll);\r\n\t\t\t\t\t\t\tsavingAcc.setRepeatable(\"\" + (maxRepeat + 1));\r\n\t\t\t\t\t\t\tupdateSavingAccount(savingAcc);\r\n\t\t\t\t\t\t\tcount+=1;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(\"Successfully!! \"+ count +\" Saving Account has been updated. Minh Map!!!\");\r\n\t\t\t\r\n\t\t\treturn \"success\";\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.out.println(\"Exception\");\r\n\r\n\t\t}\r\n\t\treturn \"Fail\";\r\n\t}", "private void listBalances() {\n\t\t\r\n\t}", "@Override\n public void apply(Map<Integer, Account> accounts) {\n Account account = accounts.get(accountNumber);\n if (account == null) {\n throw new ViolatedConstraintException(\n \"Tried to withdraw from non-existent account \" + accountNumber\n );\n }\n\n // Make sure the account is enabled.\n if (!account.isEnabled()) {\n throw new ViolatedConstraintException(\n \"Tried to withdraw from disabled account \" + accountNumber\n );\n }\n\n // Check that the account belongs to accountHolder.\n if (!account.getAccountHolder().equals(accountHolder)) {\n throw new ViolatedConstraintException(\n \"User \\\"\" + accountHolder + \"\\\" tried to perform transaction \" +\n \"on account \" + accountNumber +\n \" which belongs to user \\\"\" + account.getAccountHolder() + \"\\\"\"\n );\n }\n\n // Compute fee based on whether it was admin initiated or not\n // and whether they are a student or not.\n int fee = (adminInitiated) ? 0 : (\n (account.isStudent()) ? Constants.STUDENT_FEE : Constants.NORMAL_FEE\n );\n\n // Check that the final balance of the account after removing the funds\n // and fee is greater than zero.\n int finalBalance = account.getBalance() - amount - fee;\n if (finalBalance < 0) {\n throw new ViolatedConstraintException(\n \"Final balance should be >= 0, got \" + finalBalance\n );\n }\n\n // If the transaction isn't admin initiated, check that the final\n // withdrawal total is less than the withdrawal limit.\n int finalWithdrawalTotal = 0;\n\n if (!adminInitiated) {\n finalWithdrawalTotal = account.getWithdrawalTotal() + amount;\n\n if (finalWithdrawalTotal > Constants.WITHDRAWAL_LIMIT) {\n throw new ViolatedConstraintException(\n \"Final withdrawal total should be <= \" + Constants.WITHDRAWAL_LIMIT +\n \", got \" + finalWithdrawalTotal\n );\n }\n }\n\n // Remove the funds and fee from the account.\n account.setBalance(finalBalance);\n\n // If the transaction isn't admin initiated update withdrawal total\n // and increment the transaction count.\n if (!adminInitiated) {\n account.setWithdrawalTotal(finalWithdrawalTotal);\n account.incrementTransactionCount();\n }\n }", "@Override\r\n\tpublic boolean fundTransfer(FundTransferBean fb, double amount) {\n\t\tboolean isValid = true;\r\n\t\tfor (CustomerBean cb1 : customerList) {\r\n\t\t\tif(cb1.getPhoneNum()== fb.getSourcePhoneNum()) {\r\n\t\t\t\tfor (CustomerBean cb2 : customerList) {\r\n\t\t\t\t\tif(cb2.getPhoneNum()==fb.getDesPhoneNum()) {\r\n\t\t\t\t\t\twithdraw(cb1,amount);\r\n\t\t\t\t\t\tdeposit(cb2,amount);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthrow new WalletException();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\treturn isValid;\r\n\t}", "@Test\n public void test_total_balance3() {\n assertEquals(0, ao3.totalBalanceOfAccountsOwned(), EPS);\n }", "@Test\n\tpublic void testWithdraw() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);;\n\t\taccounts.add(acc1);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(01, \"acc1\", 00000, 50.00, \"\"));\n\t\ttransactions.add(2, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\tArrayList<Account> expected = new ArrayList<>();\n\t\texpected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Withdrawl Successful\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"fail withdrawing $50 + fee\", testResult);\n\t}", "public void testOneWithdrawal(){\n\t\t//Pre-conditions\n\t\tteller.setWorking(true);\n\t\tteller.setHost(host);\n\t\t\n\t\tassertEquals(\"Teller's state should be free, but instead it is: \" + teller.getState(),\"Free\",teller.getState());\n\t\tassertEquals(\"Teller's state should be free, but instead it is: \" + teller.getState(),\"Free\",teller.getState());\n\t\tassertEquals(\"Teller should have no pending transactions, but it has: \" +teller.pendingTransactions.size(),0,teller.pendingTransactions.size());\n\t\t\n\t\tassertEquals(\"Teller should have no pending loans, but it has \" + teller.pendingLoans.size(),0,teller.pendingTransactions.size());\n\t\tassertEquals(\"Teller should have no accountsListed, but it has \" + teller.accountsListed.size(),0,teller.accountsListed.size());\n\t\t\n\t\t//Step 0 of test - Teller has an account for this customer already \n\t\tteller.accountsListed.add(new BankAccount(withdraw,100));\n\t\t\n\t\t//Post-conditions of step 0 \n\t\tassertEquals(\"Teller should have one account listed, instead it has \" + teller.accountsListed.size(),1,teller.accountsListed.size());\n\t\tassertEquals(\"Teller's only account should have a balance of 100, instead it has \" + teller.accountsListed.get(0).getBalance(), \n\t\t\t\t100.0,teller.accountsListed.get(0).getBalance());\n\t\t\n\t\t//Step 1 of test\n\t\t//msgGoSeeTeller(Banker)\n\t\twithdraw.msgGoSeeTeller(teller);\n\t\t\n\t\t//Post-conditions of step 1 \n\t\tassertEquals(\"Teller's state should be busy, but instead it is: \" + teller.getState(),\"Busy\",teller.getState());\n\t\tassertEquals(\"Teller should have one pending transaction, but it has: \" +teller.pendingTransactions.size(),\n\t\t\t\t1,teller.pendingTransactions.size());\n\t\tassertEquals(\"Teller's transaction should be to withdraw 100 dollars, instead it is for \" + teller.pendingTransactions.get(withdraw), \n\t\t\t\t-100.0, teller.pendingTransactions.get(withdraw));\n\t\t\n\t\t//Step 2 of test\n\t\tassertTrue(\"Teller's scheduler should return true, but it doesn't.\", teller.pickAndExecuteAnAction());\n\t\t\n\t\t//Post-conditions of step 2 \n\t\tassertEquals(\"Teller's state should be free, but instead it is: \" + teller.getState(),\"Free\",teller.getState());\n\t\tassertEquals(\"Teller should have no pending transactions, but it has: \" +teller.pendingTransactions.size(),0,teller.pendingTransactions.size());\n\t\tassertTrue(\"Host's log should have a message stating \\\"Updated account, and added teller\\\", instead it reads: \" + host.log.getLastLoggedEvent().toString(), \n\t\t\t\thost.log.containsString(\"Updated account, and added teller\"));\n\t\tassertTrue(\"Customer's log should have a message stating \\\"Got 100.0 dollars, leaving bank.\\\", instead it reads: \" + withdraw.log.getLastLoggedEvent().toString(),\n\t\t\t\twithdraw.log.containsString(\"Got 100.0 dollars, leaving bank.\"));\n\t\tassertEquals(\"Customer's account stored in teller should be updated with the correct balance of 0.0, instead it has \" + teller.accountsListed.get(0).getBalance(), \n\t\t\t\t0.0, teller.accountsListed.get(0).getBalance());\n\t\t\n\t}", "Boolean checkAccountHasSufficientBalance(PrintWriter out, Account from, Double amount);", "@Test\n public void testValidBalance() {\n\n // Creates 100 coins to Alice\n Transaction createCoinTx = new Transaction();\n createCoinTx.addOutput(100, kpAlice.getPublic());\n createCoinTx.finalize();\n // Output of createCoinTx is put in UTXO pool\n UTXOPool utxoPool = new UTXOPool();\n UTXO utxo = new UTXO(createCoinTx.getHash(), 0);\n utxoPool.addUTXO(utxo, createCoinTx.getOutput(0));\n TxHandler txHandler = new TxHandler(utxoPool);\n\n // Alice transfers 10 coins to Bob, 100 to Cal\n Transaction tx1 = new Transaction();\n tx1.addInput(createCoinTx.getHash(), 0);\n tx1.addOutput(10, kpBob.getPublic());\n tx1.addOutput(100, kpCal.getPublic());\n\n // Sign for tx1 with Alice's kp\n byte[] sig1 = null;\n try {\n Signature sig = Signature.getInstance(\"SHA256withRSA\");\n sig.initSign(kpAlice.getPrivate());\n sig.update(tx1.getRawDataToSign(0));\n sig1 = sig.sign();\n } catch (NoSuchAlgorithmException | InvalidKeyException | SignatureException e) {\n e.printStackTrace();\n }\n tx1.getInput(0).addSignature(sig1);\n tx1.finalize();\n\n assertFalse(txHandler.isValidTx(tx1));\n }", "public boolean checkLegitTrans(JsonObject block){\n HashMap<String, Integer> balance = compute_balance(block);\n return Update_by_block(balance, block);\n }", "@Test\n public void testImpossible1TransferMoney() {\n Bank bank = new Bank();\n User user = new User(\"Petr\", \"0000 000000\");\n AccountOfUser acc = new AccountOfUser(0, \"0000 0000 0000 0000\");\n AccountOfUser acc2 = new AccountOfUser(0, \"0000 0000 0000 0001\");\n bank.addUser(user);\n bank.addAccountToUser(user.getPassport(), acc);\n bank.addAccountToUser(user.getPassport(), acc2);\n assertThat(bank.transferMoney(user.getPassport(), acc.getRequisites(), user.getPassport(), acc2.getRequisites(), 100), is(false));\n }", "private void updateTransaction() {\n LogUtils.logEnterFunction(Tag);\n\n String inputtedAmount = etAmount.getText().toString().trim().replaceAll(\",\", \"\");\n if (inputtedAmount.equals(\"\") || Double.parseDouble(inputtedAmount) == 0) {\n etAmount.setError(getResources().getString(R.string.Input_Error_Amount_Empty));\n return;\n }\n\n if (mAccount == null) {\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.Input_Error_Account_Empty));\n return;\n }\n\n Double amount = Double.parseDouble(inputtedAmount);\n int categoryId = mCategory != null ? mCategory.getId() : 0;\n String description = tvDescription.getText().toString();\n int accountId = mAccount.getId();\n String strEvent = tvEvent.getText().toString();\n Event event = null;\n\n if (!strEvent.equals(\"\")) {\n event = mDbHelper.getEventByName(strEvent);\n if (event == null) {\n long eventId = mDbHelper.createEvent(new Event(0, strEvent, mCal, null));\n if (eventId != -1) {\n event = mDbHelper.getEvent(eventId);\n }\n }\n }\n\n // Less: Repayment, More: Lend\n if(mCategory.getDebtType() == Category.EnumDebt.LESS || mCategory.getDebtType() == Category.EnumDebt.MORE) {\n\n boolean isDebtValid = true;\n if(mCategory.getDebtType() == Category.EnumDebt.LESS) { // Income -> Debt Collecting\n List<Debt> debts = mDbHelper.getAllDebtByPeople(tvPeople.getText().toString());\n\n Double lend = 0.0, debtCollect = 0.0;\n for(Debt debt : debts) {\n if(mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.MORE) {\n lend += debt.getAmount();\n }\n\n if(!mDbHelper.getCategory(debt.getCategoryId()).isExpense() && mDbHelper.getCategory(debt.getCategoryId()).getDebtType() == Category.EnumDebt.LESS) {\n debtCollect += debt.getAmount();\n }\n }\n\n if(debtCollect + amount > lend) {\n isDebtValid = false;\n ((ActivityMain) getActivity()).showError(getResources().getString(R.string.message_debt_collect_invalid));\n }\n\n } // End DebtType() == Category.EnumDebt.LESS\n if(isDebtValid) {\n Transaction transaction = new Transaction(mTransaction.getId(),\n TransactionEnum.Income.getValue(),\n amount,\n categoryId,\n description,\n 0,\n accountId,\n mCal,\n 0.0,\n \"\",\n event);\n\n int row = mDbHelper.updateTransaction(transaction);\n if (row == 1) { // Update transaction OK\n\n if(mDbHelper.getDebtByTransactionId(mTransaction.getId()) != null) {\n Debt debt = mDbHelper.getDebtByTransactionId(mTransaction.getId());\n debt.setCategoryId(mCategory.getId());\n debt.setAmount(amount);\n debt.setPeople(tvPeople.getText().toString());\n\n int debtRow = mDbHelper.updateDebt(debt);\n if(debtRow == 1) {\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_update_successful));\n cleanup();\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n } else {\n // Revert update\n mDbHelper.updateTransaction(mTransaction);\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_update_fail));\n }\n } else {\n Debt newDebt = new Debt();\n newDebt.setCategoryId(mCategory.getId());\n newDebt.setTransactionId((int) mTransaction.getId());\n newDebt.setAmount(amount);\n newDebt.setPeople(tvPeople.getText().toString());\n\n long debtId = mDbHelper.createDebt(newDebt);\n if(debtId != -1) {\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_create_successful));\n cleanup();\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n } else {\n // Revert update\n mDbHelper.updateTransaction(mTransaction);\n ((ActivityMain) getActivity()).showToastSuccessful(getResources().getString(R.string.message_transaction_update_fail));\n }\n } // End create new Debt\n\n } // End Update transaction OK\n } // End isDebtValid\n\n } else { // CATEGORY NORMAL\n Transaction transaction = new Transaction(mTransaction.getId(),\n TransactionEnum.Income.getValue(),\n amount,\n categoryId,\n description,\n 0,\n accountId,\n mCal,\n 0.0,\n \"\",\n event);\n\n int row = mDbHelper.updateTransaction(transaction);\n if (row == 1) { // Update transaction OK\n if(mDbHelper.getDebtByTransactionId(mTransaction.getId()) != null) {\n mDbHelper.deleteDebt(mDbHelper.getDebtByTransactionId(mTransaction.getId()).getId());\n }\n // Return to last fragment\n getFragmentManager().popBackStackImmediate();\n }\n }\n\n LogUtils.logLeaveFunction(Tag);\n }", "@Override\r\n\tpublic boolean withdraw(double amount) {\n\t\ttry {\r\n\t\t\tif (accountStatus.equals(AccountStatus.ACTIVE)) {\r\n\t\t\t\tif (balance > amount) {\r\n\t\t\t\t\tbalance = (float) (balance - amount);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow new InsufficientBalanceException(\"You'er Balance is insufficient to make this transation !\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\telse {\r\n\t\t\t\tthrow new AccountInactiveException(\"You'er Account is not Active !\");\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean deposit(DepositBean db, double amount) throws WalletException {\n\t\tboolean isValid = true;\r\n\t\tfor (CustomerBean cb : customerList) {\r\n\t\t\tif(cb.getPhoneNum()==db.getPhoneNum()) {\r\n\t\t\t\tdb.setBalance(db.getBalance()+amount);\r\n\t\t\t\tdb.setDate(LocalDateTime.now());\r\n\t\t\t\tisValid = true;\r\n\t\t\t\tWalletTransactions transac = new WalletTransactions();\r\n\t\t\t\ttransac.setAmount(amount);\r\n\t\t\t\ttransac.setBalance(db.getBalance());\r\n\t\t\t\ttransac.setDate(db.getDate());\r\n\t\t\t\ttransac.setPhoneNum(db.getPhoneNum());\r\n\t\t\t\ttransac.setType(\"deposit\");\r\n\t\t\t\ttransacList.add(transac);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tthrow new WalletException();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\treturn isValid;\r\n\t}", "public boolean processTransaction() {\n\n // Checks to see if the signature can be verified.\n if (verifySignature() == false) {\n System.out.println(\"# Transaction signature could not be verified.\");\n return false;\n }\n\n // Gathers all transaction inputs, making sure they are unspent.\n for (TransactionInput i : inputs) {\n i.UTXO = BasicBlockchain.UTXOs.get(i.transactionOutputId);\n }\n\n // Checks if transaction amount is valid.\n if (getInputsValue() < BasicBlockchain.minimumTransaction) {\n System.out.println(\"# Transaction inputs are too small.\");\n return false;\n }\n\n // Generates transaction outputs.\n // Get value of the inputs then the leftover change.\n float leftOver = getInputsValue() - value;\n transactionId = calculateHash();\n // Send value to recipient.\n outputs.add(new TransactionOutput(this.recipient, value, transactionId));\n // Send the leftover \"change\" back to sender.\n outputs.add(new TransactionOutput(this.sender, leftOver, transactionId));\n\n\n // Adds outputs to the unspent list.\n for (TransactionOutput o : outputs) {\n BasicBlockchain.UTXOs.put(o.id, o);\n }\n\n // Removes the transaction inputs from the blockchain's UTXO list as spent.\n for (TransactionInput i : inputs) {\n if (i.UTXO == null) continue;\n BasicBlockchain.UTXOs.remove(i.UTXO.id);\n }\n\n return true;\n }", "public void spendAllMoney() {\n\t\tcurrentBalance = 0;\n\t}", "public void payEconomical() {\n if (this.balance >= 2.50) {\n this.balance -= 2.50;\n }\n }", "@Test\n public void test_total_balance2() {\n assertEquals(1200, ao2.totalBalanceOfAccountsOwned(), EPS);\n }", "private boolean isEncapsulatingBet(BetSlipResponse betSlipResponse) {\n boolean result = betSlipResponse.getTransactions().size() > 0;\n\n for (TransactionResponse transactionResponse : betSlipResponse.getTransactions()) {\n result &= transactionResponse.getTransactionTypeId() == TransactionType.BET.getId();\n }\n\n return result;\n }", "@Override\r\npublic void checkBalance() {\n\t\r\n}", "void setManageTransactionBalance(String balance);", "public void balance() {\n tree.balance();\n }", "@Test\n public void customerCanPerformTransferBetweenAccounts() {\n String ownerId = \"ownerId\";\n Account accountFrom = AccountFactory.createAccount(AccountFactory.AccountType.SAVINGS, ownerId);\n Account accountTo = AccountFactory.createAccount(AccountFactory.AccountType.SAVINGS, ownerId);\n\n // Put some money in the from account\n Transaction transaction = new Transaction.Builder().setDescription(\"Test\").setAmount(DollarAmount.fromInt(100)).setType(Transaction.Type.DEPOSIT).build();\n accountFrom.applyTransaction(transaction);\n assertEquals(accountFrom.getAccountBalance(), DollarAmount.fromInt(100));\n\n // Attempt transfer\n Account.transfer(accountFrom, accountTo, DollarAmount.fromInt(30));\n\n // Assert transfer was successful\n assertEquals(DollarAmount.fromInt(70), accountFrom.getAccountBalance());\n assertEquals(DollarAmount.fromInt(30), accountTo.getAccountBalance());\n }", "private void transferToBankAccount() {\n ArrayList<Coin> selectedCoins;\n String collection;\n mGoldAmount = 0.0;\n mBankTransferTotal = 0;\n\n if (mRecyclerViewCol.getVisibility() == View.VISIBLE) {\n selectedCoins = getSelectedCoins(Data.COLLECTED);\n collection = Data.COLLECTED;\n // Impose 25 coin limit\n if (selectedCoins.size() > (25 - Data.getCollectedTransferred())) {\n displayToast(getString(R.string.msg_25_coin_limit));\n return;\n }\n } else {\n selectedCoins = getSelectedCoins(Data.RECEIVED);\n collection = Data.RECEIVED;\n }\n\n if (selectedCoins.size() == 0) {\n displayToast(getString(R.string.msg_please_select_coins));\n return;\n }\n\n // Transfer selected coins to bank account\n mBankTransferInProgress = true;\n mProgressBar.setVisibility(View.VISIBLE);\n Log.d(TAG, \"[transferToBankAccount] transfer in progress...\");\n\n for (Coin c : selectedCoins) {\n double value = c.getValue();\n String currency = c.getCurrency();\n double exchange = value * mExchangeRates.get(currency);\n mGoldAmount += exchange;\n Data.removeCoinFromCollection(c, collection, new OnEventListener<String>() {\n\n @Override\n public void onSuccess(String string) {\n mBankTransferTotal++;\n Log.d(TAG, \"[transferToBankAccount] number processed: \" + mBankTransferTotal);\n // If all coins have been processed\n if (mBankTransferTotal == selectedCoins.size()) {\n\n // Get current date\n LocalDateTime now = LocalDateTime.now();\n DateTimeFormatter format = DateTimeFormatter.ofPattern(\n \"yyyy/MM/dd\", Locale.ENGLISH);\n String date = format.format(now);\n\n // Add transaction to firebase\n Transaction transaction = new Transaction(mGoldAmount, date);\n Data.addTransaction(transaction, mBankTransferTotal, collection);\n\n // Clear transfer flag\n mBankTransferInProgress = false;\n\n // Update the view\n if (mRecyclerViewCol.getVisibility() == View.VISIBLE) {\n updateCollectedView();\n } else {\n updateReceivedView();\n }\n mProgressBar.setVisibility(View.INVISIBLE);\n Log.d(TAG, \"[transferToBankAccount] transfer complete\");\n displayToast(getString(R.string.msg_transfer_complete));\n }\n }\n\n @Override\n public void onFailure(Exception e) {\n mBankTransferTotal++;\n // If all coins have been processed\n if (mBankTransferTotal == selectedCoins.size()) {\n\n // Clear transfer flag\n mBankTransferInProgress = false;\n mProgressBar.setVisibility(View.INVISIBLE);\n Log.d(TAG, \"[transferToBankAccount] transfer failed\");\n\n // Update the view\n if (mRecyclerViewCol.getVisibility() == View.VISIBLE) {\n updateCollectedView();\n } else {\n updateReceivedView();\n }\n\n } else {\n displayToast(getString(R.string.msg_failed_to_transfer) + c.getCurrency()\n + \" worth \" + c.getValue());\n }\n Log.d(TAG, \"[sendCoins] failed to transfer coin: \" + c.getId());\n }\n });\n }\n }", "@Override\n public boolean depositAmount(TransactionDTO transaction) {\n if(transaction.getAmount()>0){\n CustomerDetails customerDetails=this.viewAccount(transaction.getUserName()); \n customerDetails.setAccountBalance(customerDetails.getAccountBalance()+transaction.getAmount());\n customerRepository.save(customerDetails);\n return true;\n }else{\n return false;\n }\n }", "protected boolean isTransferTransactionValid(StateTransferTransaction tr) {\n\t\tString fromAddressPublicKey = ((StateTransferTransaction)tr).from;\n\t\tString toAddressPublicKey = ((StateTransferTransaction)tr).to;\t\t\t\t\n\t\tdouble amount = ((StateTransferTransaction)tr).amount;\n\t\tint nonce = ((StateTransferTransaction)tr).getNonce();\n\t\t\t\n\t\t// getting the fromAccount to be modified\n\t\tAccountInterface accountFromModify = null;\n\t\tint accountFromModifyFound = 0;\n\t\tboolean accountFromIsGood = false;\n\t\tfor(AccountInterface account: accounts) {\n\t\t\tif (account.getAddress().equals(fromAddressPublicKey)){\n\t\t\t\taccountFromModify = account;\n\t\t\t\taccountFromModifyFound ++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (accountFromModifyFound > 1) {\n\t\t\t// more than one account is found ?? -> raise error\n\t\t\tServiceBus.logger.log(\"more than one matching account has been found at transfer transaction TrID : \" + tr.getTransctionId());\n\t\t\treturn false;\n\t\t}\n\t\telse if (accountFromModifyFound == 1) {\n\t\t\tif (tr.getNonce() != accountFromModify.getNonce() + 1) {\n\t\t\t\t// error -> nonce not matching -> pssible replay attack\n\t\t\t\tServiceBus.logger.log(\"Nonce is not valid at transaction, possible replay aatack\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse {\t\t\t\t\n\t\t\t\tif (accountFromModify.getBalance() < amount){\n\t\t\t\t\t// not enoguh fund on the account\n\t\t\t\t\tServiceBus.logger.log(\"Not enoguh fund on the account at transfer transaction TrID : \" + tr.getTransctionId());\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t// all cool but still not return because the second account has to be checked as well\n\t\t\t\telse {\n\t\t\t\t\taccountFromIsGood = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t}else if (accountFromModifyFound == 0) {\n\t\t\t// error, if the account does not exist, you can not transfer money from that\n\t\t\tServiceBus.logger.log(\"The account from which you want to transfer the fund does not exist, TrID : \" + tr.getTransctionId());\n\t\t\treturn false;\n\t\t}\n\t\t\n\n\t\t// getting the toAccount to be modified\n\t\tAccountInterface accountToModify = null;\n\t\tint accountToModifyFound = 0;\n\t\tboolean accountToIsGood = false;\n\t\tfor(AccountInterface account: accounts) {\n\t\t\tif (account.getAddress().equals(toAddressPublicKey)){\n\t\t\t\taccountToModify = account;\n\t\t\t\taccountToModifyFound ++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (accountToModifyFound > 1) {\n\t\t\t// more than one account is found ?? -> raise error\n\t\t\tServiceBus.logger.log(\"More than one account is found at matching the transfer transaction TrID : \" + tr.getTransctionId());\n\t\t\treturn false;\n\t\t}\n\t\telse if (accountToModifyFound == 1) {\n\t\t\taccountToIsGood = true;\n\t\t\t\t\n\t\t}else if (accountToModifyFound == 0) {\n\t\t\t// error, if the account does not exist, you can not transfer money from that\n\t\t\tServiceBus.logger.log(\"The to account does not exist, TrID : \" + tr.getTransctionId());\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// transfer is only possible if the asset type is the same, otherwise it is an exchange\n\t\tif (!accountToModify.getAssetType().equals(accountFromModify.getAssetType())){\n\t\t\t// error, from and to asset type must be the same\n\t\t\tServiceBus.logger.log(\"From and to asset type must be the same, TrID : \" + tr.getTransctionId(), Severity.WARNING);\n\t\t\treturn false;\t\t\t\n\t\t}\n\t\t\t\t\n\t\t// final check if all good return true\n\t\tif (accountFromIsGood && accountToIsGood){\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// default value\n\t\treturn false;\t\t\t\n\t}", "@Test\n\tpublic void moneyTrnasferExcetionInsufficientBalanceOfFromAccount() {\n\t\t\n\t\tString accountNumberFrom = createAccount(\"krishna\",4000);\n\t\tString accountNumberTo = createAccount(\"ram\",2000);\n\t\tdouble amountToBeTranfered = 40000.0;\n\t\tMoneyTransfer moneyTransfer = new MoneyTransfer();\n\t\tmoneyTransfer.setAccountNumberFrom(Integer.parseInt(accountNumberFrom));\n\t\tmoneyTransfer.setAccountNumberTo(Integer.parseInt(accountNumberTo));\n\t\tmoneyTransfer.setAmount(amountToBeTranfered);\n\t\t\n\t\tString requestBody = gson.toJson(moneyTransfer);\n\t\t\n\t\tRequestSpecification request = RestAssured.given();\n\t\trequest.body(requestBody);\n\t\tResponse response = request.put(\"/transfer\");\n\t\t\n\t\t// This logic is required due to response has been set as mix of Message and return data value. - START\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(\"Account Number - \");\n\t\tsb.append(accountNumberFrom);\n\t\tsb.append(\" do not have sufficient amout to transfer.\");\n\t\t// This logic is required due to response has been set as mix of Message and return data value. - END\n\t\t\n\t\tAssertions.assertEquals(sb.toString(), response.asString());\n\t\t\n\t}", "private boolean isBalanceIntegrity(final CustStmtRecord custStmtRecord) {\n\t\treturn !(custStmtRecord.getStartBalance().add(custStmtRecord.getMutation()) \n\t\t\t\t).equals(custStmtRecord.getEndBalance());\n\t}", "protected boolean isTransferTransactionValidEx(StateTransferTransaction tr) {\n\t\tString fromAddressPublicKey = ((StateTransferTransaction)tr).from;\n\t\tString toAddressPublicKey = ((StateTransferTransaction)tr).to;\t\t\t\t\n\t\tdouble amount = ((StateTransferTransaction)tr).amount;\n\t\tint nonce = ((StateTransferTransaction)tr).getNonce();\n\t\t\t\n\t\t// getting the fromAccount to be modified\n\t\tAccountInterface accountFromModify = null;\n\t\tint accountFromModifyFound = 0;\n\t\tboolean accountFromIsGood = false;\n\t\tfor(AccountInterface account: accounts) {\n\t\t\tif (account.getAddress().equals(fromAddressPublicKey)){\n\t\t\t\taccountFromModify = account;\n\t\t\t\taccountFromModifyFound ++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (accountFromModifyFound > 1) {\n\t\t\t// more than one account is found ?? -> raise error\n\t\t\tServiceBus.logger.log(\"more than one matching account has been found at transfer transaction TrID : \" + tr.getTransctionId());\n\t\t\treturn false;\n\t\t}\n\t\telse if (accountFromModifyFound == 1) {\n\t\t\tif (tr.getNonce() != accountFromModify.getNonce() + 1) {\n\t\t\t\t// error -> nonce not matching -> pssible replay attack\n\t\t\t\tServiceBus.logger.log(\"Nonce is not valid at transaction, possible replay aatack\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse {\t\t\t\t\n\t\t\t\tif (accountFromModify.getBalance() < amount){\n\t\t\t\t\t// not enoguh fund on the account\n\t\t\t\t\tServiceBus.logger.log(\"Not enoguh fund on the account at transfer transaction TrID : \" + tr.getTransctionId());\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t// all cool but still not return because the second account has to be checked as well\n\t\t\t\telse {\n\t\t\t\t\taccountFromIsGood = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t}else if (accountFromModifyFound == 0) {\n\t\t\t// error, if the account does not exist, you can not transfer money from that\n\t\t\tServiceBus.logger.log(\"The account from which you want to transfer the fund does not exist, TrID : \" + tr.getTransctionId());\n\t\t\treturn false;\n\t\t}\n\t\t\n\n\t\t// getting the toAccount to be modified\n\t\tAccountInterface accountToModify = null;\n\t\tint accountToModifyFound = 0;\n\t\tboolean accountToIsGood = false;\n\t\tfor(AccountInterface account: accounts) {\n\t\t\tif (account.getAddress().equals(toAddressPublicKey)){\n\t\t\t\taccountToModify = account;\n\t\t\t\taccountToModifyFound ++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (accountToModifyFound > 1) {\n\t\t\t// more than one account is found ?? -> raise error\n\t\t\tServiceBus.logger.log(\"More than one account is found at matching the transfer transaction TrID : \" + tr.getTransctionId());\n\t\t\treturn false;\n\t\t}\n\t\telse if (accountToModifyFound == 1) {\n\t\t\taccountToIsGood = true;\n\t\t\t\t\n\t\t}else if (accountToModifyFound == 0) {\n\t\t\t// to account can be added to the state, asset type logic is questionable\n\t\t\t\n\t\t\tAccountBase account = new AccountBase(\n\t\t\t\t\t((StateTransferTransaction)tr).from,\n\t\t\t\t\t((StateTransferTransaction)tr).getNonce(),\n\t\t\t\t\t\"\",\n\t\t\t\t\t((StateTransferTransaction)tr).amount,\n\t\t\t\t\taccountFromModify.getAssetType());\t\n\t\t\taccounts.add(account);\n\t\t\t\n\t\t\taccountToIsGood = true;\n\t\t}\n\t\t\n\t\t// transfer is only possible if the asset type is the same, otherwise it is an exchange\n\t\tif (!accountToModify.getAssetType().equals(accountFromModify.getAssetType())){\n\t\t\t// error, from and to asset type must be the same\n\t\t\tServiceBus.logger.log(\"From and to asset type must be the same, TrID : \" + tr.getTransctionId(), Severity.WARNING);\n\t\t\treturn false;\t\t\t\n\t\t}\n\t\t\t\t\n\t\t// final check if all good return true\n\t\tif (accountFromIsGood && accountToIsGood){\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// default value\n\t\treturn false;\t\t\t\n\t}", "@Test\n public void testPayTransactionSuccessfully() throws Exception {\n\n // login with sufficient rights\n shop.login(admin.getUsername(), admin.getPassword());\n\n // verify receive correct change when paying for sale\n double change = 3;\n assertEquals(change, shop.receiveCashPayment(saleId, toBePaid+change), 0.001);\n totalBalance += toBePaid;\n\n // verify sale is in state PAID/COMPLETED\n assertTrue(isTransactionInAccountBook(saleId));\n\n // verify system's balance did update correctly\n assertEquals(totalBalance, shop.computeBalance(), 0.001);\n }", "public final void payBills() {\n if (this.isBankrupt) {\n return;\n }\n Formulas formulas = new Formulas();\n if ((getInitialBudget() - formulas.monthlySpendings(this)) < 0) {\n setBankrupt(true);\n }\n setInitialBudget(getInitialBudget() - formulas.monthlySpendings(this));\n }", "public boolean changeAmountBy(Money Other);", "private void doCheckBalance() {\n while (true){\n try{\n Account userAccount = ui.readAccount(currentUser.getAccounts());\n ui.displayMessage(\"Balance: \" + userAccount.getBalance());\n break;\n } catch (Exception e){\n ui.displayError(\"Please enter a valid number.\");\n }\n }\n\n }", "@Override\t\n\t@Transactional\n\tpublic Boolean transferMoney(TransferDto transferData) throws Exception {\n\t\t\n\t\tUser targetUser = userDao.findByUsername(transferData.getTargetUser().getUsername());\n\t\t\n\t\tBalanceDto balanceData = transferData.getBalance();\n\t\t\n\t\t\n\t\tbalanceData.setType(AccountTransactionType.SUBTRACT);\n\t\t\n\t\taddSubtractBalance(balanceData);\n\t\n\t\tbalanceData.setType(AccountTransactionType.ADD);\n\t\t\n\t\tbalanceData.setAccount(transferData.getTargetAccount());\n\t\t\n\t\t\n\t\taddSubtractBalanceByUser(targetUser, balanceData);\n\t\t\n\t\t\n\t\treturn true;\n\t}", "@Test\n\tpublic void testRecalculateAccountBalance() {\n\t\tSmsAccount smsAccount = new SmsAccount();\n\t\tsmsAccount.setSakaiUserId(\"1\");\n\t\tsmsAccount.setSakaiSiteId(\"1\");\n\t\tsmsAccount.setMessageTypeCode(\"1\");\n\t\tsmsAccount.setOverdraftLimit(1000L);\n\t\tsmsAccount.setCredits(10L);\n\t\tsmsAccount.setAccountName(\"accountname\");\n\t\tsmsAccount.setAccountEnabled(true);\n\t\thibernateLogicLocator.getSmsAccountLogic()\n\t\t\t\t.persistSmsAccount(smsAccount);\n\t\tinsertTestTransactionsForAccount(smsAccount);\n\n\t\tAssert.assertTrue(smsAccount.exists());\n\n\t\tList<SmsTransaction> transactions = hibernateLogicLocator\n\t\t\t\t.getSmsTransactionLogic().getSmsTransactionsForAccountId(\n\t\t\t\t\t\tsmsAccount.getId());\n\n\t\tAssert.assertNotNull(transactions);\n\t\tAssert.assertTrue(transactions.size() > 0);\n\n\t\tsmsBillingImpl.recalculateAccountBalance(smsAccount.getId());\n\n\t\tSmsAccount recalculatedAccount = hibernateLogicLocator\n\t\t\t\t.getSmsAccountLogic().getSmsAccount(smsAccount.getId());\n\t\tAssert.assertNotNull(recalculatedAccount);\n\t\tAssert.assertTrue(recalculatedAccount.getCredits() == 6660);\n\t}", "@Test \n\tpublic void test1() {\n\t\taccount.withdraw(1000);\n\t\t//Sample (Expected) Output\n\t\tassertEquals(1000, account.getAmount(),0.01);\n\t}", "@Test\n public void testImpossible2TransferMoney() {\n Bank bank = new Bank();\n User user = new User(\"Petr\", \"0000 000000\");\n AccountOfUser acc = new AccountOfUser(0, \"0000 0000 0000 0001\");\n bank.addUser(user);\n bank.addAccountToUser(user.getPassport(), acc);\n assertThat(bank.transferMoney(user.getPassport(), \"0000 0000 0000 0000\", user.getPassport(), acc.getRequisites(), 100), is(false));\n }", "@Override\n\tpublic void calculateAndUpdateBalance() {\n\n\t\tbalance -= fee;\n\n\t}", "boolean hasTotalBet();", "boolean hasTotalBet();", "@Transactional(readOnly = true)\n public boolean checkAvailableBalance(Long accountId, Double amount) {\n return getAccountBalance(accountId) < amount;\n }", "private void validateBalance(Double fromBalance, Double transferAmount) throws PaymentsException {\n\t\tif ((fromBalance - transferAmount) <= 0) {\n\t\t\tlogger.error(\"Not enough balance.\");\n\t\t\tthrow new PaymentsException(\" Not enough funds. \");\n\t\t\t\n\t\t}\n\t}", "private void checkAmount() throws IOException {\n //System.out.println(\"The total amount in the cash machine is: \" + amountOfCash);\n for (int i : typeOfCash.keySet()) {\n Integer r = typeOfCash.get(i);\n if (r < 20) {\n sendAlert(i);\n JOptionPane.showMessageDialog(null, \"$\" + i + \"bills are out of stock\");\n }\n }\n }", "public BaseJson<BigDecimal> wallet_balance() throws Exception {\n String s = main(\"wallet_balance\",\"[]\");\n return JsonHelper.jsonStr2Obj(s, BaseJson.class);\n }", "@Test\n\tpublic void withdrawTest(){\n\t\tCustomer cus = new Customer(\"wgl\", myDate, \"Beijing\");\n\t\tAccount cAcc = new CurrentAccount(cus);\n\t\tbc.withdraw(cAcc, 300);\n\t\tboolean flag = false;\n\t\tif(cAcc.getBalance() == -300.0){\n\t\t\tflag = true;\n\t\t}\n\t\tassertTrue(flag);\n\t}", "double getBalance();", "double getBalance();", "@Override\n\tpublic int checkBill(MarketTransaction t) {\n\t\treturn 0;\n\t}", "public static void main(String[] args) {\n BankAccount Yaoming = new BankAccount(0, \"blobfis@h\");\n BankAccount Hoshi = new BankAccount(2348123, \"Seventeen\");\n BankAccount Pewpew = new BankAccount(1245, \" \");\n\n System.out.println(Yaoming.getBalance());\n System.out.println(Hoshi.getAccountID());\n // System.out.println(Yaoming.getPassword());\n Yaoming.setPassword(\"donkey\");\n // System.out.println(Yaoming.getPassword());\n System.out.println(Yaoming.deposit(53.43));\n System.out.println(Yaoming.getBalance());\n if ( Yaoming.deposit(-100) ) System.out.println(\"Deposit successful!\");\n else {System.out.println(\"Deposit failed!\");}\n System.out.println();\n\n // System.out.println(Pewpew.getPassword());\n System.out.println(Pewpew.getBalance());\n System.out.println(Pewpew.deposit(2147823.23));\n System.out.println(Pewpew.withdraw(9999999));\n System.out.println(Pewpew.withdraw(-1231784.23));\n System.out.println(Pewpew.withdraw(0.23));\n System.out.println(Pewpew.getBalance());\n System.out.println();\n\n System.out.println(Hoshi.toString());\n System.out.println(Yaoming.toString());\n System.out.println(Pewpew.toString());\n System.out.println();\n\n BankAccount Sophia = new BankAccount(123456, \"meowmeow\");\n BankAccount Funky = new BankAccount(7890, \"woofwoof\");\n Sophia.deposit(7500);\n System.out.println(Sophia.getBalance());\n System.out.println(Funky.getBalance());\n System.out.println(Sophia.transferTo(Funky, 500, \"meowmeow\")); //should be true\n System.out.println(Funky.transferTo(Sophia, 1000, \"woofwoof\")); //should be false\n System.out.println(Funky.transferTo(Sophia, 300, \"hehehe\")); //should be false\n System.out.println(Sophia.getBalance()); //should be 7000.0\n System.out.println(Funky.getBalance()); //should be 500.0\n\n }", "public boolean isBalanced() {\n\t if (checkHeight(root)==-1)\n\t \t\treturn false;\n\t \telse\n\t \t\treturn true;\n\t}", "public void childAccountsShouldUseParentTransferAccountSetting(){\n\t\tAccount transferAccount = new Account(\"New Transfer Acct\");\n\t\tmAccountsDbAdapter.addRecord(transferAccount);\n\t\tmAccountsDbAdapter.addRecord(new Account(\"Higher account\"));\n\n\t\tAccount childAccount = new Account(\"Child Account\");\n\t\tchildAccount.setParentUID(DUMMY_ACCOUNT_UID);\n\t\tmAccountsDbAdapter.addRecord(childAccount);\n\t\tContentValues contentValues = new ContentValues();\n\t\tcontentValues.put(DatabaseSchema.AccountEntry.COLUMN_DEFAULT_TRANSFER_ACCOUNT_UID, transferAccount.getUID());\n\t\tmAccountsDbAdapter.updateRecord(DUMMY_ACCOUNT_UID, contentValues);\n\n\t\tIntent intent = new Intent(mTransactionsActivity, TransactionsActivity.class);\n\t\tintent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\tintent.setAction(Intent.ACTION_INSERT_OR_EDIT);\n\t\tintent.putExtra(UxArgument.SELECTED_ACCOUNT_UID, childAccount.getUID());\n\n\t\tmTransactionsActivity.startActivity(intent);\n\n\t\tonView(withId(R.id.input_transaction_amount)).perform(typeText(\"1299\"));\n\t\tclickOnView(R.id.menu_save);\n\n\t\t//if our transfer account has a transaction then the right transfer account was used\n\t\tList<Transaction> transactions = mTransactionsDbAdapter.getAllTransactionsForAccount(transferAccount.getUID());\n\t\tassertThat(transactions).hasSize(1);\n\t}", "private boolean validateTxns(final Transaxtion txnList[]) throws TaskFailedException {\n\t\tif (txnList.length < 2)\n\t\t\treturn false;\n\t\tdouble dbAmt = 0;\n\t\tdouble crAmt = 0;\n\t\ttry {\n\t\t\tfor (final Transaxtion element : txnList) {\n\t\t\t\tfinal Transaxtion txn = element;\n\t\t\t\tif (!validateGLCode(txn))\n\t\t\t\t\treturn false;\n\t\t\t\tdbAmt += Double.parseDouble(txn.getDrAmount());\n\t\t\t\tcrAmt += Double.parseDouble(txn.getCrAmount());\n\t\t\t}\n\t\t} finally {\n\t\t\tRequiredValidator.clearEmployeeMap();\n\t\t}\n\t\tdbAmt = ExilPrecision.convertToDouble(dbAmt, 2);\n\t\tcrAmt = ExilPrecision.convertToDouble(crAmt, 2);\n\t\tif (LOGGER.isInfoEnabled())\n\t\t\tLOGGER.info(\"Total Checking.....Debit total is :\" + dbAmt + \" Credit total is :\" + crAmt);\n\t\tif (dbAmt != crAmt)\n\t\t\tthrow new TaskFailedException(\"Total debit and credit not matching. Total debit amount is: \" + dbAmt\n\t\t\t\t\t+ \" Total credit amount is :\" + crAmt);\n\t\t// return false;\n\t\treturn true;\n\t}", "public boolean isBalanced() {\n return isBalanced(root);\n }", "@Test\n public void testImpossible3TransferMoney() {\n Bank bank = new Bank();\n User user = new User(\"Petr\", \"0000 000000\");\n AccountOfUser acc = new AccountOfUser(1000, \"0000 0000 0000 0000\");\n bank.addUser(user);\n bank.addAccountToUser(user.getPassport(), acc);\n assertThat(bank.transferMoney(user.getPassport(), acc.getRequisites(), user.getPassport(), \"0000 0000 0000 0001\", 100), is(false));\n }", "public boolean withdrawal (double amount) \r\n {\r\n\r\n boolean result = false;\r\n\r\n if ( ! super.withdrawal (amount) ) \r\n {\r\n System.out.println (\"Using overdraft...\");\r\n if ( ! overdraft.withdrawal (amount-balance) )\r\n System.out.println (\"Overdraft source insufficient.\");\r\n else {\r\n balance = 0;\r\n System.out.println (\"Current Balance on account \" + account + \": \" + balance);\r\n result = true;\r\n }\r\n }\r\n System.out.println ();\r\n\r\n return result;\r\n\r\n }", "@Test\n\tpublic void testTransfer() {\n\t\tAccount acc1 = new Account(00000, \"acc1\", true, 1000.00, 0, false);\n\t\tAccount acc2 = new Account(00001, \"acc2\", true, 1000.00, 0, false);\n\t\taccounts.add(acc1);\n\t\taccounts.add(acc2);\n\n\t\ttransactions.add(0, new Transaction(10, \"acc1\", 00000, 0, \"\"));\n\t\ttransactions.add(1, new Transaction(02, \"acc1\", 00000, 200.00, \"\"));\n\t\ttransactions.add(2, new Transaction(02, \"acc2\", 00001, 200.00, \"\"));\n\t\ttransactions.add(3, new Transaction(00, \"acc1\", 00000, 0, \"\"));\n\n\t\ttransHandler = new TransactionHandler(accounts, transactions);\n\t\toutput = transHandler.HandleTransactions();\n\n\t\t// ArrayList<Account> expected = new ArrayList();\n\t\t// expected.add(0, new Account(00000, \"acc1\", true, 949.90, 0002, false));\n\t\t// expected.add(1, new Account(00001, \"acc2\", true, 1050.00, 0002, false));\n\n\t\tif (outContent.toString().contains(\"Money Transfered\")) {\n\t\t\ttestResult = true;\n\t\t} else {\n\t\t\ttestResult = false;\n\t\t}\n\n\t\tassertTrue(\"money not transfered\", testResult);\n\t}", "public double getBalance() {\n\n double balance = 0;\n balance = overDraftLimit;\n return balance;\n\n }", "default Gwei get_attesting_balance(BeaconState state, List<PendingAttestation> attestations) {\n return get_total_balance(state, get_unslashed_attesting_indices(state, attestations));\n }", "public boolean isBalanced() {\n return isBalanced(root);\n }", "public boolean checkBankBalance(int value1,int amount1)\n {\n if(value1==amount1)\n {\n return true;\n }\n return false;\n }", "@Test\n\tpublic void depositTest(){\n\t\tCustomer cus = new Customer(\"wgl\", myDate, \"Beijing\");\n\t\tAccount cAcc = new CurrentAccount(cus);\n\t\tbc.deposit(cAcc, 500, true);\n\t\tboolean flag = false;\n\t\tif(cAcc.getBalance() == 500.0){\n\t\t\tflag = true;\n\t\t}\n\t\tassertTrue(flag);\n\t}", "public void setBalance(int balance) {\r\n\t\tif(0<=balance&&balance<=1000000) {\r\n\t\tthis.balance = balance;\r\n\t}else{\r\n\t\t System.out.println(\"잘못 입력하셨습니다. 현재 잔고는 \"+this.balance+\"입니다\");\r\n\t}\r\n \r\n}", "@Override\n\tpublic boolean equals(Object obj) {\n\n\t\tif (this == obj)\n\t\t\treturn true;\n\t\tif (obj == null)\n\t\t\treturn false;\n\t\tif (getClass() != obj.getClass())\n\t\t\treturn false;\n\t\tTransaction other = (Transaction) obj;\n\t\tif (transactionAmount != null && walletReference != null) {\n\t\t\tif (other.transactionAmount != null && other.walletReference != null) {\n\t\t\t\tif (transactionAmount == other.transactionAmount\n\t\t\t\t\t\t&& walletReference.equalsIgnoreCase(other.walletReference)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (profileName == null) {\n\t\t\tif (other.profileName != null)\n\t\t\t\treturn false;\n\t\t} else if (!profileName.equals(other.profileName) && !profileName.equalsIgnoreCase(other.profileName))\n\t\t\treturn false;\n\t\tif (transactionAmount == null) {\n\t\t\tif (other.transactionAmount != null)\n\t\t\t\treturn false;\n\t\t} else if (!transactionAmount.equals(other.transactionAmount))\n\t\t\treturn false;\n\t\tif (transactionDate == null) {\n\t\t\tif (other.transactionDate != null)\n\t\t\t\treturn false;\n\t\t} else if (!transactionDate.equals(other.transactionDate))\n\t\t\treturn false;\n\t\tif (transactionDescription == null) {\n\t\t\tif (other.transactionDescription != null)\n\t\t\t\treturn false;\n\t\t} else if (!transactionDescription.equals(other.transactionDescription)\n\t\t\t\t&& !transactionDescription.equalsIgnoreCase(other.transactionDescription))\n\t\t\treturn false;\n\t\tif (transactionId == null) {\n\t\t\tif (other.transactionId != null)\n\t\t\t\treturn false;\n\t\t} else if (!transactionId.equals(other.transactionId))\n\t\t\treturn false;\n\t\tif (transactionNarrative == null) {\n\t\t\tif (other.transactionNarrative != null)\n\t\t\t\treturn false;\n\t\t} else if (!transactionNarrative.equals(other.transactionNarrative)\n\t\t\t\t&& !transactionNarrative.equalsIgnoreCase(other.transactionNarrative))\n\t\t\treturn false;\n\t\tif (transactionType != other.transactionType)\n\t\t\treturn false;\n\t\tif (walletReference == null) {\n\t\t\tif (other.walletReference != null)\n\t\t\t\treturn false;\n\t\t} else if (!walletReference.equals(other.walletReference)\n\t\t\t\t&& !walletReference.equalsIgnoreCase(other.walletReference))\n\t\t\treturn false;\n\t\treturn true;\n\n\t}", "public void setBalance(){\n balance.setBalance();\n }", "@Override\n public long getTotalBalances() {\n return accounts.values().stream().map(Account::getBalance).mapToLong(Long::longValue).sum();\n }", "private void validateTransaction(Transaction transaction) throws LedgerException {\n // Convenience variable for throwing exceptions\n String action = \"process transaction\";\n\n // Get Accounts related to the transaction\n Account payer = transaction.getPayer();\n Account receiver = transaction.getReceiver();\n Account master = this.currentBlock.getAccount(\"master\");\n\n // Check accounts are linked to valid/exisiting accounts\n if ( payer == null || receiver == null || master == null ) {\n throw new LedgerException(action, \"Transaction is not linked to valid account(s).\");\n }\n\n // Check for transaction id uniqueness\n validateTransactionId(transaction.getTransactionId());\n\n // Get total transaction withdrawal\n int amount = transaction.getAmount();\n int fee = transaction.getFee();\n int withdrawal = amount + fee;\n\n /*\n * Check the transaction is valid.\n *\n * Withdrawal, and receiver's ending balance must be _greater than_ the\n * MIN_ACCOUNT_BALANCE and _less than_ the MAX_ACCOUNT_BALANCE. The number\n * must be checked against both ends of the range in cases where an amount\n * would exceed MAX_ACCOUNT_BALANCE (i.e. Integer.MAX_VALUE), which will\n * wrap around to a value < 0.\n */\n if (withdrawal < MIN_ACCOUNT_BALANCE || withdrawal > MAX_ACCOUNT_BALANCE) {\n throw new LedgerException(action, \"Withdrawal exceeds total available currency.\");\n } else if ( payer.getBalance() < withdrawal ) {\n throw new LedgerException(action, \"Payer has an insufficient balance.\");\n } else if ( fee < MIN_FEE ) {\n throw new LedgerException(action, \"The transaction does not meet the minimum fee requried.\");\n } else if ( (amount + receiver.getBalance()) < MIN_ACCOUNT_BALANCE || (amount + receiver.getBalance()) > MAX_ACCOUNT_BALANCE) {\n throw new LedgerException(action, \"Receiver's balance would exceed maximum allowed.\");\n }\n\n // Valid transaction, Transfer funds\n payer.withdraw(withdrawal);\n receiver.deposit(amount);\n master.deposit(fee);\n }", "public Money getTotalBalance();", "public void viewBalance() {\n\t\tSystem.out.println(\"This is your current Balance $\" + tuitionBalance);\n\t}", "public boolean isOverdrawn() {\n return balance < 0;\n }", "protected boolean applyDataTransaction(StateDataTransaction tr) {\n\t\tString address = ((StateDataTransaction)tr).address;\n\t\tString newData = ((StateDataTransaction)tr).newValue;\n\n\t\tfor(AccountInterface account: accounts) {\n\t\t\tif (account.getAddress().equals(address)){\n\t\t\t\taccount.setData(newData);\n\t\t\t\taccount.increaseNonce();\t\t\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "@Override\n\tpublic Monies change(int amount, Monies balance) throws CashRegisterException {\n\t\tif (balance.getMonetaryValue() < amount) {\n\t\t\tthrow new CashRegisterException(CashRegisterExceptionType.INSUFFICIENT_AMT, amount);\n\t\t}\n\n\t\tList<Integer> searchSpace = createChangeCombinationSearchSpace(amount, balance);\n\n\t\t// if the sum of all eligible banknotes is less than\n\t\t// the change amount we don't proceed.\n\t\t// For example if we have to change 14 and after filtering 20's\n\t\t// we are left with 5, 5, and 2. While the cash register had more\n\t\t// money originally than the change amount, the change banknotes that\n\t\t// we have are not appropriate to process the change.\n\t\tif (searchSpace.stream().mapToInt(Integer::intValue).sum() < amount) {\n\t\t\tthrow new CashRegisterException(CashRegisterExceptionType.NO_EXACT_CHANGE, amount);\n\t\t}\n\n\t\tArrayList<Integer> tempSearchSpace = new ArrayList<Integer>(searchSpace);\n\t\tArrayList<Integer> selectedBankNotes = new ArrayList<Integer>();\n\t\tArrayList<List<Integer>> goodCombinations = new ArrayList<List<Integer>>();\n\t\tint remainingAmount = amount;\n\n\t\tRandom random = new Random();\n\t\tint randomIndex;\n\t\t// Randomized search with pre-set size\n\t\tfor (int i = 0; i < MAX_NUMBER_OF_ATTEMPTS_FOR_FINDING_EXACT_CHANGE; i++) {\n\t\t\trandomIndex = random.nextInt(tempSearchSpace.size());\n\t\t\tInteger banknote = tempSearchSpace.get(randomIndex);\n\t\t\t// Since we continuously shrink the search set we do\n\t\t\t// not to have numbers greater than amount. So we don't need to\n\t\t\t// check\n\t\t\t// if the remaining amount is greater or equal to remaining\n\t\t\t// banknotes.\n\t\t\tremainingAmount -= banknote;\n\t\t\tselectedBankNotes.add(banknote);\n\n\t\t\tshrinkChangeCombinationSearchSpace(randomIndex, remainingAmount, tempSearchSpace);\n\n\t\t\t// if we found a combination we store it\n\t\t\tif (remainingAmount == 0) {\n\t\t\t\tstoreNewCombination(selectedBankNotes, goodCombinations);\n\t\t\t}\n\t\t\t// if we found a combination we reload everything\n\t\t\t// and look for others up to our number of randomized tries\n\t\t\t// or if there are no more banknotes that are smaller or equal\n\t\t\t// to the amount we have remaining.\n\t\t\tif (remainingAmount == 0 || tempSearchSpace.size() == 0) {\n\t\t\t\tselectedBankNotes = new ArrayList<Integer>();\n\t\t\t\tremainingAmount = amount;\n\t\t\t\ttempSearchSpace = new ArrayList<Integer>(searchSpace);\n\t\t\t}\n\t\t}\n\t\t// We have multiple combinations here.\n\t\t// The code is setup to handle these combinations differently through\n\t\t// strategy pattern. For the time being only one strategy has been\n\t\t// implemented\n\t\t// that takes the first combination from the list. Others could the\n\t\t// combinations\n\t\t// with fewest number of banknotes or the banknotes with the smallest\n\t\t// denominations.\n\t\tif (goodCombinations.size() > 0) {\n\t\t\ttry {\n\t\t\t\tMonies changedMonies = convertBankNotesToMonies(selectChangeCombination(goodCombinations));\n\t\t\t\treturn changedMonies;\n\t\t\t} catch (MoniesException mex) {\n\t\t\t\tthrow new CashRegisterException(CashRegisterExceptionType.UNEXPECTED_CURRENCY, mex);\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new CashRegisterException(CashRegisterExceptionType.NO_EXACT_CHANGE, amount);\n\t\t}\n\t}", "@Test\n public void checkingAccount2() {\n Bank bank = new Bank();\n Customer bill = new Customer(\"Bill\");\n Account checkingAccount = new CheckingAccount(bill, Account.CHECKING);\n bank.addCustomer(new Customer(\"Bill\").openAccount(checkingAccount));\n Transaction t = new CreditTransaction(1000.0);\n t.setTransactionDate(getTestDate(-5));\n checkingAccount.addTransaction(t);\n\n assertEquals(Math.pow(1 + 0.001 / 365.0, 5) * 1000 - 1000, bank.totalInterestPaid(), DOUBLE_DELTA);\n }", "public int hasBalance(UUID uuid, int number) {\r\n\t\tPennyGame plugin = PennyGame.getPlugin(PennyGame.class);\r\n\t\t//int previousTicketCount = getTicketCount(uuid);\r\n\t\t//number = Math.min(number, this.maxTicketCount - previousTicketCount);\r\n\t\tRegisteredServiceProvider<Economy> rsp = plugin.getServer().getServicesManager().getRegistration(Economy.class);\r\n\t\tEconomy econ = rsp.getProvider();\r\n\t\tOfflinePlayer player = Bukkit.getOfflinePlayer(uuid);\r\n\t\tdouble balance = econ.getBalance(player);\r\n\t\tnumber = (int)Math.min(number, (balance / this.ticketPrice));\r\n\t\t//number = (int)Math.min(number - (number - (balance / this.ticketPrice)), number);\r\n\t\t\r\n\t\treturn number;\t\r\n\t}", "public void withdraw(double amount)\n {\n if (amount <= balance) {\n balance = balance - amount;\n }\n else {\n System.err.println(\"Transaction Declined\");\n remainder = balance - amount;\n System.out.println(\"Your balance would have been \" + remainder);\n }\n }", "public boolean isBankrupt() {\n\t\tif (money < 0) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "public void transferFunds(BankAccount account1, BankAccount account2, double amount){\n if(account1.checkAccountOpen()&&account2.checkAccountOpen()){\n if((account1.getCurrentBalance()-amount)>0) {\n if (isSameAccount(account1, account2)) {\n account1.subtractCreditTransaction(amount);\n account2.addDebitTransaction(amount);\n } else {\n System.out.println(\"This transaction could not be processed. BankAccount owners are not the same.\");\n }\n }\n else {\n System.out.println(\"Appropriate funds not found. Please check your current balance.\");\n }\n\n\n }\n }", "public void applyTransaction(Transaction tx, byte[] coinbase) {\n\t\tif (blockchain != null)\n\t\t\tblockchain.addWalletTransaction(tx);\n\n\t\t// TODO: what is going on with simple wallet transfer ?\n\n\t\t// 1. VALIDATE THE NONCE\n\t\tbyte[] senderAddress = tx.getSender();\n\n\t\tAccountState senderAccount = repository.getAccountState(senderAddress);\n\n\t\tif (senderAccount == null) {\n\t\t\tif (stateLogger.isWarnEnabled())\n\t\t\t\tstateLogger.warn(\"No such address: {}\",\n\t\t\t\t\t\tHex.toHexString(senderAddress));\n\t\t\treturn;\n\t\t}\n\n\t\tBigInteger nonce = repository.getNonce(senderAddress);\n\t\tif (nonce.compareTo(new BigInteger(tx.getNonce())) != 0) {\n\t\t\tif (stateLogger.isWarnEnabled())\n\t\t\t\tstateLogger.warn(\"Invalid nonce account.nonce={} tx.nonce={}\",\n\t\t\t\t\t\tnonce.longValue(), new BigInteger(tx.getNonce()));\n\t\t\treturn;\n\t\t}\n\n\t\t// 2.1 PERFORM THE GAS VALUE TX\n\t\t// (THIS STAGE IS NOT REVERTED BY ANY EXCEPTION)\n\n\t\t// first of all debit the gas from the issuer\n\t\tBigInteger gasDebit = tx.getTotalGasValueDebit();\n\n\t\t// The coinbase get the gas cost\n\t\trepository.addBalance(coinbase, gasDebit);\n\n\t\tbyte[] contractAddress;\n\n\t\t// Contract creation or existing Contract call\n\t\tif (tx.isContractCreation()) {\n\n\t\t\t// credit the receiver\n\t\t\tcontractAddress = tx.getContractAddress();\n\t\t\trepository.createAccount(contractAddress);\n\t\t\tstateLogger.info(\"New contract created address={}\",\n\t\t\t\t\tHex.toHexString(contractAddress));\n\t\t} else {\n\n\t\t\tcontractAddress = tx.getReceiveAddress();\n\t\t\tAccountState receiverState = repository.getAccountState(tx\n\t\t\t\t\t.getReceiveAddress());\n\n\t\t\tif (receiverState == null) {\n\t\t\t\trepository.createAccount(tx.getReceiveAddress());\n\t\t\t\tif (stateLogger.isInfoEnabled())\n\t\t\t\t\tstateLogger.info(\"New account created address={}\",\n\t\t\t\t\t\t\tHex.toHexString(tx.getReceiveAddress()));\n\t\t\t}\n\t\t}\n\n\t\t// 2.2 UPDATE THE NONCE\n\t\t// (THIS STAGE IS NOT REVERTED BY ANY EXCEPTION)\n\t\tBigInteger balance = repository.getBalance(senderAddress);\n\t\tif (balance.compareTo(BigInteger.ZERO) == 1) {\n\t\t\trepository.increaseNonce(senderAddress);\n\n\t\t\tif (stateLogger.isInfoEnabled())\n\t\t\t\tstateLogger.info(\n\t\t\t\t\t\t\"Before contract execution the sender address debit with gas total cost, \"\n\t\t\t\t\t\t\t\t+ \"\\n sender={} \\n gas_debit= {}\",\n\t\t\t\t\t\tHex.toHexString(tx.getSender()), gasDebit);\n\t\t}\n\n\t\t// actual gas value debit from the sender\n\t\t// the purchase gas will be available for the\n\t\t// contract in the execution state, and\n\t\t// can be validate using GAS op\n\t\tif (gasDebit.signum() == 1) {\n\t\t\tif (balance.compareTo(gasDebit) == -1) {\n\t\t\t\tlogger.info(\"No gas to start the execution: sender={}\",\n\t\t\t\t\t\tHex.toHexString(tx.getSender()));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\trepository.addBalance(senderAddress, gasDebit.negate());\n\t\t}\n\n\t\t// 3. START TRACKING FOR REVERT CHANGES OPTION !!!\n\t\tRepository trackRepository = repository.getTrack();\n\t\ttrackRepository.startTracking();\n\n\t\ttry {\n\n\t\t\t// 4. THE SIMPLE VALUE/BALANCE CHANGE\n\t\t\tif (tx.getValue() != null) {\n\n\t\t\t\tBigInteger senderBalance = repository.getBalance(senderAddress);\n\t\t\t\tBigInteger contractBalance = repository.getBalance(contractAddress);\n\n\t\t\t\tif (senderBalance.compareTo(new BigInteger(1, tx.getValue())) >= 0) {\n\n\t\t\t\t\trepository.addBalance(contractAddress,\n\t\t\t\t\t\t\tnew BigInteger(1, tx.getValue()));\n\t\t\t\t\trepository.addBalance(senderAddress,\n\t\t\t\t\t\t\tnew BigInteger(1, tx.getValue()).negate());\n\n\t\t\t\t\tif (stateLogger.isInfoEnabled())\n\t\t\t\t\t\tstateLogger.info(\"Update value balance \\n \"\n\t\t\t\t\t\t\t\t+ \"sender={}, receiver={}, value={}\",\n\t\t\t\t\t\t\t\tHex.toHexString(senderAddress),\n\t\t\t\t\t\t\t\tHex.toHexString(contractAddress),\n\t\t\t\t\t\t\t\tnew BigInteger(tx.getValue()));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// 3. FIND OUT WHAT IS THE TRANSACTION TYPE\n\t\t\tif (tx.isContractCreation()) {\n\n\t\t\t\tbyte[] initCode = tx.getData();\n\n\t\t\t\tBlock lastBlock = blockchain.getLastBlock();\n\n\t\t\t\tProgramInvoke programInvoke = ProgramInvokeFactory\n\t\t\t\t\t\t.createProgramInvoke(tx, lastBlock, trackRepository);\n\n\t\t\t\tif (logger.isInfoEnabled())\n\t\t\t\t\tlogger.info(\"running the init for contract: addres={}\",\n\t\t\t\t\t\t\tHex.toHexString(tx.getContractAddress()));\n\n\t\t\t\tVM vm = new VM();\n\t\t\t\tProgram program = new Program(initCode, programInvoke);\n\t\t\t\tvm.play(program);\n\t\t\t\tProgramResult result = program.getResult();\n\t\t\t\tapplyProgramResult(result, gasDebit, trackRepository,\n\t\t\t\t\t\tsenderAddress, tx.getContractAddress(), coinbase);\n\n\t\t\t} else {\n\n\t\t\t\tbyte[] programCode = trackRepository.getCode(tx\n\t\t\t\t\t\t.getReceiveAddress());\n\t\t\t\tif (programCode != null) {\n\n\t\t\t\t\tBlock lastBlock = blockchain.getLastBlock();\n\n\t\t\t\t\tif (logger.isInfoEnabled())\n\t\t\t\t\t\tlogger.info(\"calling for existing contract: addres={}\",\n\t\t\t\t\t\t\t\tHex.toHexString(tx.getReceiveAddress()));\n\n\t\t\t\t\tProgramInvoke programInvoke = ProgramInvokeFactory\n\t\t\t\t\t\t\t.createProgramInvoke(tx, lastBlock, trackRepository);\n\n\t\t\t\t\tVM vm = new VM();\n\t\t\t\t\tProgram program = new Program(programCode, programInvoke);\n\t\t\t\t\tvm.play(program);\n\n\t\t\t\t\tProgramResult result = program.getResult();\n\t\t\t\t\tapplyProgramResult(result, gasDebit, trackRepository,\n\t\t\t\t\t\t\tsenderAddress, tx.getReceiveAddress(), coinbase);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (RuntimeException e) {\n\t\t\ttrackRepository.rollback();\n\t\t\treturn;\n\t\t}\n\t\ttrackRepository.commit();\n\t\tpendingTransactions.put(Hex.toHexString(tx.getHash()), tx);\n\t}", "public void changeBalance (int amount){\n balance += amount;\n }", "public boolean deposit(String accountNumber, double amount) {\r\n\t\tif (!DaoUtility.isAccountNumberValid(accountNumber))\r\n\t\t\treturn false;\r\n\r\n\t\tConnection conn = null;\r\n\r\n\t\ttry {\r\n\t\t\tStatement st;\r\n\t\t\tResultSet rs;\r\n\t\t\tString sql;\r\n\r\n\t\t\tconn = dbConnector.getConnection();\r\n\t\t\tif (conn == null)\r\n\t\t\t\treturn false;\r\n\r\n\t\t\t// atomic operation\r\n\t\t\tst = conn.createStatement();\r\n\r\n\t\t\t// get the aid and old balance\r\n\t\t\tint aid = 0;\r\n\t\t\tdouble oldbalance = 0;\r\n\t\t\tsql = String.format(\r\n\t\t\t\t\t\"select * from tbAccount where acnumber='%s' \",\r\n\t\t\t\t\taccountNumber);\r\n\r\n\t\t\trs = st.executeQuery(sql);\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\taid = rs.getInt(\"aid\");\r\n\t\t\t\toldbalance = rs.getDouble(\"balance\");\r\n\t\t\t\tboolean isactive = rs.getBoolean(\"isactive\");\r\n\r\n\t\t\t\t// If the account is Frozen(isactive=false), then cannot\r\n\t\t\t\t// deposit.\r\n\t\t\t\tif (!isactive) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t// ac.balance += amount.\r\n\t\t\t// update tbAccount set balance='new balance' where\r\n\t\t\t// acnumber='acnumber'\r\n\t\t\tdouble newBalance = oldbalance + amount;\r\n\t\t\tsql = String.format(\r\n\t\t\t\t\t\"update tbAccount set balance=%f where acnumber='%s' \",\r\n\t\t\t\t\tnewBalance, accountNumber);\r\n\t\t\tst.addBatch(sql);\r\n\r\n\t\t\t// insert a transaction record\r\n\t\t\t// insert into tbTransaction(aid,trtype,amount,description)\r\n\t\t\t// values( select aid from tbAccount where acnumber='acnumber',\r\n\t\t\t// DEPOSIT_TRANSACTION_TYPE_ID,\r\n\t\t\t// amount, 'deposit 123.4 dollars on 2014-09-19')\r\n\t\t\t//\r\n\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\t\tjava.util.Date date = new java.util.Date();\r\n\t\t\tString currentDate = dateFormat.format(date); // 2014-08-06\r\n\r\n\t\t\tsql = String.format(\r\n\t\t\t\t\t\"insert into tbTransaction(aid,trtype,amount,description) \"\r\n\t\t\t\t\t\t\t+ \" values( %d, \" + \"\t\t\t%d, \"\r\n\t\t\t\t\t\t\t+ \"\t\t\t%f, 'deposit %.2f dollars on %s' ) \", aid,\r\n\t\t\t\t\tDEPOSIT_TRANSACTION_TYPE_ID, amount, amount, currentDate);\r\n\r\n\t\t\tst.addBatch(sql);\r\n\r\n\t\t\t// Execute transaction\r\n\t\t\tint[] nRes = st.executeBatch();\r\n\t\t\tif (nRes[1] > 0)\r\n\t\t\t\treturn true;\r\n\t\t\telse\r\n\t\t\t\treturn false;\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif (conn != null)\r\n\t\t\t\t\tconn.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}" ]
[ "0.65876895", "0.6194552", "0.6135718", "0.6085485", "0.604424", "0.58520544", "0.579975", "0.5775113", "0.57413006", "0.5735961", "0.57070583", "0.5685206", "0.56681305", "0.5640536", "0.5629838", "0.55923027", "0.558587", "0.55767006", "0.55732995", "0.5560807", "0.5555934", "0.5544009", "0.5523047", "0.5522206", "0.55157536", "0.54977053", "0.54731697", "0.546165", "0.5459799", "0.54583436", "0.54498905", "0.5421208", "0.5417769", "0.53995633", "0.5369693", "0.5365717", "0.53428525", "0.53392786", "0.5335778", "0.53197414", "0.5314985", "0.53096706", "0.53054726", "0.5300671", "0.52900076", "0.5288328", "0.5287967", "0.5274048", "0.5266826", "0.5249612", "0.5248071", "0.5244995", "0.5225603", "0.52083063", "0.5196279", "0.5182461", "0.5180095", "0.51757675", "0.5167237", "0.51634103", "0.5162419", "0.5162419", "0.5159172", "0.5157741", "0.5155631", "0.51553077", "0.5154223", "0.515346", "0.515346", "0.51280487", "0.5118365", "0.5117961", "0.5114364", "0.5114039", "0.5106219", "0.51033515", "0.51032484", "0.51030743", "0.5095909", "0.5090881", "0.50881016", "0.5087924", "0.508258", "0.50816476", "0.5081323", "0.5077089", "0.50770074", "0.50726", "0.5063104", "0.50625753", "0.5061031", "0.50574994", "0.5055654", "0.5053044", "0.5051009", "0.5049571", "0.50479656", "0.50430566", "0.50420225", "0.5041857", "0.50408524" ]
0.0
-1
Metodo....:getAlertaPorAgendamento Descricao.:Busca o status do alarme baseado nas configuracoes de agendamento ("scheduling")
private String getAlertaPorAgendamento(Evento ultimoEvento) { // Busca o tempo de atraso da ultima execucao com o agendamento especificado // Caso o alarme ainda nao possua eventos registrados entao nao considera este // para o estudo do tempo de atraso Date dtAtual = Calendar.getInstance().getTime(); Date dtUltExecucao = ultimoEvento.getDataExecucao(); Date dtProxExecucao = alarme.getAgendamento().getProximoAgendamento(dtUltExecucao); long atraso = (dtAtual.getTime() - dtProxExecucao.getTime())/1000/60; // O alerta padrao na verificacao por agendamento e o status OK, se existir atraso // entao verifica a faixa do atraso para identificar a gravidade do alarme (alerta ou falha) // porem sempre que considerado o atraso negativo significa que em relacao a data atual // o proximo agendamento nao esta atrasado String alerta = Alarme.ALARME_OK; // Verifica se o atraso se classifica como alerta if (atraso > 0 && atraso > alarme.getAtrasoMaxAlerta() && atraso < alarme.getAtrasoMaxFalha()) alerta = Alarme.ALARME_ALERTA; // Verifica se o atraso se classifica como falha if (atraso > 0 && atraso > alarme.getAtrasoMaxFalha()) alerta = Alarme.ALARME_FALHA; // Define o motivo do Alarme alarme.setMotivoAlarme(Alarme.MOTIVO_ATRASO); logger.debug(alarme.getIdAlarme()+" - Atraso:"+atraso); return alerta; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getAlertaPorStatusExecucao(Evento ultimoEvento)\n\t{\n\t\t// O alerta padrao sera o status atual do alarme, dependendo do valor do atraso esse alerta pode ser modificado\n\t\tString alerta = Alarme.ALARME_OK;\n\t\t// No caso de status de execucao, o alarme possui somente dois estados\n\t\t// Ok ou Nao Ok que entao se classifica como OK ou FALHA\n\t\tif (ultimoEvento.getCodigoRetorno() != Alarme.CODIGO_RETORNO_OK)\n\t\t\talerta = Alarme.ALARME_FALHA;\n\t\t\n\t\t// Define o motivo do Alarme\n\t\talarme.setMotivoAlarme(Alarme.MOTIVO_RETORNO);\n\n\t\tlogger.debug(alarme.getIdAlarme()+\" - CodigoRetorno:\"+ultimoEvento.getCodigoRetorno());\n\t\treturn alerta;\n\t}", "private String getStatusAlarme(Evento ultimoEvento)\n\t{\n\t\t// Se o ultimo evento nao existir para um dado alarme entao o novo status \n\t\t// sera o mesmo status atual definido para o alarme. Portanto a analise sera\n\t\t// feita somente se existir um ultimo evento\n\t\tString statusAlarme = alarme.getStatus();\n\t\tif (ultimoEvento != null)\n\t\t{\n\t\t\t// Busca o valor do alarme ALERTA,FALHA ou OK para o alarme em processamento\n\t\t\t// dependendo de suas configuracoes com relacao a \"scheduling\" (agendamento de datas)\n\t\t\tstatusAlarme = getAlertaPorAgendamento(ultimoEvento);\n\t\t\t\n\t\t\t// Se o status for diferente de OK entao ja atualiza este na tabela para indicar o alerta\n\t\t\t// desse alarme. Caso contrario entao as verificacoes por valores e por resposta serao\n\t\t\t// verificados.\n\t\t\tif (statusAlarme.equals(Alarme.ALARME_OK))\n\t\t\t{\n\t\t\t\tstatusAlarme = getAlertaPorValor(ultimoEvento);\n\t\t\t\t// Caso o status por valor seja ok entao verifica por status da ultima execucao.\n\t\t\t\t// No caso do status ser diferente de ok entao este ja vai para a tabela\n\t\t\t\tif (statusAlarme.equals(Alarme.ALARME_OK))\n\t\t\t\t\tstatusAlarme = getAlertaPorStatusExecucao(ultimoEvento);\n\t\t\t}\n\t\t}\n\t\treturn statusAlarme;\n\t}", "private String getAlertaPorValor(Evento ultimoEvento)\n\t{\n\t\t// O alerta padrao sera o status OK, dependendo do valor do atraso esse alerta pode ser modificado\n\t\tString alerta = Alarme.ALARME_OK;\n\n\t\t// Verifica se o contador classifica como alerta\n\t\tdouble valor = ultimoEvento.getValorContador();\n\t\t// Verifica se o contador classifica como alerta pelo valor minimo ou maximo\n\t\tif ( valor > alarme.getValorMinFalha() && valor < alarme.getValorMinAlerta() )\n\t\t{\n\t\t\talerta = Alarme.ALARME_ALERTA;\n\t\t\talarme.setMotivoAlarme(Alarme.MOTIVO_VALOR_MIN);\n\t\t}\n\t\telse if ( valor > alarme.getValorMaxAlerta() && valor < alarme.getValorMaxFalha() )\n\t\t\t{\n\t\t\t\talerta = Alarme.ALARME_ALERTA;\n\t\t\t\talarme.setMotivoAlarme(Alarme.MOTIVO_VALOR_MAX);\n\t\t\t}\n\n\t\t// Verifica se o contador classifica como falha. Devido a hierarquia de erro\n\t\t// o teste para falha e feito posterior pois logicamente tem uma gravidade superior\n\t\tif ( valor < alarme.getValorMinFalha() )\n\t\t{\n\t\t\talerta = Alarme.ALARME_FALHA;\n\t\t\talarme.setMotivoAlarme(Alarme.MOTIVO_VALOR_MIN);\n\t\t}\n\t\telse if ( valor > alarme.getValorMaxFalha() )\n\t\t\t{\n\t\t\t\talerta = Alarme.ALARME_FALHA;\n\t\t\t\talarme.setMotivoAlarme(Alarme.MOTIVO_VALOR_MAX);\n\t\t\t}\n\n\t\tlogger.debug(alarme.getIdAlarme()+\" - Contador:\"+valor);\n\t\treturn alerta;\n\t}", "public String getAstatus() {\n return astatus;\n }", "public void atualizarStatusAgendamento() {\n\n if (agendamentoLogic.editarStatusTbagendamento(tbagendamentoSelected, tbtipostatusagendamento)) {\n AbstractFacesContextUtils.addMessageInfo(\"Status atualizado com sucesso.\");\n } else {\n AbstractFacesContextUtils.addMessageWarn(\"Falhar ao alterar status do agendamento.\");\n }\n }", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic List<RAlarmLog> getAlarmAlert(String sdateF, String sdateT,\r\n\t\t\tString edateF, String edateT, String bscid, String cellid,\r\n\t\t\tString vendor, String district, String alarmName, String function,\r\n\t\t\tString severity, String netWork, String username, String province,\r\n\t\t\tString team, String alarmType, String alarmMappingName,\r\n\t\t\tString statusFinish, String statusView,\r\n\t\t\tString region, String unAlarmMappingName) {\r\n\t\tMap<String, Object> parms = new HashMap<String, Object>();\r\n \t\tparms.put(\"P_SDATE_FROM\", sdateF);\r\n \t\tparms.put(\"P_SDATE_TO\", sdateT);\r\n \t\tparms.put(\"P_EDATE_FROM\", edateF);\r\n \t\tparms.put(\"P_EDATE_TO\", edateT);\r\n \t\tparms.put(\"P_NE\", bscid);\r\n \t\tparms.put(\"P_CELLID\", cellid);\r\n \t\tparms.put(\"P_VENDOR\", vendor);\r\n \t\tparms.put(\"P_DISTRICT\", district);\r\n \t\tparms.put(\"P_ALARM_NAME\", alarmName);\r\n \t\tparms.put(\"P_NETWORK\", netWork);\r\n \t\tparms.put(\"P_SEVERITY\", severity);\r\n \t\tparms.put(\"P_TYPE\",function );\r\n \t\tparms.put(\"P_USERNAME\", username);\r\n \t\tparms.put(\"P_PROVINCE\", province);\r\n \t\tparms.put(\"P_TEAM\", team);\r\n \t\tparms.put(\"P_ALARM_TYPE\", alarmType);\r\n \t\tparms.put(\"P_ALARM_MAPPING_NAME\", alarmMappingName);\r\n \t\tparms.put(\"P_STATUS_FINISH\", statusFinish);\r\n \t\tparms.put(\"P_STATUS_VIEW\", statusView);\r\n \t\tparms.put(\"P_REGION\", region);\r\n \t\tparms.put(\"P_UN_ALARM_MAPPING\", unAlarmMappingName);\r\n \t\tparms.put(\"P_DATA\", null);\r\n \t\treturn getSqlMapClientTemplate().queryForList(\"R_ALARM_LOG.getAlarmAlert\", parms);\r\n\t}", "@Override\n public String getPeopleStatusAttending() {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"getPeopleStatusAttending\");\n }\n\n List<ConnectathonParticipant> listOfCP = null;\n Integer iVendor = 0;\n Integer iMonitor = 0;\n Integer iCommittee = 0;\n Integer iVisitor = 0;\n\n if (Role.isLoggedUserAdmin() || Role.isLoggedUserProjectManager() || Role.isLoggedUserMonitor()) {\n\n EntityManager em = EntityManagerService.provideEntityManager();\n\n choosenInstitutionForAdmin = (Institution) Component.getInstance(CHOOSEN_INSTITUTION_FOR_ADMIN);\n\n if (choosenInstitutionForAdmin != null) {\n return \"Vendor\";\n } else {\n Query query = em\n .createQuery(\"SELECT cp FROM ConnectathonParticipant cp WHERE cp.testingSession = :inTestingSession\");\n query.setParameter(IN_TESTING_SESSION, TestingSession.getSelectedTestingSession());\n listOfCP = query.getResultList();\n }\n } else {\n return \"Vendor\";\n }\n\n for (ConnectathonParticipant cp : listOfCP) {\n if (cp.getConnectathonParticipantStatus().getId().compareTo(ConnectathonParticipantStatus.STATUS_VENDOR) == 0) {\n iVendor++;\n } else if (cp.getConnectathonParticipantStatus().getId()\n .compareTo(ConnectathonParticipantStatus.STATUS_MONITOR) == 0) {\n iMonitor++;\n } else if (cp.getConnectathonParticipantStatus().getId()\n .compareTo(ConnectathonParticipantStatus.STATUS_COMMITTEE) == 0) {\n iCommittee++;\n } else if (cp.getConnectathonParticipantStatus().getId()\n .compareTo(ConnectathonParticipantStatus.STATUS_VISITOR) == 0) {\n iVisitor++;\n } else {\n LOG.error(\"getPeopleStatusAttending - Status not found !!!!\"\n + cp.getConnectathonParticipantStatus().getId());\n }\n }\n\n String returnedString = \"<br/>\" + iVendor + \" Vendors<br/> \" + iMonitor + \" Monitors<br/> \" + iCommittee + \" Committees<br/> \"\n + iVisitor + \" Visitors\";\n\n return returnedString;\n }", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic List<Integer> getIdAlarmAlert(String sdateF, String sdateT, String edateF,\r\n\t\t\tString edateT, String bscid, String cellid, String vendor,\r\n\t\t\tString district, String alarmName, String function,\r\n\t\t\tString severity, String netWork, String username, String province,\r\n\t\t\tString team, String alarmType, String alarmMappingName,\r\n\t\t\tString statusFinish, String statusView, \r\n\t\t\tString region, String unAlarmMappingName) {\r\n\t\tMap<String, Object> parms = new HashMap<String, Object>();\r\n \t\tparms.put(\"P_SDATE_FROM\", sdateF);\r\n \t\tparms.put(\"P_SDATE_TO\", sdateT);\r\n \t\tparms.put(\"P_EDATE_FROM\", edateF);\r\n \t\tparms.put(\"P_EDATE_TO\", edateT);\r\n \t\tparms.put(\"P_NE\", bscid);\r\n \t\tparms.put(\"P_CELLID\", cellid);\r\n \t\tparms.put(\"P_VENDOR\", vendor);\r\n \t\tparms.put(\"P_DISTRICT\", district);\r\n \t\tparms.put(\"P_ALARM_NAME\", alarmName);\r\n \t\tparms.put(\"P_NETWORK\", netWork);\r\n \t\tparms.put(\"P_SEVERITY\", severity);\r\n \t\tparms.put(\"P_TYPE\",function );\r\n \t\tparms.put(\"P_USERNAME\", username);\r\n \t\tparms.put(\"P_PROVINCE\", province);\r\n \t\tparms.put(\"P_TEAM\", team);\r\n \t\tparms.put(\"P_ALARM_TYPE\", alarmType);\r\n \t\tparms.put(\"P_ALARM_MAPPING_NAME\", alarmMappingName);\r\n \t\tparms.put(\"P_STATUS_FINISH\", statusFinish);\r\n \t\tparms.put(\"P_STATUS_VIEW\", statusView);\r\n \t\tparms.put(\"P_REGION\", region);\r\n \t\tparms.put(\"P_UN_ALARM_MAPPING\", unAlarmMappingName);\r\n \t\tparms.put(\"P_DATA\", null);\r\n \t\treturn getSqlMapClientTemplate().queryForList(\"R_ALARM_LOG.getIdAlarmAlert\", parms);\r\n\t}", "public List<Appointment> getAppointmentByStatus(AppointmentStatus a){\n List<Appointment> appList = new ArrayList();\n try{\n appointments.stream().filter((app) -> (app.getStatus()==a)).forEachOrdered((app) -> {\n appList.add(app);\n });\n return appList;\n }\n catch(Exception e){\n return appList;\n }\n }", "public void alertaAgendamentoDeEvento(final Activity activity, String titulo, String conteudo,\n String botaoPositivo, String botaoNegativo, final MPalestra mPalestra) {\n AlertDialog.Builder builder = new AlertDialog.Builder(activity);\n //define o titulo\n builder.setTitle(titulo);\n //define a mensagem\n builder.setMessage(conteudo);\n //define um botão como positivo\n builder.setPositiveButton(botaoPositivo, (arg0, arg1) -> oGestorDeEventos.adicionarEvento(activity, mPalestra));\n //define um botão como negativo.\n builder.setNegativeButton(botaoNegativo, (arg0, arg1) -> alerta.dismiss());\n //cria o AlertDialog\n alerta = builder.create();\n //Exibe\n alerta.show();\n }", "public java.lang.String getAlertaId() {\n\t\treturn _pnaAlerta.getAlertaId();\n\t}", "public int getAlarmStatus() {\n return alarmStatus;\n }", "@Override\n\tpublic kus.eventy.decorator.Alert getAlert() {\n\t\treturn sA;\n\t}", "public interface AlertService\r\n{\r\n\tpublic static final String REF_ALERT_MESSAGE_ID = \"BALERT_MESSAGE_SEQ\";\r\n\r\n\tpublic static final String REF_ALERT_RECIPIENT_ID = \"XALERT_RECIPIENT_SEQ\";\r\n\r\n\tpublic static final String ALERT_MESSAGE_ID = \"XDISPALERT_RECIPIENT_SEQ\";\r\n\t\r\n\tpublic static final String TIME_ALERT_ID = \"BTIMEALERTCAPS_SEQ\" ;\r\n\r\n\tpublic static final String ALERT_TYPE_MESSAGE = \"Alert Message\";\r\n\r\n\tpublic static final String ALERT_TYPE_EMAIL = \"Email\";\r\n\r\n\tpublic static final String ALERT_ALERT_AUDIT = \"SystemAlert\";\r\n\r\n\tpublic static final String ALERT_EMAIL_AUDIT = \"SystemEmail\";\r\n\r\n\tpublic static final String RECIPIENT_TYPE_OF_AGENCY = \"agency\";\r\n\r\n\tpublic static final String RECIPIENT_TYPE_OF_MODULE = \"module\";\r\n\r\n\tpublic static final String RECIPIENT_TYPE_OF_GROUP = \"group\";\r\n\r\n\tpublic static final String RECIPIENT_TYPE_OF_STAFF = \"staff\";\r\n\r\n\tpublic static final String RECIPIENT_TYPE_OF_DEPARTMENT = \"department\";\r\n\r\n\tpublic static final int RECIPIENT_RANGE_ASSIGN = 0; //recipients by\r\n\r\n\t// assigning\r\n\r\n\tpublic static final int RECIPIENT_RANGE_CONTACTS = 1; //recipients which\r\n\r\n\t// are\r\n\t// external(contacts)\r\n\t// of alert\r\n\r\n\tpublic static final int RECIPIENT_RANGE_ALL = 2; //recipients include\r\n\r\n\t// assign and contacts\r\n\r\n\tpublic static final String CURRENT_TIME = \"currentTime\";\r\n\r\n\tpublic static final int AUDIT_STATUS_ALL = 0;\r\n\r\n\tpublic static final int AUDIT_STATUS_ENABLED = 1;\r\n\r\n\tpublic static final int AUDIT_STATUS_DISABLED = 2;\r\n\r\n\tpublic static final String EXTERNAL_RECIPIENT_CONTACT = \"Contacts\";\r\n\t\r\n\tpublic static final String TIME_ALERT_FLAG = \"TIMEALERT_FLAG\";\r\n\t\r\n\r\n\t/**\r\n\t * Admin creates a new ref alert message.\r\n\t * @param model The ref alert message in admin side. \r\n\t * @return Return the ref alert message model if it is created successfully.\r\n\t * @throws AAException Throws AAException if meet any database operation exceptions.\r\n\t * @throws RemoteException If any remove exception occurs.\r\n\t */\r\n\tpublic RefAlertMessageModel createRefAlertMessage(RefAlertMessageModel model) throws AAException, RemoteException;\r\n\r\n\t/**\r\n\t * Update an exist ref alert message.\r\n\t * @param model The ref alert message object to be updated.\r\n\t * @return Return the ref alert message object if it is updated successfully.\r\n\t * @throws AAException Throws AAException if meet any database operation exceptions.\r\n\t * @throws RemoteException If any remove exception occurs.\r\n\t */\r\n\tpublic RefAlertMessageModel updateRefAlertMessage(RefAlertMessageModel model) throws AAException, RemoteException;\r\n\r\n\t/**\r\n\t * Remove the ref alert message by its PKs.\r\n\t * @param serviceProviderCode The service provider code.\r\n\t * @param alertMessageID The alert message id of the alert.\r\n\t * @throws AAException Throws AAException if meet any database operation exceptions.\r\n\t * @throws RemoteException If any remove exception occurs.\r\n\t */\r\n\tpublic void removeRefAlertMessageByPK(String serviceProviderCode, Long alertMessageID) throws AAException,\r\n\t\t\tRemoteException;\r\n\r\n\t/**\r\n\t * Get the ref alert message by its PKs.\r\n\t * @param servProdCode The service provider code.\r\n\t * @param messageID The unique alert message id.\r\n\t * @return Return the ref alert message object by its PKs.\r\n\t * @throws AAException Throws AAException if meet any database operation exceptions.\r\n\t * @throws RemoteException If any remove exception occurs.\r\n\t */\r\n\tpublic RefAlertMessageModel getRefAlertMessageByPK(String servProdCode, Long messageID) throws AAException,\r\n\t\t\tRemoteException;\r\n\r\n\t/**\r\n\t * Retrieve the ref alert message objects which associated with supplied rules. \r\n\t * @param serviceProviderCode The service provider code.\r\n\t * @param ruleID The supplied rule id.\r\n\t * @param auditStatus The rec status value.\r\n\t * @return Return the collection of avaiable ref alert messages.\r\n\t * @throws AAException Throws AAException if meet any database operation exceptions.\r\n\t * @throws RemoteException If any remove exception occurs.\r\n\t */\r\n\tpublic Collection getRefAlertMessagesByRuleID(String serviceProviderCode, Long ruleID, int auditStatus)\r\n\t\t\tthrows AAException, RemoteException;\r\n\r\n\t/**\r\n\t * Get the ref alert message list in an agency.\r\n\t * @param servProdCode The agency code to be queried.\r\n\t * @return Return the collection of avaible ref alert message list. \r\n\t * @throws AAException Throws AAException if meet any database operation exceptions.\r\n\t * @throws RemoteException If any remove exception occurs.\r\n\t */\r\n\tpublic Collection getRefAlertMessageListByAgency(String servProdCode) throws AAException, RemoteException;\r\n\t/**\r\n\t * Get the the resource data of ref alert message by original alert's Resource Id.\r\n\t * @param servProdCode The agency code to be queried.\r\n\t * @param resId Resource Id\r\n\t * @return Return the collection of avaible ref alert message list. \r\n\t * @throws AAException Throws AAException if meet any database operation exceptions.\r\n\t * @throws RemoteException If any remove exception occurs.\r\n\t */\r\n\tpublic Collection getRefAlertMessageListI18NByResId(String servProdCode,Long resId) throws AAException, RemoteException;\r\n\t\r\n\t/**\r\n\t * New a ref alert recipient, it is an assignment action.\r\n\t * @param model The ref alert recipient model to be created.\r\n\t * @return Return a new ref alert recipient model if it is created successfully. \r\n\t * @throws AAException Throws AAException if meet any database operation exceptions.\r\n\t * @throws RemoteException If any remove exception occurs.\r\n\t */\r\n\tpublic RefAlertRecipientModel createRefAlertRecipient(RefAlertRecipientModel model) throws AAException,\r\n\t\t\tRemoteException;\r\n\r\n\t/**\r\n\t * Remove the ref alert recipient by its PKs.\r\n\t * @param serviceProviderCode The service provider code.\r\n\t * @param recipientID The recipient id to be remove.\r\n\t * @throws AAException Throws AAException if meet any database operation exceptions.\r\n\t * @throws RemoteException If any remove exception occurs.\r\n\t */\r\n\tpublic void removeRefAlertRecipientByPK(String serviceProviderCode, Long recipientID) throws AAException,\r\n\t\t\tRemoteException;\r\n\r\n\t/**\r\n\t * Get the ref alert recipient model by its PKs.\r\n\t * @param servProdCode The service provider code.\r\n\t * @param messageID the unique alert message ID.\r\n\t * @param alertRecipientID The unique alert recipient ID.\r\n\t * @return Return the ref alert recipient model by its PKs.\r\n\t * @throws AAException Throws AAException if meet any database operation exceptions.\r\n\t * @throws RemoteException If any remove exception occurs.\r\n\t */\r\n\tpublic RefAlertRecipientModel getRefAlertRecipientByPK(String servProdCode, Long messageID, Long alertRecipientID)\r\n\t\t\tthrows AAException, RemoteException;\r\n\r\n\t/**\r\n\t * Retrieving all the alert recipients of this alert message.\r\n\t * \r\n\t * @param serviceProviderCode The service provide code.\r\n\t * @param alertID The alert ID.\r\n\t * @param resultRange\r\n\t * 0 -recipient 2- all include contancts of cap.\r\n\t * @return Collection Return the list of avaibale recipients.\r\n\t * @throws AAException Throws AAException if meet any database operation exceptions.\r\n\t * @throws RemoteException If any remove exception occurs.\r\n\t */\r\n\tpublic Collection getRefRecipientsByAlertID(String serviceProviderCode, Long alertID, int range)\r\n\t\t\tthrows AAException, RemoteException;\r\n\r\n\t/**\r\n\t * Retrieving all the external recipients of this alert message.\r\n\t * @param serviceProviderCode The service provider code.\r\n\t * @param alertID The alert ID.\r\n\t * @return String Return the external recipients' value.\r\n\t * @throws AAException Throws AAException if meet any database operation exceptions.\r\n\t * @throws RemoteException If any remove exception occurs.\r\n\t */\r\n\tpublic String getExternalRecipients(String serviceProviderCode, Long alertID) throws AAException, RemoteException;\r\n\r\n\t/**\r\n\t * Create a new ref alert rule.\r\n\t * @param model The ref alert rule object be created.\r\n\t * @return Return the ref alert rule object if it is created successfully.\r\n\t * @throws AAException Throws AAException if meet any database operation exceptions.\r\n\t * @throws RemoteException If any remove exception occurs.\r\n\t */\r\n\tpublic RefAlertRuleModel createRefAlertRule(RefAlertRuleModel model) throws AAException, RemoteException;\r\n\r\n\t/**\r\n\t * Create a list of ref alert rule objects.\r\n\t * @param refAlertRules The ref alert rule objects which is supplied by an array.\r\n\t * @return Return the list of ref alert rule object just created, they return as an array.\r\n\t * @throws AAException Throws AAException if meet any database operation exceptions.\r\n\t * @throws RemoteException If any remove exception occurs.\r\n\t */\r\n\tpublic RefAlertRuleModel[] createRefAlertRule(RefAlertRuleModel[] refAlertRules) throws AAException,\r\n\t\t\tRemoteException;\r\n\r\n\t/**\r\n\t * Remove ref alert rule object by its PKs.\r\n\t * @param serviceProviderCode The service provider code.\r\n\t * @param ruleID The unique rule id of the rule. \r\n\t * @param ruleMessageID The rule message ID.\r\n\t * @param callerID The user full name who call this method.\r\n\t * @throws AAException Throws AAException if meet any database operation exceptions.\r\n\t * @throws RemoteException If any remove exception occurs.\r\n\t */\r\n\tpublic void removeRefAlertRuleByPK(String serviceProviderCode, Long ruleID, Long ruleMessageID, String callerID)\r\n\t\t\tthrows AAException, RemoteException;\r\n\r\n\t/**\r\n\t * Remove the rule by its ID.\r\n\t * @param serviceProviderCode The service provider code.\r\n\t * @param ruleID the rule id to be removed.\r\n\t * @throws AAException Throws AAException if meet any database operation exceptions.\r\n\t * @throws RemoteException If any remove exception occurs.\r\n\t */\r\n\tpublic void removeByRuleID(String serviceProviderCode, Long ruleID) throws AAException, RemoteException;\r\n\r\n\t/**\r\n\t * Get the ref alert rule by its PKs.\r\n\t * @param servProdCode The service provider code.\r\n\t * @param ruleID The unique rule id.\r\n\t * @param ruleMessageID The rule message id.\r\n\t * @return Return the ref alert rule model by its PKs.\r\n\t * @throws AAException Throws AAException if meet any database operation exceptions.\r\n\t * @throws RemoteException If any remove exception occurs.\r\n\t */\r\n\tpublic RefAlertRuleModel getRefAlertRuleByPK(String servProdCode, Long ruleID, Long ruleMessageID)\r\n\t\t\tthrows AAException, RemoteException;\r\n\r\n\t/**\r\n\t * Get ref alert rule list by its rule ID.\r\n\t * @param serviceProviderCode The service provider code.\r\n\t * @param ruleID The rule id to be queried.\r\n\t * @return The collection of ref alert rule list.\r\n\t * @throws AAException Throws AAException if meet any database operation exceptions.\r\n\t * @throws RemoteException If any remove exception occurs.\r\n\t */\r\n\tpublic Collection getRefAlertRuleListByRuleID(String serviceProviderCode, Long ruleID) throws AAException,\r\n\t\t\tRemoteException;\r\n\r\n\t/**\r\n\t * Get the ref alert rule list by alert ID.\r\n\t * @param serviceProviderCode The service provider code.\r\n\t * @param ruleMessageID The rule message id to be queried.\r\n\t * @return Return the collection of ref alert rule list.\r\n\t * @throws AAException Throws AAException if meet any database operation exceptions.\r\n\t * @throws RemoteException If any remove exception occurs.\r\n\t */\r\n\tpublic Collection getRefAlertRuleListByAlertID(String serviceProviderCode, Long ruleMessageID) throws AAException,\r\n\t\t\tRemoteException;\r\n\r\n\t/**\r\n\t * Get client user's alert message by his/her assigned rules.\r\n\t * @param gaUserID The user's ga user id.\r\n\t * @param userDept The user's department code.\r\n\t * @param serviceProviderCode The user's service provider code.\r\n\t * @return Return the collection of user's alert messages.\r\n\t * @throws AAException Throws AAException if meet any database operation exceptions.\r\n\t * @throws RemoteException If any remove exception occurs.\r\n\t */\r\n\tpublic Collection getAlertMessageByRule(String gaUserID, String serviceProviderCode)\r\n\t\t\tthrows AAException, RemoteException;\r\n\r\n\t/**\r\n\t * Get the list of alert messages by its associated Time Alert ID. \r\n\t * @param serviceProviderCode The service provider code.\r\n\t * @param timeAlertID.\r\n\t * @return Return a list of alert message that associate with the supplied SR.\r\n\t * @throws AAException Throws AAException if meet any database operation exceptions.\r\n\t * @throws RemoteException If any remove exception occurs.\r\n\t */\r\n\tpublic Collection getAlertMessageByTimeAlertID(String serviceProviderCode, Long timeAlertID) throws AAException,RemoteException;\r\n\t\r\n\t/**\r\n\t * \r\n\t * @param serviceProviderCode\r\n\t * @param timeAlertID\r\n\t * @param type\r\n\t * @param key\r\n\t * @param alertID\r\n\t * @param messageType\r\n\t * @return\r\n\t * @throws AAException\r\n\t * @throws RemoteException\r\n\t */\r\n\tpublic AlertMessageModel getAlertMessageModel(String serviceProviderCode, Long timeAlertID, String type, String key, String alertID, String messageType) throws AAException,RemoteException;\r\n\t\r\n\t/**\r\n\t * Create a new client user's alert message.\r\n\t * @param alertMessage The alert message model to be created.\r\n\t * @return Return the alert message just created.\r\n\t * @throws AAException Throws AAException if meet any database operation exceptions.\r\n\t * @throws RemoteException If any remove exception occurs.\r\n\t */\r\n\tpublic AlertMessageModel createAlertMessage(AlertMessageModel alertMessage) throws AAException, RemoteException;\r\n\t\r\n\t/**\r\n\t * Create a collection of new client user's alert message.\r\n\t * @param alertmessages\r\n\t * @return Return the alert message just created.\r\n\t * @throws AAException Throws AAException if meet any database operation exceptions.\r\n\t * @throws RemoteException If any remove exception occurs.\r\n\t */\r\n\tpublic void createAlertMessage(Collection alertMessages) throws AAException, RemoteException;\r\n\t\r\n\tpublic void createAlertMessage(Collection alertMessages, Collection mergeMessages) throws AAException, RemoteException;\r\n\t\r\n\t/**\r\n\t * Remove the alert message by its rule ID.\r\n\t * @param serviceProviderCode The service provider code.\r\n\t * @param ruleID The rule id to be removed.\r\n\t * @throws AAException Throws AAException if meet any database operation exceptions.\r\n\t * @throws RemoteException If any remove exception occurs.\r\n\t */\r\n\tpublic void removeAlertByRuleID(String serviceProviderCode, Long ruleID) throws AAException, RemoteException;\r\n\r\n\t/**\r\n\t * Remove client user's displayable alerts by the display ID.\r\n\t * @param serviceProviderCode The service provider code.\r\n\t * @param displayAlertID The display alert id to be removed.\r\n\t * @param gaUserId The user's ga user id.\r\n\t * @throws AAException Throws AAException if meet any database operation exceptions.\r\n\t * @throws RemoteException If any remove exception occurs.\r\n\t */\r\n\tpublic void removeDisplayAlertByDisplayID(String serviceProviderCode, Long displayAlertID, String gaUserId) throws AAException, RemoteException;\r\n\tpublic Collection getAlertRuleByAgency(String servProvCode,Collection alertList) throws AAException, RemoteException;\r\n\t\r\n\t/**\r\n\t * get the alert recipient by agency. \r\n\t * @param servProvCode\r\n\t * the service provider code.\r\n\t * @param alertList the alert data list \r\n\t * @return the alertRecipientModel model collection.\r\n\t * @throws AAException\r\n\t * @throws RemoteException\r\n\t */\r\n\tpublic Collection getAlertRecipientByAgency(String servProvCode,Collection alertList) throws AAException, RemoteException;\r\n\t\r\n\t/**\r\n\t * get the alert recipient by alertID. \r\n\t * @param servProvCode\r\n\t * the service provider code.\r\n\t * @param arlertid the alert id. \r\n\t * @return the alertRecipientModel model collection.\r\n\t * @throws AAException\r\n\t * @throws RemoteException\r\n\t */\r\n\tpublic Collection getRefRecipientByAlertID(String servProvCode,Long alertID) throws AAException, RemoteException;\r\n\t\r\n\t/**\r\n\t * Import data into database by the data collections.\r\n\t * \r\n\t * \r\n\t * @param servProvCode\r\n\t * The service provider code.\r\n\t * @param alerts\r\n\t * The alerts data list.\r\n\t * @param recipients\r\n\t * The alert recipients data list.\r\n\t * @param alertRules\r\n\t * The alert rules data list.\r\n\t * @param rules\r\n\t * The rules data list.\r\n\t * @param ruleElements\r\n\t * the rule elements data list\r\n\t * @param userId\r\n\t * The operation user id.\r\n\t * @throws AAException\r\n\t * Due to any Exception occurs in data operation.\r\n\t */\r\n\tpublic void importAlerts(String servProvCode, Collection alerts, Collection recipients, Collection alertRules, Collection rules, Collection ruleElements, String userId) throws AAException, RemoteException;\r\n\t\r\n\t\r\n\t//*********************************************************************************************\r\n\t//******************* BTIMEALERTCAPS business methods *******************************\r\n\t//*********************************************************************************************\r\n\t\r\n\t/**\r\n * Create new time alert cap into pool.\r\n * @param timeAlertCapModel The time alert cap model to be created.\r\n * @throws AAException Throws if there is any database exceptions occurs.\r\n * @throws RemoteException Throws due to any remote exceptions\r\n */\r\n public void createTimeAlertCap(TimeAlertCapModel timeAlertCapModel) throws AAException, RemoteException;\r\n \r\n /**\r\n * Create a list of time alert caps.\r\n * @param timeAlertCaps A list of time alert caps to be created.\r\n * @throws AAException Throws if there is any database exceptions occurs.\r\n * @throws RemoteException Throws due to any remote exceptions\r\n */\r\n public void createTimeAlertCaps(Collection timeAlertCaps) throws AAException, RemoteException;\r\n \r\n /**\r\n * @param serviceProviderCode\r\n * @param timeAlertID\r\n * @return\r\n * @throws AAException\r\n * @throws RemoteException\r\n */\r\n public TimeAlertCapModel getTimeAlertCapByPK(String serviceProviderCode, Long timeAlertID) throws AAException, RemoteException;\r\n \r\n /**\r\n * \r\n * @param timeAlert\r\n * @throws AAException\r\n * @throws RemoteException\r\n */\r\n public void updateTimeAlertCap(TimeAlertCapModel timeAlert) throws AAException, RemoteException;\r\n \r\n /**\r\n * Retrieve all the time alert caps in the agency\r\n * @param servProvCode The agnecy code to be query\r\n * @return All of the time alert caps in the agency\r\n * @throws AAException Throws if there is any database exceptions occurs.\r\n * @throws RemoteException Throws due to any remote exceptions\r\n */\r\n public Collection getAllTimeAlertCaps(String servProvCode) throws AAException, RemoteException;\r\n \r\n /**\r\n * Remove all the idle(unsettled for a long time) time alert caps in the pool\r\n * @param servProvCode The agency code for time alert caps\r\n * @param interval The idle time for removing\r\n * @throws AAException Throws if there is any database exceptions occurs.\r\n * @throws RemoteException Throws due to any remote exceptions\r\n */\r\n public void removeIdleTimeAlertCaps(String servProvCode, Long interval) throws AAException, RemoteException;\r\n \r\n\t\r\n\t/**\r\n\t * \r\n\t * get AlertMessageModel by displayAlertID\r\n\t *\r\n\t * @param spc\r\n\t * @param displayAlertID\r\n\t * @param alertID\r\n\t * @return\r\n\t * @throws AAException\r\n\t */\r\n\tpublic AlertMessageModel getAlertMessageModel(String spc, String displayAlertID, String alertID) throws AAException;\r\n \r\n}", "public void setAlerta(int _alerta) {\r\n\t\tthis.alerta = _alerta;\r\n\t}", "@Override\r\n\tprotected Admin_Alertas getAdminAlertas() {\n\t\treturn null;\r\n\t}", "public void startAgentAlertChange() {\n // referencia la fecha que determina la alerta actual\n Timer timer = new Timer(SIBAConst.TIME_AGENT_ALERT_CHANGE, new ActionListener() {\n \t\n public void actionPerformed(ActionEvent e) {\n \t//System.out.println(\"Entro aqui general 900: \"+controlFlagGeneral.alerta());\n \t//System.out.println(\"Entro aqui personal 900: \"+controlFlagPersonal.alerta());\n //if (controlFlagGeneral.alerta() || getControlFlagPersonal().alerta()) {\n if (controlFlagGeneral.alerta().equals(true)) { \t\n // activada banderas de carga de nuevos archivos XML\n \tSystem.out.println(\"Se ha modificado la bandera General\");\n removeLastProgramation = true;\n alreadyChange = false;\n }\n else if(controlFlagPersonal.alerta().equals(true))\n {\n // activada banderas de carga de nuevos archivos XML\n \tSystem.out.println(\"Se ha modificado la bandera Personal\");\n removeLastProgramation = true;\n alreadyChange = false;\n }\n else\n {\n \tSystem.out.println(\"No se han modificado las banderas\");\n }\n }\n });\n timer.start();\n }", "public String meinStatus() {\n try {\n System.out.println(\"--------------------STATUS--------------------\");\n System.out.println(\"Spielfigur: \" + spielfigur);\n System.out.println(\"Kontostand: \" + kontostand);\n System.out.println(\"Aktuell befindest du dich auf: \" + this.aktuellesFeldName.getFeldname());\n\n System.out.println(\"Folgende Felder sind in deinem Besitz :\");\n System.out.println(\"----------------------------------------\");\n for (Spielfelder s : felderInBesitz) {\n\n System.out.println(\"Feldname: \" + s.getFeldname());\n System.out.println(\"Feldummer: \" + s.getFeldnummer());\n\n if (s instanceof Straße) {\n Straße bf = (Straße) s;\n System.out.println(\"Farbe: \" + bf.getFarbe());\n System.out.println(\"Häuser: \" + bf.getAnzahlHaeuser());\n System.out.println(\"Hotels: \" + bf.getAnzahlHotels());\n\n }\n System.out.println(\"----------------------------------------\");\n }\n System.out.println(\"--------------------STATUS ENDE--------------------\");\n System.out.println(\"Gebe JA ein um letzte Aktion durchzuführen\");\n return br.readLine();\n } catch (IOException ex) {\n Logger.getLogger(Spieler.class.getName()).log(Level.SEVERE, null, ex);\n }\n return \"\";\n }", "@GetMapping(\"{id}\")\n\tprotected ResponseEntity<Alerta> consultarAlertaById(@PathVariable(\"id\") Integer idAlerta){\n\t\t\n\t\t\n\t\tAlerta alerta = service.consultarAlertaById(idAlerta);\n\t\t\n\t\tif(alerta == null)\n\t\t\treturn ResponseEntity.notFound().build();\n\t\t\n\t\treturn ResponseEntity.ok(alerta);\n\t}", "public String geraStatus() {\r\n\t\tString statusComplemento = \"\";\r\n\t\tif (this.temProcesso() == false) {\r\n\t\t\treturn \"Nenhum processo\\n\";\r\n\t\t} else {\r\n\t\t\tfor (int i = 0; i < this.escalonadores.size(); i++) {\r\n\t\t\t\tif (i > 0) {\r\n\t\t\t\t\tstatusComplemento += \" \";\r\n\t\t\t\t}\r\n\t\t\t\tstatusComplemento += i + 1 + \" - \";\r\n\t\t\t\tif (this.escalonadores.get(i).temProcesso()) {\r\n\t\t\t\t\tstatusComplemento += this.escalonadores.get(i).geraStatusComplemento();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tstatusComplemento += \"\\n\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn statusComplemento;\r\n\t}", "public ArrayList<String> getAlerts() {\n ArrayList<String> finalList = new ArrayList<>();\n finalList.addAll(priorityAlerts);\n finalList.addAll(alerts);\n return finalList;\n }", "public String getEstatus() {\r\n return estatus;\r\n }", "public List<Empresatb09EmpresaRegraRenegociacao> buscarPorPessoaStatus(Empresatb01Empresa vo, boolean status) {\n \n StringBuilder query = new StringBuilder();\n Object[] elements = new Object[2];\n\n query.append(\" select c from Empresatb09EmpresaRegraRenegociacao c where c.empresatb01Empresa = ?1 and c.ativo = ?2 \");\n\n elements[0] = vo;\n elements[1] = status;\n\n return super.getListEntity(query.toString(), elements);\n }", "public EstatusVigenciaDetalle getEstatus() {\r\n return estatus;\r\n }", "public SmsAgendaGrupo[] findWhereIdEstatusEquals(int idEstatus) throws SmsAgendaGrupoDaoException;", "public void Apms(AggRMPsndocVO[] aggvos)throws Exception{\n\t\t if (ArrayUtils.isEmpty(aggvos)) {\r\n\t\t throw new BusinessException(ResHelper.getString(\"6021psndoc\", \"06021psndoc0002\"));\r\n\t\t }\r\n\t\t List<RMPsnJobVO> voList = new ArrayList();\r\n\t\t for (Object selectData : aggvos)\r\n\t\t {\r\n\t\t AggRMPsndocVO aggVO = (AggRMPsndocVO)selectData;\r\n\t\t if (!ArrayUtils.isEmpty(aggVO.getTableVO(RMPsnJobVO.getDefaultTableName()))) {\r\n\t\t CollectionUtils.addAll(voList, aggVO.getTableVO(RMPsnJobVO.getDefaultTableName()));\r\n\t\t }\r\n\t\t }\r\n\t\t if (CollectionUtils.isEmpty(voList)) {\r\n\t\t throw new BusinessException(ResHelper.getString(\"6021psndoc\", \"06021psndoc0102\", new String[] { getBtnName() }));\r\n\t\t }\r\n\t\t doArrange((RMPsnJobVO[]) aggvos[0].getTableVO(RMPsnJobVO.getDefaultTableName()),aggvos);\r\n//\t\t RMShowJobDialog dlg = null;\r\n//\t\t if ((aggvos.length == 1) && (voList.size() == 1))\r\n//\t\t {\r\n//\t\t if (1 != MessageDialog.showOkCancelDlg(getEntranceUI(), ResHelper.getString(\"6021pub\", \"06021pub0040\", new String[] { getBtnName() }), ResHelper.getString(\"6021psndoc\", \"06021psndoc0003\")))\r\n//\t\t {\r\n//\t\t putValue(\"message_after_action\", ResHelper.getString(\"6001uif2\", \"06001uif20002\"));\r\n//\t\t return;\r\n//\t\t }\r\n//\t\t dlg = getDialog();\r\n//\t\t dlg.doPrimary((RMPsnJobVO[])voList.toArray(new RMPsnJobVO[0]));\r\n//\t\t }\r\n//\t\t else\r\n//\t\t {\r\n//\t\t dlg = getDialog();\r\n//\t\t dlg.setValue(voList.toArray(new RMPsnJobVO[0]));\r\n//\t\t dlg.showModal();\r\n//\t\t }\r\n//\t\t clearDialog(dlg);\r\n\t\t ShowStatusBarMsgUtil.showStatusBarMsg(IShowMsgConstant.getSaveSuccessInfo(), getContext());\r\n\t }", "@Command\n\tpublic void actualizarEstatus(@BindingParam(\"analista\") final Analista analista){\n\t\tsuper.mostrarMensaje(\"Confirmacion\", \"¿Está seguro que desea cambiar el estatus del analista?\", Messagebox.EXCLAMATION, new Messagebox.Button[]{Messagebox.Button.YES,Messagebox.Button.NO}, \n\t\t\t\tnew EventListener(){\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onEvent(Event event) throws Exception {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tMessagebox.Button button = (Messagebox.Button) event.getData();\n\t\t\t\t\t\tif (button == Messagebox.Button.YES) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tanalista.setiEstatus(EstatusPersonaFactory.getEstatusActivo());\n\t\t\t\t\t\t\t\t//EL METODO DICE ACTUTALIZARPERSONA\n\t\t\t\t\t\t\t\tsMaestros.acutalizarPersona(analista);\n\t\t\t\t\t\t\t\tcambiarAnalistas(0, null, null);\n\t\t\t\t\t\t\t\tnotifyChange(\"analistas\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\n\t\t}, null);\n\t}", "public Collection getRefAlertMessageListByAgency(String servProdCode) throws AAException, RemoteException;", "io.opencannabis.schema.commerce.CommercialOrder.SchedulingType getScheduling();", "public LoadShapingEventReport completedEventStatusView(final String programName)\n throws ParseException;", "public void anulaAvaluo() {\r\n try {\r\n if (\"\".equals(mBRadicacion.Radi.getObservacionAnulaAvaluo())) {\r\n mbTodero.setMens(\"Falta informacion por Llenar\");\r\n mbTodero.warn();\r\n } else {\r\n int CodRad = mBRadicacion.Radi.getCodAvaluo();\r\n mBRadicacion.Radi.AnulaRadicacion(mBsesion.codigoMiSesion());\r\n mbTodero.setMens(\"El Avaluo N*: \" + CodRad + \" ha sido anulada\");\r\n mbTodero.info();\r\n mbTodero.resetTable(\"FRMSeguimiento:SeguimientoTable\");\r\n mbTodero.resetTable(\"FormMisAsignados:RadicadosSegTable\");\r\n RequestContext.getCurrentInstance().execute(\"PF('DLGAnuAvaluo').hide()\");\r\n ListSeguimiento = Seg.ConsulSeguimAvaluos(mBsesion.codigoMiSesion());//VARIABLES DE SESION\r\n }\r\n } catch (Exception e) {\r\n mbTodero.setMens(\"Error en el metodo '\" + this.getClass() + \".anulaAvaluo()' causado por: \" + e.getMessage());\r\n mbTodero.error();\r\n }\r\n }", "@ApiModelProperty(value = \"hace referencia si es compra de un cliente a los asientos comprados si es un producto nuevo a ofreser los asientos disponibles\")\n\n\n public Integer getAsietosEvento() {\n return asietosEvento;\n }", "@Override\n\tpublic void respuestaCompletada(WSInfomovilMethods metodo,\n\t\t\tlong milisegundo, WsInfomovilProcessStatus status) {\n\t\tif(alerta != null)\n\t\t\talerta.dismiss();\n\t\tdatosUsuario = DatosUsuario.getInstance();\n\t\timagenAdapter.setListAdapter(datosUsuario.getListaImagenes());\n\t\tarrayGaleria = datosUsuario.getListaImagenes();\n\t\timagenAdapter.notifyDataSetChanged();\n\t\tif (status == WsInfomovilProcessStatus.EXITO) {\n\t\t\talerta = new AlertView(activity, AlertViewType.AlertViewTypeInfo, getResources().getString(R.string.txtActualizacionCorrecta));\n\t\t\talerta.setDelegado(this);\n\t\t\talerta.show();\n\t\t}\n\t\telse {\n\t\t\tif (arrayGaleriaAux != null && arrayGaleriaAux.size()>0) {\n\t\t\t\tdatosUsuario.setListaImagenes(arrayGaleriaAux);\n\t\t\t}\n\t\t\talerta = new AlertView(activity, AlertViewType.AlertViewTypeInfo, getResources().getString(R.string.txtErrorActualizacion));\n\t\t\talerta.setDelegado(this);\n\t\t\talerta.show();\n\t\t}\n\n\t}", "Integer obtenerEstatusPolizaGeneral(int idEstatusPolizaPago);", "protected void mensajesAlerta() {\n\n// if(((Values)tipoViviendaSpinner.getSelectedItem()).getKey().equals(\"1\") &&\n// ((Values)materialTechoSpinner.getSelectedItem()).getKey().equals(\"6\")){\n// getAlert(getString(R.string.validacion_aviso),getString(R.string.mv_idTipoViviendaCasaMaterialTecho));\n// }\n//\n// if(((Values)tipoViviendaSpinner.getSelectedItem()).getKey().equals(\"2\") &&\n// ((Values)materialTechoSpinner.getSelectedItem()).getKey().equals(\"6\")){\n// getAlert(getString(R.string.validacion_aviso),getString(R.string.mv_idTipoViviendaDepartamentoMaterialTecho));\n// }\n\n if(((Values)tipoViviendaSpinner.getSelectedItem()).getKey().equals(\"2\") &&\n ((Values)ubicacionAguaSpinner.getSelectedItem()).getKey().equals(\"2\")){\n getAlert(getString(R.string.validacion_aviso),getString(R.string.mv_idTipoViviendaUbicacionAgua));\n }\n\n if(((Values)tipoViviendaSpinner.getSelectedItem()).getKey().equals(\"2\") &&\n ((Values)ubicacionSanitarioSpinner.getSelectedItem()).getKey().equals(\"2\")){\n getAlert(getString(R.string.validacion_aviso),getString(R.string.mv_idTipoViviendaUbicacionSanitario));\n }\n\n if( ((Values)tipoViviendaSpinner.getSelectedItem()).getKey().equals(\"3\") &&\n Integer.parseInt(((Values)tipoHogarSpinner.getSelectedItem()).getKey()) < 3 &&\n ((Values)documentoHogarSpinner.getSelectedItem()).getKey().equals(\"1\") ){\n getAlert(getString(R.string.validacion_aviso),getString(R.string.mv_idTipoViviendaTipoHogarDocumento));\n }\n\n if(((Values)materialTechoSpinner.getSelectedItem()).getKey().equals(\"6\")){\n getAlert(getString(R.string.validacion_aviso),getString(R.string.mv_materialTechoOpcionOtro));\n }\n\n if(((Values)servicioSanitarioSpinner.getSelectedItem()).getKey().equals(\"3\") &&\n ((Values)ubicacionSanitarioSpinner.getSelectedItem()).getKey().equals(\"1\")){\n getAlert(getString(R.string.validacion_aviso),getString(R.string.mv_idServicioSanitarioUbicacionSanitarioPozo));\n }\n\n if(((Values)servicioSanitarioSpinner.getSelectedItem()).getKey().equals(\"4\") &&\n ((Values)ubicacionSanitarioSpinner.getSelectedItem()).getKey().equals(\"1\")){\n getAlert(getString(R.string.validacion_aviso),getString(R.string.mv_idServicioSanitarioUbicacionSanitarioDescarga));\n }\n\n if(((Values)viaAccesoPrincipalSpinner.getSelectedItem()).getKey().equals(\"6\") &&\n ((Values)eliminaBasuraSpinner.getSelectedItem()).getKey().equals(\"1\")){\n getAlert(getString(R.string.validacion_aviso),getString(R.string.mv_idViaAccesoPrincipalEliminanBasura));\n }\n }", "public Alert getAlert(com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.alert.v1.Alert res){\n\t\tAlert alert = new Alert();\n\t\t\n\t\tif( res.getAlertLineNo() != null ){\n\t\t\talert.setAlertLineNo( res.getAlertLineNo().intValue() );\n\t\t}\n\t\tif( res.getAlertSerialNo() != null ){\n\t\t\talert.setAlertSerialNo( res.getAlertSerialNo().intValue() );\n\t\t}\n\t\talert.setAlertLevel( res.getAlertLevel() );\n\t\talert.setAlertId( res.getAlertId() );\n\t\talert.setAlertMessage( res.getAlertMessage() );\n\t\talert.setAlertType( res.getAlertType() );\n\t\talert.appendText( res.getText() );\n\t\t\n\t\treturn alert;\n\t}", "public String arrangeEvents() throws Exception {\n JSONArray scheduledEventList = calObj.retrieveEvents(\"primary\").getJSONArray(\"items\");\n JSONArray unScheduledEventList = calObj.retrieveEvents(this.user.getCalId()).getJSONArray(\"items\");\n\n //Filter events for this week\n\n\n //Make a list of all events\n\n //Prioritise all unscheduled events\n\n\n //Send the list to client to display\n String events = \"\";\n for (int i = 0; i < scheduledEventList.length(); i++) {\n org.json.JSONObject jsonLineItem = scheduledEventList.getJSONObject(i);\n events += jsonLineItem.getString(\"summary\") + \" \" + jsonLineItem.getJSONObject(\"start\").getString(\"dateTime\") + \"\\n\";\n }\n // Unscheduled events set in bot created aPAS calendar\n for (int i = 0; i < unScheduledEventList.length(); i++) {\n org.json.JSONObject jsonLineItem = unScheduledEventList.getJSONObject(i);\n events += jsonLineItem.getString(\"summary\") + \" \" + jsonLineItem.getJSONObject(\"start\").getString(\"dateTime\") + \"\\n\";\n }\n return events;\n }", "public String annullaSubAccertamento(){\n\t\t//informazioni per debug:\n\t\tsetMethodName(\"annullaSubAccertamento\");\n\t\tdebug(methodName, \"uid da annullare--> \"+getUidSubDaAnnullare());\n\t\t\n\t\t//compongo la request per il servizio di annulla:\n\t\tAnnullaMovimentoEntrata reqAnnulla = convertiModelPerChiamataServizioAnnulla(getUidSubDaAnnullare());\n\t\t\n\t\t//richiamo il servizio di annulla:\n\t\tAnnullaMovimentoEntrataResponse response = movimentoGestionService.annullaMovimentoEntrata(reqAnnulla);\n\n\t\t//analizzo la risposta del servizio:\n\t\tif(!response.isFallimento()){\n\t\t\t// RICARICO L'ACCERTAMENTO EVITANDO LA MEGA QUERY\n\t\t\tif(response.getAccertamento()!= null){\n\t\t\t\tmodel.setAccertamentoRicaricatoDopoInsOAgg(response.getAccertamento());\n\t\t\t}\n\t\t\t\n\t\t\t//richiamo il metodo di caricamento passandogli flagPostAggiorna a true:\n\t\t\tricaricaSubAccertamenti(true);\n\t\t\t\n\t\t\t//setto il messaggio di esito positivo:\n\t\t\taddActionMessage(ErroreFin.OPERAZIONE_EFFETTUATA_CORRETTAMENTE.getCodice() + \" \" + ErroreFin.OPERAZIONE_EFFETTUATA_CORRETTAMENTE.getErrore(\"\").getDescrizione());\n\t\t}else{\n\t\t\t//presenza errori\n\t\t\taddErrori(response.getErrori());\n\t\t\treturn INPUT;\n\t\t}\n\t\t\n\t\treturn SUCCESS;\n\t}", "public static void main(String[] args){\n \r\n Log.registroTraza( \"Iniciando ejecución de la tarea SolicitudesAVencerse\");\r\n \r\n String strSQL, strFechaRecibo, strReqRpta, strRadicado, strIdResp = \"\";\r\n int totalSolAlertadas=0, totalSolVencidas=0;\r\n String[] strTemp = null;\r\n int lgTiempoRpta, lgRestante, lgTiempoConfig; \r\n Vector arrConsecutivos = new Vector();\r\n Vector arrFechasCreacion = new Vector();\r\n Vector arrReqRpta = new Vector();\r\n Vector arrTiempoRpta = new Vector();\r\n Vector arrIdsResp = new Vector();\r\n Comunes comun = new Comunes();\r\n Notificacion n = new Notificacion();\r\n Calendar fechaRecibo = null;\r\n Calendar fechaRpta = null;\r\n Calendar fechaActual = null;\r\n \r\n try{\r\n strSQL = \"select g.txtNroDiasAlerta from buzon.buzon_generales g where g.txtCodigo = 'frmGeneral'\";\r\n String[] strDatosGral = GestionSQL.getFila(strSQL, \"Buzon\");\r\n lgTiempoConfig = Integer.parseInt(strDatosGral[0]);\r\n \r\n strSQL = \"select DISTINCT p.txtRadicado, p.dtFechaCreacion, r.txtReqRpta, r.txtTiempoRpta, p.txtNomCargo from buzon_pqrs p INNER JOIN buzon_retroalimentacion r on (p.txtTipoPQRS = r.txtCodigo) where (p.txtIdEstado <> 'AT' and p.txtIdEstado <> 'CPU') ORDER BY CAST(p.txtRadicado AS SIGNED)\";\r\n Vector arrSols = GestionSQL.consultaSQL(strSQL,\"Buzon\",\"ALERTASSOLS\");\r\n \r\n if (arrSols != null){ \r\n for (int i=0;i<arrSols.size();i++){\r\n strTemp = arrSols.get(i).toString().split(\",\");\r\n arrConsecutivos.add(strTemp[0]);\r\n arrFechasCreacion.add(strTemp[1]);\r\n arrReqRpta.add(strTemp[2]);\r\n arrTiempoRpta.add(strTemp[3]); \r\n arrIdsResp.add(strTemp[4]);\r\n } \r\n\r\n //Obtener los feriados.\r\n\r\n Vector arrFechas = new Vector();\r\n strSQL = \"SELECT d.dtFecha from users.users_dias_no_habiles d order by d.dtFecha\";\r\n arrFechas = GestionSQL.consultaSQL(strSQL, \"Users\", \"FECHAS\"); \r\n\r\n for(int i=0;i<arrConsecutivos.size();i++){\r\n strRadicado = arrConsecutivos.get(i).toString(); \r\n strReqRpta = arrReqRpta.get(i).toString();\r\n strIdResp = arrIdsResp.get(i).toString();\r\n lgRestante = 0; \r\n fechaRecibo = null;\r\n fechaRpta = null;\r\n fechaActual = comun.calcularFechaActual();\r\n\r\n if (strReqRpta.equals(\"S\")){ \r\n lgTiempoRpta = Integer.parseInt(arrTiempoRpta.get(i).toString());\r\n fechaRecibo = Calendar.getInstance(); \r\n\r\n strFechaRecibo = arrFechasCreacion.get(i).toString();\r\n strTemp = strFechaRecibo.split(\"-\"); \r\n fechaRecibo.set(Integer.parseInt(strTemp[0]),(Integer.parseInt(strTemp[1])-1),Integer.parseInt(strTemp[2]));\r\n fechaRecibo.set(Calendar.SECOND, 0);\r\n fechaRecibo.set(Calendar.MILLISECOND, 0); \r\n\r\n fechaRpta= Calendar.getInstance();\r\n fechaRpta.set(Calendar.SECOND, 0);\r\n fechaRpta.set(Calendar.MILLISECOND, 0); \r\n fechaRpta = comun.incrementarDiasHabiles(fechaRecibo, lgTiempoRpta, arrFechas); \r\n\r\n lgRestante = (comun.getDiasHabiles(fechaActual, fechaRpta, arrFechas)-1); \r\n\r\n if ((lgRestante <= lgTiempoConfig) && (lgRestante > 0)){ \r\n n.NotificacionSolAVencer(strRadicado, Long.valueOf(lgRestante + 1), strIdResp); \r\n totalSolAlertadas = totalSolAlertadas + 1;\r\n }else{\r\n if (lgRestante<0){\r\n n.NotificacionSolVencidas(strRadicado, fechaRpta, strIdResp);\r\n totalSolVencidas = totalSolVencidas + 1;\r\n } \r\n } \r\n } \r\n }\r\n }\r\n }catch(Exception e){\r\n Log.registroTraza(\"Se generó un error en la tarea SolicitudesAVencerse: \" + e.getMessage());\r\n }\r\n\r\n SimpleDateFormat formato = new SimpleDateFormat(\"hh:mm:ss\");\r\n Log.registroTraza( \"Tarea SolicitudesAVencerse invocada a la hora: \" + formato.format(new Date()) + \". Solicitudes alertadas: \" + totalSolAlertadas + \". Solicitudes vencidas: \" + totalSolVencidas);\r\n\r\n }", "public OpsAlert getOpsAlert(com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.opsalert.v1.OpsAlert res){\n\t\tOpsAlert opsAlert = new OpsAlert();\n\t\t\n\t\topsAlert.setActionCode( res.getActionCode() );\n\t\topsAlert.setAlertCode( res.getAlertCode() );\n\t\topsAlert.setInstructions( res.getInstructions() );\n\t\topsAlert.setHotelName( res.getHotelName() );\n\t\topsAlert.setUserName( res.getUserName() );\n\t\topsAlert.setLocaltelephNo( res.getLocaltelephNo() );\n\t\topsAlert.setService( res.getService() );\n\t\topsAlert.setReprintDoc( res.getReprintDoc() );\n\t\topsAlert.setType( res.getType() );\n\t\topsAlert.setTravelAgencyAccountNo( res.getTravelAgencyAccountNo() );\n\t\tif( res.getImApplicationInfo() != null ){\n\t\t\topsAlert.setImApplicationInfo( this.getIMApplicationInfo( res.getImApplicationInfo() ));\n\t\t}\n\t\tif( res.getInFlightInfo() != null ){\n\t\t\topsAlert.setInFlightInfo( this.getFlightTransferInfo( res.getInFlightInfo() ) );\n\t\t}\n\t\tif( res.getOutFlightInfo() != null ){\n\t\t\topsAlert.setOutFlightInfo( this.getFlightTransferInfo( res.getOutFlightInfo() ) );\n\t\t}\n\t\tif( res.getDocumentAddress() != null ){\n\t\t\topsAlert.setDocumentAddress( this.getAddress( res.getDocumentAddress() ) );\n\t\t}\n\t\tif( res.getBookingHeader() != null ){\n\t\t\topsAlert.setBookingHeader( this.getBookingHeader( res.getBookingHeader() ) );\n\t\t}\n\t\tif( (res.getGuests() != null) && (res.getGuests().size() > 0) ){\n\t\t\tList<GuestInfo> guests = new ArrayList<GuestInfo>();\n\t\t\tfor(int i=0; i < res.getGuests().size(); i++){\n\t\t\t\tif( res.getGuests().get(i) != null )\n\t\t\t\tguests.add( this.getGuestInfo( res.getGuests().get(i) ) );\n\t\t\t}\n\t\t\topsAlert.setGuests(guests);\n\t\t}\n\t\tif( (res.getAlertTypes() != null) && (res.getAlertTypes().size() > 0) ){\n\t\t\tList<AlertType> alertTypes = new ArrayList<AlertType>();\n\t\t\tfor(int i=0; i < res.getAlertTypes().size(); i++){\n\t\t\t\tif( res.getAlertTypes().get(i) != null )\n\t\t\t\talertTypes.add( this.getAlertType( res.getAlertTypes().get(i) ) );\n\t\t\t}\n\t\t\topsAlert.setAlertTypes(alertTypes);\n\t\t}\n\t\tif( (res.getActionTypes() != null) && (res.getActionTypes().size() > 0) ){\n\t\t\tList<ActionType> actionTypes = new ArrayList<ActionType>();\n\t\t\tfor(int i=0; i < res.getActionTypes().size(); i++){\n\t\t\t\tif( res.getActionTypes().get(i) != null )\n\t\t\t\tactionTypes.add( this.getActionType( res.getActionTypes().get(i) ) );\n\t\t\t}\n\t\t\topsAlert.setActionTypes(actionTypes);\n\t\t}\n\t\t\n\t\treturn opsAlert;\n\t}", "public alertas buscarInfoDeUnRegistro(Connection conn, alertas objeto) {\r\n\r\n\t\ttry {\r\n\r\n\t\t\tPreparedStatement statement = conn\r\n\t\t\t\t\t.prepareStatement(\"select ID_ALERTA, FECHA_INI, FECHA_FIN, ESTADO, DESCRIPCION2 from alertas where DESCRIPCION='\"\r\n\t\t\t\t\t\t\t+ objeto.getDescripcion() + \"'\");\r\n\t\t\tResultSet rs = statement.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tobjeto.setAlerta(rs.getInt(\"ID_ALERTA\"));\r\n\t\t\t\tobjeto.setFechaInicio(rs.getString(\"FECHA_INI\"));\r\n\t\t\t\tobjeto.setFechaDinalizacion(rs.getString(\"FECHA_FIN\"));\r\n\t\t\t\tobjeto.setEstado(rs.getString(\"ESTADO\"));\r\n\t\t\t\tobjeto.setDescripcion2(rs.getString(\"DESCRIPCION2\"));\r\n\t\t\t\t// Process data here\r\n\r\n\t\t\t}\r\n\t\t\trs.close();\r\n\t\t\tstatement.close();\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t// JOptionPane.showMessageDialog(null, \"Alerta!\",\r\n\t\t\t// \":\"+e.getMessage(), JOptionPane.ERROR_MESSAGE);\r\n\t\t\tobjeto.setDescripcion(\"null\");\r\n\r\n\t\t}\r\n\t\treturn objeto;\r\n\r\n\t}", "@GetMapping()\n\tprotected ResponseEntity<Page<Alerta>> getAllAlertas(){\n\t\t\n\t\tPage<Alerta> alertas = service.getAllAlertas(0, 10000);\n\t\t\n\t\tif(alertas == null)\n\t\t\treturn ResponseEntity.notFound().build();\n\t\t\n\t\treturn ResponseEntity.ok(alertas);\n\t}", "public void createAgendamento() {\n\n if (tbagendamento.getTmdataagendamento().after(TimeControl.getDateIni())) {\n if (agendamentoLogic.createTbagendamento(tbagendamento)) {\n AbstractFacesContextUtils.redirectPage(PagesUrl.URL_AGENDAMENTO_LIST);\n AbstractFacesContextUtils.addMessageInfo(\"Agendamento cadastrado com sucesso.\");\n } else {\n AbstractFacesContextUtils.addMessageWarn(\"Falhar ao realizado cadastro do agendamento.\");\n }\n } else {\n AbstractFacesContextUtils.addMessageWarn(\"verifique se a data de agendamento esta correta.\");\n }\n }", "public void getPropuestasOrdenadas(int confirm) throws ParseException{\n System.out.println(\"\\nSe imprimirán las propuestas de la Sala \"+getNombreSala()+\":\");\n if (propuestas.size() == 0){\n System.out.println(\"No hay reservas para esta Sala\");\n }\n else{\n for (Propuesta propuestaF : propuestas) {\n String nombreReservador = propuestaF.getReservador().getNombreCompleto();\n if (confirm == 0){\n if (propuestaF.isForAllSem()) {\n System.out.println(\"Propuesta por todo el semestre, parte el \"+propuestaF.getFechaPuntualI(0)+\" hasta \"+\n propuestaF.getFechaPuntualF(0)+\". La reserva termina el \"+\n propuestaF.getFechaPuntualI(propuestaF.getFechasPropuestasInicio().size()-1)+\" hasta \"+\n propuestaF.getFechaPuntualF(propuestaF.getFechasPropuestasFinal().size()-1));\n System.out.println(\"Esta reserva fue hecha por:\");\n if (propuestaF.getReservador() instanceof Profesor){\n System.out.println(\"Profesor \"+ nombreReservador);\n }\n else if (propuestaF.getReservador() instanceof Estudiante){\n System.out.println(\"Estudiante \"+ nombreReservador);\n }\n else{\n System.out.println(nombreReservador);\n }\n }\n else{\n int i = 0;\n int j = 0;\n int idPropuesta = 0;\n String fecha = \"01-01-50000\";\n SimpleDateFormat parseF = new SimpleDateFormat(\"dd-MM-yyyy\");\n Date fechaMasReciente = parseF.parse(fecha);\n Date fechaAux;\n Propuesta propActual;\n while(i < propuestas.size()){\n while (j < propuestas.size()){\n propActual = propuestas.get(j);\n fechaAux = propActual.getFechaPuntualI(0);\n if (fechaAux.compareTo(fechaMasReciente) < 0){\n fechaMasReciente = fechaAux;\n }\n j++;\n }\n System.out.println(\"Desde \"+propuestas.get(i).getFechaPuntualF(0)+\" hasta \"+\n propuestas.get(i).getFechaPuntualF(0));\n fecha = \"01-01-2200\";\n fechaMasReciente = parseF.parse(fecha);\n i++;\n }\n }\n }\n else if (confirm == 1){\n if (propuestaF.isForAllSem() && propuestaF.isConfirmada()) {\n System.out.println(\"Propuesta por todo el semestre, parte el \"+propuestaF.getFechaPuntualI(0)+\" hasta \"+\n propuestaF.getFechaPuntualF(0)+\". La reserva termina el \"+\n propuestaF.getFechaPuntualI(propuestaF.getFechasPropuestasInicio().size()-1)+\" hasta \"+\n propuestaF.getFechaPuntualF(propuestaF.getFechasPropuestasFinal().size()-1));\n System.out.println(\"Esta reserva fue hecha por:\");\n if (propuestaF.getReservador() instanceof Profesor){\n System.out.println(\"Profesor \"+ nombreReservador);\n }\n else if (propuestaF.getReservador() instanceof Estudiante){\n System.out.println(\"Estudiante \"+ nombreReservador);\n }\n else{\n System.out.println(nombreReservador);\n }\n }\n else if (propuestaF.isConfirmada()){\n int i = 0;\n int j = 0;\n int idPropuesta = 0;\n String fecha = \"01-01-50000\";\n SimpleDateFormat parseF = new SimpleDateFormat(\"dd-MM-yyyy\");\n Date fechaMasReciente = parseF.parse(fecha);\n Date fechaAux;\n Propuesta propActual;\n while(i < propuestas.size()){\n while (j < propuestas.size()){\n propActual = propuestas.get(j);\n fechaAux = propActual.getFechaPuntualI(0);\n if (fechaAux.compareTo(fechaMasReciente) < 0){\n fechaMasReciente = fechaAux;\n }\n j++;\n }\n System.out.println(\"Desde \"+propuestas.get(i).getFechaPuntualF(0)+\" hasta \"+\n propuestas.get(i).getFechaPuntualF(0));\n fecha = \"01-01-2200\";\n fechaMasReciente = parseF.parse(fecha);\n i++;\n }\n }\n }\n }\n }\n }", "private int obtieneEstatusBateria() {\n\t\t\n\t\ttry \n { \n IntentFilter batIntentFilter = \n new IntentFilter(Intent.ACTION_BATTERY_CHANGED); \n Intent battery = \n this.registerReceiver(null, batIntentFilter); \n int nivelBateria = battery.getIntExtra(BatteryManager.EXTRA_LEVEL, -1); \n return nivelBateria; \n } \n catch (Exception e) \n { \n Toast.makeText(getApplicationContext(), \n \"Error al obtener estado de la bateria\",\n Toast.LENGTH_SHORT).show(); \n return 0; \n } \n\t}", "boolean isStatusSuspensao();", "protected void onGetOnTimerReservationSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}", "protected void onGetOnTimerReservationSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}", "@Override\r\n public void aceptarReporte() {\n if (rep_reporte.getReporteSelecionado().equals(\"Libro Diario\")) {\r\n if (rep_reporte.isVisible()) {\r\n parametro = new HashMap();\r\n rep_reporte.cerrar();\r\n sec_rango_reporte.setMultiple(true);\r\n sec_rango_reporte.dibujar();\r\n utilitario.addUpdate(\"rep_reporte,sec_rango_reporte\");\r\n\r\n } else if (sec_rango_reporte.isVisible()) {\r\n String estado = \"\" + utilitario.getVariable(\"p_con_estado_comprobante_normal\") + \",\" + utilitario.getVariable(\"p_con_estado_comp_inicial\") + \",\" + utilitario.getVariable(\"p_con_estado_comp_final\");\r\n parametro.put(\"fecha_inicio\", sec_rango_reporte.getFecha1());\r\n parametro.put(\"fecha_fin\", sec_rango_reporte.getFecha2());\r\n\r\n parametro.put(\"ide_cneco\", estado);\r\n parametro.put(\"ide_cnlap_haber\", p_con_lugar_haber);\r\n parametro.put(\"ide_cnlap_debe\", p_con_lugar_debe);\r\n sec_rango_reporte.cerrar();\r\n sel_rep.setSeleccionFormatoReporte(parametro, rep_reporte.getPath());\r\n sel_rep.dibujar();\r\n utilitario.addUpdate(\"sel_rep,sec_rango_reporte\");\r\n }\r\n } else if (rep_reporte.getReporteSelecionado().equals(\"Balance General Consolidado\")) {\r\n if (rep_reporte.isVisible()) {\r\n parametro = new HashMap();\r\n rep_reporte.cerrar();\r\n sec_rango_reporte.setMultiple(true);\r\n sec_rango_reporte.dibujar();\r\n utilitario.addUpdate(\"rep_reporte,sec_rango_reporte\");\r\n } else if (sec_rango_reporte.isVisible()) {\r\n if (sec_rango_reporte.getFecha1String() != null && !sec_rango_reporte.getFecha1String().isEmpty()) {\r\n if (sec_rango_reporte.getFecha2String() != null && !sec_rango_reporte.getFecha2String().isEmpty()) {\r\n fecha_fin = sec_rango_reporte.getFecha2String();\r\n fecha_inicio = con.getFechaInicialPeriodo(fecha_fin);\r\n if (fecha_inicio != null && !fecha_inicio.isEmpty()) {\r\n sec_rango_reporte.cerrar();\r\n sel_tab_nivel.dibujar();\r\n utilitario.addUpdate(\"sec_rango_reporte,sel_tab_nivel\");\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"El rango de fechas seleccionado no se encuentra en ningun Periodo Contable\");\r\n }\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha final\");\r\n }\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha inicial\");\r\n }\r\n } else if (sel_tab_nivel.isVisible()) {\r\n if (sel_tab_nivel.getValorSeleccionado() != null) {\r\n System.out.println(\"fecha fin \" + fecha_fin);\r\n parametro.put(\"p_activo\", utilitario.getVariable(\"p_con_tipo_cuenta_activo\"));\r\n parametro.put(\"p_pasivo\", utilitario.getVariable(\"p_con_tipo_cuenta_pasivo\"));\r\n parametro.put(\"p_patrimonio\", utilitario.getVariable(\"p_con_tipo_cuenta_patrimonio\"));\r\n TablaGenerica tab_datos = utilitario.consultar(\"SELECT * FROM sis_empresa e, sis_sucursal s where s.ide_empr=e.ide_empr and s.ide_empr=\" + utilitario.getVariable(\"ide_empr\") + \" and s.ide_sucu=\" + utilitario.getVariable(\"ide_sucu\"));\r\n if (tab_datos.getTotalFilas() > 0) {\r\n parametro.put(\"logo\", tab_datos.getValor(0, \"logo_empr\"));\r\n parametro.put(\"empresa\", tab_datos.getValor(0, \"nom_empr\"));\r\n parametro.put(\"sucursal\", tab_datos.getValor(0, \"nom_sucu\"));\r\n parametro.put(\"direccion\", tab_datos.getValor(0, \"direccion_sucu\"));\r\n parametro.put(\"telefono\", tab_datos.getValor(0, \"telefonos_sucu\"));\r\n parametro.put(\"ruc\", tab_datos.getValor(0, \"identificacion_empr\"));\r\n\r\n }\r\n parametro.put(\"fecha_inicio\", getFormatoFecha(fecha_inicio));\r\n parametro.put(\"fecha_fin\", getFormatoFecha(fecha_fin));\r\n TablaGenerica tab_balance = con.generarBalanceGeneral(true, fecha_inicio, fecha_fin, Integer.parseInt(sel_tab_nivel.getValorSeleccionado()));\r\n parametro.put(\"titulo\", \"BALANCE GENERAL CONSOLIDADO\");\r\n if (tab_balance.getTotalFilas() > 0) {\r\n List lis_totales = con.obtenerTotalesBalanceGeneral(true, fecha_inicio, fecha_fin);\r\n double tot_activo = Double.parseDouble(lis_totales.get(0) + \"\");\r\n double tot_pasivo = Double.parseDouble(lis_totales.get(1) + \"\");\r\n double tot_patrimonio = Double.parseDouble(lis_totales.get(2) + \"\");\r\n double utilidad_perdida = tot_activo - tot_pasivo - tot_patrimonio;\r\n double total = tot_pasivo + tot_patrimonio + utilidad_perdida;\r\n parametro.put(\"p_tot_activo\", tot_activo);\r\n parametro.put(\"p_total\", total);\r\n parametro.put(\"p_utilidad_perdida\", utilidad_perdida);\r\n parametro.put(\"p_tot_pasivo\", tot_pasivo);\r\n parametro.put(\"p_tot_patrimonio\", (tot_patrimonio));\r\n }\r\n sel_tab_nivel.cerrar();\r\n ReporteDataSource data = new ReporteDataSource(tab_balance);\r\n sel_rep.setSeleccionFormatoReporte(parametro, rep_reporte.getPath(), data);\r\n sel_rep.dibujar();\r\n\r\n utilitario.addUpdate(\"sel_rep,sel_tab_nivel\");\r\n }\r\n }\r\n } else if (rep_reporte.getReporteSelecionado().equals(\"Balance General\")) {\r\n if (rep_reporte.isVisible()) {\r\n parametro = new HashMap();\r\n rep_reporte.cerrar();\r\n sec_rango_reporte.setMultiple(true);\r\n sec_rango_reporte.dibujar();\r\n utilitario.addUpdate(\"rep_reporte,sec_rango_reporte\");\r\n } else if (sec_rango_reporte.isVisible()) {\r\n if (sec_rango_reporte.getFecha1String() != null && !sec_rango_reporte.getFecha1String().isEmpty()) {\r\n if (sec_rango_reporte.getFecha2String() != null && !sec_rango_reporte.getFecha2String().isEmpty()) {\r\n fecha_fin = sec_rango_reporte.getFecha2String();\r\n fecha_inicio = con.getFechaInicialPeriodo(fecha_fin);\r\n if (fecha_inicio != null && !fecha_inicio.isEmpty()) {\r\n sec_rango_reporte.cerrar();\r\n sel_tab_nivel.dibujar();\r\n utilitario.addUpdate(\"sec_rango_reporte,sel_tab_nivel\");\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"El rango de fechas seleccionado no se encuentra en ningun Periodo Contable\");\r\n }\r\n\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha final\");\r\n }\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha inicial\");\r\n }\r\n } else if (sel_tab_nivel.isVisible()) {\r\n if (sel_tab_nivel.getValorSeleccionado() != null) {\r\n System.out.println(\"fecha fin \" + fecha_fin);\r\n parametro.put(\"p_activo\", utilitario.getVariable(\"p_con_tipo_cuenta_activo\"));\r\n parametro.put(\"p_pasivo\", utilitario.getVariable(\"p_con_tipo_cuenta_pasivo\"));\r\n parametro.put(\"p_patrimonio\", utilitario.getVariable(\"p_con_tipo_cuenta_patrimonio\"));\r\n TablaGenerica tab_datos = utilitario.consultar(\"SELECT * FROM sis_empresa e, sis_sucursal s where s.ide_empr=e.ide_empr and s.ide_empr=\" + utilitario.getVariable(\"ide_empr\") + \" and s.ide_sucu=\" + utilitario.getVariable(\"ide_sucu\"));\r\n if (tab_datos.getTotalFilas() > 0) {\r\n parametro.put(\"logo\", tab_datos.getValor(0, \"logo_empr\"));\r\n parametro.put(\"empresa\", tab_datos.getValor(0, \"nom_empr\"));\r\n parametro.put(\"sucursal\", tab_datos.getValor(0, \"nom_sucu\"));\r\n parametro.put(\"direccion\", tab_datos.getValor(0, \"direccion_sucu\"));\r\n parametro.put(\"telefono\", tab_datos.getValor(0, \"telefonos_sucu\"));\r\n parametro.put(\"ruc\", tab_datos.getValor(0, \"identificacion_empr\"));\r\n\r\n }\r\n parametro.put(\"fecha_inicio\", getFormatoFecha(fecha_inicio));\r\n parametro.put(\"fecha_fin\", getFormatoFecha(fecha_fin));\r\n TablaGenerica tab_balance = con.generarBalanceGeneral(false, fecha_inicio, fecha_fin, Integer.parseInt(sel_tab_nivel.getValorSeleccionado()));\r\n parametro.put(\"titulo\", \"BALANCE GENERAL\");\r\n if (tab_balance.getTotalFilas() > 0) {\r\n List lis_totales = con.obtenerTotalesBalanceGeneral(false, fecha_inicio, fecha_fin);\r\n double tot_activo = Double.parseDouble(lis_totales.get(0) + \"\");\r\n double tot_pasivo = Double.parseDouble(lis_totales.get(1) + \"\");\r\n double tot_patrimonio = Double.parseDouble(lis_totales.get(2) + \"\");\r\n double utilidad_perdida = tot_activo - tot_pasivo - tot_patrimonio;\r\n double total = tot_pasivo + tot_patrimonio + utilidad_perdida;\r\n parametro.put(\"p_tot_activo\", tot_activo);\r\n parametro.put(\"p_total\", total);\r\n parametro.put(\"p_utilidad_perdida\", utilidad_perdida);\r\n parametro.put(\"p_tot_pasivo\", tot_pasivo);\r\n parametro.put(\"p_tot_patrimonio\", (tot_patrimonio));\r\n }\r\n sel_tab_nivel.cerrar();\r\n ReporteDataSource data = new ReporteDataSource(tab_balance);\r\n sel_rep.setSeleccionFormatoReporte(parametro, rep_reporte.getPath(), data);\r\n sel_rep.dibujar();\r\n\r\n utilitario.addUpdate(\"sel_rep,sel_tab_nivel\");\r\n }\r\n }\r\n } else if (rep_reporte.getReporteSelecionado().equals(\"Estado de Resultados Consolidado\")) {\r\n if (rep_reporte.isVisible()) {\r\n parametro = new HashMap();\r\n rep_reporte.cerrar();\r\n sec_rango_reporte.setMultiple(true);\r\n sec_rango_reporte.dibujar();\r\n utilitario.addUpdate(\"rep_reporte,sec_rango_reporte\");\r\n } else if (sec_rango_reporte.isVisible()) {\r\n if (sec_rango_reporte.getFecha1String() != null && !sec_rango_reporte.getFecha1String().isEmpty()) {\r\n if (sec_rango_reporte.getFecha2String() != null && !sec_rango_reporte.getFecha2String().isEmpty()) {\r\n fecha_fin = sec_rango_reporte.getFecha2String();\r\n fecha_inicio = con.getFechaInicialPeriodo(fecha_fin);\r\n if (fecha_inicio != null && !fecha_inicio.isEmpty()) {\r\n sec_rango_reporte.cerrar();\r\n sel_tab_nivel.dibujar();\r\n utilitario.addUpdate(\"sec_rango_reporte,sel_tab_nivel\");\r\n }\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha fin\");\r\n }\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha inicio\");\r\n }\r\n } else if (sel_tab_nivel.isVisible()) {\r\n if (sel_tab_nivel.getValorSeleccionado() != null) {\r\n parametro.put(\"p_ingresos\", utilitario.getVariable(\"p_con_tipo_cuenta_ingresos\"));\r\n parametro.put(\"p_gastos\", utilitario.getVariable(\"p_con_tipo_cuenta_gastos\"));\r\n parametro.put(\"p_costos\", utilitario.getVariable(\"p_con_tipo_cuenta_costos\"));\r\n TablaGenerica tab_datos = utilitario.consultar(\"SELECT * FROM sis_empresa e, sis_sucursal s where s.ide_empr=e.ide_empr and s.ide_empr=\" + utilitario.getVariable(\"ide_empr\") + \" and s.ide_sucu=\" + utilitario.getVariable(\"ide_sucu\"));\r\n if (tab_datos.getTotalFilas() > 0) {\r\n parametro.put(\"logo\", tab_datos.getValor(0, \"logo_empr\"));\r\n parametro.put(\"empresa\", tab_datos.getValor(0, \"nom_empr\"));\r\n parametro.put(\"sucursal\", tab_datos.getValor(0, \"nom_sucu\"));\r\n parametro.put(\"direccion\", tab_datos.getValor(0, \"direccion_sucu\"));\r\n parametro.put(\"telefono\", tab_datos.getValor(0, \"telefonos_sucu\"));\r\n parametro.put(\"ruc\", tab_datos.getValor(0, \"identificacion_empr\"));\r\n }\r\n\r\n parametro.put(\"fecha_inicio\", getFormatoFecha(fecha_inicio));\r\n parametro.put(\"fecha_fin\", getFormatoFecha(fecha_fin));\r\n TablaGenerica tab_estado = con.generarEstadoResultados(true, fecha_inicio, fecha_fin, Integer.parseInt(sel_tab_nivel.getValorSeleccionado()));\r\n if (tab_estado.getTotalFilas() > 0) {\r\n List lis_totales = con.obtenerTotalesEstadoResultados(true, fecha_inicio, fecha_fin);\r\n double tot_ingresos = Double.parseDouble(lis_totales.get(0) + \"\");\r\n double tot_gastos = Double.parseDouble(lis_totales.get(1) + \"\");\r\n double tot_costos = Double.parseDouble(lis_totales.get(2) + \"\");\r\n double utilidad_perdida = tot_ingresos - (tot_gastos + tot_costos);\r\n parametro.put(\"p_tot_ingresos\", tot_ingresos);\r\n parametro.put(\"p_tot_gastos\", tot_gastos);\r\n parametro.put(\"p_tot_costos\", tot_costos);\r\n parametro.put(\"p_utilidad\", utilidad_perdida);\r\n }\r\n parametro.put(\"titulo\", \"ESTADO DE RESULTADOS CONSOLIDADO\");\r\n ReporteDataSource data = new ReporteDataSource(tab_estado);\r\n sel_tab_nivel.cerrar();\r\n sel_rep.setSeleccionFormatoReporte(parametro, rep_reporte.getPath(), data);\r\n sel_rep.dibujar();\r\n utilitario.addUpdate(\"sel_rep,sel_tab_nivel\");\r\n }\r\n }\r\n\r\n } else if (rep_reporte.getReporteSelecionado().equals(\"Estado de Resultados\")) {\r\n if (rep_reporte.isVisible()) {\r\n parametro = new HashMap();\r\n rep_reporte.cerrar();\r\n sec_rango_reporte.setMultiple(true);\r\n sec_rango_reporte.dibujar();\r\n utilitario.addUpdate(\"rep_reporte,sec_rango_reporte\");\r\n } else if (sec_rango_reporte.isVisible()) {\r\n if (sec_rango_reporte.getFecha1String() != null && !sec_rango_reporte.getFecha1String().isEmpty()) {\r\n if (sec_rango_reporte.getFecha2String() != null && !sec_rango_reporte.getFecha2String().isEmpty()) {\r\n fecha_fin = sec_rango_reporte.getFecha2String();\r\n fecha_inicio = con.getFechaInicialPeriodo(fecha_fin);\r\n if (fecha_inicio != null && !fecha_inicio.isEmpty()) {\r\n sec_rango_reporte.cerrar();\r\n sel_tab_nivel.dibujar();\r\n utilitario.addUpdate(\"sec_rango_reporte,sel_tab_nivel\");\r\n }\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha fin\");\r\n }\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha inicio\");\r\n }\r\n } else if (sel_tab_nivel.isVisible()) {\r\n if (sel_tab_nivel.getValorSeleccionado() != null) {\r\n parametro.put(\"p_ingresos\", utilitario.getVariable(\"p_con_tipo_cuenta_ingresos\"));\r\n parametro.put(\"p_gastos\", utilitario.getVariable(\"p_con_tipo_cuenta_gastos\"));\r\n parametro.put(\"p_costos\", utilitario.getVariable(\"p_con_tipo_cuenta_costos\"));\r\n TablaGenerica tab_datos = utilitario.consultar(\"SELECT * FROM sis_empresa e, sis_sucursal s where s.ide_empr=e.ide_empr and s.ide_empr=\" + utilitario.getVariable(\"ide_empr\") + \" and s.ide_sucu=\" + utilitario.getVariable(\"ide_sucu\"));\r\n if (tab_datos.getTotalFilas() > 0) {\r\n parametro.put(\"logo\", tab_datos.getValor(0, \"logo_empr\"));\r\n parametro.put(\"empresa\", tab_datos.getValor(0, \"nom_empr\"));\r\n parametro.put(\"sucursal\", tab_datos.getValor(0, \"nom_sucu\"));\r\n parametro.put(\"direccion\", tab_datos.getValor(0, \"direccion_sucu\"));\r\n parametro.put(\"telefono\", tab_datos.getValor(0, \"telefonos_sucu\"));\r\n parametro.put(\"ruc\", tab_datos.getValor(0, \"identificacion_empr\"));\r\n }\r\n\r\n parametro.put(\"fecha_inicio\", getFormatoFecha(fecha_inicio));\r\n parametro.put(\"fecha_fin\", getFormatoFecha(fecha_fin));\r\n TablaGenerica tab_estado = con.generarEstadoResultados(false, fecha_inicio, fecha_fin, Integer.parseInt(sel_tab_nivel.getValorSeleccionado()));\r\n if (tab_estado.getTotalFilas() > 0) {\r\n List lis_totales = con.obtenerTotalesEstadoResultados(false, fecha_inicio, fecha_fin);\r\n double tot_ingresos = Double.parseDouble(lis_totales.get(0) + \"\");\r\n double tot_gastos = Double.parseDouble(lis_totales.get(1) + \"\");\r\n double tot_costos = Double.parseDouble(lis_totales.get(2) + \"\");\r\n double utilidad_perdida = tot_ingresos - (tot_gastos + tot_costos);\r\n parametro.put(\"p_tot_ingresos\", tot_ingresos);\r\n parametro.put(\"p_tot_gastos\", tot_gastos);\r\n parametro.put(\"p_tot_costos\", tot_costos);\r\n parametro.put(\"p_utilidad\", utilidad_perdida);\r\n }\r\n ReporteDataSource data = new ReporteDataSource(tab_estado);\r\n parametro.put(\"titulo\", \"ESTADO DE RESULTADOS\");\r\n sel_tab_nivel.cerrar();\r\n sel_rep.setSeleccionFormatoReporte(parametro, rep_reporte.getPath(), data);\r\n sel_rep.dibujar();\r\n utilitario.addUpdate(\"sel_rep,sel_tab_nivel\");\r\n }\r\n }\r\n\r\n } else if (rep_reporte.getReporteSelecionado().equals(\"Libro Mayor\")) {\r\n if (rep_reporte.isVisible()) {\r\n parametro = new HashMap();\r\n rep_reporte.cerrar();\r\n lis_ide_cndpc_sel.clear();\r\n lis_ide_cndpc_deseleccionados.clear();\r\n int_count_deseleccion = 0;\r\n int_count_seleccion = 0;\r\n sel_tab.getTab_seleccion().setSeleccionados(null);\r\n// utilitario.ejecutarJavaScript(sel_tab.getTab_seleccion().getId() + \".clearFilters();\");\r\n sel_tab.dibujar();\r\n utilitario.addUpdate(\"rep_reporte,sel_tab\");\r\n } else {\r\n if (sel_tab.isVisible()) {\r\n\r\n if (sel_tab.getSeleccionados() != null && !sel_tab.getSeleccionados().isEmpty()) {\r\n System.out.println(\"nn \" + sel_tab.getSeleccionados());\r\n parametro.put(\"ide_cndpc\", sel_tab.getSeleccionados());//lista sel \r\n sel_tab.cerrar();\r\n String estado = \"\" + utilitario.getVariable(\"p_con_estado_comprobante_normal\") + \",\" + utilitario.getVariable(\"p_con_estado_comp_inicial\") + \",\" + utilitario.getVariable(\"p_con_estado_comp_final\");\r\n parametro.put(\"ide_cneco\", estado);\r\n sec_rango_reporte.setMultiple(true);\r\n sec_rango_reporte.dibujar();\r\n utilitario.addUpdate(\"sel_tab,sec_rango_reporte\");\r\n\r\n } else {\r\n utilitario.agregarMensajeInfo(\"Debe seleccionar al menos una cuenta contable\", \"\");\r\n }\r\n// if (lis_ide_cndpc_deseleccionados.size() == 0) {\r\n// System.out.println(\"sel tab lis \" + sel_tab.getSeleccionados());\r\n// parametro.put(\"ide_cndpc\", sel_tab.getSeleccionados());//lista sel \r\n// } else {\r\n// System.out.println(\"sel tab \" + utilitario.generarComillasLista(lis_ide_cndpc_deseleccionados));\r\n// parametro.put(\"ide_cndpc\", utilitario.generarComillasLista(lis_ide_cndpc_deseleccionados));//lista sel \r\n// }\r\n } else if (sec_rango_reporte.isVisible()) {\r\n if (sec_rango_reporte.isFechasValidas()) {\r\n parametro.put(\"fecha_inicio\", sec_rango_reporte.getFecha1());\r\n parametro.put(\"fecha_fin\", sec_rango_reporte.getFecha2());\r\n parametro.put(\"ide_cnlap_haber\", p_con_lugar_haber);\r\n parametro.put(\"ide_cnlap_debe\", p_con_lugar_debe);\r\n sec_rango_reporte.cerrar();\r\n sel_rep.setSeleccionFormatoReporte(parametro, rep_reporte.getPath());\r\n sel_rep.dibujar();\r\n utilitario.addUpdate(\"sel_rep,sec_rango_reporte\");\r\n } else {\r\n utilitario.agregarMensajeInfo(\"Las fechas seleccionadas no son correctas\", \"\");\r\n }\r\n }\r\n }\r\n } else if (rep_reporte.getReporteSelecionado().equals(\"Balance de Comprobacion\")) {\r\n if (rep_reporte.isVisible()) {\r\n parametro = new HashMap();\r\n rep_reporte.cerrar();\r\n sec_rango_reporte.setMultiple(true);\r\n sec_rango_reporte.dibujar();\r\n utilitario.addUpdate(\"rep_reporte,sec_rango_reporte\");\r\n\r\n } else {\r\n if (sec_rango_reporte.isVisible()) {\r\n if (sec_rango_reporte.getFecha1String() != null && !sec_rango_reporte.getFecha1String().isEmpty()) {\r\n if (sec_rango_reporte.getFecha2String() != null && !sec_rango_reporte.getFecha2String().isEmpty()) {\r\n String fecha_fin1 = sec_rango_reporte.getFecha2String();\r\n String fecha_inicio1 = sec_rango_reporte.getFecha1String();\r\n System.out.println(\"fecha fin \" + fecha_fin1);\r\n sec_rango_reporte.cerrar();\r\n\r\n TablaGenerica tab_datos = utilitario.consultar(\"SELECT * FROM sis_empresa e, sis_sucursal s where s.ide_empr=e.ide_empr and s.ide_empr=\" + utilitario.getVariable(\"ide_empr\") + \" and s.ide_sucu=\" + utilitario.getVariable(\"ide_sucu\"));\r\n if (tab_datos.getTotalFilas() > 0) {\r\n parametro.put(\"logo\", tab_datos.getValor(0, \"logo_empr\"));\r\n parametro.put(\"empresa\", tab_datos.getValor(0, \"nom_empr\"));\r\n parametro.put(\"sucursal\", tab_datos.getValor(0, \"nom_sucu\"));\r\n parametro.put(\"direccion\", tab_datos.getValor(0, \"direccion_sucu\"));\r\n parametro.put(\"telefono\", tab_datos.getValor(0, \"telefonos_sucu\"));\r\n parametro.put(\"ruc\", tab_datos.getValor(0, \"identificacion_empr\"));\r\n }\r\n String fechaPeriodoActivo = con.obtenerFechaInicialPeriodoActivo();\r\n// if (fechaPeriodoActivo != null && !fechaPeriodoActivo.isEmpty()) {\r\n parametro.put(\"fecha_inicio\", getFormatoFecha(fecha_inicio1));\r\n parametro.put(\"fecha_fin\", getFormatoFecha(fecha_fin1));\r\n TablaGenerica tab_bal = con.generarBalanceComprobacion(fechaPeriodoActivo, fecha_fin1);\r\n double suma_debe = 0;\r\n double suma_haber = 0;\r\n double suma_deudor = 0;\r\n double suma_acreedor = 0;\r\n for (int i = 0; i < tab_bal.getTotalFilas() - 1; i++) {\r\n suma_debe = Double.parseDouble(tab_bal.getValor(i, \"debe\")) + suma_debe;\r\n suma_haber = Double.parseDouble(tab_bal.getValor(i, \"haber\")) + suma_haber;\r\n suma_deudor = Double.parseDouble(tab_bal.getValor(i, \"deudor\")) + suma_deudor;\r\n suma_acreedor = Double.parseDouble(tab_bal.getValor(i, \"acreedor\")) + suma_acreedor;\r\n }\r\n parametro.put(\"tot_debe\", suma_debe);\r\n parametro.put(\"tot_haber\", suma_haber);\r\n parametro.put(\"tot_deudor\", suma_deudor);\r\n parametro.put(\"tot_acreedor\", suma_acreedor);\r\n ReporteDataSource data = new ReporteDataSource(tab_bal);\r\n sel_rep.setSeleccionFormatoReporte(parametro, rep_reporte.getPath(), data);\r\n sel_rep.dibujar();\r\n utilitario.addUpdate(\"sel_rep,sec_rango_reporte\");\r\n }\r\n// }\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha fin\");\r\n }\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha inicio\");\r\n }\r\n }\r\n\r\n } else if (rep_reporte.getReporteSelecionado().equals(\"Comprobante Contabilidad\")) {\r\n if (rep_reporte.isVisible()) {\r\n if (tab_tabla1.getValor(\"ide_cnccc\") != null) {\r\n parametro = new HashMap();\r\n rep_reporte.cerrar();\r\n parametro.put(\"ide_cnccc\", Long.parseLong(tab_tabla1.getValor(\"ide_cnccc\")));\r\n parametro.put(\"ide_cnlap_haber\", p_con_lugar_haber);\r\n parametro.put(\"ide_cnlap_debe\", p_con_lugar_debe);\r\n sel_rep.setSeleccionFormatoReporte(parametro, rep_reporte.getPath());\r\n sel_rep.dibujar();\r\n utilitario.addUpdate(\"rep_reporte,sel_rep\");\r\n } else {\r\n utilitario.agregarMensajeInfo(\"No se puede generar el reporte\", \"La fila seleccionada no tiene compraqbante de contabilidad\");\r\n }\r\n\r\n }\r\n }\r\n }", "@GET\n @Path(\"jobs/status\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response jobActiveByStatus() {\n List<LGJob> jobs = Utils.getJobManager().getAllLimitFields(\"_id\", \"status\", \"reason\");\n JSONObject ob = new JSONObject();\n for (LGJob job : jobs) {\n JSONObject t = new JSONObject();\n t.put(\"status\", job.getStatusString(job.getStatus()));\n t.put(\"reason\", job.getReason());\n ob.put(job.getJobId(), t);\n }\n return Response.status(200).entity(ob.toString(1)).build();\n }", "public String getStatus()\r\n {\n return (\"1\".equals(getField(\"ApprovalStatus\")) && \"100\".equals(getField(\"HostRespCode\")) ? \"Approved\" : \"Declined\");\r\n }", "public String actualizarPromocionSalarial() {\r\n\t\tif (PromocionSalarialAsignados == null || PromocionSalarialAsignados.size() == 0) {\r\n\t\t\tstatusMessages.clear();\r\n\t\t\tstatusMessages.add(Severity.ERROR,\r\n\t\t\t\t\t\"Debe escoger al menos un puesto para agrupar\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tif (orden.intValue() <= 0) {\r\n\t\t\tstatusMessages.clear();\r\n\t\t\tstatusMessages.add(Severity.ERROR,\r\n\t\t\t\t\t\"El numero de Orden debe ser mayor a 0. Verifique\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tif (exiteNroOrden(\"update\")) {\r\n\t\t\tstatusMessages.clear();\r\n\t\t\tstatusMessages.add(Severity.ERROR,\r\n\t\t\t\t\t\"El numero de Orden ingresado ya existe. Verifique\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tpuestoAgr.setCodGrupo(codigo);\r\n\t\t\tpuestoAgr.setDescripcionGrupo(denominacion);\r\n\t\t\tpuestoAgr.setObservacion(observacion);\r\n\t\t\tif (!orden.equals(puestoAgr.getNroOrden())) {\r\n\t\t\t\tif (!existeOrden())\r\n\t\t\t\t\tpuestoAgr.setNroOrden(orden);\r\n\t\t\t\telse {\r\n\t\t\t\t\tstatusMessages.clear();\r\n\t\t\t\t\tstatusMessages.add(Severity.ERROR,\r\n\t\t\t\t\t\t\t\"El orden ingresado ya existe o no es valido\");\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tpuestoAgr.setUsuAlta(usuarioLogueado.getCodigoUsuario());\r\n\t\t\tpuestoAgr.setFechaAlta(new Date());\r\n\t\t\tem.persist(puestoAgr);\r\n\t\t\tconcursoPuestoAgrHome.setInstance(puestoAgr);\r\n\t\t\t// String resultado = concursoPuestoAgrHome.update();\r\n\t\t\tString mensaje = \"\";\r\n\t\t\ttry {\r\n\r\n\t\t\t\tfor (PromocionConcursoAgr agr : PromocionSalarialAsignadosAux) {\r\n\t\t\t\t\tBoolean esta = false;\r\n\t\t\t\t\tfor (PromocionConcursoAgr c : PromocionSalarialAsignados) {\r\n\t\t\t\t\t\tif (c.getIdPromocionConcursoAgr() != null\r\n\t\t\t\t\t\t\t\t&& c.getIdPromocionConcursoAgr().equals(\r\n\t\t\t\t\t\t\t\t\t\tagr.getIdPromocionConcursoAgr())) {\r\n\t\t\t\t\t\t\testa = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!esta) {\r\n\t\t\t\t\t\tList<PromocionConcursoAgr> lista = new ArrayList<PromocionConcursoAgr>();\r\n\t\t\t\t\t\tlista = buscarConcursoPromocionSalarial();\r\n\t\t\t\t\t\tfor (PromocionConcursoAgr l : lista) {\r\n\t\t\t\t\t\t\tl.setConcursoPuestoAgr(null);\r\n\t\t\t\t\t\t\tl.setEstadoDet(buscarEstado(\"en reserva\"));\r\n\t\t\t\t\t\t\tem.merge(l);\r\n//\t\t\t\t\t\t\tPlantaCargoDet planta = new PlantaCargoDet();\r\n//\t\t\t\t\t\t\tplanta = l.getPromocionSalarial();\r\n//\t\t\t\t\t\t\tplanta.setEstadoDet(buscarEstado(\"en reserva\"));\r\n//\t\t\t\t\t\t\tem.merge(planta);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// em.remove(agr);\r\n\t\t\t\t\t\t// em.flush();\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tLong idCpt = null;\r\n\t\t\t\tString categoria = null;\r\n\t\t\t\tfor (PromocionConcursoAgr c : PromocionSalarialAsignados) {\r\n\t\t\t\t\t// if (c.getConcursoPuestoAgr() == null) {\r\n\t\t\t\t\tBoolean cumple = false;\r\n\r\n\t\t\t\t\r\n\t\t\t\t\tif (c.getPromocionSalarial().getCpt() != null) {\r\n\t\t\t\t\t\tif (c.getPromocionSalarial().getCpt() != null) {\r\n\t\t\t\t\t\t\tif (idCpt == null) {\r\n\t\t\t\t\t\t\t\tidCpt = c.getPromocionSalarial().getCpt()\r\n\t\t\t\t\t\t\t\t\t\t.getId();\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tif (c.getPromocionSalarial().getCpt().getId()\r\n\t\t\t\t\t\t\t\t\t.longValue() == idCpt.longValue()) {\r\n\r\n\t\t\t\t\t\t\t\tif (c.getPromocionSalarial().getCategoria() != null) {\r\n\t\t\t\t\t\t\t\t\tif (categoria == null) {\r\n\t\t\t\t\t\t\t\t\t\tcategoria =c.getPromocionSalarial().getCategoria();\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\tif (categoria == null\r\n\t\t\t\t\t\t\t\t\t\t\t|| categoria\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t.equals(c.getPromocionSalarial().getCategoria())) {\r\n\t\t\t\t\t\t\t\t\t\tcumple = true;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\tif (cumple) {\r\n\t\t\t\t\t\tc.setNroOrden(3);\r\n\t\t\t\t\t\tc.setEstadoDet(buscarEstado(\"agrupado\"));\r\n\t\t\t\t\t\tc.setConcursoPuestoAgr(concursoPuestoAgrHome\r\n\t\t\t\t\t\t\t\t.getInstance());\r\n\t\t\t\t\t\tif (c.getConcursoPuestoAgr() == null)\r\n\t\t\t\t\t\t\tem.persist(c);\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tem.merge(c);\r\n\t\t\t\t\t\t// em.flush();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tmensaje += \" \" + c.getPromocionSalarial().getDescripcion();\r\n\r\n\t\t\t\t\t}\r\n//\t\t\t\t\tPlantaCargoDet planta = new PlantaCargoDet();\r\n//\t\t\t\t\tplanta = c.getPromocionSalarial();\r\n//\t\t\t\t\tplanta.setEstadoDet(buscarEstado(\"agrupado\"));\r\n//\t\t\t\t\tem.merge(planta);\r\n\t\t\t\t\t// em.flush();\r\n\t\t\t\t\t// }\r\n\t\t\t\t}\r\n\t\t\t\tif (!mensaje.trim().isEmpty()) {\r\n\t\t\t\t\tstatusMessages.clear();\r\n\t\t\t\t\tstatusMessages\r\n\t\t\t\t\t\t\t.add(Severity.ERROR,\r\n\t\t\t\t\t\t\t\t\t\"Los puestos: \"\r\n\t\t\t\t\t\t\t\t\t\t\t+ mensaje\r\n\t\t\t\t\t\t\t\t\t\t\t+ \" no pueden ser agrupados, no cumplen las condiciones\");\r\n\t\t\t\t\tconcursoPuestoAgrHome.setInstance(null);\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tint cantidadVacancia = 0;\r\n\t\t\t\t//SI ES PROMOCION SALARIAL\r\n\t\t\t\tif(concurso.getPromocion())\r\n\t\t\t\t\tcantidadVacancia =Integer.parseInt( em.createNativeQuery(\"SELECT COUNT(*)FROM seleccion.promocion_concurso_agr WHERE id_concurso_puesto_agr=\"+puestoAgr.getIdConcursoPuestoAgr()).getSingleResult().toString());\r\n\t\t\t\t\t\r\n\t\t\t\telse\r\n\t\t\t\t//SI NO ES PROMOCION SALARIAL\r\n\t\t\t\t\tcantidadVacancia =Integer.parseInt( em.createNativeQuery(\"SELECT COUNT(*)FROM seleccion.concurso_puesto_det WHERE id_concurso_puesto_agr=\"+puestoAgr.getIdConcursoPuestoAgr()).getSingleResult().toString());\r\n\t\t\t\t\r\n\t\t\t\tpuestoAgr.setCantidadPuestos(cantidadVacancia);\r\n\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t\tif (mensaje.trim().isEmpty()) {\r\n\t\t\t\tem.flush();\r\n\t\t\t\tstatusMessages.clear();\r\n\t\t\t\tstatusMessages.add(Severity.INFO, SeamResourceBundle\r\n\t\t\t\t\t\t.getBundle().getString(\"GENERICO_MSG\"));\r\n\t\t\t}\r\n\t\t\toperacion = \"volver\";\r\n\t\t\treturn \"updated\";\r\n\t\t} catch (Exception e) {\r\n\t\t\tstatusMessages.add(Severity.ERROR, e.getMessage());\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}", "List<Status> getStatusAlteraveis() throws ServiceException;", "String getStatusMessage();", "int getSchedulingValue();", "public static void main(String[] args) {\n LocalDateTime termino = LocalDateTime.now();\n if (termino.getHour() >= 17) {\n if(termino.getMinute() >= 31){\n System.out.println(\"Ar-Condicionado Ligado + produto.getSala()\");\n }\n }\n if(termino.getDayOfWeek().getValue() != 7){\n //depois de consultar no banco e dar o alerta, mudar o atributo leituraAlerta no banco para true\n \n }\n \n }", "public Long getAlertId();", "@PostMapping()\n\tprotected ResponseEntity<Alerta> cadastrarAlerta(@RequestBody Alerta novoAlerta){\n\t\t\n\t\ttry {\n\t\t\tnovoAlerta = service.cadastrarAlerta(novoAlerta);\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn ResponseEntity.badRequest().build();\n\t\t}\n\t\t\n\t\treturn ResponseEntity.ok(novoAlerta);\n\t}", "public void checkForAlerts() {\n }", "String getStatusMessage( );", "java.lang.String getStatus();", "java.lang.String getStatus();", "java.lang.String getStatus();", "java.lang.String getStatus();", "public void setEstatus(EstatusVigenciaDetalle estatus) {\r\n this.estatus = estatus;\r\n }", "io.opencannabis.schema.commerce.CommercialOrder.OrderScheduling getScheduling();", "public void alertasexistencia() {\r\n try {\r\n rs = modelo.alertaexistenciapro();//C.P.M consultamos los producto con alerta en existencia\r\n DefaultTableModel tabla = new DefaultTableModel() {//C.P.M creamos el modelo de la tabla\r\n @Override\r\n public boolean isCellEditable(int rowIndex, int vColIndex) {\r\n return false;\r\n }\r\n };\r\n vista.Talertas.setModel(tabla);//C.P.M le mandamos el modelo\r\n modelo.estructuraAlrta(tabla);//C.P.M obtenemos la estructura de la tabla \"los encabezados\"\r\n ResultSetMetaData rsMd = rs.getMetaData();//C.P.M obtenemos los metadatos de la consulta\r\n int cantidadColumnas = rsMd.getColumnCount();//C.P.M obtenemos la cantidad de las columnas de la consulta\r\n while (rs.next()) {\r\n Object[] fila = new Object[cantidadColumnas];//C.P.M creamos un arreglo con la cantidad de columnas \r\n for (int i = 0; i < cantidadColumnas; i++) {//C.P.M lo recorremos \r\n fila[i] = rs.getObject(i + 1);//C.P.M y agregamos la informacion de la consulta\r\n }\r\n tabla.addRow(fila);//C.P.M lo agregamos a la tabla como una nueva fila\r\n }\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"Ocurrio algun error al consultar las alertas\");\r\n }\r\n }", "public String getAns(){\n String ans = null;\n switch (this.getStatus()){\n case RESULT_OK:\n ans = this.ans.getStr();\n break;\n case RESULT_EXPECTED_EXCEPTION:\n ans = null;\n break;\n case RESULT_UNEXPECTED_EXCEPTION:\n ans = \"\";\n break;\n }\n return ans;\n }", "void displayAppointment(){\n\r\n if(accountType.equalsIgnoreCase(\"Patient\")){\r\n try{\r\n int i = user.getAppointments().size();\r\n Appointment appointment = user.getAppointments().get(i - 1);\r\n appointmentTime.setText(appointment.getDate().toString());\r\n appointmentNewsFeed.setText(\"Dr.\" + appointment.getSpecialist().getFirstname() + \" \" + appointment.getSpecialist().getLastname());\r\n appointmentStatus.setText(appointment.getStatus());\r\n\r\n if(appointment.getStatus().equalsIgnoreCase(\"CANCEL\")){\r\n appointmentStatus.setForeground(Color.RED);\r\n }\r\n else if(appointment.getStatus().equalsIgnoreCase(\"WAITING\")){\r\n appointmentStatus.setForeground(Color.YELLOW);\r\n }\r\n else if(appointment.getStatus().equalsIgnoreCase(\"IN-PROGRESS\")){\r\n appointmentStatus.setForeground(Color.GREEN);\r\n }\r\n else if(appointment.getStatus().equalsIgnoreCase(\"FINISHED\")){\r\n appointmentStatus.setForeground(Color.BLUE);\r\n }\r\n else if(appointment.getStatus().equalsIgnoreCase(\"NEW APPOINTMENT\")){\r\n appointmentStatus.setForeground(Color.cyan);\r\n }\r\n\r\n }catch(Exception e){\r\n appointmentNewsFeed.setText(\"No Upcoming Appointments\");\r\n }\r\n }else if(accountType.equalsIgnoreCase(\"Specialist\")){\r\n try{\r\n int i = user.getAppointments().size();\r\n Appointment appointment = user.getAppointments().get(i - 1);\r\n appointmentTime.setText(appointment.getDate().toString());\r\n appointmentNewsFeed.setText(appointment.getPatient().getFirstname() + \" \" + appointment.getPatient().getLastname());\r\n appointmentStatus.setText(appointment.getStatus());\r\n\r\n if(appointment.getStatus().equalsIgnoreCase(\"CANCEL\")){\r\n appointmentStatus.setForeground(Color.RED);\r\n }\r\n else if(appointment.getStatus().equalsIgnoreCase(\"WAITING\")){\r\n appointmentStatus.setForeground(Color.YELLOW);\r\n }\r\n else if(appointment.getStatus().equalsIgnoreCase(\"IN-PROGRESS\")){\r\n appointmentStatus.setForeground(Color.GREEN);\r\n }\r\n else if(appointment.getStatus().equalsIgnoreCase(\"FINISHED\")){\r\n appointmentStatus.setForeground(Color.BLUE);\r\n }\r\n else if(appointment.getStatus().equalsIgnoreCase(\"NEW APPOINTMENT\")){\r\n appointmentStatus.setForeground(Color.cyan);\r\n }\r\n\r\n\r\n }catch(Exception e){\r\n appointmentNewsFeed.setText(\"No Upcoming Appointments\");\r\n }\r\n\r\n }else if(accountType.equalsIgnoreCase(\"Administrator\")){\r\n try{\r\n int i = user.getAppointments().size();\r\n Appointment appointment = user.getAppointments().get(i - 1);\r\n appointmentTime.setText(appointment.getDate().toString());\r\n appointmentNewsFeed.setText(\"Dr.\" + appointment.getSpecialist().getFirstname() + \" \" + appointment.getSpecialist().getLastname() + \" and \" + appointment.getPatient().getFirstname() + \" \" + appointment.getPatient().getLastname());\r\n appointmentStatus.setText(appointment.getStatus());\r\n\r\n if(appointment.getStatus().equalsIgnoreCase(\"CANCEL\")){\r\n appointmentStatus.setForeground(Color.RED);\r\n }\r\n else if(appointment.getStatus().equalsIgnoreCase(\"WAITING\")){\r\n appointmentStatus.setForeground(Color.YELLOW);\r\n }\r\n else if(appointment.getStatus().equalsIgnoreCase(\"IN-PROGRESS\")){\r\n appointmentStatus.setForeground(Color.GREEN);\r\n }\r\n else if(appointment.getStatus().equalsIgnoreCase(\"FINISHED\")){\r\n appointmentStatus.setForeground(Color.BLUE);\r\n }\r\n else if(appointment.getStatus().equalsIgnoreCase(\"NEW APPOINTMENT\")){\r\n appointmentStatus.setForeground(Color.cyan);\r\n }\r\n\r\n }catch(Exception e){\r\n appointmentNewsFeed.setText(\"No Upcoming Appointments\");\r\n }\r\n }\r\n }", "public String getTODO_ALERT() {\r\n return TODO_ALERT;\r\n }", "private static void checkStatus() {\n\r\n\t\tDate date = new Date();\r\n\t\tSystem.out.println(\"Checking at :\"+date.toString());\r\n\t\tString response = \"\";\r\n\t\ttry {\r\n\t\t\tresponse = sendGET(GET_URL_COVAXIN);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t//System.out.println(response.toString());\r\n\t\tArrayList<Map> res = formatResponse(response);\r\n\r\n\t\tres = checkAvailability(res);\r\n\t\tif(res.size()>0)\r\n\t\t\tnotifyUser(res);\r\n\t\t//System.out.println(emp.toString());\r\n\t}", "public String recuperaCultivoByEstadoAsigCA(){\n\t\tlstCultivo = iDAO.recuperaCultivoByInicilizacionEsquema(idInicializacionEsquema,idEstado);\n\t\t\n\t\treturn SUCCESS;\t\t\n\t}", "int getActivacion();", "public void atualizarStatusSolicitacaoServicoSara() {\n\t\tList<SolicitacaoServico> solicitacoes = new ArrayList<>();\n\t\ttry {\n\t\tgetSolicitacaoServicoDAO().beginTransaction();\n\t\tsolicitacoes = getSolicitacaoServicoDAO().getSolicitacaoServicoNaoFinalizadas();\n\t\tgetSolicitacaoServicoDAO().closeTransaction();\n\t\t\n\t\tfor(SolicitacaoServico s : solicitacoes) {\n\t\t\tif(s.getStatusServicos() != StatusServicos.CRIA_OS_SARA) {\n\t\t\tString status = getSolicitacaoServicoDAO().getStatusServerSara(s.getSolicitacao().getNumeroATI(), s.getOS());\n\t\t\tif(status.equals(\"OS_GERADA\")) {\n\t\t\t\ts.setStatusServicos(StatusServicos.OS_GERADA);\n\t\t\t}else \n\t\t\t\tif(status.equals(\"OS_INICIADA\")) {\n\t\t\t\t\ts.setStatusServicos(StatusServicos.OS_INICIADA);\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t\tif(status.equals(\"FINALIZADO\")) {\n\t\t\t\t\t\ts.setStatusServicos(StatusServicos.FINALIZADO);\n\t\t\t\t\t}\n\t\t\tgetDAO().beginTransaction();\n\t\t\talterar(s.getSolicitacao(), \"Alteração de Status do serviço\",s.getSolicitacao().getUltResponsavel());\n\t\t\tgetDAO().commitAndCloseTransaction();\n\t\t\t}\n\t\t\n\t\t}\n\t\t}catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "public Optional<String> getAlert() {\n return alert;\n }", "public Optional<String> getAlert() {\n return alert;\n }", "public String alertaObtemTextoEAceita() {\n Alert alerta = getDriver().switchTo().alert();\n String msg = alerta.getText();\n alerta.accept();\n\n return msg;\n }", "@Override\n public List<Object> getMiniChartCommStatusByLocation(\n Map<String, Object> condition, String[] arrFmtmessagecommalert) {\n return null;\n }", "public void cambioEstadAvaluo() {\r\n try {\r\n if (\"\".equals(mBRadicacion.Radi.getObservacionAvaluo()) || \"\".equals(mBRadicacion.Radi.getEstadoAvaluo())) {\r\n mbTodero.setMens(\"Falta informacion por Llenar\");\r\n mbTodero.warn();\r\n } else {\r\n mBRadicacion.Radi.CambioEstRad(mBsesion.codigoMiSesion());\r\n mbTodero.setMens(\"La informacion ha sido guardada correctamente\");\r\n mbTodero.info();\r\n mbTodero.resetTable(\"FRMSeguimiento:SeguimientoTable\");\r\n RequestContext.getCurrentInstance().execute(\"PF('DlgEstAvaluo').hide()\");\r\n ListSeguimiento = Seg.ConsulSeguimAvaluos(mBsesion.codigoMiSesion());//VARIABLES DE SESION\r\n }\r\n } catch (Exception e) {\r\n mbTodero.setMens(\"Error en el metodo '\" + this.getClass() + \".cambioEstadAvaluo()' causado por: \" + e.getMessage());\r\n mbTodero.error();\r\n }\r\n }", "private void dialogCreateAppointment(){\n\n String day = spin_day.getSelectedItem().toString();//Get the text of the spinner\n String time = spin_start.getSelectedItem().toString()+ \" to \" +\n spin_end.getSelectedItem().toString();//Get the text of the spinner\n String fullTime = day + \" at \" + time;\n\n /**\n * Event of the dialog box (found on STACKOVERFLOW)\n */\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Appointment\");\n builder.setMessage(\"You sure you want to create an Appointment:\\n\" +\n fullTime);\n\n\n builder.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n getValidity();\n }\n });\n builder.setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n }\n });\n AlertDialog alert = builder.create();\n alert.show();\n\n }", "public String getNombreEstatusObjeto() {\r\n\t\treturn nombreEstatusObjeto;\r\n\t}", "public Object verificarSLAdeTicket(Ticket ticket, boolean enTexto) {\n\n StringBuilder respuesta = new StringBuilder();\n\n String prioridadTicket = ticket.getPrioridadTicketcodigo().getNombre().toLowerCase().trim();\n\n int tiempoDeRespuestaEsperado = 0;\n\n int tiempoDeResolucionEsperado = ticket.getItemProductonumeroSerial().getContratonumero().getSlaid().getTiempoDeSolucion();\n\n if (prioridadTicket.contains(\"alta\")) {\n tiempoDeRespuestaEsperado = ticket.getItemProductonumeroSerial().getContratonumero().getSlaid().getTiempoRespuestaPrioridadAlta();\n } else if (prioridadTicket.contains(\"media\")) {\n tiempoDeRespuestaEsperado = ticket.getItemProductonumeroSerial().getContratonumero().getSlaid().getTiempoRespuestaPrioridadMedia();\n } else if (prioridadTicket.contains(\"baja\")) {\n tiempoDeRespuestaEsperado = ticket.getItemProductonumeroSerial().getContratonumero().getSlaid().getTiempoRespuestaPrioridadBaja();\n }\n\n //En este segmento de código se verifica el tiempo de respuesta inicial\n respuesta.append(\"Tiempo de Respuesta Inicial\\n\");\n respuesta.append(\"Tiempo esperado: \").append(tiempoDeRespuestaEsperado).append(\"h\\n\");\n Date fechaDeCreacion = ticket.getFechaDeCreacion();\n Date fechaDePrimerContacto = ticket.getFechaDePrimerContacto();\n long duracion1 = fechaDeCreacion.getTime() - fechaDePrimerContacto.getTime();\n long diferenciaEnHoras1 = TimeUnit.MILLISECONDS.toHours(duracion1);\n respuesta.append(\"Tiempo real: \").append(diferenciaEnHoras1).append(\"h\\n\\n\");\n\n //En este segmento de código se verifica el tiempo de resolución del caso\n respuesta.append(\"Tiempo de Finalización de Ticket\\n\");\n respuesta.append(\"Tiempo esperado: \").append(tiempoDeResolucionEsperado).append(\"h\\n\");\n long duracion2 = ticket.getFechaDeCreacion().getTime() - ticket.getFechaDeCierre().getTime();\n long diferenciaEnHoras2 = TimeUnit.MILLISECONDS.toHours(duracion2);\n respuesta.append(\"Tiempo real: \").append(diferenciaEnHoras2).append(\"h\\n\");\n\n if (enTexto) {\n return respuesta.toString();\n } else {\n return diferenciaEnHoras1 <= tiempoDeRespuestaEsperado && diferenciaEnHoras2 <= tiempoDeResolucionEsperado;\n }\n\n }", "public void editarTbagendamento() {\n\n if (tbagendamento.getTmdataagendamento().after(TimeControl.getDateIni())) {\n if (agendamentoLogic.editTbagendamento(tbagendamento)) {\n AbstractFacesContextUtils.redirectPage(PagesUrl.URL_AGENDAMENTO_LIST);\n AbstractFacesContextUtils.addMessageInfo(\"Agendamento editado com sucesso.\");\n } else {\n AbstractFacesContextUtils.addMessageWarn(\"Falhar ao realizado ediçãos do agendamento.\");\n }\n } else {\n AbstractFacesContextUtils.addMessageWarn(\"verifique se a data de agendamento esta correta.\");\n }\n\n }", "public String getDescripcionEstatusObjeto() {\r\n\t\treturn descripcionEstatusObjeto;\r\n\t}", "String getStatus();", "String getStatus();", "String getStatus();", "String getStatus();", "String getStatus();", "public ArrayList<Invitato> getAssegnamentiTavolo(){\n return AssegnamentiTavolo;\n }", "List<Averia> listarAverias() throws BusinessException;", "public void setEstatus(String estatus) {\r\n this.estatus = estatus;\r\n }", "public String accionemergencia(){\n\t\tString resp=\"\";\n\t\tif(puntosvida<=5 && acc!=1){\n\t\t\tpuntosvida=puntosvida+15;\n\t\t\tresp=\"\\nAccion de emergencia \"+ tipo +\"activada vida +15\";\n\t\t\tacc=1;\n\t\t}\n\t\treturn resp;\n\t}", "@GET\n @Path(\"{thingName}/{status}\")\n @Produces(MediaType.APPLICATION_JSON)\n public String recieveAlarm(@PathParam(\"thingName\") String thingName, \n @PathParam(\"status\") String status,@Context UriInfo info) {\n\n MultivaluedMap queryMap = info.getQueryParameters();\n Iterator itr = queryMap.keySet().iterator();\n HashMap<String, String> dataMap = new HashMap<>(); \n while(itr.hasNext()){\n Object key = itr.next();\n Object value = queryMap.getFirst(key);\n dataMap.put(key.toString(), value.toString());\n }\n ThingInfoMap thingInfoMap = new ThingInfoMap(thingName, new Timestamp(new Date().getTime()).toString(),status);\n thingInfoMap.setContent(dataMap);\n \n int alarmID = database.addAlarm(thingInfoMap);\n Dweet newDweet;\n if(alarmID != -1){\n thingInfoMap.setAlarmID(alarmID);\n newDweet = new Dweet(\"succeeded\", \"sending\", \"alarm\", thingInfoMap);\n newDweet.setTo(\"myMobileA\"); // it's not included in database\n String warningMsg = gson.toJson(newDweet);\n //send alarm to mobile use GCM\n sendToMobileByGCM(warningMsg);\n return warningMsg;\n } else {\n newDweet = new Dweet(\"failed\", \"alarm is failed to added\");\n return gson.toJson(newDweet);\n }\n\n }", "public int getJobStatus(int jNo);", "public abstract String getStatusMessage();", "@Override\r\n\tpublic Map<String, String> getAlertMeses() {\n\t\treturn null;\r\n\t}", "private void validarhorarioconotroshorariosactivos(HorarioAsignado horarioasignado, List<HorarioAsignado> horarios) throws LogicaException, ParseException, DatoException {\nGregorianCalendar startasignado=new GregorianCalendar();\nDate startdateasignado= new Date(horarioasignado.getValidezinicio().getTime());\nstartasignado.setTime(startdateasignado);\nGregorianCalendar endasignado=new GregorianCalendar();\nDate enddateasignado= new Date(horarioasignado.getValidezfin().getTime());\nendasignado.setTime(enddateasignado);\n\nint tempfrecasignado = horarioasignado.getHorario().getIdfrecuenciaasignacion().intValue();\nList<Integer> diadelasemanaasignado = diadelasemana(tempfrecasignado);\nList<HashMap<String, Object>> dataasignado = Util.diferenciaEnDiasconFrecuencia(startasignado, endasignado,diadelasemanaasignado,tempfrecasignado);\n\n\n\n\nfor(HorarioAsignado ho:horarios){\n\t\t\tif(ho.getIdhorarioasignado().equals(horarioasignado.getIdhorarioasignado())){\n\t\t\t\n\t\t\t}else{\n\t\t\tif(ho.getIdhorario()==horarioasignado.getIdhorario()){\n\t\t\t\n\t\t\t/*//cedulasconhorarios.add(em);\n\t\t\tif (horarioasignado.getValidezinicio().after(ho.getValidezinicio()) && horarioasignado.getValidezinicio().before(ho.getValidezfin())){\n\t\t\tthrow new LogicaException(\"este contrato ya tiene asociado ese horario\"\n\t\t\t+ \" entre las fechas \"+ho.getValidezinicio()+\" y \"+ ho.getValidezfin());\n\t\t\t\n\t\t\t}*/\n\t\t\t\n\t\t\t}else{\n\t\t\t\n\t\t\t}\n\n\t\tContrato contrato = contratoEJB.getContratosporId(ho.getIdcontrato());\n\t\tEmpleadoBean empleado = empleadoEJB.buscarEmpleadosporId(contrato.getIdempleado());\t\n\tGregorianCalendar start=new GregorianCalendar();\n\tDate startdate= new Date(ho.getValidezinicio().getTime());\n\tstart.setTime(startdate);\n\tGregorianCalendar end=new GregorianCalendar();\n\tDate enddate= new Date(ho.getValidezfin().getTime());\n\tend.setTime(enddate);\n\t\n\tint tempfrec = ho.getHorario().getIdfrecuenciaasignacion().intValue();\n\tList<Integer> diadelasemana = diadelasemana(tempfrec);\n\tList<HashMap<String, Object>> data = Util.diferenciaEnDiasconFrecuencia(start, end,diadelasemana,tempfrec);\n\t\n\t\t\t\t\tfor(HashMap<String, Object> diadehorario:data){\n\t\t\t\tHashMap<String, Object> horariofechas=new HashMap<String, Object>();\n\t\t\t\tGregorianCalendar fecha = (GregorianCalendar)diadehorario.get(\"fecha\");\n\t\t\t\tDate fechadat =fecha.getTime();\n\t\t\t\tGregorianCalendar fechafin = (GregorianCalendar)diadehorario.get(\"fechafin\");\n\t\t\t\tDate fechafindat = fechafin.getTime();\n\t\t\t\tfor(HashMap<String, Object> diaasignado:dataasignado){\n\t\t\t\t\t\tHashMap<String, Object> horariofechasasignadas=new HashMap<String, Object>();\n\t\t\t\t\t\tGregorianCalendar fechaasignada = (GregorianCalendar)diaasignado.get(\"fecha\");\n\t\t\t\t\t\tDate fechaasignadadat =fechaasignada.getTime();\n\t\t\t\t\t\tGregorianCalendar fechafinasignada = (GregorianCalendar)diaasignado.get(\"fechafin\");\n\t\t\t\t\t\tDate fechafinasignadadat = fechafinasignada.getTime();\n\t\t\t\t\t\t\t\t\tif(fechaasignada.after(fechafin)){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tif((fechaasignada.getTime().after(fecha.getTime())||fechaasignada.getTime().equals(fecha.getTime())) && fechaasignada.getTime().before(fechafin.getTime()) ){\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//\tif((fechaasignada.getTime().after(fecha.getTime()) && fechaasignada.getTime().before(fechafin.getTime())) ){\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tthrow new LogicaException(\"Este contrato del empleado con identificación numero:\"+empleado.getEmpleadoidentificacion().getNumeroidentificacion() +\" ya tiene asociado un horario\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" en las fechas \"+Util.dateToString(fecha.getTime(), \"dd/MM/yyyy HH:mm\") +\" y \"+ Util.dateToString(fechafin.getTime(),\"dd/MM/yyyy HH:mm\")+\" debe seleccionar un rango de dias diferente o un horario diferente\");\n\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tif((fechafinasignada.getTime().after(fecha.getTime())||fechafinasignada.getTime().equals(fecha.getTime())) && fechafinasignada.getTime().before(fechafin.getTime()) ){\n\t\t\t\t\t\t\t\t\t\t\t\tthrow new LogicaException(\"Este contrato del empleado con identificación numero:\"+empleado.getEmpleadoidentificacion().getNumeroidentificacion() +\" ya tiene asociado un horario\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" en las fechas \"+Util.dateToString(fecha.getTime(), \"dd/MM/yyyy HH:mm\")+\" y \"+ Util.dateToString(fechafin.getTime(),\"dd/MM/yyyy HH:mm\")+\" debe seleccionar un rango de dias diferente o un horario diferente\");\n\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tif((fecha.getTime().after(fechaasignada.getTime() ) && fecha.getTime().before(fechafinasignada.getTime())) ){\n\t\t\t\t\t\t\t\t\t\t\t\tthrow new LogicaException(\"Este contrato del empleado con identificación numero:\"+empleado.getEmpleadoidentificacion().getNumeroidentificacion() +\" ya tiene asociado un horario\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" en las fechas \"+Util.dateToString(fecha.getTime(), \"dd/MM/yyyy HH:mm\")+\" y \"+ Util.dateToString(fechafin.getTime(),\"dd/MM/yyyy HH:mm\")+\" debe seleccionar un rango de dias diferente o un horario diferente\");\n\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tif((fechafin.getTime().after(fechaasignada.getTime() ) && fechafin.getTime().before(fechafinasignada.getTime())) ){\n\t\t\t\t\t\t\t\t\t\t\t\tthrow new LogicaException(\"Este contrato del empleado con identificación numero:\"+empleado.getEmpleadoidentificacion().getNumeroidentificacion() +\" ya tiene asociado un horario\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \" en las fechas \"+Util.dateToString(fecha.getTime(), \"dd/MM/yyyy HH:mm\")+\" y \"+ Util.dateToString(fechafin.getTime(),\"dd/MM/yyyy HH:mm\")+\" debe seleccionar un rango de dias diferente o un horario diferente\");\n\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t}\n\n}\n\n\n}\n\n\n/////////////////////////fin validacion/\n}", "public void alerta() {\r\n try {\r\n rs = modelo.Alerta();//C.P.M consultamos los producto con alerta en existencia\r\n DefaultTableModel alerta = new DefaultTableModel() {//C.P.M Creamos el modelo de nuestra tabla\r\n @Override\r\n public boolean isCellEditable(int rowIndex, int vColIndex) {//C.P.M le decimos que no seran editables los componetnes\r\n return false;\r\n }\r\n };\r\n vista.Talertas.setModel(alerta);//C.P.M le mandamos el modelo a la tabla de la vista\r\n modelo.estructuraAlrta(alerta);//C.P.M obtenemos la estructura de la tabla \"los encabezados\"\r\n ResultSetMetaData rsMd = rs.getMetaData();//C.P.M Obtenemos los metadatos para obtener la cantidad del columnas que llegan\r\n int cantidadColumnas = rsMd.getColumnCount();//C.P.M la cantidad la alojamos dentro de un entero\r\n while (rs.next()) {//C.P.M recorremos la informacion obtenida\r\n Object[] fila = new Object[cantidadColumnas];//C.P.M creamos un arreglo con el tamano de el resultado\r\n for (int i = 0; i < cantidadColumnas; i++) {//C.P.M lo recorremos \r\n fila[i] = rs.getObject(i + 1);//C.P.M y insertamos los valores que trajo del modelo\r\n }\r\n alerta.addRow(fila);//C.P.M agregamos el arreglo como una nueva fila dentro de la tabla\r\n }\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"Ocurrio un error al consultar los producto con alerta\");\r\n }\r\n }", "public boolean getAtmStatus();" ]
[ "0.7078232", "0.70343053", "0.6221994", "0.5711966", "0.5630885", "0.55461174", "0.55306304", "0.5529068", "0.5421789", "0.54020077", "0.5363857", "0.5352941", "0.5292447", "0.5275244", "0.5237196", "0.52275467", "0.5201119", "0.51857406", "0.51697683", "0.5145807", "0.51276493", "0.5082117", "0.5077752", "0.50773543", "0.50682867", "0.5065794", "0.50580853", "0.5050593", "0.5041362", "0.5039551", "0.50274986", "0.50138396", "0.49920806", "0.49910042", "0.49898043", "0.49894825", "0.49853393", "0.49845785", "0.49815232", "0.4975236", "0.49678138", "0.49578494", "0.4952548", "0.4950767", "0.49376905", "0.49333885", "0.4930685", "0.4930685", "0.49180335", "0.48951685", "0.48877347", "0.4882386", "0.4869445", "0.48674858", "0.4862014", "0.4860569", "0.4857577", "0.48545575", "0.48543763", "0.48435876", "0.4840287", "0.4840287", "0.4840287", "0.4840287", "0.48379835", "0.48360515", "0.48327264", "0.4829081", "0.48232445", "0.4812491", "0.4812127", "0.48117822", "0.48098636", "0.48036307", "0.47879222", "0.47879222", "0.47874397", "0.47871327", "0.4785626", "0.47853288", "0.47845268", "0.47833025", "0.47799635", "0.47768635", "0.47768247", "0.47768247", "0.47768247", "0.47768247", "0.47768247", "0.4772934", "0.47700688", "0.47618854", "0.47617248", "0.47594228", "0.474644", "0.47444668", "0.47412178", "0.4739717", "0.4738027", "0.473456" ]
0.75329596
0
Metodo....:getAlertaPorValor Descricao.:Busca o valor do status do alarme baseado no valor do contador do ultimo evento
private String getAlertaPorValor(Evento ultimoEvento) { // O alerta padrao sera o status OK, dependendo do valor do atraso esse alerta pode ser modificado String alerta = Alarme.ALARME_OK; // Verifica se o contador classifica como alerta double valor = ultimoEvento.getValorContador(); // Verifica se o contador classifica como alerta pelo valor minimo ou maximo if ( valor > alarme.getValorMinFalha() && valor < alarme.getValorMinAlerta() ) { alerta = Alarme.ALARME_ALERTA; alarme.setMotivoAlarme(Alarme.MOTIVO_VALOR_MIN); } else if ( valor > alarme.getValorMaxAlerta() && valor < alarme.getValorMaxFalha() ) { alerta = Alarme.ALARME_ALERTA; alarme.setMotivoAlarme(Alarme.MOTIVO_VALOR_MAX); } // Verifica se o contador classifica como falha. Devido a hierarquia de erro // o teste para falha e feito posterior pois logicamente tem uma gravidade superior if ( valor < alarme.getValorMinFalha() ) { alerta = Alarme.ALARME_FALHA; alarme.setMotivoAlarme(Alarme.MOTIVO_VALOR_MIN); } else if ( valor > alarme.getValorMaxFalha() ) { alerta = Alarme.ALARME_FALHA; alarme.setMotivoAlarme(Alarme.MOTIVO_VALOR_MAX); } logger.debug(alarme.getIdAlarme()+" - Contador:"+valor); return alerta; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getAlertaPorStatusExecucao(Evento ultimoEvento)\n\t{\n\t\t// O alerta padrao sera o status atual do alarme, dependendo do valor do atraso esse alerta pode ser modificado\n\t\tString alerta = Alarme.ALARME_OK;\n\t\t// No caso de status de execucao, o alarme possui somente dois estados\n\t\t// Ok ou Nao Ok que entao se classifica como OK ou FALHA\n\t\tif (ultimoEvento.getCodigoRetorno() != Alarme.CODIGO_RETORNO_OK)\n\t\t\talerta = Alarme.ALARME_FALHA;\n\t\t\n\t\t// Define o motivo do Alarme\n\t\talarme.setMotivoAlarme(Alarme.MOTIVO_RETORNO);\n\n\t\tlogger.debug(alarme.getIdAlarme()+\" - CodigoRetorno:\"+ultimoEvento.getCodigoRetorno());\n\t\treturn alerta;\n\t}", "private String getStatusAlarme(Evento ultimoEvento)\n\t{\n\t\t// Se o ultimo evento nao existir para um dado alarme entao o novo status \n\t\t// sera o mesmo status atual definido para o alarme. Portanto a analise sera\n\t\t// feita somente se existir um ultimo evento\n\t\tString statusAlarme = alarme.getStatus();\n\t\tif (ultimoEvento != null)\n\t\t{\n\t\t\t// Busca o valor do alarme ALERTA,FALHA ou OK para o alarme em processamento\n\t\t\t// dependendo de suas configuracoes com relacao a \"scheduling\" (agendamento de datas)\n\t\t\tstatusAlarme = getAlertaPorAgendamento(ultimoEvento);\n\t\t\t\n\t\t\t// Se o status for diferente de OK entao ja atualiza este na tabela para indicar o alerta\n\t\t\t// desse alarme. Caso contrario entao as verificacoes por valores e por resposta serao\n\t\t\t// verificados.\n\t\t\tif (statusAlarme.equals(Alarme.ALARME_OK))\n\t\t\t{\n\t\t\t\tstatusAlarme = getAlertaPorValor(ultimoEvento);\n\t\t\t\t// Caso o status por valor seja ok entao verifica por status da ultima execucao.\n\t\t\t\t// No caso do status ser diferente de ok entao este ja vai para a tabela\n\t\t\t\tif (statusAlarme.equals(Alarme.ALARME_OK))\n\t\t\t\t\tstatusAlarme = getAlertaPorStatusExecucao(ultimoEvento);\n\t\t\t}\n\t\t}\n\t\treturn statusAlarme;\n\t}", "private String getAlertaPorAgendamento(Evento ultimoEvento)\n\t{\n\t\t// Busca o tempo de atraso da ultima execucao com o agendamento especificado\n\t\t// Caso o alarme ainda nao possua eventos registrados entao nao considera este\n\t\t// para o estudo do tempo de atraso\n\t\tDate dtAtual\t\t= Calendar.getInstance().getTime();\n\t\tDate dtUltExecucao\t= ultimoEvento.getDataExecucao();\n\t\tDate dtProxExecucao = alarme.getAgendamento().getProximoAgendamento(dtUltExecucao);\n\t\tlong atraso = (dtAtual.getTime() - dtProxExecucao.getTime())/1000/60;\n\n\t\t// O alerta padrao na verificacao por agendamento e o status OK, se existir atraso\n\t\t// entao verifica a faixa do atraso para identificar a gravidade do alarme (alerta ou falha)\n\t\t// porem sempre que considerado o atraso negativo significa que em relacao a data atual\n\t\t// o proximo agendamento nao esta atrasado\n\t\tString alerta = Alarme.ALARME_OK;\n\n\t\t// Verifica se o atraso se classifica como alerta\n\t\tif (atraso > 0 && atraso > alarme.getAtrasoMaxAlerta() && atraso < alarme.getAtrasoMaxFalha())\n\t\t\talerta = Alarme.ALARME_ALERTA;\n\t\t// Verifica se o atraso se classifica como falha\n\t\tif (atraso > 0 && atraso > alarme.getAtrasoMaxFalha())\n\t\t\talerta = Alarme.ALARME_FALHA;\n\n\t\t// Define o motivo do Alarme\n\t\talarme.setMotivoAlarme(Alarme.MOTIVO_ATRASO);\n\n\t\tlogger.debug(alarme.getIdAlarme()+\" - Atraso:\"+atraso);\n\t\treturn alerta;\n\t}", "public void setAlerta(int _alerta) {\r\n\t\tthis.alerta = _alerta;\r\n\t}", "private int obtieneEstatusBateria() {\n\t\t\n\t\ttry \n { \n IntentFilter batIntentFilter = \n new IntentFilter(Intent.ACTION_BATTERY_CHANGED); \n Intent battery = \n this.registerReceiver(null, batIntentFilter); \n int nivelBateria = battery.getIntExtra(BatteryManager.EXTRA_LEVEL, -1); \n return nivelBateria; \n } \n catch (Exception e) \n { \n Toast.makeText(getApplicationContext(), \n \"Error al obtener estado de la bateria\",\n Toast.LENGTH_SHORT).show(); \n return 0; \n } \n\t}", "public void anulaAvaluo() {\r\n try {\r\n if (\"\".equals(mBRadicacion.Radi.getObservacionAnulaAvaluo())) {\r\n mbTodero.setMens(\"Falta informacion por Llenar\");\r\n mbTodero.warn();\r\n } else {\r\n int CodRad = mBRadicacion.Radi.getCodAvaluo();\r\n mBRadicacion.Radi.AnulaRadicacion(mBsesion.codigoMiSesion());\r\n mbTodero.setMens(\"El Avaluo N*: \" + CodRad + \" ha sido anulada\");\r\n mbTodero.info();\r\n mbTodero.resetTable(\"FRMSeguimiento:SeguimientoTable\");\r\n mbTodero.resetTable(\"FormMisAsignados:RadicadosSegTable\");\r\n RequestContext.getCurrentInstance().execute(\"PF('DLGAnuAvaluo').hide()\");\r\n ListSeguimiento = Seg.ConsulSeguimAvaluos(mBsesion.codigoMiSesion());//VARIABLES DE SESION\r\n }\r\n } catch (Exception e) {\r\n mbTodero.setMens(\"Error en el metodo '\" + this.getClass() + \".anulaAvaluo()' causado por: \" + e.getMessage());\r\n mbTodero.error();\r\n }\r\n }", "protected void mensajesAlerta() {\n\n// if(((Values)tipoViviendaSpinner.getSelectedItem()).getKey().equals(\"1\") &&\n// ((Values)materialTechoSpinner.getSelectedItem()).getKey().equals(\"6\")){\n// getAlert(getString(R.string.validacion_aviso),getString(R.string.mv_idTipoViviendaCasaMaterialTecho));\n// }\n//\n// if(((Values)tipoViviendaSpinner.getSelectedItem()).getKey().equals(\"2\") &&\n// ((Values)materialTechoSpinner.getSelectedItem()).getKey().equals(\"6\")){\n// getAlert(getString(R.string.validacion_aviso),getString(R.string.mv_idTipoViviendaDepartamentoMaterialTecho));\n// }\n\n if(((Values)tipoViviendaSpinner.getSelectedItem()).getKey().equals(\"2\") &&\n ((Values)ubicacionAguaSpinner.getSelectedItem()).getKey().equals(\"2\")){\n getAlert(getString(R.string.validacion_aviso),getString(R.string.mv_idTipoViviendaUbicacionAgua));\n }\n\n if(((Values)tipoViviendaSpinner.getSelectedItem()).getKey().equals(\"2\") &&\n ((Values)ubicacionSanitarioSpinner.getSelectedItem()).getKey().equals(\"2\")){\n getAlert(getString(R.string.validacion_aviso),getString(R.string.mv_idTipoViviendaUbicacionSanitario));\n }\n\n if( ((Values)tipoViviendaSpinner.getSelectedItem()).getKey().equals(\"3\") &&\n Integer.parseInt(((Values)tipoHogarSpinner.getSelectedItem()).getKey()) < 3 &&\n ((Values)documentoHogarSpinner.getSelectedItem()).getKey().equals(\"1\") ){\n getAlert(getString(R.string.validacion_aviso),getString(R.string.mv_idTipoViviendaTipoHogarDocumento));\n }\n\n if(((Values)materialTechoSpinner.getSelectedItem()).getKey().equals(\"6\")){\n getAlert(getString(R.string.validacion_aviso),getString(R.string.mv_materialTechoOpcionOtro));\n }\n\n if(((Values)servicioSanitarioSpinner.getSelectedItem()).getKey().equals(\"3\") &&\n ((Values)ubicacionSanitarioSpinner.getSelectedItem()).getKey().equals(\"1\")){\n getAlert(getString(R.string.validacion_aviso),getString(R.string.mv_idServicioSanitarioUbicacionSanitarioPozo));\n }\n\n if(((Values)servicioSanitarioSpinner.getSelectedItem()).getKey().equals(\"4\") &&\n ((Values)ubicacionSanitarioSpinner.getSelectedItem()).getKey().equals(\"1\")){\n getAlert(getString(R.string.validacion_aviso),getString(R.string.mv_idServicioSanitarioUbicacionSanitarioDescarga));\n }\n\n if(((Values)viaAccesoPrincipalSpinner.getSelectedItem()).getKey().equals(\"6\") &&\n ((Values)eliminaBasuraSpinner.getSelectedItem()).getKey().equals(\"1\")){\n getAlert(getString(R.string.validacion_aviso),getString(R.string.mv_idViaAccesoPrincipalEliminanBasura));\n }\n }", "public void cambioEstadAvaluo() {\r\n try {\r\n if (\"\".equals(mBRadicacion.Radi.getObservacionAvaluo()) || \"\".equals(mBRadicacion.Radi.getEstadoAvaluo())) {\r\n mbTodero.setMens(\"Falta informacion por Llenar\");\r\n mbTodero.warn();\r\n } else {\r\n mBRadicacion.Radi.CambioEstRad(mBsesion.codigoMiSesion());\r\n mbTodero.setMens(\"La informacion ha sido guardada correctamente\");\r\n mbTodero.info();\r\n mbTodero.resetTable(\"FRMSeguimiento:SeguimientoTable\");\r\n RequestContext.getCurrentInstance().execute(\"PF('DlgEstAvaluo').hide()\");\r\n ListSeguimiento = Seg.ConsulSeguimAvaluos(mBsesion.codigoMiSesion());//VARIABLES DE SESION\r\n }\r\n } catch (Exception e) {\r\n mbTodero.setMens(\"Error en el metodo '\" + this.getClass() + \".cambioEstadAvaluo()' causado por: \" + e.getMessage());\r\n mbTodero.error();\r\n }\r\n }", "public String alertaObtemTextoEAceita() {\n Alert alerta = getDriver().switchTo().alert();\n String msg = alerta.getText();\n alerta.accept();\n\n return msg;\n }", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "@Override\n\tpublic void respuestaCompletada(WSInfomovilMethods metodo,\n\t\t\tlong milisegundo, WsInfomovilProcessStatus status) {\n\t\tif(alerta != null)\n\t\t\talerta.dismiss();\n\t\tdatosUsuario = DatosUsuario.getInstance();\n\t\timagenAdapter.setListAdapter(datosUsuario.getListaImagenes());\n\t\tarrayGaleria = datosUsuario.getListaImagenes();\n\t\timagenAdapter.notifyDataSetChanged();\n\t\tif (status == WsInfomovilProcessStatus.EXITO) {\n\t\t\talerta = new AlertView(activity, AlertViewType.AlertViewTypeInfo, getResources().getString(R.string.txtActualizacionCorrecta));\n\t\t\talerta.setDelegado(this);\n\t\t\talerta.show();\n\t\t}\n\t\telse {\n\t\t\tif (arrayGaleriaAux != null && arrayGaleriaAux.size()>0) {\n\t\t\t\tdatosUsuario.setListaImagenes(arrayGaleriaAux);\n\t\t\t}\n\t\t\talerta = new AlertView(activity, AlertViewType.AlertViewTypeInfo, getResources().getString(R.string.txtErrorActualizacion));\n\t\t\talerta.setDelegado(this);\n\t\t\talerta.show();\n\t\t}\n\n\t}", "int getEventValue();", "private void ruotaNuovoStatoPaziente() {\r\n\t\tif(nuovoStatoPaziente==StatoPaziente.WAITING_WHITE)\r\n\t\t\tnuovoStatoPaziente = StatoPaziente.WAITING_YELLOW;\r\n\t\telse if(nuovoStatoPaziente==StatoPaziente.WAITING_YELLOW)\r\n\t\t\tnuovoStatoPaziente = StatoPaziente.WAITING_RED;\r\n\t\telse if(nuovoStatoPaziente==StatoPaziente.WAITING_RED)\r\n\t\t\tnuovoStatoPaziente = StatoPaziente.WAITING_WHITE;\r\n\t\t\r\n\t}", "Integer obtenerEstatusPolizaGeneral(int idEstatusPolizaPago);", "public void setEstatus(EstatusVigenciaDetalle estatus) {\r\n this.estatus = estatus;\r\n }", "public void alertUser(int status){\r\n\r\n }", "public EstatusVigenciaDetalle getEstatus() {\r\n return estatus;\r\n }", "@Command\n\tpublic void actualizarEstatus(@BindingParam(\"analista\") final Analista analista){\n\t\tsuper.mostrarMensaje(\"Confirmacion\", \"¿Está seguro que desea cambiar el estatus del analista?\", Messagebox.EXCLAMATION, new Messagebox.Button[]{Messagebox.Button.YES,Messagebox.Button.NO}, \n\t\t\t\tnew EventListener(){\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onEvent(Event event) throws Exception {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tMessagebox.Button button = (Messagebox.Button) event.getData();\n\t\t\t\t\t\tif (button == Messagebox.Button.YES) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tanalista.setiEstatus(EstatusPersonaFactory.getEstatusActivo());\n\t\t\t\t\t\t\t\t//EL METODO DICE ACTUTALIZARPERSONA\n\t\t\t\t\t\t\t\tsMaestros.acutalizarPersona(analista);\n\t\t\t\t\t\t\t\tcambiarAnalistas(0, null, null);\n\t\t\t\t\t\t\t\tnotifyChange(\"analistas\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\n\t\t}, null);\n\t}", "public Alert getAlert(com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.alert.v1.Alert res){\n\t\tAlert alert = new Alert();\n\t\t\n\t\tif( res.getAlertLineNo() != null ){\n\t\t\talert.setAlertLineNo( res.getAlertLineNo().intValue() );\n\t\t}\n\t\tif( res.getAlertSerialNo() != null ){\n\t\t\talert.setAlertSerialNo( res.getAlertSerialNo().intValue() );\n\t\t}\n\t\talert.setAlertLevel( res.getAlertLevel() );\n\t\talert.setAlertId( res.getAlertId() );\n\t\talert.setAlertMessage( res.getAlertMessage() );\n\t\talert.setAlertType( res.getAlertType() );\n\t\talert.appendText( res.getText() );\n\t\t\n\t\treturn alert;\n\t}", "@Override\n\t\t\t\t\tpublic void onEvent(Event event) throws Exception {\n\t\t\t\t\t\tMessagebox.Button button = (Messagebox.Button) event.getData();\n\t\t\t\t\t\tif (button == Messagebox.Button.YES) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tanalista.setiEstatus(EstatusPersonaFactory.getEstatusActivo());\n\t\t\t\t\t\t\t\t//EL METODO DICE ACTUTALIZARPERSONA\n\t\t\t\t\t\t\t\tsMaestros.acutalizarPersona(analista);\n\t\t\t\t\t\t\t\tcambiarAnalistas(0, null, null);\n\t\t\t\t\t\t\t\tnotifyChange(\"analistas\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onEvent(Event event) throws Exception {\n\t\t\t\t\t\tMessagebox.Button button = (Messagebox.Button) event.getData();\n\t\t\t\t\t\tif (button == Messagebox.Button.YES) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tanalista.setiEstatus(EstatusPersonaFactory.getEstatusInactivo());\n\t\t//\t\t\t\tEL METODO DICE ACTUTALIZARPERSONA\n\t\t\t\t\t\tsMaestros.acutalizarPersona(analista);\n\t\t\t\t\t\tcambiarAnalistas(0, null, null);\n\t\t\t\t\t\tnotifyChange(\"analistas\");\n\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\t\tif (sTransaccion.validarAnalistaEnRequerimientos(analista)){\n//\t\t\t\t\t\t\t\t\t\t\tanalista.setiEstatus(EstatusPersonaFactory.getEstatusInactivo());\n//\t\t\t\t\t\t\t\t\t\t\t//EL METODO DICE ACTUTALIZARPERSONA\n//\t\t\t\t\t\t\t\t\t\t\tsMaestros.acutalizarPersona(analista);\n//\t\t\t\t\t\t\t\t\t\t\tcambiarAnalistas(0, null, null);\n//\t\t\t\t\t\t\t\t\t\t\tnotifyChange(\"analistas\");\n//\t\t\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\t\telse\n//\t\t\t\t\t\t\t\t\t\t\tmostrarMensaje(\"Informacion\", \"No se Puede eliminar el analista, esta asignado a un requerimiento que esta activo\", Messagebox.EXCLAMATION, null, null, null);\n//\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}", "public java.lang.String getAlertaId() {\n\t\treturn _pnaAlerta.getAlertaId();\n\t}", "private void mostrarValorDeIndicadorSeleccionado() {\n\t\r\n\t\tMessageBox messageBox;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tdatosDelIndicador();\r\n\t\t\tthis.getModelObject().observerIndicador();\r\n\t\t}\r\n\t\tcatch (RuntimeException ex){\r\n\t\t\tmessageBox = new MessageBox(this, Type.Error);\r\n\t\t\tmessageBox.setMessage(ex.getMessage());\r\n\t\t\tmessageBox.open();\r\n\t\t}\r\n\t}", "public alertas buscarInfoDeUnRegistro(Connection conn, alertas objeto) {\r\n\r\n\t\ttry {\r\n\r\n\t\t\tPreparedStatement statement = conn\r\n\t\t\t\t\t.prepareStatement(\"select ID_ALERTA, FECHA_INI, FECHA_FIN, ESTADO, DESCRIPCION2 from alertas where DESCRIPCION='\"\r\n\t\t\t\t\t\t\t+ objeto.getDescripcion() + \"'\");\r\n\t\t\tResultSet rs = statement.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tobjeto.setAlerta(rs.getInt(\"ID_ALERTA\"));\r\n\t\t\t\tobjeto.setFechaInicio(rs.getString(\"FECHA_INI\"));\r\n\t\t\t\tobjeto.setFechaDinalizacion(rs.getString(\"FECHA_FIN\"));\r\n\t\t\t\tobjeto.setEstado(rs.getString(\"ESTADO\"));\r\n\t\t\t\tobjeto.setDescripcion2(rs.getString(\"DESCRIPCION2\"));\r\n\t\t\t\t// Process data here\r\n\r\n\t\t\t}\r\n\t\t\trs.close();\r\n\t\t\tstatement.close();\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t// JOptionPane.showMessageDialog(null, \"Alerta!\",\r\n\t\t\t// \":\"+e.getMessage(), JOptionPane.ERROR_MESSAGE);\r\n\t\t\tobjeto.setDescripcion(\"null\");\r\n\r\n\t\t}\r\n\t\treturn objeto;\r\n\r\n\t}", "public void alertasexistencia() {\r\n try {\r\n rs = modelo.alertaexistenciapro();//C.P.M consultamos los producto con alerta en existencia\r\n DefaultTableModel tabla = new DefaultTableModel() {//C.P.M creamos el modelo de la tabla\r\n @Override\r\n public boolean isCellEditable(int rowIndex, int vColIndex) {\r\n return false;\r\n }\r\n };\r\n vista.Talertas.setModel(tabla);//C.P.M le mandamos el modelo\r\n modelo.estructuraAlrta(tabla);//C.P.M obtenemos la estructura de la tabla \"los encabezados\"\r\n ResultSetMetaData rsMd = rs.getMetaData();//C.P.M obtenemos los metadatos de la consulta\r\n int cantidadColumnas = rsMd.getColumnCount();//C.P.M obtenemos la cantidad de las columnas de la consulta\r\n while (rs.next()) {\r\n Object[] fila = new Object[cantidadColumnas];//C.P.M creamos un arreglo con la cantidad de columnas \r\n for (int i = 0; i < cantidadColumnas; i++) {//C.P.M lo recorremos \r\n fila[i] = rs.getObject(i + 1);//C.P.M y agregamos la informacion de la consulta\r\n }\r\n tabla.addRow(fila);//C.P.M lo agregamos a la tabla como una nueva fila\r\n }\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"Ocurrio algun error al consultar las alertas\");\r\n }\r\n }", "@POST\n\t@Consumes({ MediaType.APPLICATION_JSON })\n\t@Produces({ MediaType.APPLICATION_JSON })\n\t@Transactional\n\tpublic StatusVo cadastrarAvaliacao(AvaliacaoVo avaliacaoVo) {\n\n\t\tStatusVo status = new StatusVo();\n\n\t\tAvaliacao avaliacao = avaliacaoService.cadastrarAvaliacao(avaliacaoVo);\n\n\t\tboolean result = (avaliacao != null && avaliacao.getId() != null);\n\n\t\tif (result) {\n\t\t\tstatus.setChave(Constants.UM);\n\t\t\tstatus.setIdCadastrado(new Long(avaliacao.getId()));\n\t\t\tstatus.setValor(Constants.CHAVE_OK);\n\t\t} else {\n\t\t\tstatus.setChave(Constants.ZERO);\n\t\t\tstatus.setValor(Constants.CHAVE_ERRO);\n\t\t}\n\n\t\treturn status;\n\n\t}", "public int getAlertPriority()\n {\n return this.alert_priority;\n }", "public String getEstatus() {\r\n return estatus;\r\n }", "private void muestraResultado(float vimc, String msg){\n //Mensaje en notificacion de Toast\n // Toast.makeText(this, vimc+ msg, Toast.LENGTH_SHORT).show();\n\n //Mensaje con alert\n AlertDialog.Builder vent = new AlertDialog.Builder(this);\n //Modificar las propiedades del de vent\n vent.setTitle(\"Resultado\");\n String cad = String.valueOf(vimc);\n vent.setMessage(\"IMC: \" + vimc+\"\\n\"+msg);\n //Crear boton de modal\n vent.setPositiveButton(\"Aceptar\", null);\n //Crear modal\n vent.create();\n //Mostarr en la poantalla\n vent.show();\n txtA.setText(null);\n txtP.setText(null);\n }", "@GetMapping(\"{id}\")\n\tprotected ResponseEntity<Alerta> consultarAlertaById(@PathVariable(\"id\") Integer idAlerta){\n\t\t\n\t\t\n\t\tAlerta alerta = service.consultarAlertaById(idAlerta);\n\t\t\n\t\tif(alerta == null)\n\t\t\treturn ResponseEntity.notFound().build();\n\t\t\n\t\treturn ResponseEntity.ok(alerta);\n\t}", "@Override\n\tpublic kus.eventy.decorator.Alert getAlert() {\n\t\treturn sA;\n\t}", "public List<Empresatb09EmpresaRegraRenegociacao> buscarPorPessoaStatus(Empresatb01Empresa vo, boolean status) {\n \n StringBuilder query = new StringBuilder();\n Object[] elements = new Object[2];\n\n query.append(\" select c from Empresatb09EmpresaRegraRenegociacao c where c.empresatb01Empresa = ?1 and c.ativo = ?2 \");\n\n elements[0] = vo;\n elements[1] = status;\n\n return super.getListEntity(query.toString(), elements);\n }", "int getDeliveryStatusValue();", "public int getAlarmStatus() {\n return alarmStatus;\n }", "protected void pontoVerificacao(Object valorCheck) {\n\t\tString alertMessage= getDriver().switchTo().alert().getText();\n\t\tpontoVerificacao(alertMessage.contains((String) valorCheck),\n \"Validação da poup-up: \" + alertMessage + \"</br><b>Valor atual:</b> \"\n + alertMessage + \"</br><b>Valor esperado:</b> \" + valorCheck);\n\t\tgetDriver().switchTo().alert().accept();\n\t}", "public int checkForAlert() {\n return 0;\n }", "public String actualizarValorRetencionListener()\r\n/* 564: */ {\r\n/* 565:599 */ DetalleFacturaProveedorSRI detalleFacturaProveedorSRI = (DetalleFacturaProveedorSRI)this.dtDetalleFacturaProveedorSRI.getRowData();\r\n/* 566:600 */ this.servicioFacturaProveedorSRI.actualizarValorRetencion(detalleFacturaProveedorSRI);\r\n/* 567:601 */ return \"\";\r\n/* 568: */ }", "public String getAstatus() {\n return astatus;\n }", "public void alerta() {\r\n try {\r\n rs = modelo.Alerta();//C.P.M consultamos los producto con alerta en existencia\r\n DefaultTableModel alerta = new DefaultTableModel() {//C.P.M Creamos el modelo de nuestra tabla\r\n @Override\r\n public boolean isCellEditable(int rowIndex, int vColIndex) {//C.P.M le decimos que no seran editables los componetnes\r\n return false;\r\n }\r\n };\r\n vista.Talertas.setModel(alerta);//C.P.M le mandamos el modelo a la tabla de la vista\r\n modelo.estructuraAlrta(alerta);//C.P.M obtenemos la estructura de la tabla \"los encabezados\"\r\n ResultSetMetaData rsMd = rs.getMetaData();//C.P.M Obtenemos los metadatos para obtener la cantidad del columnas que llegan\r\n int cantidadColumnas = rsMd.getColumnCount();//C.P.M la cantidad la alojamos dentro de un entero\r\n while (rs.next()) {//C.P.M recorremos la informacion obtenida\r\n Object[] fila = new Object[cantidadColumnas];//C.P.M creamos un arreglo con el tamano de el resultado\r\n for (int i = 0; i < cantidadColumnas; i++) {//C.P.M lo recorremos \r\n fila[i] = rs.getObject(i + 1);//C.P.M y insertamos los valores que trajo del modelo\r\n }\r\n alerta.addRow(fila);//C.P.M agregamos el arreglo como una nueva fila dentro de la tabla\r\n }\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"Ocurrio un error al consultar los producto con alerta\");\r\n }\r\n }", "String getDataStatus();", "@ApiModelProperty(value = \"hace referencia si es compra de un cliente a los asientos comprados si es un producto nuevo a ofreser los asientos disponibles\")\n\n\n public Integer getAsietosEvento() {\n return asietosEvento;\n }", "public void alertaAgendamentoDeEvento(final Activity activity, String titulo, String conteudo,\n String botaoPositivo, String botaoNegativo, final MPalestra mPalestra) {\n AlertDialog.Builder builder = new AlertDialog.Builder(activity);\n //define o titulo\n builder.setTitle(titulo);\n //define a mensagem\n builder.setMessage(conteudo);\n //define um botão como positivo\n builder.setPositiveButton(botaoPositivo, (arg0, arg1) -> oGestorDeEventos.adicionarEvento(activity, mPalestra));\n //define um botão como negativo.\n builder.setNegativeButton(botaoNegativo, (arg0, arg1) -> alerta.dismiss());\n //cria o AlertDialog\n alerta = builder.create();\n //Exibe\n alerta.show();\n }", "public OpsAlert getOpsAlert(com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.opsalert.v1.OpsAlert res){\n\t\tOpsAlert opsAlert = new OpsAlert();\n\t\t\n\t\topsAlert.setActionCode( res.getActionCode() );\n\t\topsAlert.setAlertCode( res.getAlertCode() );\n\t\topsAlert.setInstructions( res.getInstructions() );\n\t\topsAlert.setHotelName( res.getHotelName() );\n\t\topsAlert.setUserName( res.getUserName() );\n\t\topsAlert.setLocaltelephNo( res.getLocaltelephNo() );\n\t\topsAlert.setService( res.getService() );\n\t\topsAlert.setReprintDoc( res.getReprintDoc() );\n\t\topsAlert.setType( res.getType() );\n\t\topsAlert.setTravelAgencyAccountNo( res.getTravelAgencyAccountNo() );\n\t\tif( res.getImApplicationInfo() != null ){\n\t\t\topsAlert.setImApplicationInfo( this.getIMApplicationInfo( res.getImApplicationInfo() ));\n\t\t}\n\t\tif( res.getInFlightInfo() != null ){\n\t\t\topsAlert.setInFlightInfo( this.getFlightTransferInfo( res.getInFlightInfo() ) );\n\t\t}\n\t\tif( res.getOutFlightInfo() != null ){\n\t\t\topsAlert.setOutFlightInfo( this.getFlightTransferInfo( res.getOutFlightInfo() ) );\n\t\t}\n\t\tif( res.getDocumentAddress() != null ){\n\t\t\topsAlert.setDocumentAddress( this.getAddress( res.getDocumentAddress() ) );\n\t\t}\n\t\tif( res.getBookingHeader() != null ){\n\t\t\topsAlert.setBookingHeader( this.getBookingHeader( res.getBookingHeader() ) );\n\t\t}\n\t\tif( (res.getGuests() != null) && (res.getGuests().size() > 0) ){\n\t\t\tList<GuestInfo> guests = new ArrayList<GuestInfo>();\n\t\t\tfor(int i=0; i < res.getGuests().size(); i++){\n\t\t\t\tif( res.getGuests().get(i) != null )\n\t\t\t\tguests.add( this.getGuestInfo( res.getGuests().get(i) ) );\n\t\t\t}\n\t\t\topsAlert.setGuests(guests);\n\t\t}\n\t\tif( (res.getAlertTypes() != null) && (res.getAlertTypes().size() > 0) ){\n\t\t\tList<AlertType> alertTypes = new ArrayList<AlertType>();\n\t\t\tfor(int i=0; i < res.getAlertTypes().size(); i++){\n\t\t\t\tif( res.getAlertTypes().get(i) != null )\n\t\t\t\talertTypes.add( this.getAlertType( res.getAlertTypes().get(i) ) );\n\t\t\t}\n\t\t\topsAlert.setAlertTypes(alertTypes);\n\t\t}\n\t\tif( (res.getActionTypes() != null) && (res.getActionTypes().size() > 0) ){\n\t\t\tList<ActionType> actionTypes = new ArrayList<ActionType>();\n\t\t\tfor(int i=0; i < res.getActionTypes().size(); i++){\n\t\t\t\tif( res.getActionTypes().get(i) != null )\n\t\t\t\tactionTypes.add( this.getActionType( res.getActionTypes().get(i) ) );\n\t\t\t}\n\t\t\topsAlert.setActionTypes(actionTypes);\n\t\t}\n\t\t\n\t\treturn opsAlert;\n\t}", "int getActivacion();", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic List<Integer> getIdAlarmAlert(String sdateF, String sdateT, String edateF,\r\n\t\t\tString edateT, String bscid, String cellid, String vendor,\r\n\t\t\tString district, String alarmName, String function,\r\n\t\t\tString severity, String netWork, String username, String province,\r\n\t\t\tString team, String alarmType, String alarmMappingName,\r\n\t\t\tString statusFinish, String statusView, \r\n\t\t\tString region, String unAlarmMappingName) {\r\n\t\tMap<String, Object> parms = new HashMap<String, Object>();\r\n \t\tparms.put(\"P_SDATE_FROM\", sdateF);\r\n \t\tparms.put(\"P_SDATE_TO\", sdateT);\r\n \t\tparms.put(\"P_EDATE_FROM\", edateF);\r\n \t\tparms.put(\"P_EDATE_TO\", edateT);\r\n \t\tparms.put(\"P_NE\", bscid);\r\n \t\tparms.put(\"P_CELLID\", cellid);\r\n \t\tparms.put(\"P_VENDOR\", vendor);\r\n \t\tparms.put(\"P_DISTRICT\", district);\r\n \t\tparms.put(\"P_ALARM_NAME\", alarmName);\r\n \t\tparms.put(\"P_NETWORK\", netWork);\r\n \t\tparms.put(\"P_SEVERITY\", severity);\r\n \t\tparms.put(\"P_TYPE\",function );\r\n \t\tparms.put(\"P_USERNAME\", username);\r\n \t\tparms.put(\"P_PROVINCE\", province);\r\n \t\tparms.put(\"P_TEAM\", team);\r\n \t\tparms.put(\"P_ALARM_TYPE\", alarmType);\r\n \t\tparms.put(\"P_ALARM_MAPPING_NAME\", alarmMappingName);\r\n \t\tparms.put(\"P_STATUS_FINISH\", statusFinish);\r\n \t\tparms.put(\"P_STATUS_VIEW\", statusView);\r\n \t\tparms.put(\"P_REGION\", region);\r\n \t\tparms.put(\"P_UN_ALARM_MAPPING\", unAlarmMappingName);\r\n \t\tparms.put(\"P_DATA\", null);\r\n \t\treturn getSqlMapClientTemplate().queryForList(\"R_ALARM_LOG.getIdAlarmAlert\", parms);\r\n\t}", "@PostMapping()\n\tprotected ResponseEntity<Alerta> cadastrarAlerta(@RequestBody Alerta novoAlerta){\n\t\t\n\t\ttry {\n\t\t\tnovoAlerta = service.cadastrarAlerta(novoAlerta);\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn ResponseEntity.badRequest().build();\n\t\t}\n\t\t\n\t\treturn ResponseEntity.ok(novoAlerta);\n\t}", "public String accionemergencia(){\n\t\tString resp=\"\";\n\t\tif(puntosvida<=5 && acc!=1){\n\t\t\tpuntosvida=puntosvida+15;\n\t\t\tresp=\"\\nAccion de emergencia \"+ tipo +\"activada vida +15\";\n\t\t\tacc=1;\n\t\t}\n\t\treturn resp;\n\t}", "public int getAlarm () { return alarm; }", "public float calculaPremioConsoanteResultado (Aposta aposta, Evento.Resultado res){\n switch (res) {\n case VITORIA:\n return aposta.calculaPremio(\"1\");\n case EMPATE:\n return aposta.calculaPremio(\"x\");\n case DERROTA:\n return aposta.calculaPremio(\"2\");\n }\n return 0;\n \n }", "public void updtAval(UsuarioDto aval, int estatus) throws BusinessException {\n\n try {\n avaSolDao.updtAval(aval, estatus);\n } catch (IntegracionException ex) {\n throw new BusinessException(ex.getMessage(), ex);\n }\n }", "public int MostrarUltimoValorIngresado() {\r\n return UltimoValorIngresado.informacion;\r\n }", "public void msgErreur(){\n \n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Entrée invalide\");\n alert.setHeaderText(\"Corriger les entrées invalides.\");\n alert.setContentText(\"Les informations entrées sont erronnées\");\n\n alert.showAndWait();\n \n\n}", "public void setEstatus(String estatus) {\r\n this.estatus = estatus;\r\n }", "public java.lang.String getValor();", "@Test\n public void alerts () throws Exception\n {\n JavascriptExecutor js = (JavascriptExecutor) driver;\n\n //ACEPTAR ALERTA\n js.executeScript(\"alert('Saludos pal Amigo Raul');\");\n wait = new WebDriverWait(driver, 2);\n wait.until(ExpectedConditions.alertIsPresent());\n utils.Loading(driver, 300);\n /*driver.switchTo().alert().accept();\n utils.Loading(driver, 300);*/\n\n //DISMIS ALERTA --> LO QUE HACE ESTA FUNCION ES CANCELAR LAS ALERTAS,se cumple cuando se tiene un botón cancelar,diferentes a positivo\n String Alert = driver.switchTo().alert().getText();\n System.out.println(\"El texto es\" + Alert);\n driver.switchTo().alert().dismiss();\n }", "public void startAgentAlertChange() {\n // referencia la fecha que determina la alerta actual\n Timer timer = new Timer(SIBAConst.TIME_AGENT_ALERT_CHANGE, new ActionListener() {\n \t\n public void actionPerformed(ActionEvent e) {\n \t//System.out.println(\"Entro aqui general 900: \"+controlFlagGeneral.alerta());\n \t//System.out.println(\"Entro aqui personal 900: \"+controlFlagPersonal.alerta());\n //if (controlFlagGeneral.alerta() || getControlFlagPersonal().alerta()) {\n if (controlFlagGeneral.alerta().equals(true)) { \t\n // activada banderas de carga de nuevos archivos XML\n \tSystem.out.println(\"Se ha modificado la bandera General\");\n removeLastProgramation = true;\n alreadyChange = false;\n }\n else if(controlFlagPersonal.alerta().equals(true))\n {\n // activada banderas de carga de nuevos archivos XML\n \tSystem.out.println(\"Se ha modificado la bandera Personal\");\n removeLastProgramation = true;\n alreadyChange = false;\n }\n else\n {\n \tSystem.out.println(\"No se han modificado las banderas\");\n }\n }\n });\n timer.start();\n }", "com.polytech.spik.protocol.SpikMessages.StatusChanged getStatusChanged();", "public Long getAlertId();", "Object getValor();", "private double getValorAjuste(HashMap infoAssinante) throws Exception\n\t{\n\t\tdouble result = 0;\n\t\t\n\t\tString msisdn = (String)infoAssinante.get(\"IDT_MSISDN\");\n\t\tdouble minCredito = ((Double)infoAssinante.get(\"MIN_CREDITO\")).doubleValue();\n\t\tdouble minFF = ((Double)infoAssinante.get(\"MIN_FF\")).doubleValue(); \n\t\tint idtCodigoNacional = (new Integer(msisdn.substring(2, 4))).intValue();\n\t\tdouble vlrBonusMinuto = getVlrBonusMinuto(idtCodigoNacional);\n\t\tdouble vlrBonusMinutoFF = getVlrBonusMinutoFF(idtCodigoNacional);\n\t\t\n\t\tresult = ((minCredito - minFF)*vlrBonusMinuto) + (minFF*vlrBonusMinutoFF);\n\t\t\n\t\treturn result;\n\t}", "public List<UsuarioDto> getAvalesByIdSolicitud(BigInteger idSolicitud) throws BusinessException {\n try {\n\n List<UsuarioDto> avales = avaSolDao.getAvalesByIdSolicitud(idSolicitud);\n\n for (UsuarioDto aval : avales) {\n /*Cuando el usuario está activo*/\n if(aval.getEstatus()==null){\n aval.setEstatus(0);\n }\n \n if (aval.getEstatus() == 1) {\n aval.setEstatusStr(Constantes.USR_ACTIVO);\n } else {\n aval.setEstatusStr(Constantes.USR_BAJA);\n }\n\n switch (aval.getEstatusAvalInt()) {\n case 1:\n aval.setEstatusAvalStr(Constantes.SOLAVA_PENDIENTE);\n break;\n case 2:\n aval.setEstatusAvalStr(Constantes.SOLAVA_VALIDANDO);\n break;\n case 3:\n aval.setEstatusAvalStr(Constantes.SOLAVA_APROBADO);\n break;\n case 4:\n aval.setEstatusAvalStr(Constantes.SOLAVA_RECHAZADO);\n break;\n }\n }\n\n return avales;\n } catch (IntegracionException ex) {\n throw new BusinessException(ex.getMessage(), ex);\n }\n }", "@Override\r\n public void aceptarReporte() {\n if (rep_reporte.getReporteSelecionado().equals(\"Libro Diario\")) {\r\n if (rep_reporte.isVisible()) {\r\n parametro = new HashMap();\r\n rep_reporte.cerrar();\r\n sec_rango_reporte.setMultiple(true);\r\n sec_rango_reporte.dibujar();\r\n utilitario.addUpdate(\"rep_reporte,sec_rango_reporte\");\r\n\r\n } else if (sec_rango_reporte.isVisible()) {\r\n String estado = \"\" + utilitario.getVariable(\"p_con_estado_comprobante_normal\") + \",\" + utilitario.getVariable(\"p_con_estado_comp_inicial\") + \",\" + utilitario.getVariable(\"p_con_estado_comp_final\");\r\n parametro.put(\"fecha_inicio\", sec_rango_reporte.getFecha1());\r\n parametro.put(\"fecha_fin\", sec_rango_reporte.getFecha2());\r\n\r\n parametro.put(\"ide_cneco\", estado);\r\n parametro.put(\"ide_cnlap_haber\", p_con_lugar_haber);\r\n parametro.put(\"ide_cnlap_debe\", p_con_lugar_debe);\r\n sec_rango_reporte.cerrar();\r\n sel_rep.setSeleccionFormatoReporte(parametro, rep_reporte.getPath());\r\n sel_rep.dibujar();\r\n utilitario.addUpdate(\"sel_rep,sec_rango_reporte\");\r\n }\r\n } else if (rep_reporte.getReporteSelecionado().equals(\"Balance General Consolidado\")) {\r\n if (rep_reporte.isVisible()) {\r\n parametro = new HashMap();\r\n rep_reporte.cerrar();\r\n sec_rango_reporte.setMultiple(true);\r\n sec_rango_reporte.dibujar();\r\n utilitario.addUpdate(\"rep_reporte,sec_rango_reporte\");\r\n } else if (sec_rango_reporte.isVisible()) {\r\n if (sec_rango_reporte.getFecha1String() != null && !sec_rango_reporte.getFecha1String().isEmpty()) {\r\n if (sec_rango_reporte.getFecha2String() != null && !sec_rango_reporte.getFecha2String().isEmpty()) {\r\n fecha_fin = sec_rango_reporte.getFecha2String();\r\n fecha_inicio = con.getFechaInicialPeriodo(fecha_fin);\r\n if (fecha_inicio != null && !fecha_inicio.isEmpty()) {\r\n sec_rango_reporte.cerrar();\r\n sel_tab_nivel.dibujar();\r\n utilitario.addUpdate(\"sec_rango_reporte,sel_tab_nivel\");\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"El rango de fechas seleccionado no se encuentra en ningun Periodo Contable\");\r\n }\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha final\");\r\n }\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha inicial\");\r\n }\r\n } else if (sel_tab_nivel.isVisible()) {\r\n if (sel_tab_nivel.getValorSeleccionado() != null) {\r\n System.out.println(\"fecha fin \" + fecha_fin);\r\n parametro.put(\"p_activo\", utilitario.getVariable(\"p_con_tipo_cuenta_activo\"));\r\n parametro.put(\"p_pasivo\", utilitario.getVariable(\"p_con_tipo_cuenta_pasivo\"));\r\n parametro.put(\"p_patrimonio\", utilitario.getVariable(\"p_con_tipo_cuenta_patrimonio\"));\r\n TablaGenerica tab_datos = utilitario.consultar(\"SELECT * FROM sis_empresa e, sis_sucursal s where s.ide_empr=e.ide_empr and s.ide_empr=\" + utilitario.getVariable(\"ide_empr\") + \" and s.ide_sucu=\" + utilitario.getVariable(\"ide_sucu\"));\r\n if (tab_datos.getTotalFilas() > 0) {\r\n parametro.put(\"logo\", tab_datos.getValor(0, \"logo_empr\"));\r\n parametro.put(\"empresa\", tab_datos.getValor(0, \"nom_empr\"));\r\n parametro.put(\"sucursal\", tab_datos.getValor(0, \"nom_sucu\"));\r\n parametro.put(\"direccion\", tab_datos.getValor(0, \"direccion_sucu\"));\r\n parametro.put(\"telefono\", tab_datos.getValor(0, \"telefonos_sucu\"));\r\n parametro.put(\"ruc\", tab_datos.getValor(0, \"identificacion_empr\"));\r\n\r\n }\r\n parametro.put(\"fecha_inicio\", getFormatoFecha(fecha_inicio));\r\n parametro.put(\"fecha_fin\", getFormatoFecha(fecha_fin));\r\n TablaGenerica tab_balance = con.generarBalanceGeneral(true, fecha_inicio, fecha_fin, Integer.parseInt(sel_tab_nivel.getValorSeleccionado()));\r\n parametro.put(\"titulo\", \"BALANCE GENERAL CONSOLIDADO\");\r\n if (tab_balance.getTotalFilas() > 0) {\r\n List lis_totales = con.obtenerTotalesBalanceGeneral(true, fecha_inicio, fecha_fin);\r\n double tot_activo = Double.parseDouble(lis_totales.get(0) + \"\");\r\n double tot_pasivo = Double.parseDouble(lis_totales.get(1) + \"\");\r\n double tot_patrimonio = Double.parseDouble(lis_totales.get(2) + \"\");\r\n double utilidad_perdida = tot_activo - tot_pasivo - tot_patrimonio;\r\n double total = tot_pasivo + tot_patrimonio + utilidad_perdida;\r\n parametro.put(\"p_tot_activo\", tot_activo);\r\n parametro.put(\"p_total\", total);\r\n parametro.put(\"p_utilidad_perdida\", utilidad_perdida);\r\n parametro.put(\"p_tot_pasivo\", tot_pasivo);\r\n parametro.put(\"p_tot_patrimonio\", (tot_patrimonio));\r\n }\r\n sel_tab_nivel.cerrar();\r\n ReporteDataSource data = new ReporteDataSource(tab_balance);\r\n sel_rep.setSeleccionFormatoReporte(parametro, rep_reporte.getPath(), data);\r\n sel_rep.dibujar();\r\n\r\n utilitario.addUpdate(\"sel_rep,sel_tab_nivel\");\r\n }\r\n }\r\n } else if (rep_reporte.getReporteSelecionado().equals(\"Balance General\")) {\r\n if (rep_reporte.isVisible()) {\r\n parametro = new HashMap();\r\n rep_reporte.cerrar();\r\n sec_rango_reporte.setMultiple(true);\r\n sec_rango_reporte.dibujar();\r\n utilitario.addUpdate(\"rep_reporte,sec_rango_reporte\");\r\n } else if (sec_rango_reporte.isVisible()) {\r\n if (sec_rango_reporte.getFecha1String() != null && !sec_rango_reporte.getFecha1String().isEmpty()) {\r\n if (sec_rango_reporte.getFecha2String() != null && !sec_rango_reporte.getFecha2String().isEmpty()) {\r\n fecha_fin = sec_rango_reporte.getFecha2String();\r\n fecha_inicio = con.getFechaInicialPeriodo(fecha_fin);\r\n if (fecha_inicio != null && !fecha_inicio.isEmpty()) {\r\n sec_rango_reporte.cerrar();\r\n sel_tab_nivel.dibujar();\r\n utilitario.addUpdate(\"sec_rango_reporte,sel_tab_nivel\");\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"El rango de fechas seleccionado no se encuentra en ningun Periodo Contable\");\r\n }\r\n\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha final\");\r\n }\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha inicial\");\r\n }\r\n } else if (sel_tab_nivel.isVisible()) {\r\n if (sel_tab_nivel.getValorSeleccionado() != null) {\r\n System.out.println(\"fecha fin \" + fecha_fin);\r\n parametro.put(\"p_activo\", utilitario.getVariable(\"p_con_tipo_cuenta_activo\"));\r\n parametro.put(\"p_pasivo\", utilitario.getVariable(\"p_con_tipo_cuenta_pasivo\"));\r\n parametro.put(\"p_patrimonio\", utilitario.getVariable(\"p_con_tipo_cuenta_patrimonio\"));\r\n TablaGenerica tab_datos = utilitario.consultar(\"SELECT * FROM sis_empresa e, sis_sucursal s where s.ide_empr=e.ide_empr and s.ide_empr=\" + utilitario.getVariable(\"ide_empr\") + \" and s.ide_sucu=\" + utilitario.getVariable(\"ide_sucu\"));\r\n if (tab_datos.getTotalFilas() > 0) {\r\n parametro.put(\"logo\", tab_datos.getValor(0, \"logo_empr\"));\r\n parametro.put(\"empresa\", tab_datos.getValor(0, \"nom_empr\"));\r\n parametro.put(\"sucursal\", tab_datos.getValor(0, \"nom_sucu\"));\r\n parametro.put(\"direccion\", tab_datos.getValor(0, \"direccion_sucu\"));\r\n parametro.put(\"telefono\", tab_datos.getValor(0, \"telefonos_sucu\"));\r\n parametro.put(\"ruc\", tab_datos.getValor(0, \"identificacion_empr\"));\r\n\r\n }\r\n parametro.put(\"fecha_inicio\", getFormatoFecha(fecha_inicio));\r\n parametro.put(\"fecha_fin\", getFormatoFecha(fecha_fin));\r\n TablaGenerica tab_balance = con.generarBalanceGeneral(false, fecha_inicio, fecha_fin, Integer.parseInt(sel_tab_nivel.getValorSeleccionado()));\r\n parametro.put(\"titulo\", \"BALANCE GENERAL\");\r\n if (tab_balance.getTotalFilas() > 0) {\r\n List lis_totales = con.obtenerTotalesBalanceGeneral(false, fecha_inicio, fecha_fin);\r\n double tot_activo = Double.parseDouble(lis_totales.get(0) + \"\");\r\n double tot_pasivo = Double.parseDouble(lis_totales.get(1) + \"\");\r\n double tot_patrimonio = Double.parseDouble(lis_totales.get(2) + \"\");\r\n double utilidad_perdida = tot_activo - tot_pasivo - tot_patrimonio;\r\n double total = tot_pasivo + tot_patrimonio + utilidad_perdida;\r\n parametro.put(\"p_tot_activo\", tot_activo);\r\n parametro.put(\"p_total\", total);\r\n parametro.put(\"p_utilidad_perdida\", utilidad_perdida);\r\n parametro.put(\"p_tot_pasivo\", tot_pasivo);\r\n parametro.put(\"p_tot_patrimonio\", (tot_patrimonio));\r\n }\r\n sel_tab_nivel.cerrar();\r\n ReporteDataSource data = new ReporteDataSource(tab_balance);\r\n sel_rep.setSeleccionFormatoReporte(parametro, rep_reporte.getPath(), data);\r\n sel_rep.dibujar();\r\n\r\n utilitario.addUpdate(\"sel_rep,sel_tab_nivel\");\r\n }\r\n }\r\n } else if (rep_reporte.getReporteSelecionado().equals(\"Estado de Resultados Consolidado\")) {\r\n if (rep_reporte.isVisible()) {\r\n parametro = new HashMap();\r\n rep_reporte.cerrar();\r\n sec_rango_reporte.setMultiple(true);\r\n sec_rango_reporte.dibujar();\r\n utilitario.addUpdate(\"rep_reporte,sec_rango_reporte\");\r\n } else if (sec_rango_reporte.isVisible()) {\r\n if (sec_rango_reporte.getFecha1String() != null && !sec_rango_reporte.getFecha1String().isEmpty()) {\r\n if (sec_rango_reporte.getFecha2String() != null && !sec_rango_reporte.getFecha2String().isEmpty()) {\r\n fecha_fin = sec_rango_reporte.getFecha2String();\r\n fecha_inicio = con.getFechaInicialPeriodo(fecha_fin);\r\n if (fecha_inicio != null && !fecha_inicio.isEmpty()) {\r\n sec_rango_reporte.cerrar();\r\n sel_tab_nivel.dibujar();\r\n utilitario.addUpdate(\"sec_rango_reporte,sel_tab_nivel\");\r\n }\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha fin\");\r\n }\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha inicio\");\r\n }\r\n } else if (sel_tab_nivel.isVisible()) {\r\n if (sel_tab_nivel.getValorSeleccionado() != null) {\r\n parametro.put(\"p_ingresos\", utilitario.getVariable(\"p_con_tipo_cuenta_ingresos\"));\r\n parametro.put(\"p_gastos\", utilitario.getVariable(\"p_con_tipo_cuenta_gastos\"));\r\n parametro.put(\"p_costos\", utilitario.getVariable(\"p_con_tipo_cuenta_costos\"));\r\n TablaGenerica tab_datos = utilitario.consultar(\"SELECT * FROM sis_empresa e, sis_sucursal s where s.ide_empr=e.ide_empr and s.ide_empr=\" + utilitario.getVariable(\"ide_empr\") + \" and s.ide_sucu=\" + utilitario.getVariable(\"ide_sucu\"));\r\n if (tab_datos.getTotalFilas() > 0) {\r\n parametro.put(\"logo\", tab_datos.getValor(0, \"logo_empr\"));\r\n parametro.put(\"empresa\", tab_datos.getValor(0, \"nom_empr\"));\r\n parametro.put(\"sucursal\", tab_datos.getValor(0, \"nom_sucu\"));\r\n parametro.put(\"direccion\", tab_datos.getValor(0, \"direccion_sucu\"));\r\n parametro.put(\"telefono\", tab_datos.getValor(0, \"telefonos_sucu\"));\r\n parametro.put(\"ruc\", tab_datos.getValor(0, \"identificacion_empr\"));\r\n }\r\n\r\n parametro.put(\"fecha_inicio\", getFormatoFecha(fecha_inicio));\r\n parametro.put(\"fecha_fin\", getFormatoFecha(fecha_fin));\r\n TablaGenerica tab_estado = con.generarEstadoResultados(true, fecha_inicio, fecha_fin, Integer.parseInt(sel_tab_nivel.getValorSeleccionado()));\r\n if (tab_estado.getTotalFilas() > 0) {\r\n List lis_totales = con.obtenerTotalesEstadoResultados(true, fecha_inicio, fecha_fin);\r\n double tot_ingresos = Double.parseDouble(lis_totales.get(0) + \"\");\r\n double tot_gastos = Double.parseDouble(lis_totales.get(1) + \"\");\r\n double tot_costos = Double.parseDouble(lis_totales.get(2) + \"\");\r\n double utilidad_perdida = tot_ingresos - (tot_gastos + tot_costos);\r\n parametro.put(\"p_tot_ingresos\", tot_ingresos);\r\n parametro.put(\"p_tot_gastos\", tot_gastos);\r\n parametro.put(\"p_tot_costos\", tot_costos);\r\n parametro.put(\"p_utilidad\", utilidad_perdida);\r\n }\r\n parametro.put(\"titulo\", \"ESTADO DE RESULTADOS CONSOLIDADO\");\r\n ReporteDataSource data = new ReporteDataSource(tab_estado);\r\n sel_tab_nivel.cerrar();\r\n sel_rep.setSeleccionFormatoReporte(parametro, rep_reporte.getPath(), data);\r\n sel_rep.dibujar();\r\n utilitario.addUpdate(\"sel_rep,sel_tab_nivel\");\r\n }\r\n }\r\n\r\n } else if (rep_reporte.getReporteSelecionado().equals(\"Estado de Resultados\")) {\r\n if (rep_reporte.isVisible()) {\r\n parametro = new HashMap();\r\n rep_reporte.cerrar();\r\n sec_rango_reporte.setMultiple(true);\r\n sec_rango_reporte.dibujar();\r\n utilitario.addUpdate(\"rep_reporte,sec_rango_reporte\");\r\n } else if (sec_rango_reporte.isVisible()) {\r\n if (sec_rango_reporte.getFecha1String() != null && !sec_rango_reporte.getFecha1String().isEmpty()) {\r\n if (sec_rango_reporte.getFecha2String() != null && !sec_rango_reporte.getFecha2String().isEmpty()) {\r\n fecha_fin = sec_rango_reporte.getFecha2String();\r\n fecha_inicio = con.getFechaInicialPeriodo(fecha_fin);\r\n if (fecha_inicio != null && !fecha_inicio.isEmpty()) {\r\n sec_rango_reporte.cerrar();\r\n sel_tab_nivel.dibujar();\r\n utilitario.addUpdate(\"sec_rango_reporte,sel_tab_nivel\");\r\n }\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha fin\");\r\n }\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha inicio\");\r\n }\r\n } else if (sel_tab_nivel.isVisible()) {\r\n if (sel_tab_nivel.getValorSeleccionado() != null) {\r\n parametro.put(\"p_ingresos\", utilitario.getVariable(\"p_con_tipo_cuenta_ingresos\"));\r\n parametro.put(\"p_gastos\", utilitario.getVariable(\"p_con_tipo_cuenta_gastos\"));\r\n parametro.put(\"p_costos\", utilitario.getVariable(\"p_con_tipo_cuenta_costos\"));\r\n TablaGenerica tab_datos = utilitario.consultar(\"SELECT * FROM sis_empresa e, sis_sucursal s where s.ide_empr=e.ide_empr and s.ide_empr=\" + utilitario.getVariable(\"ide_empr\") + \" and s.ide_sucu=\" + utilitario.getVariable(\"ide_sucu\"));\r\n if (tab_datos.getTotalFilas() > 0) {\r\n parametro.put(\"logo\", tab_datos.getValor(0, \"logo_empr\"));\r\n parametro.put(\"empresa\", tab_datos.getValor(0, \"nom_empr\"));\r\n parametro.put(\"sucursal\", tab_datos.getValor(0, \"nom_sucu\"));\r\n parametro.put(\"direccion\", tab_datos.getValor(0, \"direccion_sucu\"));\r\n parametro.put(\"telefono\", tab_datos.getValor(0, \"telefonos_sucu\"));\r\n parametro.put(\"ruc\", tab_datos.getValor(0, \"identificacion_empr\"));\r\n }\r\n\r\n parametro.put(\"fecha_inicio\", getFormatoFecha(fecha_inicio));\r\n parametro.put(\"fecha_fin\", getFormatoFecha(fecha_fin));\r\n TablaGenerica tab_estado = con.generarEstadoResultados(false, fecha_inicio, fecha_fin, Integer.parseInt(sel_tab_nivel.getValorSeleccionado()));\r\n if (tab_estado.getTotalFilas() > 0) {\r\n List lis_totales = con.obtenerTotalesEstadoResultados(false, fecha_inicio, fecha_fin);\r\n double tot_ingresos = Double.parseDouble(lis_totales.get(0) + \"\");\r\n double tot_gastos = Double.parseDouble(lis_totales.get(1) + \"\");\r\n double tot_costos = Double.parseDouble(lis_totales.get(2) + \"\");\r\n double utilidad_perdida = tot_ingresos - (tot_gastos + tot_costos);\r\n parametro.put(\"p_tot_ingresos\", tot_ingresos);\r\n parametro.put(\"p_tot_gastos\", tot_gastos);\r\n parametro.put(\"p_tot_costos\", tot_costos);\r\n parametro.put(\"p_utilidad\", utilidad_perdida);\r\n }\r\n ReporteDataSource data = new ReporteDataSource(tab_estado);\r\n parametro.put(\"titulo\", \"ESTADO DE RESULTADOS\");\r\n sel_tab_nivel.cerrar();\r\n sel_rep.setSeleccionFormatoReporte(parametro, rep_reporte.getPath(), data);\r\n sel_rep.dibujar();\r\n utilitario.addUpdate(\"sel_rep,sel_tab_nivel\");\r\n }\r\n }\r\n\r\n } else if (rep_reporte.getReporteSelecionado().equals(\"Libro Mayor\")) {\r\n if (rep_reporte.isVisible()) {\r\n parametro = new HashMap();\r\n rep_reporte.cerrar();\r\n lis_ide_cndpc_sel.clear();\r\n lis_ide_cndpc_deseleccionados.clear();\r\n int_count_deseleccion = 0;\r\n int_count_seleccion = 0;\r\n sel_tab.getTab_seleccion().setSeleccionados(null);\r\n// utilitario.ejecutarJavaScript(sel_tab.getTab_seleccion().getId() + \".clearFilters();\");\r\n sel_tab.dibujar();\r\n utilitario.addUpdate(\"rep_reporte,sel_tab\");\r\n } else {\r\n if (sel_tab.isVisible()) {\r\n\r\n if (sel_tab.getSeleccionados() != null && !sel_tab.getSeleccionados().isEmpty()) {\r\n System.out.println(\"nn \" + sel_tab.getSeleccionados());\r\n parametro.put(\"ide_cndpc\", sel_tab.getSeleccionados());//lista sel \r\n sel_tab.cerrar();\r\n String estado = \"\" + utilitario.getVariable(\"p_con_estado_comprobante_normal\") + \",\" + utilitario.getVariable(\"p_con_estado_comp_inicial\") + \",\" + utilitario.getVariable(\"p_con_estado_comp_final\");\r\n parametro.put(\"ide_cneco\", estado);\r\n sec_rango_reporte.setMultiple(true);\r\n sec_rango_reporte.dibujar();\r\n utilitario.addUpdate(\"sel_tab,sec_rango_reporte\");\r\n\r\n } else {\r\n utilitario.agregarMensajeInfo(\"Debe seleccionar al menos una cuenta contable\", \"\");\r\n }\r\n// if (lis_ide_cndpc_deseleccionados.size() == 0) {\r\n// System.out.println(\"sel tab lis \" + sel_tab.getSeleccionados());\r\n// parametro.put(\"ide_cndpc\", sel_tab.getSeleccionados());//lista sel \r\n// } else {\r\n// System.out.println(\"sel tab \" + utilitario.generarComillasLista(lis_ide_cndpc_deseleccionados));\r\n// parametro.put(\"ide_cndpc\", utilitario.generarComillasLista(lis_ide_cndpc_deseleccionados));//lista sel \r\n// }\r\n } else if (sec_rango_reporte.isVisible()) {\r\n if (sec_rango_reporte.isFechasValidas()) {\r\n parametro.put(\"fecha_inicio\", sec_rango_reporte.getFecha1());\r\n parametro.put(\"fecha_fin\", sec_rango_reporte.getFecha2());\r\n parametro.put(\"ide_cnlap_haber\", p_con_lugar_haber);\r\n parametro.put(\"ide_cnlap_debe\", p_con_lugar_debe);\r\n sec_rango_reporte.cerrar();\r\n sel_rep.setSeleccionFormatoReporte(parametro, rep_reporte.getPath());\r\n sel_rep.dibujar();\r\n utilitario.addUpdate(\"sel_rep,sec_rango_reporte\");\r\n } else {\r\n utilitario.agregarMensajeInfo(\"Las fechas seleccionadas no son correctas\", \"\");\r\n }\r\n }\r\n }\r\n } else if (rep_reporte.getReporteSelecionado().equals(\"Balance de Comprobacion\")) {\r\n if (rep_reporte.isVisible()) {\r\n parametro = new HashMap();\r\n rep_reporte.cerrar();\r\n sec_rango_reporte.setMultiple(true);\r\n sec_rango_reporte.dibujar();\r\n utilitario.addUpdate(\"rep_reporte,sec_rango_reporte\");\r\n\r\n } else {\r\n if (sec_rango_reporte.isVisible()) {\r\n if (sec_rango_reporte.getFecha1String() != null && !sec_rango_reporte.getFecha1String().isEmpty()) {\r\n if (sec_rango_reporte.getFecha2String() != null && !sec_rango_reporte.getFecha2String().isEmpty()) {\r\n String fecha_fin1 = sec_rango_reporte.getFecha2String();\r\n String fecha_inicio1 = sec_rango_reporte.getFecha1String();\r\n System.out.println(\"fecha fin \" + fecha_fin1);\r\n sec_rango_reporte.cerrar();\r\n\r\n TablaGenerica tab_datos = utilitario.consultar(\"SELECT * FROM sis_empresa e, sis_sucursal s where s.ide_empr=e.ide_empr and s.ide_empr=\" + utilitario.getVariable(\"ide_empr\") + \" and s.ide_sucu=\" + utilitario.getVariable(\"ide_sucu\"));\r\n if (tab_datos.getTotalFilas() > 0) {\r\n parametro.put(\"logo\", tab_datos.getValor(0, \"logo_empr\"));\r\n parametro.put(\"empresa\", tab_datos.getValor(0, \"nom_empr\"));\r\n parametro.put(\"sucursal\", tab_datos.getValor(0, \"nom_sucu\"));\r\n parametro.put(\"direccion\", tab_datos.getValor(0, \"direccion_sucu\"));\r\n parametro.put(\"telefono\", tab_datos.getValor(0, \"telefonos_sucu\"));\r\n parametro.put(\"ruc\", tab_datos.getValor(0, \"identificacion_empr\"));\r\n }\r\n String fechaPeriodoActivo = con.obtenerFechaInicialPeriodoActivo();\r\n// if (fechaPeriodoActivo != null && !fechaPeriodoActivo.isEmpty()) {\r\n parametro.put(\"fecha_inicio\", getFormatoFecha(fecha_inicio1));\r\n parametro.put(\"fecha_fin\", getFormatoFecha(fecha_fin1));\r\n TablaGenerica tab_bal = con.generarBalanceComprobacion(fechaPeriodoActivo, fecha_fin1);\r\n double suma_debe = 0;\r\n double suma_haber = 0;\r\n double suma_deudor = 0;\r\n double suma_acreedor = 0;\r\n for (int i = 0; i < tab_bal.getTotalFilas() - 1; i++) {\r\n suma_debe = Double.parseDouble(tab_bal.getValor(i, \"debe\")) + suma_debe;\r\n suma_haber = Double.parseDouble(tab_bal.getValor(i, \"haber\")) + suma_haber;\r\n suma_deudor = Double.parseDouble(tab_bal.getValor(i, \"deudor\")) + suma_deudor;\r\n suma_acreedor = Double.parseDouble(tab_bal.getValor(i, \"acreedor\")) + suma_acreedor;\r\n }\r\n parametro.put(\"tot_debe\", suma_debe);\r\n parametro.put(\"tot_haber\", suma_haber);\r\n parametro.put(\"tot_deudor\", suma_deudor);\r\n parametro.put(\"tot_acreedor\", suma_acreedor);\r\n ReporteDataSource data = new ReporteDataSource(tab_bal);\r\n sel_rep.setSeleccionFormatoReporte(parametro, rep_reporte.getPath(), data);\r\n sel_rep.dibujar();\r\n utilitario.addUpdate(\"sel_rep,sec_rango_reporte\");\r\n }\r\n// }\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha fin\");\r\n }\r\n } else {\r\n utilitario.agregarMensajeError(\"Atencion\", \"No ha seleccionado la fecha inicio\");\r\n }\r\n }\r\n\r\n } else if (rep_reporte.getReporteSelecionado().equals(\"Comprobante Contabilidad\")) {\r\n if (rep_reporte.isVisible()) {\r\n if (tab_tabla1.getValor(\"ide_cnccc\") != null) {\r\n parametro = new HashMap();\r\n rep_reporte.cerrar();\r\n parametro.put(\"ide_cnccc\", Long.parseLong(tab_tabla1.getValor(\"ide_cnccc\")));\r\n parametro.put(\"ide_cnlap_haber\", p_con_lugar_haber);\r\n parametro.put(\"ide_cnlap_debe\", p_con_lugar_debe);\r\n sel_rep.setSeleccionFormatoReporte(parametro, rep_reporte.getPath());\r\n sel_rep.dibujar();\r\n utilitario.addUpdate(\"rep_reporte,sel_rep\");\r\n } else {\r\n utilitario.agregarMensajeInfo(\"No se puede generar el reporte\", \"La fila seleccionada no tiene compraqbante de contabilidad\");\r\n }\r\n\r\n }\r\n }\r\n }", "protected void onGetOnTimerReservationSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}", "protected void onGetOnTimerReservationSetting(EchoObject eoj, short tid, byte esv, EchoProperty property, boolean success) {}", "public void getAlertByType(int t,TableQueryCallback<Alert> callback){\n mAlertTable.where().field(\"alertType\").eq(t).execute(callback);\n }", "public String getNombreEstatusObjeto() {\r\n\t\treturn nombreEstatusObjeto;\r\n\t}", "private float parametroEstadistico(int e) {\n\n int[] porError={20,10,9,8,7,6,5};\n float[] z = {(float) 1.28,(float) 1.65,(float) 1.69,(float) 1.75,(float) 1.81,(float) 1.88,(float) 1.96 };\n float valor=0;\n\n for(int i = 0 ; i < porError.length ; i++){\n if(e == porError[i]) {\n valor = z[i];\n }\n }\n return valor;\n }", "public EnumVar getStatus() {\n return status;\n }", "public void onClick(View v)\n {\n LayoutInflater li = LayoutInflater.from(context);\n View promptsView = li.inflate(R.layout.prompt_statusfilter, null);\n\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(\n context);\n\n\n alertDialogBuilder.setView(promptsView);\n\n final EditText userInput = (EditText) promptsView\n .findViewById(R.id.editTextDialogUserInput);\n\n final CheckBox chkFinalizadas = (CheckBox) promptsView\n .findViewById(R.id.chkFinalizadas);\n\n final CheckBox chkReporte = (CheckBox) promptsView\n .findViewById(R.id.chkConReporte);\n\n final CheckBox chkAsignadas = (CheckBox) promptsView\n .findViewById(R.id.chkAsignadas);\n\n\n alertDialogBuilder\n .setCancelable(false)\n .setPositiveButton(\"Ok\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog,int id) {\n // get user input and set it to result\n // edit text\n //result.setText(userInput.getText());\n\n StatusListTmp=\"\";\n\n if (chkFinalizadas.isChecked()){\n StatusListTmp=\"2\";\n\n }\n if(chkAsignadas.isChecked()){\n StatusListTmp=StatusListTmp+\",0\";\n\n }\n if(chkReporte.isChecked()){\n StatusListTmp=StatusListTmp+\",1\";\n\n }\n\n StatusListTmp = StatusListTmp.startsWith(\",\") ? StatusListTmp.substring(1) : StatusListTmp;\n StatusListTmp = StatusListTmp.endsWith(\",\") ? StatusListTmp.substring(1) : StatusListTmp;\n\n Log.d(\"FILTRO\",StatusListTmp);\n StatusList=StatusListTmp;\n\n mAuthTask = new getTaskDetail(useremail,\"\");\n\n mAuthTask.execute((Void) null);\n\n }\n })\n .setNegativeButton(\"Cancelar\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog,int id) {\n dialog.cancel();\n }\n });\n\n // create alert dialog\n AlertDialog alertDialog = alertDialogBuilder.create();\n\n // show it\n alertDialog.show();\n /*fin*/\n\n }", "public ButtonType getAlert(String message){\r\n Alert alert = new Alert(Alert.AlertType.WARNING, message, ButtonType.OK, ButtonType.CANCEL);\r\n return alert.showAndWait().get();\r\n }", "public int getStatusValue() {\n return status_;\n }", "public int getStatusValue() {\n return status_;\n }", "public int getStatusValue() {\n return status_;\n }", "void mo9949a(StatusListener eVar);", "public String getDescripcionEstatusObjeto() {\r\n\t\treturn descripcionEstatusObjeto;\r\n\t}", "private void esegui() {\n /* variabili e costanti locali di lavoro */\n OperazioneMonitorabile operazione;\n\n try { // prova ad eseguire il codice\n\n /**\n * Lancia l'operazione di analisi dei dati in un thread asincrono\n * al termine il thread aggiorna i dati del dialogo\n */\n operazione = new OpAnalisi(this.getProgressBar());\n operazione.avvia();\n\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n }", "int getResponseTypeValue();", "public Optional<String> getAlert() {\n return alert;\n }", "public Optional<String> getAlert() {\n return alert;\n }", "public String getStatus(){\n\n //returns the value of the status field\n return this.status;\n }", "public int getValor() {\r\n return valor;\r\n }" ]
[ "0.7651331", "0.7000145", "0.6914451", "0.6191653", "0.5869434", "0.5745889", "0.56279296", "0.55610627", "0.55132276", "0.54879254", "0.54879254", "0.54879254", "0.54879254", "0.54879254", "0.54879254", "0.54879254", "0.54879254", "0.54879254", "0.54879254", "0.54879254", "0.54879254", "0.54879254", "0.54879254", "0.54879254", "0.54879254", "0.54879254", "0.54879254", "0.54879254", "0.54879254", "0.5483815", "0.5465868", "0.54610234", "0.5440806", "0.54238856", "0.5412523", "0.54019547", "0.5401894", "0.5386221", "0.5325549", "0.5322797", "0.53150326", "0.52710533", "0.5250663", "0.5226812", "0.5216183", "0.520367", "0.52024233", "0.5191668", "0.5180869", "0.5169181", "0.5161051", "0.5156827", "0.51538295", "0.51469046", "0.5132098", "0.5128195", "0.5126235", "0.5103664", "0.510079", "0.5090908", "0.5064153", "0.5060642", "0.5058828", "0.505776", "0.5045638", "0.504503", "0.5008043", "0.50034523", "0.5000596", "0.50002235", "0.49968913", "0.49874738", "0.49833092", "0.49797404", "0.49707326", "0.4967238", "0.49607375", "0.49539304", "0.49508882", "0.49401948", "0.49203238", "0.49186122", "0.49186122", "0.4918536", "0.4918451", "0.49146956", "0.49131995", "0.49121726", "0.4902392", "0.48869088", "0.48869088", "0.48869088", "0.48836762", "0.48727617", "0.48684028", "0.48671645", "0.48668727", "0.48668727", "0.48640102", "0.4862261" ]
0.80666095
0
Metodo....:getAlertaPorStatusExecucao Descricao.:Retorna o status do alarme baseado no valor do status da ultima execucao
private String getAlertaPorStatusExecucao(Evento ultimoEvento) { // O alerta padrao sera o status atual do alarme, dependendo do valor do atraso esse alerta pode ser modificado String alerta = Alarme.ALARME_OK; // No caso de status de execucao, o alarme possui somente dois estados // Ok ou Nao Ok que entao se classifica como OK ou FALHA if (ultimoEvento.getCodigoRetorno() != Alarme.CODIGO_RETORNO_OK) alerta = Alarme.ALARME_FALHA; // Define o motivo do Alarme alarme.setMotivoAlarme(Alarme.MOTIVO_RETORNO); logger.debug(alarme.getIdAlarme()+" - CodigoRetorno:"+ultimoEvento.getCodigoRetorno()); return alerta; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getStatusAlarme(Evento ultimoEvento)\n\t{\n\t\t// Se o ultimo evento nao existir para um dado alarme entao o novo status \n\t\t// sera o mesmo status atual definido para o alarme. Portanto a analise sera\n\t\t// feita somente se existir um ultimo evento\n\t\tString statusAlarme = alarme.getStatus();\n\t\tif (ultimoEvento != null)\n\t\t{\n\t\t\t// Busca o valor do alarme ALERTA,FALHA ou OK para o alarme em processamento\n\t\t\t// dependendo de suas configuracoes com relacao a \"scheduling\" (agendamento de datas)\n\t\t\tstatusAlarme = getAlertaPorAgendamento(ultimoEvento);\n\t\t\t\n\t\t\t// Se o status for diferente de OK entao ja atualiza este na tabela para indicar o alerta\n\t\t\t// desse alarme. Caso contrario entao as verificacoes por valores e por resposta serao\n\t\t\t// verificados.\n\t\t\tif (statusAlarme.equals(Alarme.ALARME_OK))\n\t\t\t{\n\t\t\t\tstatusAlarme = getAlertaPorValor(ultimoEvento);\n\t\t\t\t// Caso o status por valor seja ok entao verifica por status da ultima execucao.\n\t\t\t\t// No caso do status ser diferente de ok entao este ja vai para a tabela\n\t\t\t\tif (statusAlarme.equals(Alarme.ALARME_OK))\n\t\t\t\t\tstatusAlarme = getAlertaPorStatusExecucao(ultimoEvento);\n\t\t\t}\n\t\t}\n\t\treturn statusAlarme;\n\t}", "private String getAlertaPorAgendamento(Evento ultimoEvento)\n\t{\n\t\t// Busca o tempo de atraso da ultima execucao com o agendamento especificado\n\t\t// Caso o alarme ainda nao possua eventos registrados entao nao considera este\n\t\t// para o estudo do tempo de atraso\n\t\tDate dtAtual\t\t= Calendar.getInstance().getTime();\n\t\tDate dtUltExecucao\t= ultimoEvento.getDataExecucao();\n\t\tDate dtProxExecucao = alarme.getAgendamento().getProximoAgendamento(dtUltExecucao);\n\t\tlong atraso = (dtAtual.getTime() - dtProxExecucao.getTime())/1000/60;\n\n\t\t// O alerta padrao na verificacao por agendamento e o status OK, se existir atraso\n\t\t// entao verifica a faixa do atraso para identificar a gravidade do alarme (alerta ou falha)\n\t\t// porem sempre que considerado o atraso negativo significa que em relacao a data atual\n\t\t// o proximo agendamento nao esta atrasado\n\t\tString alerta = Alarme.ALARME_OK;\n\n\t\t// Verifica se o atraso se classifica como alerta\n\t\tif (atraso > 0 && atraso > alarme.getAtrasoMaxAlerta() && atraso < alarme.getAtrasoMaxFalha())\n\t\t\talerta = Alarme.ALARME_ALERTA;\n\t\t// Verifica se o atraso se classifica como falha\n\t\tif (atraso > 0 && atraso > alarme.getAtrasoMaxFalha())\n\t\t\talerta = Alarme.ALARME_FALHA;\n\n\t\t// Define o motivo do Alarme\n\t\talarme.setMotivoAlarme(Alarme.MOTIVO_ATRASO);\n\n\t\tlogger.debug(alarme.getIdAlarme()+\" - Atraso:\"+atraso);\n\t\treturn alerta;\n\t}", "private String getAlertaPorValor(Evento ultimoEvento)\n\t{\n\t\t// O alerta padrao sera o status OK, dependendo do valor do atraso esse alerta pode ser modificado\n\t\tString alerta = Alarme.ALARME_OK;\n\n\t\t// Verifica se o contador classifica como alerta\n\t\tdouble valor = ultimoEvento.getValorContador();\n\t\t// Verifica se o contador classifica como alerta pelo valor minimo ou maximo\n\t\tif ( valor > alarme.getValorMinFalha() && valor < alarme.getValorMinAlerta() )\n\t\t{\n\t\t\talerta = Alarme.ALARME_ALERTA;\n\t\t\talarme.setMotivoAlarme(Alarme.MOTIVO_VALOR_MIN);\n\t\t}\n\t\telse if ( valor > alarme.getValorMaxAlerta() && valor < alarme.getValorMaxFalha() )\n\t\t\t{\n\t\t\t\talerta = Alarme.ALARME_ALERTA;\n\t\t\t\talarme.setMotivoAlarme(Alarme.MOTIVO_VALOR_MAX);\n\t\t\t}\n\n\t\t// Verifica se o contador classifica como falha. Devido a hierarquia de erro\n\t\t// o teste para falha e feito posterior pois logicamente tem uma gravidade superior\n\t\tif ( valor < alarme.getValorMinFalha() )\n\t\t{\n\t\t\talerta = Alarme.ALARME_FALHA;\n\t\t\talarme.setMotivoAlarme(Alarme.MOTIVO_VALOR_MIN);\n\t\t}\n\t\telse if ( valor > alarme.getValorMaxFalha() )\n\t\t\t{\n\t\t\t\talerta = Alarme.ALARME_FALHA;\n\t\t\t\talarme.setMotivoAlarme(Alarme.MOTIVO_VALOR_MAX);\n\t\t\t}\n\n\t\tlogger.debug(alarme.getIdAlarme()+\" - Contador:\"+valor);\n\t\treturn alerta;\n\t}", "public static native int getAecStatus();", "public int getJobStatus(int jNo);", "public int checkForAlert() {\n return 0;\n }", "public String geraStatus() {\r\n\t\tString statusComplemento = \"\";\r\n\t\tif (this.temProcesso() == false) {\r\n\t\t\treturn \"Nenhum processo\\n\";\r\n\t\t} else {\r\n\t\t\tfor (int i = 0; i < this.escalonadores.size(); i++) {\r\n\t\t\t\tif (i > 0) {\r\n\t\t\t\t\tstatusComplemento += \" \";\r\n\t\t\t\t}\r\n\t\t\t\tstatusComplemento += i + 1 + \" - \";\r\n\t\t\t\tif (this.escalonadores.get(i).temProcesso()) {\r\n\t\t\t\t\tstatusComplemento += this.escalonadores.get(i).geraStatusComplemento();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tstatusComplemento += \"\\n\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn statusComplemento;\r\n\t}", "public void setAlerta(int _alerta) {\r\n\t\tthis.alerta = _alerta;\r\n\t}", "public synchronized Status getStatus() {\n return execStatus;\n }", "public java.lang.String getAlertaId() {\n\t\treturn _pnaAlerta.getAlertaId();\n\t}", "Integer obtenerEstatusPolizaGeneral(int idEstatusPolizaPago);", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "int getStatusValue();", "public PaxosExecution getExecution(PaxosMessage a_msg)\n {\n PaxosExecution result = (PaxosExecution) m_executions.get(a_msg.getInitiator());\n if (result == null)\n {\n error(\"Unknown PaxosExecution requested! (\" + a_msg.getInitiator()\n + \"), problably inconsistent InfoService\");\n }\n return result;\n }", "private int obtieneEstatusBateria() {\n\t\t\n\t\ttry \n { \n IntentFilter batIntentFilter = \n new IntentFilter(Intent.ACTION_BATTERY_CHANGED); \n Intent battery = \n this.registerReceiver(null, batIntentFilter); \n int nivelBateria = battery.getIntExtra(BatteryManager.EXTRA_LEVEL, -1); \n return nivelBateria; \n } \n catch (Exception e) \n { \n Toast.makeText(getApplicationContext(), \n \"Error al obtener estado de la bateria\",\n Toast.LENGTH_SHORT).show(); \n return 0; \n } \n\t}", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic List<Integer> getIdAlarmAlert(String sdateF, String sdateT, String edateF,\r\n\t\t\tString edateT, String bscid, String cellid, String vendor,\r\n\t\t\tString district, String alarmName, String function,\r\n\t\t\tString severity, String netWork, String username, String province,\r\n\t\t\tString team, String alarmType, String alarmMappingName,\r\n\t\t\tString statusFinish, String statusView, \r\n\t\t\tString region, String unAlarmMappingName) {\r\n\t\tMap<String, Object> parms = new HashMap<String, Object>();\r\n \t\tparms.put(\"P_SDATE_FROM\", sdateF);\r\n \t\tparms.put(\"P_SDATE_TO\", sdateT);\r\n \t\tparms.put(\"P_EDATE_FROM\", edateF);\r\n \t\tparms.put(\"P_EDATE_TO\", edateT);\r\n \t\tparms.put(\"P_NE\", bscid);\r\n \t\tparms.put(\"P_CELLID\", cellid);\r\n \t\tparms.put(\"P_VENDOR\", vendor);\r\n \t\tparms.put(\"P_DISTRICT\", district);\r\n \t\tparms.put(\"P_ALARM_NAME\", alarmName);\r\n \t\tparms.put(\"P_NETWORK\", netWork);\r\n \t\tparms.put(\"P_SEVERITY\", severity);\r\n \t\tparms.put(\"P_TYPE\",function );\r\n \t\tparms.put(\"P_USERNAME\", username);\r\n \t\tparms.put(\"P_PROVINCE\", province);\r\n \t\tparms.put(\"P_TEAM\", team);\r\n \t\tparms.put(\"P_ALARM_TYPE\", alarmType);\r\n \t\tparms.put(\"P_ALARM_MAPPING_NAME\", alarmMappingName);\r\n \t\tparms.put(\"P_STATUS_FINISH\", statusFinish);\r\n \t\tparms.put(\"P_STATUS_VIEW\", statusView);\r\n \t\tparms.put(\"P_REGION\", region);\r\n \t\tparms.put(\"P_UN_ALARM_MAPPING\", unAlarmMappingName);\r\n \t\tparms.put(\"P_DATA\", null);\r\n \t\treturn getSqlMapClientTemplate().queryForList(\"R_ALARM_LOG.getIdAlarmAlert\", parms);\r\n\t}", "public String alertaObtemTextoEAceita() {\n Alert alerta = getDriver().switchTo().alert();\n String msg = alerta.getText();\n alerta.accept();\n\n return msg;\n }", "public int getAlertPriority()\n {\n return this.alert_priority;\n }", "public ResultStatus getExecutionProgressStatus();", "Integer getStatus();", "public String getEstatus() {\r\n return estatus;\r\n }", "public String getStatus() throws RemoteException;", "public int getAlarmStatus() {\n return alarmStatus;\n }", "public Alert getAlert(com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.alert.v1.Alert res){\n\t\tAlert alert = new Alert();\n\t\t\n\t\tif( res.getAlertLineNo() != null ){\n\t\t\talert.setAlertLineNo( res.getAlertLineNo().intValue() );\n\t\t}\n\t\tif( res.getAlertSerialNo() != null ){\n\t\t\talert.setAlertSerialNo( res.getAlertSerialNo().intValue() );\n\t\t}\n\t\talert.setAlertLevel( res.getAlertLevel() );\n\t\talert.setAlertId( res.getAlertId() );\n\t\talert.setAlertMessage( res.getAlertMessage() );\n\t\talert.setAlertType( res.getAlertType() );\n\t\talert.appendText( res.getText() );\n\t\t\n\t\treturn alert;\n\t}", "public String getAstatus() {\n return astatus;\n }", "public OpsAlert getOpsAlert(com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.opsalert.v1.OpsAlert res){\n\t\tOpsAlert opsAlert = new OpsAlert();\n\t\t\n\t\topsAlert.setActionCode( res.getActionCode() );\n\t\topsAlert.setAlertCode( res.getAlertCode() );\n\t\topsAlert.setInstructions( res.getInstructions() );\n\t\topsAlert.setHotelName( res.getHotelName() );\n\t\topsAlert.setUserName( res.getUserName() );\n\t\topsAlert.setLocaltelephNo( res.getLocaltelephNo() );\n\t\topsAlert.setService( res.getService() );\n\t\topsAlert.setReprintDoc( res.getReprintDoc() );\n\t\topsAlert.setType( res.getType() );\n\t\topsAlert.setTravelAgencyAccountNo( res.getTravelAgencyAccountNo() );\n\t\tif( res.getImApplicationInfo() != null ){\n\t\t\topsAlert.setImApplicationInfo( this.getIMApplicationInfo( res.getImApplicationInfo() ));\n\t\t}\n\t\tif( res.getInFlightInfo() != null ){\n\t\t\topsAlert.setInFlightInfo( this.getFlightTransferInfo( res.getInFlightInfo() ) );\n\t\t}\n\t\tif( res.getOutFlightInfo() != null ){\n\t\t\topsAlert.setOutFlightInfo( this.getFlightTransferInfo( res.getOutFlightInfo() ) );\n\t\t}\n\t\tif( res.getDocumentAddress() != null ){\n\t\t\topsAlert.setDocumentAddress( this.getAddress( res.getDocumentAddress() ) );\n\t\t}\n\t\tif( res.getBookingHeader() != null ){\n\t\t\topsAlert.setBookingHeader( this.getBookingHeader( res.getBookingHeader() ) );\n\t\t}\n\t\tif( (res.getGuests() != null) && (res.getGuests().size() > 0) ){\n\t\t\tList<GuestInfo> guests = new ArrayList<GuestInfo>();\n\t\t\tfor(int i=0; i < res.getGuests().size(); i++){\n\t\t\t\tif( res.getGuests().get(i) != null )\n\t\t\t\tguests.add( this.getGuestInfo( res.getGuests().get(i) ) );\n\t\t\t}\n\t\t\topsAlert.setGuests(guests);\n\t\t}\n\t\tif( (res.getAlertTypes() != null) && (res.getAlertTypes().size() > 0) ){\n\t\t\tList<AlertType> alertTypes = new ArrayList<AlertType>();\n\t\t\tfor(int i=0; i < res.getAlertTypes().size(); i++){\n\t\t\t\tif( res.getAlertTypes().get(i) != null )\n\t\t\t\talertTypes.add( this.getAlertType( res.getAlertTypes().get(i) ) );\n\t\t\t}\n\t\t\topsAlert.setAlertTypes(alertTypes);\n\t\t}\n\t\tif( (res.getActionTypes() != null) && (res.getActionTypes().size() > 0) ){\n\t\t\tList<ActionType> actionTypes = new ArrayList<ActionType>();\n\t\t\tfor(int i=0; i < res.getActionTypes().size(); i++){\n\t\t\t\tif( res.getActionTypes().get(i) != null )\n\t\t\t\tactionTypes.add( this.getActionType( res.getActionTypes().get(i) ) );\n\t\t\t}\n\t\t\topsAlert.setActionTypes(actionTypes);\n\t\t}\n\t\t\n\t\treturn opsAlert;\n\t}", "public int getStatus();", "public int getStatus();", "public int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "public EstatusVigenciaDetalle getEstatus() {\r\n return estatus;\r\n }", "public ExecutionStatus status() {\n return this.status;\n }", "java.lang.String getStatus();", "java.lang.String getStatus();", "java.lang.String getStatus();", "java.lang.String getStatus();", "@Command\n\tpublic void actualizarEstatus(@BindingParam(\"analista\") final Analista analista){\n\t\tsuper.mostrarMensaje(\"Confirmacion\", \"¿Está seguro que desea cambiar el estatus del analista?\", Messagebox.EXCLAMATION, new Messagebox.Button[]{Messagebox.Button.YES,Messagebox.Button.NO}, \n\t\t\t\tnew EventListener(){\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onEvent(Event event) throws Exception {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tMessagebox.Button button = (Messagebox.Button) event.getData();\n\t\t\t\t\t\tif (button == Messagebox.Button.YES) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tanalista.setiEstatus(EstatusPersonaFactory.getEstatusActivo());\n\t\t\t\t\t\t\t\t//EL METODO DICE ACTUTALIZARPERSONA\n\t\t\t\t\t\t\t\tsMaestros.acutalizarPersona(analista);\n\t\t\t\t\t\t\t\tcambiarAnalistas(0, null, null);\n\t\t\t\t\t\t\t\tnotifyChange(\"analistas\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\n\t\t}, null);\n\t}", "public void alertUser(int status){\r\n\r\n }", "public Long getAlertId();", "public String getNombreEstatusObjeto() {\r\n\t\treturn nombreEstatusObjeto;\r\n\t}", "public IStatus getResult();", "public int getIdEstatusObjeto() {\r\n\t\treturn idEstatusObjeto;\r\n\t}", "OperationStatusType status();", "boolean isStatusSuspensao();", "public String updateNUpdateDone(String xml) throws Exception {\n\t\tQueue<KeyValuePair> queue = IMonitorUtil.extractCommandsQueueFromXml(xml);\n\t\t\n\t\tString alertEvent = IMonitorUtil.commandId(queue, Constants.ALERT_EVENT);\n\t\tAlertType alertType=null;\n\t\t\n\t\t//Naveen start\n\t\tif(alertEvent.equals(Constants.REQUEST_NEIGHBOR_UPDATE_DONE))\n\t\t\talertType= IMonitorUtil.getAlertTypes().get(Constants.REQUEST_NEIGHBOR_UPDATE_DONE);\n\t\telse if(alertEvent.equals(Constants.REQUEST_ASSOCIATION_DONE))\n\t\t\talertType= IMonitorUtil.getAlertTypes().get(Constants.REQUEST_ASSOCIATION_DONE);\n\t\telse if(alertEvent.equals(Constants.REQUEST_CONFIGURATION_DONE))\n\t\t\talertType= IMonitorUtil.getAlertTypes().get(Constants.REQUEST_CONFIGURATION_DONE);\n\t\telse if(alertEvent.equals(Constants.ASSIGN_RETURN_ROUTE_SUCCESS))\n\t\t\talertType = IMonitorUtil.getAlertTypes().get(Constants.ASSIGN_RETURN_ROUTE_SUCCESS);\n\t\telse if(alertEvent.equals(Constants.NORMAL_SWITCH_CONFIG_SUCCESS))\n\t\t\talertType = IMonitorUtil.getAlertTypes().get(Constants.NORMAL_SWITCH_CONFIG_SUCCESS);\n\t\telse if(alertEvent.equals(Constants.ROUTING_INFO_SUCCESS))\n\t\t alertType = IMonitorUtil.getAlertTypes().get(Constants.ROUTING_INFO_SUCCESS);\n\t\telse if(alertEvent.equals(Constants.NODE_PROTOCOL_INFO_SUCCESS))\n\t\t\talertType = IMonitorUtil.getAlertTypes().get(Constants.NODE_PROTOCOL_INFO_SUCCESS);\n\t\t//end\n\t\t\n\t\t\n\t\tQueue<KeyValuePair> resultQueue = updateAlertAndExecuteRule(xml,\n\t\t\t\talertType);\n\n\t\tXStream stream = new XStream();\n\t\treturn stream.toXML(resultQueue);\n\t}", "@Override\n public int estado(){\n \n try {\n Process proceso;\n proceso = Runtime.getRuntime().exec(\"/etc/init.d/\"+nombreServicio+\" status\");\n InputStream is = proceso.getInputStream(); \n BufferedReader buffer = new BufferedReader (new InputStreamReader (is));\n \n //Se descartan las dos primeras lineas y se lee la tercera\n buffer.readLine();\n buffer.readLine();\n String resultado = buffer.readLine();\n \n if(resultado.contains(\"Active: active\")){\n return 1;\n }\n } \n catch (IOException ex) {\n Logger.getLogger(Servicio.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n return 0;\n }", "String getStatusMessage( );", "int getEresult();", "com.lvl6.proto.EventQuestProto.QuestProgressResponseProto.QuestProgressStatus getStatus();", "private Queue<KeyValuePair> updateAlertAndExecuteRule(String xml,\n\t\t\tAlertType alertType) throws ParserConfigurationException,\n\t\t\tSAXException, IOException {\n\t\t// 1. Get the device.\n\t\t// 2. Update the device\n\t\t// 3. Save the alerts\n\t\t// 4. Execute the rules\n\t\t\n\t\tQueue<KeyValuePair> queue = IMonitorUtil\n\t\t\t\t.extractCommandsQueueFromXml(xml);\n\t\tString generatedDeviceId = IMonitorUtil.commandId(queue,\n\t\t\t\tConstants.DEVICE_ID);\n\t\tString Gatewayid= IMonitorUtil.commandId(queue,\n\t\t\t\tConstants.IMVG_ID); \n\t\t\n\t\tCustomerManager customerManager = new CustomerManager();\n\t\tImvgAlertsActionsManager imvgAlertsActionsManager = new ImvgAlertsActionsManager();\n\t\tString customerId = null;\n\t\tGatewayManager gatewayManager = new GatewayManager();\n\t\tDeviceManager deviceManager = new DeviceManager();\n\t\tXStream stream = new XStream();\n\t\t// naveen start\n\t\tlong id = Long.parseLong(gatewayManager.getIdOfGateway(Gatewayid));\n\t\t//customerId = gatewayManager.getCustomerIdOfGateWay(Gatewayid);\n\t\tCustomer customer = customerManager.getCustomerByMacId(Gatewayid);\n\t\t//PushNotify changes 7Feb start\n\t\t//Get alerts list from userChoosenALerts table start\n\t\tDevice device = null;\n\t\t//Changes done by apoorva to display Home Stay Away in alerts page\n\t\tString alertEvent = IMonitorUtil.commandId(queue, Constants.ALERT_EVENT);\n\t\tGateWay gateWay=gatewayManager.getGateWayByMacId(Gatewayid);\n\t\tString gatewayName = gateWay.getName();\n\t\tString alertValue=null;\n\n\t\tif(alertEvent.equalsIgnoreCase(\"ARM_DEVICES_SUCCESS\")){\n\t\t\tgeneratedDeviceId += (\"-AWAY\");\n\t\t\talertValue= gatewayName;\n\t\t\t//generatedDeviceId.concat(\"-AWAY\");\t\t\t\n\t\t}else if(alertEvent.equalsIgnoreCase(\"DISARM_DEVICES_SUCCESS\")){\n\t\t\tgeneratedDeviceId += (\"-HOME\");\n\t\t\talertValue= gatewayName;\n\t\t\t//generatedDeviceId.concat(\"-HOME\");\n\t\t}else if(alertEvent.equalsIgnoreCase(\"STAY_DEVICES_SUCCESS\")){\n\t\t\tgeneratedDeviceId +=(\"-STAY\");\n\t\t\talertValue= gatewayName;\n\t\t\t//generatedDeviceId.concat(\"-STAY\");\n\t\t\t//3gp change start end\n\t\t}\n\t\tdevice = deviceManager.getDeviceWithGateWayAndAgentByGeneratedDeviceId(generatedDeviceId);\n\t\tlong deviceId = device.getId();\n\t\tif (!alertEvent.equalsIgnoreCase(\"ARM_DEVICES_SUCCESS\") || !alertEvent.equalsIgnoreCase(\"DISARM_DEVICES_SUCCESS\") || !alertEvent.equalsIgnoreCase(\"STAY_DEVICES_SUCCESS\") || !alertEvent.equalsIgnoreCase(Constants.BATTERY_STATUS))\n\t\t{\n\t\t\tUserChoosenAlertsManager alertsManager=new UserChoosenAlertsManager();\n\t\t\tUserChoosenAlerts choosenAlerts= alertsManager.listUserChoosenAlertsfromdevice(deviceId,alertType.getId());\n\t\t\tif (choosenAlerts!=null)\n\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t//LogUtil.info(\"Alert Name: \" + alertType.getDetails());\n\t\t\t\t\t//LogUtil.info(\"Device Friendly Name : \" + device.getFriendlyName());\n\t\t\t\t\tPushNotificationsService pushNotificationsService= new PushNotificationsService(alertType, customer,device);\n\t\t\t\t\tThread thread = new Thread(pushNotificationsService);\n\t\t\t\t\tthread.start();\n\t\t\t}\n\t\t}\n\t\n\t\tif(alertEvent.equalsIgnoreCase(\"TEMPERATURE_CHANGE\")){\n\t\t\t\n\t\t\n\t\t\talertValue = IMonitorUtil.commandId(queue, Constants.TEMPERATURE_VALUE);\n\t\t\t\n\t\t\tDevice acDevice = deviceManager.getDevice(generatedDeviceId);\n\t\t\tlong dcID = acDevice.getDeviceConfiguration().getId();\n\t\t\t\n\t\t\tdeviceManager.updateAcConfigurationWithSensedTemperature(dcID,alertValue);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t\t//Changes done by apoorva to display Home Stay Away in alerts page end\n\t\telse if(alertEvent.equalsIgnoreCase(\"PMLEVEL_CHANGE\")){\n\t\t\tString generatedDeviceId1 = IMonitorUtil.commandId(queue,Constants.DEVICE_ID);\n\t\t\tString pmvalue = IMonitorUtil.commandId(queue,Constants.PM_VALUE);\n\t\t\tDeviceManager deviceManager1=new DeviceManager();\n\t\t\tdeviceManager1.updateDeviceCommandParam(generatedDeviceId1, pmvalue);\t\n\t\t}\n\t\t\n\t\t\n\t\t// naveen start: to take back up from the existing alertfromimvg table\n\t\tint count =Integer.parseInt(imvgAlertsActionsManager.getCountAlerts(id).toString());\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"dd\");\n\t\tDate date = new Date();\n\t\tCalendar cal = Calendar.getInstance();\n\t\t\n\t\tint bck = customer.getBackup();\n\t\tif(count>10000 || ((dateFormat.format(cal.getTime()).equals(\"01\")) && bck == 0)){\n\t\t\tGateWay gw = gatewayManager.getGateWayByMacId(Gatewayid);\n\t\t\tSet<Device> deviceList = gatewayManager.getDevicesOfGateWay(gw);\n\t\t\t\n\t\t\t//Get Entries from existing table\n\t\t\tfor(Device d : deviceList){\n\t\t\t\tlong dId = d.getId();\n\t\t\t\timvgAlertsActionsManager.backup(dId);\n\t\t\t\t\n\t\t\t\timvgAlertsActionsManager.deleteCurrentAlerts(dId);\n\t\t\t\t\n\t\t\t}\n\t\t\tif(dateFormat.format(cal.getTime()).equals(\"01\")){\n\t\t\t\tcustomerId = customer.getCustomerId();\n\t\t\t\tLogUtil.info(\"customerId : \" + customerId);\n\t\t\t\tcustomerManager.setbackupdone(customerId);\n\t\t\t}\n\t\t}else if(!dateFormat.format(cal.getTime()).equals(\"01\")){\n\t\t\t\n\t\t\tcustomerManager.resetbackupdone(customerId);\n\t\t}\n\t\t// Naveen end\n\t\t\n\t\tString batteryStatus = IMonitorUtil.commandId(queue, Constants.BATTERY_LEVEL);\n\t\t\n\t\tString TimeStamp=IMonitorUtil.commandId(queue,\"IMVG_TIME_STAMP\");\n\t\tSimpleDateFormat time=new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\n\t\t\n\t\ttry {\n\t\t\tdate = time.parse(TimeStamp);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t/*to update IDU's if Slave is down\n\t\t\t * Added by apoorva\n\t\t\t * */\n\t\t\tif ((alertEvent.equalsIgnoreCase(\"SLAVE_DOWN\")) || (alertEvent.equalsIgnoreCase(\"SLAVE_UP\")) )\n\t\t\t{\n\t\t\t\tdevice=new Device();\n\t\t\t\tString generatedDeviceId11 = IMonitorUtil.commandId(queue,Constants.DEVICE_ID);\n\t\t\t\tdevice.setGeneratedDeviceId(generatedDeviceId11);\n\t\t\t\tdeviceManager.updateSlaveAndIduLastAlert(alertType,device);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tdevice=deviceManager.changeDeviceLastAlertSaveAlertAndCheckArm(generatedDeviceId,alertType,batteryStatus,date);\n\t\t\t\n\t\t\tif(alertEvent.equalsIgnoreCase(\"PANIC_SITUATION\"))\n\t\t\t{\n\t\t\t\tdeviceManager.updateAlertsFromImvgForVirtualDevice(device.getId(),alertType,date,device,alertValue);\n\t\t\t}else if(alertEvent.equalsIgnoreCase(\"POWER_INFORMATION\"))\n\t\t\t{\n\t\t\t\talertValue=IMonitorUtil.commandId(queue, Constants.POWER_CONSUMED);\n\t\t\t\tdeviceManager.updatePowerInformation(device.getId(),alertType,date,device,alertValue);\n\t\t\t}else if(alertEvent.equalsIgnoreCase(\"ENERGY_INFORMATION\"))\n\t\t\t{\n\t\t\t\talertValue=IMonitorUtil.commandId(queue, Constants.ENERGY_CONSUMED);\n\t\t\t\t//LogUtil.info(\"energy value\"+alertValue);\n\t\t\t\t\n\t\t\t\t//LogUtil.info(\"device\"+new XStream().toXML(device));\n\t\t\t\tdeviceManager.updateEnergyInformation(device.getId(),alertType,date,device,alertValue);\n\t\t\t}\n\t\t\telse if(alertEvent.equalsIgnoreCase(Constants.BATTERY_STATUS))\n\t\t\t{\n\t\t\t\tint BatteryLevelValue=0;\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\tBatteryLevelValue = Integer.parseInt(batteryStatus);\n\t\t\t\t\t\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(BatteryLevelValue <= 10)\n\t\t\t\tdeviceManager.updateAlertsFromImvg(device.getId(),alertType,date,device,alertValue);\n\t\t\t\t\n\t\t\t\t//Send push notofocations\n\t\t\t\tUserChoosenAlertsManager alertsManager=new UserChoosenAlertsManager();\n\t\t\t\tUserChoosenAlerts choosenAlerts= alertsManager.listUserChoosenAlertsfromdevice(deviceId,alertType.getId());\n\t\t\t\tif (choosenAlerts!=null)\n\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t//LogUtil.info(\"Alert Name: \" + alertType.getDetails());\n\t\t\t\t\t\t//LogUtil.info(\"Device Friendly Name : \" + device.getFriendlyName());\n\t\t\t\t\t\tPushNotificationsService pushNotificationsService= new PushNotificationsService(alertType, customer,device);\n\t\t\t\t\t\tThread thread = new Thread(pushNotificationsService);\n\t\t\t\t\t\tthread.start();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}else if(alertEvent.equalsIgnoreCase(Constants.NODE_PROTOCOL_INFO_SUCCESS)){ // Added by Naveen\n\t\t\t\t\n\t\t\t\t/*String basicType = IMonitorUtil.commandId(queue, Constants.BASIC);\t\t\t\t\n\t\t\t\tString generic = IMonitorUtil.commandId(queue, Constants.GENERIC);\n\t\t\t\tString specific = IMonitorUtil.commandId(queue, Constants.SPECIFIC);\n\t\t\t\tString protocolInfo = basicType +\"-\"+ generic+ \"-\" + specific;*/\n\t\t\t\tStringBuilder sb = new StringBuilder(IMonitorUtil.commandId(queue, Constants.BASIC)).append(\"-\").append(IMonitorUtil.commandId(queue, Constants.GENERIC)).append(\"-\").append(IMonitorUtil.commandId(queue, Constants.SPECIFIC));\n\t\t\t\tString protocolInfo = sb.toString();\n\t\t\t\tdeviceManager.updateAlertsFromImvg(device.getId(),alertType,date,device,protocolInfo);\n\t\t\t\t\n\t\t\t}else if(alertEvent.equalsIgnoreCase(Constants.ROUTING_INFO_SUCCESS)){ // Added by Naveen\n\t\t\t\t\n\t\t\t\tString List = IMonitorUtil.commandId(queue, Constants.NEIGHBOURS);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tdeviceManager.updateAlertsFromImvg(device.getId(),alertType,date,device,List);\n\t\t\t\t\n\t\t\t}else if((alertEvent.equalsIgnoreCase(Constants.DEVICE_UP))||(alertEvent.equalsIgnoreCase(Constants.DEVICE_DOWN))){\n\t\t\t\tdeviceManager.updateAlertsFromImvg(device.getId(),alertType,date,device,alertValue);\n\t\t\t\t\n\t\t\t\t//Updating to alexa end point\n\t\t\t\ttry {\n\t\t\t\t\tdevice = deviceManager.getDeviceWithGateWayAndAgentByGeneratedDeviceId(generatedDeviceId);\n\t\t\t\t\tupdateConnectivityStatusToAlexa(Gatewayid,device,alertEvent);\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t/*to update IDU's if VIA or IDU is down\n\t\t\t\t * Added by Naveen\n\t\t\t\t * */\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif((device.getDeviceType().getName().equals(Constants.VIA)) || (device.getDeviceType().getName().equals(Constants.VIA_UNIT )) ) {\n\t\t\t\t\t\tdeviceManager.updateSlaveAndIduLastAlert(alertType,device);\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\n\t\t\t\tdeviceManager.updateAlertsFromImvg(device.getId(),alertType,date,device,alertValue);\n\t\t\t}\n\t\t} catch (ParseException e) {\n\t\t\tLogUtil.info(\"ParseException\", e);\n\t\t} catch (Exception e){\n\t\t\tLogUtil.info(\"Got Exception\", e);\n\t\t}\n\t\t\t\t\t\t\n\t\treturn checkArmStatusAndExecuteRules(queue, generatedDeviceId, device,alertType);\n\t}", "TaskStatus getStatus();", "@Test\n public void alerts () throws Exception\n {\n JavascriptExecutor js = (JavascriptExecutor) driver;\n\n //ACEPTAR ALERTA\n js.executeScript(\"alert('Saludos pal Amigo Raul');\");\n wait = new WebDriverWait(driver, 2);\n wait.until(ExpectedConditions.alertIsPresent());\n utils.Loading(driver, 300);\n /*driver.switchTo().alert().accept();\n utils.Loading(driver, 300);*/\n\n //DISMIS ALERTA --> LO QUE HACE ESTA FUNCION ES CANCELAR LAS ALERTAS,se cumple cuando se tiene un botón cancelar,diferentes a positivo\n String Alert = driver.switchTo().alert().getText();\n System.out.println(\"El texto es\" + Alert);\n driver.switchTo().alert().dismiss();\n }", "@POST\n\t@Consumes({ MediaType.APPLICATION_JSON })\n\t@Produces({ MediaType.APPLICATION_JSON })\n\t@Transactional\n\tpublic StatusVo cadastrarAvaliacao(AvaliacaoVo avaliacaoVo) {\n\n\t\tStatusVo status = new StatusVo();\n\n\t\tAvaliacao avaliacao = avaliacaoService.cadastrarAvaliacao(avaliacaoVo);\n\n\t\tboolean result = (avaliacao != null && avaliacao.getId() != null);\n\n\t\tif (result) {\n\t\t\tstatus.setChave(Constants.UM);\n\t\t\tstatus.setIdCadastrado(new Long(avaliacao.getId()));\n\t\t\tstatus.setValor(Constants.CHAVE_OK);\n\t\t} else {\n\t\t\tstatus.setChave(Constants.ZERO);\n\t\t\tstatus.setValor(Constants.CHAVE_ERRO);\n\t\t}\n\n\t\treturn status;\n\n\t}", "int getStatus(int index);", "public List<TorrentStatus> status() {\n torrent_status_vector v = alert.getStatus();\n int size = (int) v.size();\n\n List<TorrentStatus> l = new ArrayList<>(size);\n for (int i = 0; i < size; i++) {\n l.add(new TorrentStatus(v.get(i)));\n }\n\n return l;\n }", "com.lvl6.proto.EventQuestProto.QuestAcceptResponseProto.QuestAcceptStatus getStatus();", "String getStatus();", "String getStatus();", "String getStatus();", "String getStatus();", "String getStatus();", "String getDataStatus();", "public Integer getStatus() {\r\n return status;\r\n }", "public Integer getStatus() {\r\n return status;\r\n }", "public String getStatus()\r\n {\n return (\"1\".equals(getField(\"ApprovalStatus\")) && \"100\".equals(getField(\"HostRespCode\")) ? \"Approved\" : \"Declined\");\r\n }", "public final Integer getExecReturnCode() {\n\t\treturn execReturnCode;\n\t}", "EntryStatus getStatus();", "@Override\n\tpublic void respuestaCompletada(WSInfomovilMethods metodo,\n\t\t\tlong milisegundo, WsInfomovilProcessStatus status) {\n\t\tif(alerta != null)\n\t\t\talerta.dismiss();\n\t\tdatosUsuario = DatosUsuario.getInstance();\n\t\timagenAdapter.setListAdapter(datosUsuario.getListaImagenes());\n\t\tarrayGaleria = datosUsuario.getListaImagenes();\n\t\timagenAdapter.notifyDataSetChanged();\n\t\tif (status == WsInfomovilProcessStatus.EXITO) {\n\t\t\talerta = new AlertView(activity, AlertViewType.AlertViewTypeInfo, getResources().getString(R.string.txtActualizacionCorrecta));\n\t\t\talerta.setDelegado(this);\n\t\t\talerta.show();\n\t\t}\n\t\telse {\n\t\t\tif (arrayGaleriaAux != null && arrayGaleriaAux.size()>0) {\n\t\t\t\tdatosUsuario.setListaImagenes(arrayGaleriaAux);\n\t\t\t}\n\t\t\talerta = new AlertView(activity, AlertViewType.AlertViewTypeInfo, getResources().getString(R.string.txtErrorActualizacion));\n\t\t\talerta.setDelegado(this);\n\t\t\talerta.show();\n\t\t}\n\n\t}", "public List<Empresatb09EmpresaRegraRenegociacao> buscarPorPessoaStatus(Empresatb01Empresa vo, boolean status) {\n \n StringBuilder query = new StringBuilder();\n Object[] elements = new Object[2];\n\n query.append(\" select c from Empresatb09EmpresaRegraRenegociacao c where c.empresatb01Empresa = ?1 and c.ativo = ?2 \");\n\n elements[0] = vo;\n elements[1] = status;\n\n return super.getListEntity(query.toString(), elements);\n }", "public int ultimasAlertasDelSistema(Connection conn) {\r\n\t\tint cantidad = 0;\r\n\t\ttry {\r\n\r\n\t\t\tPreparedStatement statement = conn\r\n\t\t\t\t\t.prepareStatement(\"select\"\r\n\t\t\t\t\t\t\t+ \" count(ID_ALERTA)\"\r\n\t\t\t\t\t\t\t+ \" from alertas \"\r\n\t\t\t\t\t\t\t+ \" where fecha_fin \"\r\n\t\t\t\t\t\t\t+ \" BETWEEN DATE_SUB(CURRENT_DATE(), INTERVAL 8 DAY) AND CURRENT_DATE+3 \"\r\n\t\t\t\t\t\t\t+ \" and ESTADO != 'Desactivado'\");\r\n\r\n\t\t\tResultSet rs = statement.executeQuery();\r\n\r\n\t\t\tcantidad = 0;\r\n\t\t\tfor (int i = 0; i < 1; i++) {\r\n\t\t\t\trs.next();\r\n\t\t\t\tcantidad = Integer.parseInt(\"\" + rs.getString(1));\r\n\t\t\t}\r\n\r\n\t\t\trs.close();\r\n\t\t\tstatement.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t}\r\n\r\n\t\treturn cantidad;\r\n\t}", "String status();", "String status();" ]
[ "0.67378944", "0.6520044", "0.6463138", "0.55637383", "0.5435676", "0.54289675", "0.5400165", "0.53956306", "0.538617", "0.53631985", "0.5329028", "0.53278345", "0.53278345", "0.53278345", "0.53278345", "0.53278345", "0.53278345", "0.53278345", "0.53278345", "0.53278345", "0.53278345", "0.53278345", "0.53278345", "0.53278345", "0.53278345", "0.53278345", "0.53278345", "0.53278345", "0.53278345", "0.53278345", "0.53278345", "0.5312881", "0.5302657", "0.52905035", "0.5280871", "0.52642447", "0.5225005", "0.52229446", "0.52178365", "0.52095747", "0.518645", "0.51723236", "0.51700854", "0.5145675", "0.50515634", "0.50515634", "0.50515634", "0.50364727", "0.50364727", "0.50364727", "0.50364727", "0.50364727", "0.50364727", "0.50364727", "0.50364727", "0.50364727", "0.50364727", "0.50364727", "0.5028156", "0.5023529", "0.50190026", "0.50190026", "0.50190026", "0.50190026", "0.50131714", "0.49713627", "0.49704513", "0.49693662", "0.496837", "0.49678996", "0.49665767", "0.4944897", "0.49377185", "0.49358895", "0.49290195", "0.49246362", "0.49072203", "0.4901141", "0.49007863", "0.48986685", "0.48892227", "0.4885121", "0.4884659", "0.48845205", "0.48765728", "0.48765728", "0.48765728", "0.48765728", "0.48765728", "0.4874476", "0.48659378", "0.48659378", "0.48652297", "0.48591453", "0.48529533", "0.48471424", "0.48375088", "0.48361093", "0.48359212", "0.48359212" ]
0.8214494
0
Metodo....:getStatusAlarme Descricao.:Define o novo status que sera definido para o alarme
private String getStatusAlarme(Evento ultimoEvento) { // Se o ultimo evento nao existir para um dado alarme entao o novo status // sera o mesmo status atual definido para o alarme. Portanto a analise sera // feita somente se existir um ultimo evento String statusAlarme = alarme.getStatus(); if (ultimoEvento != null) { // Busca o valor do alarme ALERTA,FALHA ou OK para o alarme em processamento // dependendo de suas configuracoes com relacao a "scheduling" (agendamento de datas) statusAlarme = getAlertaPorAgendamento(ultimoEvento); // Se o status for diferente de OK entao ja atualiza este na tabela para indicar o alerta // desse alarme. Caso contrario entao as verificacoes por valores e por resposta serao // verificados. if (statusAlarme.equals(Alarme.ALARME_OK)) { statusAlarme = getAlertaPorValor(ultimoEvento); // Caso o status por valor seja ok entao verifica por status da ultima execucao. // No caso do status ser diferente de ok entao este ja vai para a tabela if (statusAlarme.equals(Alarme.ALARME_OK)) statusAlarme = getAlertaPorStatusExecucao(ultimoEvento); } } return statusAlarme; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Boolean getStatus() {return status;}", "public Status getStatus();", "public Status getStatus() {\r\n\t return status;\r\n\t }", "public int getStatus();", "public int getStatus();", "public int getStatus();", "public String getAstatus() {\n return astatus;\n }", "public Status getStatus(){\n return status;\n }", "public StatusEnum getStatus()\n {\n return status;\n }", "public String getStatus() { return status; }", "java.lang.String getStatus();", "java.lang.String getStatus();", "java.lang.String getStatus();", "java.lang.String getStatus();", "public Status getStatus()\n {\n return status;\n }", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "public boolean getStatus(){\n return activestatus;\n }", "public int getStatus ()\n {\n return status;\n }", "public int getStatus ()\n {\n return status;\n }", "public int getStatus()\n {\n return status;\n }", "boolean getStatus();", "boolean getStatus();", "boolean getStatus();", "@Override\n\tpublic int getStatus();", "@Override\n\tpublic int getStatus();", "public final Status getStatus() {\n/* 199 */ return this.status;\n/* */ }", "public boolean returnStatus(){\n return status;\r\n }", "public Status getStatus() {\r\n return status;\r\n }", "UserStatus getStatus();", "public boolean getStatus() {\n\treturn status;\n }", "public boolean getStatus(){\r\n\t\treturn status;\r\n\t}", "public Boolean getStatus() {\n return status;\n }", "public Boolean getStatus() {\n return status;\n }", "public Boolean getStatus() {\n return status;\n }", "public StatusEnum getStatus() {\n return status;\n }", "public String getStatus(){\n\n //returns the value of the status field\n return this.status;\n }", "public String getStatus(){\r\n\t\treturn status;\r\n\t}", "private void getStatus() {\n\t\t\n\t}", "public java.lang.Object getStatus() {\n return status;\n }", "@Override\n public Status getStatus() {\n return status;\n }", "public Status getStatus() {\n return status;\n }", "public Status getStatus() {\n return status;\n }", "public Status getStatus() {\n return status;\n }", "public Status getStatus()\n\t{\n\t\treturn status;\n\t}", "RequestStatus getStatus();", "public int getStatus() {\n return status;\n }", "public int getStatus() {\n return status;\n }", "public int getStatus() {\n return status;\n }", "public int getStatus() {\n return status;\n }", "public int getStatus() {\n return status;\n }", "String getStatus();", "String getStatus();", "String getStatus();", "String getStatus();", "String getStatus();", "public int getStatus(){\r\n\t\treturn this.status;\r\n\t}", "Integer getStatus();", "public abstract String currentStatus();", "public abstract OnlineStatus getStatus();", "public StatusCode GetStatus();", "public String getStatus () {\r\n return status;\r\n }", "public EnumVar getStatus() {\n return status;\n }", "T getStatus();", "public String getStatus() {\n return this.status;\n }", "public String getStatus() {\n return this.status;\n }", "public String getStatus() {\n return this.status;\n }", "public int getEntitystatus();", "public Integer getStatus() {\r\n return status;\r\n }", "public Integer getStatus() {\r\n return status;\r\n }", "public boolean getAtmStatus();", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }", "public Integer getStatus() {\n return status;\n }" ]
[ "0.7595296", "0.75109947", "0.7319225", "0.7312145", "0.7312145", "0.7312145", "0.72928137", "0.729266", "0.7257356", "0.72561044", "0.71973366", "0.71973366", "0.71973366", "0.71973366", "0.71774584", "0.71595955", "0.71595955", "0.71595955", "0.71595955", "0.71595955", "0.71595955", "0.71595955", "0.71595955", "0.71595955", "0.71595955", "0.71595955", "0.7148116", "0.71441346", "0.71441346", "0.7127722", "0.71260715", "0.71260715", "0.71260715", "0.7123573", "0.7123573", "0.7110479", "0.709775", "0.7092582", "0.708656", "0.70594054", "0.7058906", "0.70566857", "0.70566857", "0.70566857", "0.7053666", "0.7052252", "0.7048571", "0.7020693", "0.70201296", "0.6998155", "0.69889426", "0.69889426", "0.69889426", "0.6978183", "0.6976665", "0.6976224", "0.6976224", "0.6976224", "0.6976224", "0.6976224", "0.6963662", "0.6963662", "0.6963662", "0.6963662", "0.6963662", "0.6952817", "0.6949043", "0.6945125", "0.6939646", "0.6938127", "0.69312745", "0.6931212", "0.6928578", "0.6922408", "0.6922408", "0.6922408", "0.691212", "0.6906685", "0.6906685", "0.6894672", "0.68874437", "0.68874437", "0.68874437", "0.68874437", "0.68874437", "0.68874437", "0.68874437", "0.68874437", "0.68874437", "0.68874437", "0.68874437", "0.68874437", "0.68874437", "0.68874437", "0.68874437", "0.68874437", "0.68874437", "0.68874437", "0.68874437", "0.68874437" ]
0.7227114
10
TODO Autogenerated method stub
@Override public Iterator createIterator() { return bestSongs.values().iterator(); }
{ "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
/ access modifiers changed from: protected
public void subscribeActual(SingleObserver<? super R> singleObserver) { try { this.source.subscribe(new ReduceSeedObserver(singleObserver, this.reducer, ObjectHelper.requireNonNull(this.seedSupplier.call(), "The seedSupplier returned a null value"))); } catch (Throwable th) { Exceptions.throwIfFatal(th); EmptyDisposable.error(th, singleObserver); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "private abstract void privateabstract();", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void smell() {\n\t\t\n\t}", "public abstract Object mo26777y();", "protected void h() {}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "protected abstract Set method_1559();", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public abstract void mo70713b();", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "protected Doodler() {\n\t}", "public abstract void mo27386d();", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "private PropertyAccess() {\n\t\tsuper();\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public abstract void mo56925d();", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void init() {\n }", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void emprestimo() {\n\n\t}", "public abstract void mo27385c();", "@Override\r\n\t\t\tpublic void buscar() {\n\r\n\t\t\t}", "@Override\n public void memoria() {\n \n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "protected boolean func_70814_o() { return true; }", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public abstract void mo30696a();", "abstract int pregnancy();", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n void init() {\n }", "private TMCourse() {\n\t}", "@Override\n\tpublic void leti() \n\t{\n\t}", "public abstract void mo35054b();", "@Override\n public void init() {\n }", "@Override\n\tpublic void buscar() {\n\t\t\n\t}", "private Infer() {\n\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tpublic void erstellen() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "public final void mo51373a() {\n }", "protected FanisamBato(){\n\t}", "protected void method_3848() {\r\n super.method_3848();\r\n }", "public abstract Object mo1771a();", "public abstract void m15813a();", "@Override\n public void get() {}", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void dibuja() {\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 }", "private Get() {}", "private Get() {}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public abstract void mo27464a();", "public abstract String mo41079d();", "@Override\n\tpublic void classroom() {\n\t\t\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void logic() {\n\n\t}", "public abstract void mo102899a();", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "public abstract void mo42329d();", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Override\r\n \tpublic void process() {\n \t\t\r\n \t}", "public void method_4270() {}", "public abstract void mo6549b();", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void function() {\n\t\t\n\t}", "public abstract String mo118046b();" ]
[ "0.7375959", "0.70425177", "0.69218665", "0.6908857", "0.68462455", "0.68293995", "0.6805953", "0.6583417", "0.65397364", "0.65014184", "0.6491877", "0.6491877", "0.6472813", "0.64386034", "0.6432003", "0.6432003", "0.64291835", "0.6425716", "0.6419082", "0.6409203", "0.6406647", "0.6401983", "0.6399918", "0.63980156", "0.63775325", "0.637381", "0.6371243", "0.63685536", "0.6354125", "0.63342035", "0.6326444", "0.6326444", "0.6326272", "0.63074166", "0.6279543", "0.62711143", "0.62517804", "0.6225546", "0.6221585", "0.6214133", "0.62042844", "0.6195285", "0.6182919", "0.6176472", "0.61582804", "0.6138921", "0.6122121", "0.6118945", "0.6118614", "0.61002874", "0.60924006", "0.60924006", "0.60867274", "0.6084558", "0.6070018", "0.6070004", "0.60676074", "0.60570544", "0.6047126", "0.6047071", "0.6034709", "0.6031872", "0.6025553", "0.6020158", "0.60166955", "0.6015039", "0.6011175", "0.5995864", "0.59951955", "0.599483", "0.5992563", "0.59914196", "0.5985271", "0.59848785", "0.59677714", "0.5967113", "0.5967113", "0.5967113", "0.5967113", "0.5967113", "0.5967113", "0.5966056", "0.5966056", "0.59610426", "0.59567136", "0.5953479", "0.59491515", "0.5945194", "0.594085", "0.59344965", "0.5932654", "0.5932434", "0.59303945", "0.5929808", "0.5926648", "0.5924341", "0.59239006", "0.5923369", "0.59223837", "0.59204763", "0.59188694" ]
0.0
-1
Case 0: Identical person do not result in any differences
@Test public void testCompareEqualsCase0() throws IOException { Person p1 = DataUtil.readDataFromFile("test/data/case0/case0-person.json", Person.class); Person p2 = DataUtil.readDataFromFile("test/data/case0/case0-person.json", Person.class); IContext ctx = ObjectCompare.compare(p1, p2); debug(ctx.getDifferences()); Assert.assertFalse(ctx.hasDifferences()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n\tpublic void testCompareCase1() throws IOException {\r\n\t\tPerson p1 = DataUtil.readDataFromFile(\"test/data/case1/case1-person1.json\", Person.class);\r\n\t\tPerson p2 = DataUtil.readDataFromFile(\"test/data/case1/case1-person2.json\", Person.class);\r\n\r\n\t\tIContext ctx = ObjectCompare.compare(p1, p2);\r\n\t\tdebug(ctx.getDifferences());\r\n\t\tAssert.assertTrue(ctx.hasDifferences());\r\n\t\tAssert.assertEquals(4, ctx.getDifferences().size());\r\n\t}", "@Test\r\n\tpublic void testCompareCase2() throws IOException {\r\n\t\tPerson p1 = DataUtil.readDataFromFile(\"test/data/case2/case2-person1.json\", Person.class);\r\n\t\tPerson p2 = DataUtil.readDataFromFile(\"test/data/case2/case2-person2.json\", Person.class);\r\n\r\n\t\t// Custom context\r\n\t\tString ageFieldName = FieldUtil.makeFieldName(Person.class, \"age\");\r\n\t\tIContext ctx = ObjectCompare.buildContext().register(FieldFeature.IGNORE_FIELD, ageFieldName);\r\n\t\tObjectCompare.compare(p1, p2, ctx);\r\n\t\tdebug(ctx.getDifferences());\r\n\t\tAssert.assertFalse(ctx.hasDifferences());\r\n\t}", "public void test_hk_02() {\n OntModelSpec spec = new OntModelSpec(OntModelSpec.OWL_MEM);\n spec.setReasoner(null);\n OntModel ontModel = ModelFactory.createOntologyModel(spec, null); // ProfileRegistry.OWL_LANG);\n ontModel.createAllDifferent();\n assertTrue(ontModel.listAllDifferent().hasNext());\n AllDifferent allDifferent = (AllDifferent) ontModel.listAllDifferent().next();\n //allDifferent.setDistinct(ontModel.createList());\n assertFalse(allDifferent.listDistinctMembers().hasNext());\n }", "@Test\n public void isSamePerson() {\n assertTrue(ALICE.isSamePerson(ALICE));\n\n // null -> returns false\n assertFalse(ALICE.isSamePerson(null));\n\n // different phone and email -> returns false\n Person editedAlice = new PersonBuilder(ALICE).withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_BOB).build();\n assertFalse(ALICE.isSamePerson(editedAlice));\n\n // different name -> returns false\n editedAlice = new PersonBuilder(ALICE).withName(VALID_NAME_BOB).build();\n assertFalse(ALICE.isSamePerson(editedAlice));\n\n // same name, same phone, different attributes -> returns true\n editedAlice = new PersonBuilder(ALICE).withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB)\n .withClientSources(VALID_CLIENTSOURCE_HUSBAND).withNote(VALID_NOTE_DOG).addToArchive().build();\n assertTrue(ALICE.isSamePerson(editedAlice));\n\n // same name, same email, different attributes -> returns true\n editedAlice = new PersonBuilder(ALICE).withPhone(VALID_PHONE_BOB).withAddress(VALID_ADDRESS_BOB)\n .withClientSources(VALID_CLIENTSOURCE_HUSBAND).withNote(VALID_NOTE_DOG).addToArchive().build();\n assertTrue(ALICE.isSamePerson(editedAlice));\n\n // same name, same phone, same email, different attributes -> returns true\n editedAlice = new PersonBuilder(ALICE).withAddress(VALID_ADDRESS_BOB)\n .withClientSources(VALID_CLIENTSOURCE_HUSBAND)\n .withNote(VALID_NOTE_DOG).addToArchive().build();\n assertTrue(ALICE.isSamePerson(editedAlice));\n\n\n // null phone and email test cases start here\n Person aliceWithoutPhone = new PersonBuilder(ALICE).withoutPhone().build();\n Person aliceWithoutEmail = new PersonBuilder(ALICE).withoutEmail().build();\n Person aliceWithoutPhoneAndEmail = new PersonBuilder(ALICE).withoutPhone().withoutEmail().build();\n\n // same name, null phone, null email, different attributes -> returns true\n editedAlice = new PersonBuilder(ALICE).withoutPhone().withoutEmail().withAddress(VALID_ADDRESS_BOB)\n .withClientSources(VALID_CLIENTSOURCE_HUSBAND).withNote(VALID_NOTE_DOG).addToArchive().build();\n assertTrue(aliceWithoutPhoneAndEmail.isSamePerson(editedAlice));\n\n // same name, null phone, null and non-null email -> returns false\n editedAlice = new PersonBuilder(ALICE).withoutPhone().withoutEmail().build();\n assertFalse(aliceWithoutPhone.isSamePerson(editedAlice));\n\n // same name, null phone, same email, different attributes -> returns true\n editedAlice = new PersonBuilder(ALICE).withoutPhone().withAddress(VALID_ADDRESS_BOB)\n .withClientSources(VALID_CLIENTSOURCE_HUSBAND).withNote(VALID_NOTE_DOG).addToArchive().build();\n assertTrue(aliceWithoutPhone.isSamePerson(editedAlice));\n\n // same name, null phone, different email -> returns false\n editedAlice = new PersonBuilder(ALICE).withoutPhone().withEmail(VALID_EMAIL_BOB).build();\n assertFalse(aliceWithoutPhone.isSamePerson(editedAlice));\n\n // same name, null and non-null phone, null email -> returns false\n editedAlice = new PersonBuilder(ALICE).withoutPhone().withoutEmail().build();\n assertFalse(aliceWithoutEmail.isSamePerson(editedAlice));\n\n // same name, null and non-null phone, null and non-null email -> returns false\n editedAlice = new PersonBuilder(ALICE).withoutPhone().withoutEmail().build();\n assertFalse(ALICE.isSamePerson(editedAlice));\n\n // same name, null and non-null phone, same email, different attributes -> returns true\n editedAlice = new PersonBuilder(ALICE).withoutPhone().withAddress(VALID_ADDRESS_BOB)\n .withClientSources(VALID_CLIENTSOURCE_HUSBAND).withNote(VALID_NOTE_DOG).addToArchive().build();\n assertTrue(ALICE.isSamePerson(editedAlice));\n\n // same name, null and non-null phone, different email -> returns false\n editedAlice = new PersonBuilder(ALICE).withoutPhone().withEmail(VALID_EMAIL_BOB).build();\n assertFalse(ALICE.isSamePerson(editedAlice));\n\n // same name, same phone, null email, different attributes -> returns true\n editedAlice = new PersonBuilder(ALICE).withoutEmail().withAddress(VALID_ADDRESS_BOB)\n .withClientSources(VALID_CLIENTSOURCE_HUSBAND).withNote(VALID_NOTE_DOG).addToArchive().build();\n assertTrue(aliceWithoutEmail.isSamePerson(editedAlice));\n\n // same name, same phone, null and non-null email, different attributes -> returns true\n editedAlice = new PersonBuilder(ALICE).withoutEmail().withAddress(VALID_ADDRESS_BOB)\n .withClientSources(VALID_CLIENTSOURCE_HUSBAND).withNote(VALID_NOTE_DOG).addToArchive().build();\n assertTrue(ALICE.isSamePerson(editedAlice));\n\n // same name, different phone, null email -> returns false\n editedAlice = new PersonBuilder(ALICE).withPhone(VALID_PHONE_BOB).withoutEmail().build();\n assertFalse(aliceWithoutEmail.isSamePerson(editedAlice));\n\n // same name, different phone, null and non-null email -> returns false\n editedAlice = new PersonBuilder(ALICE).withPhone(VALID_PHONE_BOB).withoutEmail().build();\n assertFalse(ALICE.isSamePerson(editedAlice));\n\n }", "public ArrayList<String> deadPersonsTrueGuess(Guess currGuess) {\n ArrayList<String> deadPerson = new ArrayList<String>();\n for (Person person : config.personList) {\n for (HashMap.Entry<String, String> entry : person.getPersonAttValSet().entrySet()) {\n if (entry.getKey().equals(currGuess.getAttribute()) && !entry.getValue().equals(currGuess.getValue())) {\n deadPerson.add(person.getName());\n }\n }\n }\n\n return deadPerson;\n }", "public static void main(String[] args) {\n\n Person Iffy = new Person(\"Iffy\");\n System.out.println(\"Iffy.personName = \" + Iffy.personName);\n System.out.println(\"Iffy.getName() = \" + Iffy.getName());\n System.out.println(\"Iffy.sayHello() = \" + Iffy.sayHello());\n Iffy.setName(\"Irfa\");\n System.out.println(\"Iffy.personName = \" + Iffy.personName);\n\n// Person person1 = new Person(\"John\");\n// Person person2 = new Person(\"John\");\n// System.out.println(person1.getName().equals(person2.getName()));\n// System.out.println(person1 == person2);\n\n// Person person1 = new Person(\"John\");\n// Person person2 = person1;\n// System.out.println(person1 == person2);\n\n Person person1 = new Person(\"John\");\n Person person2 = person1;\n System.out.println(person1.getName());\n System.out.println(person2.getName());\n person2.setName(\"Jane\");\n System.out.println(person1.getName());\n System.out.println(person2.getName());\n\n\n }", "@Test\n @Ignore\n public void testGetPerson() {\n Person person = dao.getPerson(\"KWCB-HZV\", \"\");\n assertEquals(\"KWCB-HZV\", person.id);\n assertEquals(\"Willis Aaron Dial\", person.name);\n assertFalse(person.living);\n \n assertArrayEquals(\"Facts don't match expected: \" + Arrays.deepToString(person.facts),\n new Fact[] { \n new Fact(\"birth\", \"23 December 1897\", null, 1897, \"Hooper, Weber, Utah, United States\"),\n new Fact(\"death\", \"19 January 1985\", null, 1985, \"Logan, Cache, Utah, United States\") },\n person.facts);\n assertArrayEquals(\"Parents don't match expected: \" + Arrays.deepToString(person.parents),\n new PersonReference[] {\n new PersonReference(\"KWZP-8K5\", \"William Burris Dial\", \"father\"),\n new PersonReference(\"KWZP-8KG\", \"Temperance Lavina Moore\", \"mother\")\n },\n person.parents);\n assertArrayEquals(\"Spouses don't match expected: \" + Arrays.deepToString(person.spouses),\n new PersonReference[] {\n new PersonReference(\"KWCB-HZ2\", \"Ida Lovisa Beckstrand\", \"wife\")\n },\n person.spouses);\n assertArrayEquals(\"Children don't match expected: \" + Arrays.deepToString(person.children),\n new PersonReference[] {\n new PersonReference(\"KWC6-X7D\", \"Glen \\\"B\\\" Dial\", \"son\"),\n new PersonReference(\"KWJJ-4XH\", \"Merlin \\\"B\\\" Dial\", \"son\")\n },\n person.children);\n }", "@Test\r\n\tpublic void testCompareCase4() throws IOException {\r\n\t\tPerson p1 = DataUtil.readDataFromFile(\"test/data/case4/case4-person1.json\", Person.class);\r\n\t\tPerson p2 = DataUtil.readDataFromFile(\"test/data/case4/case4-person2.json\", Person.class);\r\n\r\n\t\t// Custom context\r\n\t\tIContext ctx = ObjectCompare.compare(p1, p2);\r\n\t\tdebug(ctx.getDifferences());\r\n\t\tAssert.assertTrue(ctx.hasDifferences());\r\n\t}", "@Test\n\tpublic void testNotEqualsPersonalData() {\n\t\tSystem.out.println(\"starting testNotEqualsPersonalData()\");\n\t\tPersonalData personalData1 = new PersonalData(\"Kelvin\", \"Huynh\", \"4081234567\", \"Kelvin_Huynh@email.com\");\n\t\tPersonalData personalData2 = new PersonalData(\"Kevin\", \"Huynh\", \"4081234567\", \"Kelvin_Huynh@email.com\");\n\t\tassertFalse (\"personalData1 NOT equals personalData2\", personalData1.equals(personalData2));\n\t System.out.println(\"testNotEqualsPersonalData PASSED\");\t\t\n\t}", "public boolean uniqueCheck(Person person){\r\n\t\treturn (housePosition!=person.housePosition) && (color!=person.color) && (nationality!=person.nationality) \r\n\t\t\t\t && (beverage!=person.beverage) && (cigar!=person.cigar) && (pet!=person.pet);\r\n\t}", "public boolean DEBUG_compare(Alphabet other) {\n System.out.println(\"now comparing the alphabets this with other:\\n\"+this+\"\\n\"+other);\n boolean sameSlexic = true;\n for (String s : other.slexic.keySet()) {\n if (!slexic.containsKey(s)) {\n sameSlexic = false;\n break;\n }\n if (!slexic.get(s).equals(other.slexic.get(s))) {\n sameSlexic = false;\n break;\n }\n slexic.remove(s);\n }\n System.out.println(\"the slexic attributes are the same : \" + sameSlexic);\n boolean sameSlexicinv = true;\n for (int i = 0, limit = other.slexicinv.size(); i < limit; i++) {\n boolean temp = false;\n for (int j = i, limit2 = slexicinv.size() + i; j < limit2; j++) {\n int k = j % slexicinv.size();\n if (other.slexicinv.get(i).equals(slexicinv.get(k))) {\n temp = true;\n break;\n }\n }\n if (!temp) {\n sameSlexicinv = false;\n break;\n }\n\n }\n boolean sameSpair = true;\n System.out.println(\"the slexicinv attributes are the same : \" + sameSlexicinv);\n for (IntegerPair p : other.spair.keySet()) {\n if(!spair.containsKey(p)) {\n //if (!containsKey(spair, p)) {\n sameSpair = false;\n break;\n }\n //if (!(get(spair, p).equals(get(a.spair, p)))) {\n if (!spair.get(p).equals(other.spair.get(p))) {\n sameSpair = false;\n break;\n }\n }\n System.out.println(\"the spair attributes are the same : \" + sameSpair);\n boolean sameSpairinv = true;\n for (int i = 0, limit = other.spairinv.size(); i < limit; i++) {\n boolean temp = false;\n for (int j = i, limit2 = spairinv.size() + i; j < limit2; j++) {\n int k = j % spairinv.size();\n if (other.spairinv.get(i).equals(spairinv.get(k))) {\n temp = true;\n break;\n }\n }\n if (!temp) {\n sameSpairinv = false;\n break;\n }\n }\n System.out.println(\"the spairinv attributes are the same : \" + sameSpairinv);\n return (sameSpairinv && sameSpair && sameSlexic && sameSlexicinv);\n }", "@Test\r\n\tpublic void testCompareCase3() throws IOException {\r\n\t\tPerson p1 = DataUtil.readDataFromFile(\"test/data/case3/case3-person1.json\", Person.class);\r\n\t\tPerson p2 = DataUtil.readDataFromFile(\"test/data/case3/case3-person2.json\", Person.class);\r\n\r\n\t\t// Custom context\r\n\t\tIContext ctx = ObjectCompare.compare(p1, p2);\r\n\t\tdebug(ctx.getDifferences());\r\n\t\tAssert.assertFalse(ctx.hasDifferences());\r\n\t}", "public void checkInflected(Individual other)\n\t{\n\t\tdouble probability = world.getSpreadingFactor() * (1+(Math.max(other.getConversationTime(), getConversationTime()) / 10))\n\t\t\t\t* getMaskIndicator() * other.getMaskIndicator() * (1-(Math.min(other.getSocialDistance(), getSocialDistance()) / 10));\n\t\tif(Math.min(probability, 1) > 0.3)\n\t\t\tgetCovid();\n\t\t\t\n\t}", "public ArrayList<String> deadPersonsFalseGuess(Guess currGuess) {\n ArrayList<String> deadPerson = new ArrayList<String>();\n\n for (Person person : config.personList) {\n for (HashMap.Entry<String, String> entry : person.getPersonAttValSet().entrySet()) {\n if (entry.getKey().equals(currGuess.getAttribute()) && entry.getValue().equals(currGuess.getValue())) {\n deadPerson.add(person.getName());\n }\n }\n }\n\n return deadPerson;\n\n }", "@Then ( \"(.+) should not see (.+) as a personal representative\" )\n public void notSeeRep ( final String me, final String rep ) throws InterruptedException {\n driver.get( driver.getCurrentUrl() );\n // Thread.sleep( DATABASE_UPDATE );\n Patient.getByName( rep ).save();\n Patient.getByName( me ).save();\n assertFalse( Patient.getByName( rep ).inRepresentees( Patient.getByName( me ) ) );\n driver.findElement( By.id( \"logout\" ) ).click();\n }", "@Test\n public void equals_differentName() {\n SiteInfo si1 = new SiteInfo(\n Amount.valueOf(12000, SiteInfo.CUBIC_FOOT),\n Amount.valueOf(76, NonSI.FAHRENHEIT),\n Amount.valueOf(92, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n 56,\n Damage.CLASS2,\n Country.USA,\n \"Foo Site\"\n );\n SiteInfo si2 = new SiteInfo(\n Amount.valueOf(12000, SiteInfo.CUBIC_FOOT),\n Amount.valueOf(76, NonSI.FAHRENHEIT),\n Amount.valueOf(92, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n 56,\n Damage.CLASS2,\n Country.USA,\n \"Bar Site\"\n );\n\n Assert.assertNotEquals(si1, si2);\n }", "@Test\r\n\tpublic void testCompareCase5() throws IOException {\r\n\t\tPerson p1 = DataUtil.readDataFromFile(\"test/data/case5/case5-person1.json\", Person.class);\r\n\t\tPerson p2 = DataUtil.readDataFromFile(\"test/data/case5/case5-person2.json\", Person.class);\r\n\r\n\t\t// Custom context\r\n\t\tIContext ctx = ObjectCompare.compare(p1, p2);\r\n\t\tdebug(ctx.getDifferences());\r\n\t\tAssert.assertTrue(ctx.hasDifferences());\r\n\t}", "@Test\n void _correctThenCaseTest() {\n\n actionApply();\n\n for (ReceiverPair receiverPair : dependedReceiverPairs) {\n for (AssingablePair assingablePair : incompatibleAssignablePairs) {\n verify(model).arithm(receiverPair.getVariableDependentReceiver(), \"!=\", assingablePair.getIndexdependentAssignable());\n }\n }\n }", "@Ignore\n @Test\n public void whenTestTwoUsersWithTheSameNameAndBirthdayTheGetFalse() {\n Calendar birthday = Calendar.getInstance();\n birthday.set(1001, 12, 21);\n User john = new User(\"John Snow\", birthday);\n User snow = new User(\"John Snow\", (Calendar) birthday.clone());\n\n assertFalse(john.equals(snow));\n }", "private void assertEquivalentPair(Set<Pair> result, String s1, String s2) {\n\t\tPair resultPair = filterResult(result, s1, s2);\n\t\tassertFalse(resultPair.isMarked());\n\t}", "@Test\n public void testEqualsNonIdentical() {\n int userID = 0;\n int[] pref = new int[11];\n int[] health = new int[9];\n int[] diet = new int[5];\n int[] meal = new int[3];\n UserProfile up2 = new UserProfile(userID, pref, health, diet, meal);\n assertEquals(up, up2);\n\n up2 = new UserProfile(userID, pref, health, diet, meal, \"01203\");\n assertNotEquals(up, up2);\n\n int[] pref2 = {-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};\n up2 = new UserProfile(userID, pref2, health, diet, meal);\n assertNotEquals(up, up2);\n\n int[] health2 = {-2, 0, 0, 0, 0, 0, 0, 0, 0};\n up2 = new UserProfile(userID, pref2, health2, diet, meal);\n assertNotEquals(up, up2);\n\n int[] diet2 = {-3, 0, 0, 0, 0};\n up2 = new UserProfile(userID, pref, health2, diet2, meal);\n assertNotEquals(up, up2);\n\n int[] meal2 = {-4, 0, 0};\n up2 = new UserProfile(userID, pref, health2, diet2, meal2);\n assertNotEquals(up, up2);\n }", "@Test\r\n\tpublic void testChangeTheOriginalChooseIsBetterThanNotChange() {\r\n\t\tMontyHall monty = new MontyHall();\r\n\t\tmonty.setChanged(true);\r\n\t\tfloat rateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(10);\r\n\t\tmonty.setChanged(false);\r\n\t\tfloat rateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(10);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\r\n\t\t/* count is 100 */\r\n\t\tmonty.setChanged(true);\r\n\t\trateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(100);\r\n\t\tmonty.setChanged(false);\r\n\t\trateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(100);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\r\n\t\t/* count is 10000 */\r\n\t\tmonty.setChanged(true);\r\n\t\trateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(10000);\r\n\t\tmonty.setChanged(false);\r\n\t\trateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(10000);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\r\n\t\t/* count is 1000000 */\r\n\t\tmonty.setChanged(true);\r\n\t\trateOfChange = monty.rateOfWinThePrizeWithChangeTheOriginalChoose(1000000);\r\n\t\tmonty.setChanged(false);\r\n\t\trateOfNotChange = monty.rateOfWinThePrizeWithoutChangeTheOriginalChoose(1000000);\r\n\t\tassertTrue(rateOfChange > rateOfNotChange);\r\n\t}", "@Test\r\n\tpublic void SickPersonCompTest () {\n\t\tAssert.assertEquals(\"compareToImpl incorrect, this.severity() > p.severity() issue\", -5, sp1.compareToImpl(sp2), 0.000001);\r\n\t//(2) this severity < p (expect positive number)\r\n\t\tAssert.assertEquals(\"compareToImpl incorrect, this.severity() < p.severity issue\", 5, sp2.compareToImpl(sp1),0.000001);\r\n\t//(3) this severity = p (expect 0)\r\n\t\tAssert.assertEquals(\"compareToImpl incorrect, Severity equal issue\",0, sp1.compareToImpl(sp3));\r\n\t//(4) p is HealthyPerson (expect -1)\r\n\t\tAssert.assertEquals(\"compareToImpl incorrect, p = HealthyPerson issue\", -1, sp1.compareToImpl(hp));\r\n\t}", "private static void compareForIdenticalKeys() {\n Integer[] identical = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1};\n\n Insertion insertion = new Insertion();\n insertion.analyzeSort(identical);\n insertion.getStat().printReport();\n\n Selection selection = new Selection();\n selection.analyzeSort(identical);\n selection.getStat().printReport();\n }", "@Test\r\n public void ObjectsAreNotTheSame() {\n try_scorers = new Try_Scorers(\"Sharief\",\"Roman\",3,9);\r\n Assert.assertNotSame(try_scorers ,try_scorers.updateGamesPlayed(4),\"The Objects are the same\"); \r\n \r\n }", "@Test\r\n\tpublic void testChooseResultWithUnChangeCarPositionSecond() {\r\n\t\tMontyHall monty = new MontyHall();\r\n\t\tmonty.setTheDoorWithCar(1);\r\n\t\tmonty.setChanged(false);\r\n\t\tmonty.setUserChoosedDoor(0);\r\n\t\tassertEquals(2, monty.getTheDoorChoosedBycompere());\r\n\t\tassertEquals(false, monty.winThePrize());\r\n\r\n\t\tmonty.setUserChoosedDoor(1);\r\n\t\tassertNotEquals(1, monty.getTheDoorChoosedBycompere());\r\n\t\tassertEquals(true, monty.winThePrize());\r\n\r\n\t\tmonty.setUserChoosedDoor(2);\r\n\t\tassertEquals(0, monty.getTheDoorChoosedBycompere());\r\n\t\tassertEquals(false, monty.winThePrize());\r\n\t}", "public boolean merry(Person person) {\n if ((this.man != person.man) && (spouse != person)) {\n divorce();\n person.divorce();\n spouse = person;\n person.spouse = this;\n\n return true;\n } else return false;\n }", "@Test\n\tpublic void testDifferentID() {\n\t\tMainDish dessertTest = new MainDish(\"quiche\");\n\t\tMainDish dessertTest2 = new MainDish(\"quiche\");\n\t\tassertTrue(dessertTest.getId()!=dessertTest2.getId());\n\t}", "@Test\r\n\tpublic void testGetPersons() {\r\n\t\tassertTrue(teachu1.getPersons().contains(person1));\r\n\t\tassertFalse(teachu1.getPersons().contains(new PersonTime()));\r\n\t}", "@Override\n public boolean hardDiff(FObject o1, FObject o2, FObject diff) {\n if ( this.get(o1) == null ) {\n if ( this.get(o2) == null ) {\n return false;\n } else {\n //shadow copy, since we only use to print out diff entry in journal\n this.set(diff, this.get(o2));\n return true;\n }\n }\n //Both this.get(o1) and thid.get(o2) are not null\n //The propertyInfo is instance of AbstractObjectProperty, so that there is no way to do nested propertyInfo check\n //No matter if there are point to same instance or not, treat them as difference\n //if there are point to different instance, indeed there are different\n //if there are point to same instance, we can not guarantee if there are no difference comparing with record in the journal.\n //shodow copy\n this.set(diff, this.get(o2));\n return true;\n }", "@Test\r\n public void testTransitive() throws Exception {\n\r\n EmployeeImpl emp1 = new EmployeeImpl(\"7993389\", \"gagandeep.singh@rbs.com\");\r\n EmployeeImpl emp2 = new EmployeeImpl(\"7993390\", \"ramandeep.singh@rbs.com\");\r\n EmployeeImpl emp3 = new EmployeeImpl(\"7993391\", \"aakanksha.dave@rbs.com\");\r\n\r\n Assert.assertTrue(\"Comparable implementation is incorrect\", emp3.compareTo(emp2) == 1);\r\n Assert.assertTrue(\"Comparable implementation is incorrect\", emp2.compareTo(emp1) == 1);\r\n Assert.assertTrue(\"Comparable implementation is incorrect\", emp3.compareTo(emp1) == 1);\r\n }", "private void checkforEIDMismatch(Person person)\n\t\t\tthrows PersonIdServiceException {\n\t\tlog.debug(\"Checking for EID mismatch...\");\n\t\ttry {\n\t\t\tMap eidmap = new HashMap();\n\t\t\tString problemDomain = null;\n\t\t\tfor (Iterator i = person.getPersonIdentifiers().iterator(); i\n\t\t\t\t\t.hasNext();) {\n\t\t\t\tPersonIdentifier pi = (PersonIdentifier) i.next();\n\t\t\t\tString domain = pi.getAssigningAuthority().getNameSpaceID();\n\t\t\t\tString corpId = pi.getCorpId();\n\t\t\t\tString updatedCorpId = pi.getUpdatedCorpId();\n\n\t\t\t\tif (eidmap.containsKey(domain)) {\n\t\t\t\t\tString eid = (String) eidmap.get(domain);\n\t\t\t\t\tif (updatedCorpId != null) {\n\t\t\t\t\t\tif (!eid.equals(updatedCorpId)) {\n\t\t\t\t\t\t\tlog.debug(\"EID mismatch found for:\\n\" + \"Domain: \"\n\t\t\t\t\t\t\t\t\t+ domain + \"\\n\" + \"EID1: \" + eid + \"\\n\"\n\t\t\t\t\t\t\t\t\t+ \"EID2: \" + updatedCorpId);\n\t\t\t\t\t\t\tproblemDomain = domain;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (!eid.equals(corpId)) {\n\t\t\t\t\t\t\tlog.debug(\"EID mismatch found for:\\n\" + \"Domain: \"\n\t\t\t\t\t\t\t\t\t+ domain + \"\\n\" + \"EID1: \" + eid + \"\\n\"\n\t\t\t\t\t\t\t\t\t+ \"EID2: \" + corpId);\n\t\t\t\t\t\t\tproblemDomain = domain;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tString veid = (updatedCorpId != null) ? updatedCorpId\n\t\t\t\t\t\t\t: corpId;\n\t\t\t\t\tif (veid != null) {\n\t\t\t\t\t\teidmap.put(domain, veid);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (problemDomain != null) {\n\t\t\t\t// check to see if we care about this problemDomain\n\t\t\t\tif (!getEIDDomains().contains(problemDomain)) {\n\t\t\t\t\tlog\n\t\t\t\t\t\t\t.debug(\"EID mismatch exists but alerting is not configured for domain: \"\n\t\t\t\t\t\t\t\t\t+ problemDomain);\n\t\t\t\t} else {\n\t\t\t\t\tString description = \"Multiple EID attributes exist for single CDE person\";\n\t\t\t\t\tif (!new ReviewQueue().exists(description, person)) {\n\t\t\t\t\t\tPersonReview r = new PersonReview();\n\t\t\t\t\t\tr.setDescr(description);\n\t\t\t\t\t\tr.setDomainId(problemDomain);\n\t\t\t\t\t\tr.setUserId(\"System\");\n\t\t\t\t\t\tr.addPerson(person);\n\t\t\t\t\t\tsubmitReview(r);\n\t\t\t\t\t\tlog.debug(\"EID mismatch PersonReview sent. Domain: \"\n\t\t\t\t\t\t\t\t+ problemDomain);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlog\n\t\t\t\t\t\t\t\t.debug(\"EID mismatch exists but is already recorded in Review Queue\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tlog.debug(\"No EID mismatch found\");\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlog.error(e, e);\n\t\t\tthrow new PersonIdServiceException(e.getMessage());\n\t\t}\n\t}", "private int compareMainProtein(\n ProteinMatch oldProteinMatch,\n String oldAccession,\n ProteinMatch newProteinMatch,\n String newAccession,\n SequenceProvider sequenceProvider,\n ProteinDetailsProvider proteinDetailsProvider,\n IdentificationParameters identificationParameters,\n Identification identification\n ) {\n\n DigestionParameters digestionPreferences = identificationParameters.getSearchParameters().getDigestionParameters();\n\n if (digestionPreferences.getCleavageParameter() == DigestionParameters.CleavageParameter.enzyme) {\n\n boolean newEnzymatic = Arrays.stream(newProteinMatch.getPeptideMatchesKeys())\n .mapToObj(\n key -> identification.getPeptideMatch(key)\n )\n .anyMatch(\n peptideMatch -> PeptideUtils.isEnzymatic(\n peptideMatch.getPeptide(),\n newAccession,\n sequenceProvider.getSequence(newAccession),\n digestionPreferences.getEnzymes()\n )\n );\n\n boolean oldEnzymatic = Arrays.stream(oldProteinMatch.getPeptideMatchesKeys())\n .mapToObj(\n key -> identification.getPeptideMatch(key)\n )\n .anyMatch(\n peptideMatch -> PeptideUtils.isEnzymatic(\n peptideMatch.getPeptide(),\n oldAccession,\n sequenceProvider.getSequence(oldAccession),\n digestionPreferences.getEnzymes()\n )\n );\n\n if (newEnzymatic && !oldEnzymatic) {\n\n return 1;\n\n } else if (!newEnzymatic && oldEnzymatic) {\n\n return 0;\n\n }\n }\n\n Integer evidenceLevelOld = proteinDetailsProvider.getProteinEvidence(oldAccession);\n Integer evidenceLevelNew = proteinDetailsProvider.getProteinEvidence(newAccession);\n\n // compare protein evidence levels\n if (evidenceLevelOld != null && evidenceLevelNew != null) {\n\n if (evidenceLevelNew < evidenceLevelOld) {\n\n return 2;\n\n } else if (evidenceLevelOld < evidenceLevelNew) {\n\n return 0;\n\n }\n }\n\n // Compare descriptions for keywords of uncharacterized proteins\n String oldDescription = proteinDetailsProvider.getSimpleDescription(oldAccession);\n\n if (oldDescription == null || oldDescription.trim().isEmpty()) {\n\n oldDescription = proteinDetailsProvider.getDescription(oldAccession);\n\n }\n\n String newDescription = proteinDetailsProvider.getSimpleDescription(newAccession);\n\n if (newDescription == null || newDescription.trim().isEmpty()) {\n\n newDescription = proteinDetailsProvider.getDescription(newAccession);\n\n }\n\n boolean oldUncharacterized = false, newUncharacterized = false;\n\n for (String keyWord : KEYWORDS_UNCHARACTERIZED) {\n\n if (newDescription != null && newDescription.contains(keyWord)) {\n\n newUncharacterized = true;\n\n }\n\n if (oldDescription != null && oldDescription.contains(keyWord)) {\n\n oldUncharacterized = true;\n\n }\n }\n\n if (oldUncharacterized && !newUncharacterized) {\n\n return 3;\n\n } else if (!oldUncharacterized && newUncharacterized) {\n\n return 0;\n\n }\n\n return 0;\n\n }", "@Test\r\n\tpublic void testDenyFriendRequest() {\r\n\t\tPerson p1 = new Person(0);\r\n\t\tp1.receiveFriendRequest(\"JavaLord\", \"JavaLordDisplayName\");\r\n\t\tassertTrue(p1.hasFriendRequest(\"JavaLord\"));\r\n\t\tassertTrue(p1.denyFriendRequest(\"JavaLord\"));\r\n\t\tassertFalse(p1.denyFriendRequest(\"JavaLord\"));\r\n\t}", "@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 void _correctIfCaseTest() {\n\n actionApply();\n\n for (ReceiverPair receiverPair : dependedReceiverPairs) {\n for (AssingablePair assingablePair : incompatibleAssignablePairs) {\n verify(model).arithm(receiverPair.getVariableReceiver(), \"=\", assingablePair.getIndexAssignable());\n }\n }\n }", "public void test_ck_03() {\n // part A - surprising reification\n OntModel model1 = ModelFactory.createOntologyModel(OntModelSpec.DAML_MEM, null);\n OntModel model2 = ModelFactory.createOntologyModel(OntModelSpec.DAML_MEM_RULE_INF, null);\n \n Individual sub = model1.createIndividual(\"http://mytest#i1\", model1.getProfile().CLASS());\n OntProperty pred = model1.createOntProperty(\"http://mytest#\");\n Individual obj = model1.createIndividual(\"http://mytest#i2\", model1.getProfile().CLASS());\n OntProperty probabilityP = model1.createOntProperty(\"http://mytest#prob\");\n \n Statement st = model1.createStatement(sub, pred, obj);\n model1.add(st);\n st.createReifiedStatement().addProperty(probabilityP, 0.9);\n assertTrue(\"st should be reified\", st.isReified());\n \n Statement st2 = model2.createStatement(sub, pred, obj);\n model2.add(st2);\n st2.createReifiedStatement().addProperty(probabilityP, 0.3);\n assertTrue(\"st2 should be reified\", st2.isReified());\n \n sub.addProperty(probabilityP, 0.3);\n sub.removeAll(probabilityP).addProperty(probabilityP, 0.3); //!!!\n // exception\n \n // Part B - exception in remove All\n Individual sub2 = model2.createIndividual(\"http://mytest#i1\", model1.getProfile().CLASS());\n \n sub.addProperty(probabilityP, 0.3);\n sub.removeAll(probabilityP); //!!! exception\n \n sub2.addProperty(probabilityP, 0.3);\n sub2.removeAll(probabilityP); //!!! exception\n \n }", "@Test\n public void officeActionCreateWithMismatchingEviCaseNo77777778() {\n // This test case validate the understanding based on which the create\n // office-action api has been developed.\n // ie, while creating an office-action inside a given serial number the\n // incoming association of evidence file has to match\n // the serial number of office-action.\n // In-other words the incoming associated evidence files needs to exists\n // inside the same office-action case number.\n testCreateSampleEviOneForOffActn78();\n testCreateSampleEviTwoForOffActn78();\n testCreateOfficeAction77();\n }", "@Test\n void compareTo_MatchButModifying_NameAndAddress()\n {\n runIsMatchTest(AnswerType.yes, AnswerType.yes, AnswerType.no, AnswerType.no, ContactMatchType.MatchButModifying);\n }", "@Test\n public void Test13_1() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n DamageEffectComponent another = new DamageEffectComponent(EffectEnum.DAMAGE_DEBUFF, 3, -40);\n // Then test the method\n assertFalse(component.equals(another));\n }", "public static void runExercise6() {//distinct() - will remove duplicates\n // List <?> stAges = students.stream().map(student -> student.getAge()).sorted().collect(Collectors.toList());\n // System.out.println(\"\" + stAges);\n // students.stream().map(student -> student.getAge()).sorted().forEach(age -> {\n // System.out.println(age);\n // students.stream().filter(stud -> age == stud.getAge()).forEach(st -> System.out.println(age + \" \" + st.getName()));\n \n // });\n students.stream().map(student -> student.getAge()).sorted().distinct().forEach(age -> {\n students.stream().filter(stud -> stud.getAge() == age).forEach(name -> System.out.println(name.getName()));\n });\n \n \n }", "@Test\r\n\tpublic void testSetPersonTime() {\r\n\t\tteachu1.setPersonTime(newPersonTime);\r\n\r\n\t\tassertTrue(teachu1.getPersons().contains(person2));\r\n\t\tassertFalse(teachu1.getPersons().contains(person1));\r\n\t}", "@Test\n public void equalsOtherTest() {\n Device device2 = new Device(deviceID, \"other\");\n assertNotEquals(device, device2);\n }", "public void testNotApply() {\n\t\tthis.recordReturn(this.one, this.one.canApply(), true);\n\t\tthis.recordReturn(this.two, this.two.canApply(), false);\n\t\tthis.replayMockObjects();\n\t\tassertFalse(\"Should not be able to apply if one change can not be applied\", this.aggregate.canApply());\n\t\tthis.verifyMockObjects();\n\t}", "public void testDeletedProblem() throws Exception {\n \n InternalContest contest = new InternalContest();\n\n int numTeams = 2;\n initData(contest, numTeams , 5);\n String [] runsData = {\n\n \"1,1,A,1,No\", //20\n \"2,1,A,3,Yes\", //3 (first yes counts Minutes only)\n \"3,1,A,5,No\", //20\n \"4,1,A,7,Yes\", //20 \n \"5,1,A,9,No\", //20\n \n \"6,1,B,11,No\", //20 (all runs count)\n \"7,1,B,13,No\", //20 (all runs count)\n \n \"8,2,A,30,Yes\", //30\n \n \"9,2,B,35,No\", //20 (all runs count)\n \"10,2,B,40,No\", //20 (all runs count)\n \"11,2,B,45,No\", //20 (all runs count)\n \"12,2,B,50,No\", //20 (all runs count)\n \"13,2,B,55,No\", //20 (all runs count)\n\n };\n \n // Rank TeamId Solved Penalty\n \n String [] rankData = {\n \"1,team1,0,0\",\n \"1,team2,0,0\"\n };\n\n for (String runInfoLine : runsData) {\n SampleContest.addRunFromInfo(contest, runInfoLine);\n }\n\n Problem probA = contest.getProblems()[0];\n probA.setActive(false);\n contest.updateProblem(probA);\n Problem probA1 = contest.getProblem(probA.getElementId());\n assertEquals(\"probA1 setup\", false, probA1.isActive());\n Problem probA2 = contest.getProblems()[0];\n assertEquals(\"probA2 setup\", false, probA2.isActive());\n confirmRanks(contest, rankData);\n Document document = null;\n\n try {\n DefaultScoringAlgorithm defaultScoringAlgorithm = new DefaultScoringAlgorithm();\n String xmlString = defaultScoringAlgorithm.getStandings(contest, null, log);\n if (debugMode) {\n System.out.println(xmlString);\n }\n // getStandings should always return a well-formed xml\n assertFalse(\"getStandings returned null \", xmlString == null);\n assertFalse(\"getStandings returned empty string \", xmlString.trim().length() == 0);\n\n DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();\n document = documentBuilder.parse(new InputSource(new StringReader(xmlString)));\n\n } catch (Exception e) {\n assertTrue(\"Error in XML output \" + e.getMessage(), true);\n e.printStackTrace();\n }\n \n // skip past nodes to find teamStanding node\n NodeList list = document.getDocumentElement().getChildNodes();\n \n int rankIndex = 0;\n \n for(int i=0; i<list.getLength(); i++) {\n Node node = (Node)list.item(i);\n String name = node.getNodeName();\n if (name.equals(\"teamStanding\")){\n String [] standingsRow = fetchStanding (node);\n// Object[] cols = { \"Rank\", \"Name\", \"Solved\", \"Points\" };\n String [] cols = rankData[rankIndex].split(\",\");\n\n if (debugMode) {\n System.out.println(\"SA rank=\"+standingsRow[0]+\" solved=\"+standingsRow[2]+\" points=\"+standingsRow[3]+\" name=\"+standingsRow[1]);\n System.out.println(\" rank=\"+cols[0]+\" solved=\"+cols[2]+\" points=\"+cols[3]+\" name=\"+cols[1]);\n System.out.println();\n System.out.flush();\n }\n \n compareRanking (rankIndex+1, standingsRow, cols);\n rankIndex++;\n } else if(name.equals(\"standingsHeader\")) {\n String problemCount = node.getAttributes().getNamedItem(\"problemCount\").getNodeValue();\n int problemCountInt = Integer.valueOf(problemCount);\n NodeList list2 = node.getChildNodes();\n int foundProblemCount = -1;\n for(int j=0; j<list2.getLength(); j++) {\n Node node2 = (Node)list2.item(j);\n String name2 = node2.getNodeName();\n if (name2.equals(\"problem\")){\n int id = Integer.valueOf(node2.getAttributes().getNamedItem(\"id\").getNodeValue());\n if (id > foundProblemCount) {\n foundProblemCount = id;\n }\n }\n }\n assertEquals(\"problem list max id\",problemCountInt, foundProblemCount);\n assertEquals(\"problemCount\",\"4\", problemCount);\n }\n }\n\n }", "private void compareFirstPass() {\n this.oldFileNoMatch = new HashMap<String, SubsetElement>();\r\n Iterator<String> iter = this.oldFile.keySet().iterator();\r\n while (iter.hasNext()) {\r\n final String key = iter.next();\r\n if (!this.newFile.containsKey(key)) {\r\n final String newKey = this.oldFile.get(key).getSubsetCode()\r\n + this.oldFile.get(key).getConceptCode();\r\n this.oldFileNoMatch.put(newKey, this.oldFile.get(key));\r\n }\r\n }\r\n\r\n // Now repeat going the other way, pulling all new file no matches into\r\n // newFileNoMatch\r\n this.newFileNoMatch = new HashMap<String, SubsetElement>();\r\n iter = this.newFile.keySet().iterator();\r\n while (iter.hasNext()) {\r\n final String key = iter.next();\r\n if (!this.oldFile.containsKey(key)) {\r\n final String newKey = this.newFile.get(key).getSubsetCode()\r\n + this.newFile.get(key).getConceptCode();\r\n this.newFileNoMatch.put(newKey, this.newFile.get(key));\r\n }\r\n }\r\n\r\n // dump the initial large HashMaps to reclaim some memory\r\n this.oldFile = null;\r\n this.newFile = null;\r\n }", "@Test\n public void equals() {\n Person aliceCopy = new PersonBuilder(ALICE).build();\n assertTrue(ALICE.equals(aliceCopy));\n\n // same object -> returns true\n assertTrue(ALICE.equals(ALICE));\n\n // null -> returns false\n assertFalse(ALICE.equals(null));\n\n // different type -> returns false\n assertFalse(ALICE.equals(5));\n\n // different person -> returns false\n assertFalse(ALICE.equals(BOB));\n\n // different name -> returns false\n Person editedAlice = new PersonBuilder(ALICE).withName(VALID_NAME_BOB).build();\n assertFalse(ALICE.equals(editedAlice));\n\n // different phone -> returns false\n editedAlice = new PersonBuilder(ALICE).withPhone(VALID_PHONE_BOB).build();\n assertFalse(ALICE.equals(editedAlice));\n\n // different email -> returns false\n editedAlice = new PersonBuilder(ALICE).withEmail(VALID_EMAIL_BOB).build();\n assertFalse(ALICE.equals(editedAlice));\n\n // different address -> returns false\n editedAlice = new PersonBuilder(ALICE).withAddress(VALID_ADDRESS_BOB).build();\n assertFalse(ALICE.equals(editedAlice));\n\n // different clientSources -> returns false\n editedAlice = new PersonBuilder(ALICE).withClientSources(VALID_CLIENTSOURCE_HUSBAND).build();\n assertFalse(ALICE.equals(editedAlice));\n\n // different note -> returns false\n editedAlice = new PersonBuilder(ALICE).withNote(VALID_NOTE_DOG).build();\n assertFalse(ALICE.equals(editedAlice));\n\n // different policy -> returns false\n editedAlice = new PersonBuilder(ALICE).withPolicy(VALID_POLICY_NAME_BOB, VALID_POLICY_DESCRIPTION_BOB).build();\n assertFalse(ALICE.equals(editedAlice));\n }", "@Test\n public void testDecisionRule2() throws IOException {\n \n Data data = getDataObject(\"./data/adult.csv\");\n DataHandle handle = data.getHandle();\n \n RiskModelPopulationUniqueness model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.1d)).getPopulationBasedUniquenessRisk();\n double sampleUniqueness = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.1d)).getSampleBasedUniquenessRisk().getFractionOfUniqueRecords();\n double populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n \n if (model.getPopulationUniquenessModel() == PopulationUniquenessModel.PITMAN) {\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.27684993883653597) == 0);\n } else if (model.getPopulationUniquenessModel() == PopulationUniquenessModel.ZAYATZ) {\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.3207402393466189) == 0);\n } else {\n fail(\"Unexpected convergence of SNB\");\n }\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) <= 0);\n \n model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.2d)).getPopulationBasedUniquenessRisk();\n populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.3577099234829125d) == 0);\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) <= 0);\n \n model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.01d)).getPopulationBasedUniquenessRisk();\n populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.1446083531167384) == 0);\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) <= 0);\n \n model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 1d)).getPopulationBasedUniquenessRisk();\n populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, 0.5142895033485844) == 0);\n assertTrue(populationUniqueness + \"/\" + sampleUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) == 0);\n }", "public double calculateObservedDisagreement();", "@Test\r\n\tpublic void testOutgoingFriendRequest() {\r\n\t\tPerson p1 = new Person(0);\r\n\t\tp1.nonDatabase = true;\r\n\t\tassertTrue(p1.newOutgoingFriendRequest(\"test\"));\r\n\t\tassertFalse(p1.newOutgoingFriendRequest(\"test\")); // Fail if duplicate\r\n\t}", "@Test\n\tpublic void testNotAMatchOfAnyKind() {\n\t\tassertFalse(s4.equals(s3));\n\t\tassertFalse(streetAddresses.contains(s4));\n\t\tassertFalse(streetAddresses.stream().anyMatch(s -> comparator.compare(s4, s) == 0));\n\t}", "public double calculateExpectedDisagreement();", "@Test\n void compareTo_PotentialMatch_OnlyNameMatches()\n {\n runIsMatchTest(AnswerType.yes, AnswerType.no, AnswerType.no, AnswerType.no, ContactMatchType.PotentialMatch);\n }", "public void assertForFindUniquePerson(Person person) {\r\n\t\tassertNotNull(person);\r\n\t\tassertEquals(NAME_PARAM[2], person.getName());\r\n\t\tassertEquals(SEX_RESULT[2], person.getSex());\r\n\t}", "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 final void testDifferentNameEquals() {\n assertFalse(testTransaction1.equals(testTransaction2)); // pmd doesn't\n // like either\n // way\n }", "@Test\n void compareTo_Identical_AllParts()\n {\n runIsMatchTest(AnswerType.yes, AnswerType.yes, AnswerType.yes, AnswerType.yes, ContactMatchType.Identical);\n }", "@Test\n\tpublic void testEqualsFalso() {\n\t\t\n\t\tassertFalse(contato1.equals(contato2));\n\t}", "public boolean differ(Object a, Object b) {\n Node set1 = find(getNode(a));\n Node set2 = find(getNode(b));\n\n return set1 != set2;\n }", "@Test\n public void equals_DifferentObjects_Test() {\n Assert.assertFalse(bq1.equals(ONE));\n }", "@Override\r\n \tpublic Editable computeDifferences(Editable newEditable) {\n \t\treturn null;\r\n \t}", "@Test\n public void testEquals_differentParameters() {\n CellIdentityNr cellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n CellIdentityNr anotherCellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI + 1,\n ALPHAL, ALPHAS, Collections.emptyList());\n\n // THEN this two objects are different\n assertThat(cellIdentityNr).isNotEqualTo(anotherCellIdentityNr);\n }", "public static void main(String[] args) {\n\t\tInterview interview = new Interview();\r\n\t\tinterview.addName(\"MARY\");\r\n\t\tinterview.addName(\"JOE\");\r\n\t\tinterview.addName(\"SIENNA\");\r\n\t\tinterview.addName(\"PETER\");\t\t\r\n\t\tInterview a = new Interview(1);\r\n\t\tInterview c=a;\r\n\t\tInterview b = new Interview(1);\r\n System.out.println(a.equals(b));\r\n\t\tinterview.displayNameAndAge();\r\n\t\t\r\n\t\tSystem.out.println(\"Test 1\");\r\n\t\t\r\n\t}", "public void removeAllInvolvedPerson() {\r\n\t\tBase.removeAll(this.model, this.getResource(), INVOLVEDPERSON);\r\n\t}", "@Test\r\n\tpublic void testChooseResultWithUnChangeCarPositionFrist() {\r\n\t\tMontyHall monty = new MontyHall();\r\n\t\tmonty.setChanged(false);\r\n\t\tmonty.setTheDoorWithCar(0);\r\n\t\tmonty.setUserChoosedDoor(0);\r\n\t\tassertNotEquals(0, monty.getTheDoorChoosedBycompere());\r\n\t\tassertEquals(true, monty.winThePrize());\r\n\r\n\t\tmonty.setUserChoosedDoor(1);\r\n\t\tassertEquals(2, monty.getTheDoorChoosedBycompere());\r\n\t\tassertEquals(false, monty.winThePrize());\r\n\r\n\t\tmonty.setUserChoosedDoor(2);\r\n\t\tassertEquals(1, monty.getTheDoorChoosedBycompere());\r\n\t\tassertEquals(false, monty.winThePrize());\r\n\t}", "@Test\n public void getOtherPersonTestPerson() throws ParsingException, NoSuchFieldException, ParseException, IllegalAccessException {\n //Init\n Person person = new Person(null);\n Person partner = new Person(null);\n Person otherPerson = new Person(null);\n Union union = new Union(person, partner, new FullDate(\"05 MAR 2020\"), new Town(\"Saintes\", \"Charente-Maritime\"), UnionType.HETERO_MAR);\n\n //Reflection init\n Field idField = person.getClass().getDeclaredField(\"id\");\n idField.setAccessible(true);\n\n //Reflection set\n idField.set(person, \"1\");\n idField.set(partner, \"2\");\n\n //Verification\n assertEquals(partner, union.getOtherPerson(person));\n assertEquals(person, union.getOtherPerson(partner));\n assertNull(union.getOtherPerson(otherPerson));\n }", "@Test\n public void Test13_2() {\n component = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 3, 40);\n DamageEffectComponent another = new DamageEffectComponent(EffectEnum.DAMAGE_BUFF, 4, 40);\n // Then test the method\n assertFalse(component.equals(another));\n }", "@Test\n public void equals_DifferentUserId_Test() {\n Assert.assertFalse(bq1.equals(bq2));\n }", "private boolean isNoteworthy(ThingTimeTriple firstTriple, ThingTimeTriple previousTriple)\r\n/* 129: */ {\r\n/* 130:137 */ Mark.say(\r\n/* 131: */ \r\n/* 132: */ \r\n/* 133: */ \r\n/* 134: */ \r\n/* 135: */ \r\n/* 136: */ \r\n/* 137: */ \r\n/* 138: */ \r\n/* 139: */ \r\n/* 140: */ \r\n/* 141: */ \r\n/* 142: */ \r\n/* 143: */ \r\n/* 144: */ \r\n/* 145: */ \r\n/* 146: */ \r\n/* 147: */ \r\n/* 148: */ \r\n/* 149: */ \r\n/* 150: */ \r\n/* 151: */ \r\n/* 152: */ \r\n/* 153: */ \r\n/* 154: */ \r\n/* 155: */ \r\n/* 156: */ \r\n/* 157: */ \r\n/* 158: */ \r\n/* 159: */ \r\n/* 160: */ \r\n/* 161: */ \r\n/* 162: */ \r\n/* 163: */ \r\n/* 164: */ \r\n/* 165: */ \r\n/* 166: */ \r\n/* 167: */ \r\n/* 168: */ \r\n/* 169: */ \r\n/* 170: */ \r\n/* 171: */ \r\n/* 172: */ \r\n/* 173: */ \r\n/* 174:181 */ new Object[] { \"Inputs to isNoteworthy\", firstTriple.english, previousTriple.english });\r\n/* 175:138 */ if (previousTriple == null)\r\n/* 176: */ {\r\n/* 177:139 */ resetReference(firstTriple);\r\n/* 178:140 */ return true;\r\n/* 179: */ }\r\n/* 180:143 */ if (previousTriple.english.equals(firstTriple.english))\r\n/* 181: */ {\r\n/* 182:144 */ Mark.say(new Object[] {\"English is the same\" });\r\n/* 183: */ }\r\n/* 184: */ else\r\n/* 185: */ {\r\n/* 186:147 */ String type = firstTriple.t.getType();\r\n/* 187:148 */ Mark.say(new Object[] {\"Significant types\", type, this.significantEvents });\r\n/* 188:150 */ if (this.significantEvents.contains(type))\r\n/* 189: */ {\r\n/* 190:151 */ Mark.say(new Object[] {firstTriple.english, \"is significant\" });\r\n/* 191: */ \r\n/* 192: */ \r\n/* 193: */ \r\n/* 194:155 */ ThingTimeTriple previousEventOfSameType = (ThingTimeTriple)this.previousTriples.get(type);\r\n/* 195:157 */ if (previousEventOfSameType == null)\r\n/* 196: */ {\r\n/* 197:158 */ resetReference(firstTriple);\r\n/* 198:159 */ return true;\r\n/* 199: */ }\r\n/* 200:162 */ if (overlaps(firstTriple, previousEventOfSameType))\r\n/* 201: */ {\r\n/* 202:167 */ Connections.getPorts(this).transmit(TO_TEXT_VIEWER, new BetterSignal(new Object[] { \"Commentary\", Html.line(\"Events overlap [\" + \r\n/* 203:168 */ previousEventOfSameType.from / 1000L + \" \" + previousEventOfSameType.to / 1000L + \"] [\" + firstTriple.from / 1000L + \" \" + \r\n/* 204:169 */ firstTriple.to / 1000L + \"] \") }));\r\n/* 205: */ }\r\n/* 206: */ else\r\n/* 207: */ {\r\n/* 208:172 */ resetReference(firstTriple);\r\n/* 209:173 */ return true;\r\n/* 210: */ }\r\n/* 211: */ }\r\n/* 212: */ else\r\n/* 213: */ {\r\n/* 214:177 */ Mark.say(new Object[] {firstTriple.english, \"NOT significant\" });\r\n/* 215: */ }\r\n/* 216: */ }\r\n/* 217:180 */ return false;\r\n/* 218: */ }", "@Override\n public int compareTo(Person person) {\n // Compare current object crossing time with the crossing time of the person object passed as an argument\n return this.crossingTime - person.crossingTime;\n }", "public void testDifferentDotProducts() {\n List<ISpectrum> spectra = ClusteringTestUtilities.readISpectraFromResource();\n\n ISpectrum[] spectrums = (ISpectrum[]) spectra.toArray();\n\n int total = 0;\n int different = 0;\n ISimilarityChecker checker = new FrankEtAlDotProduct(0.5F, 15, true);\n ISimilarityChecker currentChecker = new FrankEtAlDotProductJohannes();\n\n Set<String> interestingIds = new HashSet<>();\n\n\n for (int i = 0; i < spectrums.length; i++) {\n ISpectrum psm1 = spectrums[i];\n for (int j = i + 1; j < spectrums.length; j++) {\n ISpectrum psm2 = spectrums[j];\n double dotOrg = checker.assessSimilarity(psm1, psm2);\n double dotNew = currentChecker.assessSimilarity(psm1, psm2);\n\n if (Math.abs(dotOrg - dotNew) > 0.00001) {\n different++;\n\n StringBuilder usedPeaksTester = new StringBuilder();\n\n // these are the really interesting cases\n dotOrg = checker.assessSimilarity(psm1, psm2);\n\n double noClosestPeak = dotNew;\n dotNew = currentChecker.assessSimilarity(psm1, psm2);\n String id2 = psm2.getId();\n String id1 = psm1.getId();\n interestingIds.add(id1);\n interestingIds.add(id2);\n\n // System.out.println(usedPeaksTester.toString());\n // System.out.printf(id2 + \":\" + id1 + \" \" + \"Old: %8.3f Newx: %8.3f New: %8.3f\\tDiff: %8.3f\\n\", dotOrg, noClosestPeak, dotNew, dotOrg - dotNew);\n }\n total++;\n\n }\n\n }\n\n List<String> sorted = new ArrayList<>(interestingIds);\n Collections.sort(sorted);\n // System.out.println(\"Interesting Ids\");\n for (String s : sorted) {\n // System.out.println(s);\n }\n\n\n TestCase.assertEquals(0, different);\n }", "@Test\n void compareTo_NoMatch_AllParts() {\n runIsMatchTest(AnswerType.no, AnswerType.no, AnswerType.no, AnswerType.no, ContactMatchType.NoMatch);\n }", "protected boolean isDuplicate(ELesxUseCase useCase) {\n return false;\n }", "@Test\n public void testPlannedActivityNotEquals() {\n int different_id = planned.getId() + 1;\n PlannedActivity different_planned = new PlannedActivity(different_id,\n planned.getSite(), planned.getTipology(), planned.getDescription(),\n planned.getInterventionTime(), planned.isInterruptible(),\n planned.getWeek(), planned.getProcedure());\n assertNotEquals(planned, different_planned);\n\n }", "@Test\r\n\tpublic void SickPersonConstTest() {\n\tAssert.assertEquals(\"SP getSeverity incorrect\", 10,sp1.getSeverity(),0.00001);\r\n\tAssert.assertEquals(\"SP getName incorrect\", \"Alex\", sp1.getName());\r\n\tAssert.assertEquals(\"SP getAge incorrect\",20, sp1.getAge(), 0.00001);\r\n\tAssert.assertEquals(\"Person compareTo incorrect\", -5, sp1.compareTo(sp2), 0.00001);\r\n\t}", "@Test\r\n\tpublic void teachingUnitContainsPersons() {\r\n\t\tassertTrue(teachu1.containsPerson(\"ErK\"));\r\n\t\tassertTrue(teachu1.containsPerson(\"AlP\"));\r\n\t\tassertFalse(teachu1.containsPerson(\"MaP\"));\r\n\t}", "@Test\n public void equals() {\n CsvAdaptedPatient alice = new CsvAdaptedPatient(ALICE);\n CsvAdaptedPatient aliceCopy = new CsvAdaptedPatient(new PatientBuilder(ALICE).build());\n\n assertTrue(alice.equals(aliceCopy));\n\n // same object -> returns true\n assertTrue(alice.equals(alice));\n\n // null -> returns false\n assertFalse(alice.equals(null));\n\n // different type -> returns false\n assertFalse(alice.equals(5));\n\n // different patient -> returns false\n assertFalse(alice.equals(new CsvAdaptedPatient(BOB)));\n\n // different name -> returns false\n Patient editedAlice = new PatientBuilder(ALICE).withName(VALID_NAME_BOB).build();\n assertFalse(alice.equals(new CsvAdaptedPatient(editedAlice)));\n\n // different phone -> returns false\n editedAlice = new PatientBuilder(ALICE).withPhone(VALID_PHONE_BOB).build();\n assertFalse(alice.equals(new CsvAdaptedPatient(editedAlice)));\n\n // different address -> returns false\n editedAlice = new PatientBuilder(ALICE).withAddress(VALID_ADDRESS_BOB).build();\n assertFalse(alice.equals(new CsvAdaptedPatient(editedAlice)));\n\n // different remark -> returns false\n editedAlice = new PatientBuilder(ALICE).withRemark(VALID_REMARK_BOB).build();\n assertFalse(alice.equals(new CsvAdaptedPatient(editedAlice)));\n }", "public void setDiff(){\n diff=true;\n }", "@Test\n\tpublic void testSameLibDiffLocs() \n\t{\n\t\tString id = \"diffHomeLoc\";\n\t\tassertLCVol1NotLopped(id);\n\t\tassertLCVol2NotLopped(id);\n\t\tassertNoLoppedLC(id);\n\t}", "public boolean marry(Person person) {\n boolean isDifferentGenders = person.man != this.man;\n boolean bothNotHavePair = person.spouse == null && this.spouse == null;\n if (isDifferentGenders) {\n person.divorce();\n this.divorce();\n person.spouse = this;\n this.spouse = person;\n }\n return isDifferentGenders && bothNotHavePair;\n }", "@Test\n public void testDecisionRule() {\n DataProvider provider = new DataProvider();\n provider.createDataDefinition();\n DataHandle handle = provider.getData().getHandle();\n \n RiskModelPopulationUniqueness model = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.2d)).getPopulationBasedUniquenessRisk();\n double populationUniqueness = model.getFractionOfUniqueTuplesDankar();\n double sampleUniqueness = handle.getRiskEstimator(ARXPopulationModel.create(handle.getNumRows(), 0.1d)).getSampleBasedUniquenessRisk().getFractionOfUniqueRecords();\n \n // Risk before anonymization\n assertTrue(sampleUniqueness + \" / \" + populationUniqueness, compareUniqueness(populationUniqueness, 1.0d) == 0);\n assertTrue(sampleUniqueness + \" / \" + populationUniqueness, compareUniqueness(populationUniqueness, sampleUniqueness) <= 0);\n \n final ARXAnonymizer anonymizer = new ARXAnonymizer();\n final ARXConfiguration config = ARXConfiguration.create();\n config.addPrivacyModel(new KAnonymity(2));\n config.setSuppressionLimit(0d);\n \n ARXResult result = null;\n try {\n result = anonymizer.anonymize(provider.getData(), config);\n } catch (IOException e) {\n e.printStackTrace();\n }\n final DataHandle outHandle = result.getOutput(false);\n \n populationUniqueness = outHandle.getRiskEstimator(ARXPopulationModel.create(provider.getData().getHandle().getNumRows(), 0.1d)).getPopulationBasedUniquenessRisk().getFractionOfUniqueTuplesDankar();\n assertTrue(\"Is: \" + populationUniqueness, compareUniqueness(populationUniqueness, 0) == 0);\n }", "Diff() {\n\t}", "@Test\n void compareTo_NoMatch_NothingSpecifiedInContactToMerge()\n {\n Contact c1 = new Contact();\n Contact c2 = createBaseContact();\n\n assertEquals(ContactMatchType.NoMatch, c1.compareTo(c2).getMatchType());\n }", "boolean hasSameAs();", "@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 disabledtestAssociation2Fragments() {\n\t\tString ID1 = \"iu.1\";\n\t\tString IDF1 = \"iu.fragment.1\";\n\t\tString IDF2 = \"iu.fragment.2\";\n\t\tIInstallableUnit iu1 = createEclipseIU(ID1);\n\t\tIInstallableUnit iuf1 = createBundleFragment(IDF1);\n\t\tIInstallableUnit iuf2 = createBundleFragment(IDF2);\n\t\tProfileChangeRequest req = new ProfileChangeRequest(createProfile(getName()));\n\t\treq.addInstallableUnits(iu1, iuf1, iuf2);\n\t\tcreateTestMetdataRepository(new IInstallableUnit[] {iu1, iuf1});\n\t\tIQueryable<IInstallableUnit> additions = createPlanner().getProvisioningPlan(req, null, null).getAdditions();\n\t\t{\n\t\t\tIterator<IInstallableUnit> iterator = additions.query(QueryUtil.createIUQuery(ID1), null).iterator();\n\t\t\tassertTrue(\"Solution contains IU \" + ID1, iterator.hasNext());\n\t\t\tIInstallableUnit iu = iterator.next();\n\t\t\tassertEquals(\"Number of attached fragments to IU \" + ID1, 2, iu.getFragments().size());\n\t\t}\n\t}", "@Test\n public void equalsOtherTest2() {\n Device device2 = new Device(\"other\", token);\n assertNotEquals(device, device2);\n }", "private boolean runMultiSampleCase() {\n\t\tArrayList<Candidate> candidates = collectTrioCandidates();\n\n\t\t// Then, check the candidates for all trios around affected individuals.\n\t\tfor (Candidate c : candidates)\n\t\t\tif (isCompatibleWithTriosAroundAffected(c))\n\t\t\t\treturn true;\n\t\treturn false;\n\t}", "@Test\n public void testImpossible1TransferMoney() {\n Bank bank = new Bank();\n User user = new User(\"Petr\", \"0000 000000\");\n AccountOfUser acc = new AccountOfUser(0, \"0000 0000 0000 0000\");\n AccountOfUser acc2 = new AccountOfUser(0, \"0000 0000 0000 0001\");\n bank.addUser(user);\n bank.addAccountToUser(user.getPassport(), acc);\n bank.addAccountToUser(user.getPassport(), acc2);\n assertThat(bank.transferMoney(user.getPassport(), acc.getRequisites(), user.getPassport(), acc2.getRequisites(), 100), is(false));\n }", "@Test\n public void noEqualsID() {\n final CourseType courseType1 = new CourseType(\"N\", \"Pic\", 5, 1);\n courseType1.setId(\"ID\");\n courseType1.setCourses(List.of(new Course(\"C1\"), new Course(\"C2\")));\n courseType1.setAllowedDishes(List.of(new Dish(\"D1\"), new Dish(\"D2\")));\n final CourseType courseType2 = new CourseType(\"N\", \"Pic\", 5, 1);\n courseType2.setId(\"ID2\");\n courseType2.setCourses(List.of(new Course(\"C1\"), new Course(\"C2\")));\n courseType2.setAllowedDishes(List.of(new Dish(\"D1\"), new Dish(\"D2\")));\n final CourseType courseTypeNull = new CourseType(\"N\", \"Pic\", 5, 1);\n courseTypeNull.setId(null);\n courseTypeNull.setCourses(List.of(new Course(\"C1\"), new Course(\"C2\")));\n courseTypeNull.setAllowedDishes(List.of(new Dish(\"D1\"), new Dish(\"D2\")));\n\n assertNotEquals(courseType1, courseType2);\n assertNotEquals(courseType1, courseTypeNull);\n assertNotEquals(courseTypeNull, courseType1);\n }", "private boolean comparePersistentIdEntrys(@Nonnull PairwiseId one, @Nonnull PairwiseId other)\n {\n // Do not compare times\n //\n return Objects.equals(one.getPairwiseId(), other.getPairwiseId()) &&\n Objects.equals(one.getIssuerEntityID(), other.getIssuerEntityID()) &&\n Objects.equals(one.getRecipientEntityID(), other.getRecipientEntityID()) &&\n Objects.equals(one.getSourceSystemId(), other.getSourceSystemId()) &&\n Objects.equals(one.getPrincipalName(), other.getPrincipalName()) &&\n Objects.equals(one.getPeerProvidedId(), other.getPeerProvidedId());\n }", "private void badMatch() {\n\t\tArrayList<Integer> faceValues = new ArrayList<Integer>();\n\t\tInteger firstSelectableCardPos = null;\n\t\t\n\t\tfor (int card = 0; card < CARDS_SUM; card++) {\n\t\t\tPlayingCard thisCard = ((PlayingCard) getActivity().findViewById(solo.getImage(card).getId()));\n\t\t\t\n\t\t\t// cheat by finding card face without turning card over\n\t\t\tint face = thisCard.getCard();\n\t\t\tfaceValues.add(face);\n\t\t\t\n\t\t\t// can't select all cards\n\t\t\tif (thisCard.isLocked() || thisCard.getVisible()) {\n\t\t\t\tcontinue;\n\t\t\t} else if (firstSelectableCardPos == null) {\n\t\t\t\tfirstSelectableCardPos = card;\n\t\t\t}\n\t\t\t\n\t\t\t// if this is a different card, select the bad pair\n\t\t\tif (faceValues.get(firstSelectableCardPos) != face) {\n\t\t\t\tsolo.clickOnImage(firstSelectableCardPos);\n\t\t\t\tsolo.clickOnImage(card);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "private boolean isDifferent(String contentInGiven, String contentInCurr) {\n if (contentInGiven == null && contentInCurr == null) {\n return false;\n } else if (contentInCurr != null && contentInGiven != null\n && contentInCurr.equals(contentInGiven)) {\n return false;\n }\n return true;\n }", "public boolean isDangerToPeople () {\n\t\treturn false;\n\t}", "private HashMap<Integer, Integer> determineDifference(BidDetails previousBid, BidDetails currentBid) {\r\n\r\n HashMap<Integer, Integer> diff = new HashMap<Integer, Integer>();\r\n try {\r\n for (Issue i : opponentUtilitySpace.getDomain().getIssues()) {\r\n // compare the values of each issue to see if the have changed between the two bids\r\n diff.put(i.getNumber(), (((ValueDiscrete) currentBid.getBid().getValue(i.getNumber()))\r\n .equals((ValueDiscrete) previousBid.getBid().getValue(i.getNumber()))) ? 0 : 1);\r\n }\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n // return the hashmap\r\n return diff;\r\n }", "@Test\n public void isSameLog_differentLog_returnFalse() {\n assertFalse(LOG_A.isSameLog(null));\n\n // different exercise and dateTime -> returns false\n Log editedLog = new LogBuilder(LOG_A)\n .withExercise(VALID_EXERCISE_B)\n .withDateTime(VALID_DATE_TIME_B)\n .build();\n assertFalse(LOG_A.isSameLog(editedLog));\n\n // different dateTime -> returns false\n editedLog = new LogBuilder(LOG_A).withDateTime(VALID_DATE_TIME_B).build();\n assertFalse(LOG_A.isSameLog(editedLog));\n }", "@Test\n public void testRecordsWithDifferentIDsProduceDifferentHashCodes() throws Exception {\n setRecordFieldValue(otherRecord, \"id\", 42L);\n int hashcodeA = record.hashCode();\n int hashcodeB = otherRecord.hashCode();\n\n assertThat(hashcodeA == hashcodeB, is(false));\n }", "@Test\r\n\tpublic void HealthyPersonConstTest() {\n\t\tAssert.assertEquals(\"HP getReason incorrect\", \"allergies\", hp1.getReason());\r\n\t\tAssert.assertEquals(\"HP getName incorrect\", \"Alex\", hp1.getName());\r\n\t\tAssert.assertEquals(\"HP getAge incorrect\", 20, hp1.getAge(),0.0001);\r\n\t}", "@Test(description = \"negative test that derived relationship is changed\")\n public void t23b_negativeTestDerivedChanged()\n throws Exception\n {\n this.createNewData(\"Parent1\")\n .create();\n this.createNewData(\"Parent2\")\n .create();\n this.createNewData(\"Test\")\n .create()\n .setValue(\"derived\", AbstractTest.PREFIX + \"Parent1\")\n .update(\"\");\n this.createNewData(\"Test\")\n .setValue(\"derived\", AbstractTest.PREFIX + \"Parent2\")\n .failureUpdate(ErrorKey.DM_RELATION_UPDATE_DERIVED);\n this.createNewData(\"Test\")\n .setValue(\"derived\", AbstractTest.PREFIX + \"Parent1\")\n .checkExport();\n }", "public boolean checker(Object primObj, Object equalObj, Object diffObj) {\n logger.log(Level.FINE, \"Primary object:: \" + primObj);\n logger.log(Level.FINE,\n \"Object that is equal to the primary one:: \" + equalObj);\n logger.log(Level.FINE,\n \"Object that is different from the primary one:: \" + diffObj);\n\n if (!primObj.equals(equalObj)) {\n logger.log(Level.FINE, primObj + \" isn't equal to \" + equalObj);\n return false;\n }\n\n if (primObj.equals(diffObj)) {\n logger.log(Level.FINE, primObj + \" is equal to \" + diffObj);\n return false;\n }\n\n /*\n * Check that toString() method invoked twice on the same object\n * produces equal String objects\n */\n logger.log(Level.FINE,\n \"Check that toString() method invoked twice on the same object\"\n + \" produces equal String objects ...\");\n String str1 = primObj.toString();\n String str2 = primObj.toString();\n\n if (!(str1.equals(str2))) {\n logger.log(Level.FINE,\n \"toString() method invoked twice on the same object\"\n + \" produces non-equal String objects:\\n\" + str1 + \"\\n\"\n + str2);\n return false;\n }\n logger.log(Level.FINE, \"\\tpassed\");\n\n /*\n * Check that 2 equal objects have equal string representations\n */\n logger.log(Level.FINE,\n \"Check that 2 equal objects have equal string\"\n + \" representations ...\");\n String primObj_str = primObj.toString();\n String equalObj_str = equalObj.toString();\n\n if (!(primObj_str.equals(equalObj_str))) {\n logger.log(Level.FINE,\n \"2 equal objects have non-equal string representations:\\n\"\n + primObj_str + \"\\n\" + equalObj_str);\n return false;\n }\n logger.log(Level.FINE, \"\\tpassed\");\n return true;\n }" ]
[ "0.60556984", "0.5950092", "0.5840393", "0.58201385", "0.5599134", "0.55849844", "0.5574288", "0.5549634", "0.5536654", "0.5529148", "0.54402816", "0.5419475", "0.54188377", "0.54141724", "0.5405864", "0.53900224", "0.53685856", "0.53635883", "0.5338989", "0.5324938", "0.53238624", "0.53159946", "0.5254092", "0.52527946", "0.52498233", "0.52263933", "0.5214969", "0.52096194", "0.5195102", "0.518578", "0.5176977", "0.5153691", "0.51531243", "0.514294", "0.51421565", "0.51343834", "0.5133631", "0.5132778", "0.5131311", "0.51291937", "0.5116978", "0.5114591", "0.5106678", "0.51064706", "0.5102258", "0.5085689", "0.50817937", "0.50811803", "0.50810015", "0.50763017", "0.5069483", "0.5065265", "0.5062033", "0.5060912", "0.5060184", "0.50601727", "0.50528604", "0.5050195", "0.50282454", "0.5027756", "0.5023964", "0.5014509", "0.501355", "0.50111574", "0.5002509", "0.5001661", "0.50006336", "0.499842", "0.49893245", "0.49878603", "0.49818468", "0.49816784", "0.49767905", "0.49731776", "0.49710757", "0.49703705", "0.49656147", "0.496338", "0.4962509", "0.4960306", "0.4958999", "0.4952297", "0.49520358", "0.49513173", "0.49508965", "0.49479502", "0.4945232", "0.4933486", "0.49323437", "0.49308705", "0.49303374", "0.4928405", "0.49184608", "0.49118492", "0.4911089", "0.49109453", "0.490435", "0.49031895", "0.48956925", "0.48942497" ]
0.6184038
0
Case 1: If fields have different value, they result in differences.
@Test public void testCompareCase1() throws IOException { Person p1 = DataUtil.readDataFromFile("test/data/case1/case1-person1.json", Person.class); Person p2 = DataUtil.readDataFromFile("test/data/case1/case1-person2.json", Person.class); IContext ctx = ObjectCompare.compare(p1, p2); debug(ctx.getDifferences()); Assert.assertTrue(ctx.hasDifferences()); Assert.assertEquals(4, ctx.getDifferences().size()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testEqualsReturnsFalseOnDifferentIdVal() throws Exception {\n setRecordFieldValue(otherRecord, \"id\", 42L);\n\n boolean equals = record.equals(otherRecord);\n\n assertThat(equals, is(false));\n }", "private boolean haveTwoObjsSameFields(Class classObjects, Object obj1, Object obj2, ArrayList<String> fieldsToExcludeFromCompare) {\n log.info(\"TEST: comparing two objects of class \"+classObjects.getName());\n if (obj1.getClass() != obj2.getClass()) {\n log.error(\"TEST: The two objects are instances of different classes, thus different\");\n return false;\n }\n\n try {\n PropertyDescriptor[] pds= Introspector.getBeanInfo(classObjects).getPropertyDescriptors();\n for(PropertyDescriptor pd: pds) {\n log.info(pd.getDisplayName());\n String methodName=pd.getReadMethod().getName();\n String fieldName = methodName.substring(3, methodName.length());\n\n if(fieldsToExcludeFromCompare.contains(fieldName)==true) {\n continue;\n }\n\n boolean areEqual=false;\n try {\n Object objReturned1 = pd.getReadMethod().invoke(obj1);\n Object objReturned2 =pd.getReadMethod().invoke(obj2);\n if(objReturned1!=null && objReturned2!=null) {\n areEqual=objReturned1.equals(objReturned2);\n if(objReturned1 instanceof List<?> && ((List) objReturned1).size()>0 && ((List) objReturned1).size()>0 && ((List) objReturned1).get(0) instanceof String) {\n String str1=String.valueOf(objReturned1);\n String str2=String.valueOf(objReturned2);\n areEqual=str1.equals(str2);\n\n }\n }\n else if(objReturned1==null && objReturned2==null) {\n log.info(\"TEST: Field with name \"+fieldName+\" null in both objects.\");\n areEqual=true;\n }\n else {\n //log.info(\"One of two objects is null\");\n //log.info(\"{}\",objReturned1);\n //log.info(\"{}\",objReturned2);\n }\n if(areEqual==false) {\n log.info(\"TEST: field with name \"+fieldName+\" has different values in objects. \");\n return false;\n }\n else{\n log.info(\"TEST: field with name \"+fieldName+\" has same value in both objects. \");\n }\n } catch (IllegalAccessException e) {\n\n e.printStackTrace();\n return false;\n } catch (IllegalArgumentException e) {\n e.printStackTrace();\n return false;\n } catch (InvocationTargetException e) {\n e.printStackTrace();\n return false;\n }\n }\n } catch (IntrospectionException e) {\n e.printStackTrace();\n }\n return true;\n }", "public void testTwoFields() throws Exception {\n String key1 = 1 + randomAlphaOfLength(3);\n String key2 = 2 + randomAlphaOfLength(3);\n String key3 = 3 + randomAlphaOfLength(3);\n updateAndCheckSource(0, 1, fields(key1, \"foo\", key2, \"baz\"));\n updateAndCheckSource(0, 1, fields(key1, \"foo\", key2, \"baz\"));\n updateAndCheckSource(1, 2, fields(key1, \"foo\", key2, \"bir\"));\n updateAndCheckSource(1, 2, fields(key1, \"foo\", key2, \"bir\"));\n updateAndCheckSource(2, 3, fields(key1, \"foo\", key2, \"foo\"));\n updateAndCheckSource(3, 4, fields(key1, \"foo\", key2, null));\n updateAndCheckSource(3, 4, fields(key1, \"foo\", key2, null));\n updateAndCheckSource(4, 5, fields(key1, \"foo\", key2, \"foo\"));\n updateAndCheckSource(5, 6, fields(key1, null, key2, \"foo\"));\n updateAndCheckSource(5, 6, fields(key1, null, key2, \"foo\"));\n updateAndCheckSource(6, 7, fields(key1, null, key2, null));\n updateAndCheckSource(6, 7, fields(key1, null, key2, null));\n updateAndCheckSource(7, 8, fields(key1, null, key2, null, key3, null));\n\n assertEquals(5, totalNoopUpdates());\n }", "public boolean isObjectDifferentiaField(CharField cf) {\n return false;\n }", "private boolean isValuesEqual(BinaryMessage tocmp, BinaryMessage original) {\n\t\tif(tocmp.getValue().equals(original.getValue())) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "@Test\n public void testEqualsReturnsFalseOnDifferentStartVal() throws Exception {\n setRecordFieldValue(otherRecord, \"start\", null);\n boolean equals = record.equals(otherRecord);\n\n assertThat(equals, is(false));\n\n equals = otherRecord.equals(record);\n\n assertThat(equals, is(false));\n }", "public void diff(Value old, StringBuilder b) {\n Value v = new Value(this);\n v.flags &= ~old.flags; // TODO: see Value.remove above (anyway, diff is only used for debug output)\n if (v.object_labels != null) {\n v.object_labels = newSet(v.object_labels);\n if (old.object_labels != null)\n v.object_labels.removeAll(old.object_labels);\n }\n if (v.getters != null) {\n v.getters = newSet(v.getters);\n if (old.getters != null)\n v.getters.removeAll(old.getters);\n }\n if (v.setters != null) {\n v.setters = newSet(v.setters);\n if (old.setters != null)\n v.setters.removeAll(old.setters);\n }\n if (old.excluded_strings != null) {\n v.excluded_strings = newSet(old.excluded_strings);\n if (excluded_strings != null)\n v.excluded_strings.removeAll(excluded_strings);\n }\n if (v.included_strings != null) {\n v.included_strings = newSet(v.included_strings);\n if (old.included_strings != null)\n v.included_strings.removeAll(old.included_strings);\n }\n b.append(v);\n }", "@Test\n public void testRecordsWithDifferentIDsProduceDifferentHashCodes() throws Exception {\n setRecordFieldValue(otherRecord, \"id\", 42L);\n int hashcodeA = record.hashCode();\n int hashcodeB = otherRecord.hashCode();\n\n assertThat(hashcodeA == hashcodeB, is(false));\n }", "@Override\n public boolean hardDiff(FObject o1, FObject o2, FObject diff) {\n if ( this.get(o1) == null ) {\n if ( this.get(o2) == null ) {\n return false;\n } else {\n //shadow copy, since we only use to print out diff entry in journal\n this.set(diff, this.get(o2));\n return true;\n }\n }\n //Both this.get(o1) and thid.get(o2) are not null\n //The propertyInfo is instance of AbstractObjectProperty, so that there is no way to do nested propertyInfo check\n //No matter if there are point to same instance or not, treat them as difference\n //if there are point to different instance, indeed there are different\n //if there are point to same instance, we can not guarantee if there are no difference comparing with record in the journal.\n //shodow copy\n this.set(diff, this.get(o2));\n return true;\n }", "public V difference(V v1, V v2);", "@Test\n public void testRecordsWithDifferentStartValProduceDifferentHashCodes() throws Exception {\n setRecordFieldValue(otherRecord, \"start\", new Date(otherRecord.getStart().getTime() + 100));\n int hashcodeA = record.hashCode();\n int hashcodeB = otherRecord.hashCode();\n\n assertThat(hashcodeA == hashcodeB, is(false));\n }", "@Test\n public void fieldCompare() throws Exception {\n Document doc = new Document();\n DocumentBuilder builder = new DocumentBuilder(doc);\n\n FieldCompare field = (FieldCompare) builder.insertField(FieldType.FIELD_COMPARE, true);\n field.setLeftExpression(\"3\");\n field.setComparisonOperator(\"<\");\n field.setRightExpression(\"2\");\n field.update();\n\n // The COMPARE field displays a \"0\" or a \"1\", depending on its statement's truth.\n // The result of this statement is false so that this field will display a \"0\".\n Assert.assertEquals(\" COMPARE 3 < 2\", field.getFieldCode());\n Assert.assertEquals(\"0\", field.getResult());\n\n builder.writeln();\n\n field = (FieldCompare) builder.insertField(FieldType.FIELD_COMPARE, true);\n field.setLeftExpression(\"5\");\n field.setComparisonOperator(\"=\");\n field.setRightExpression(\"2 + 3\");\n field.update();\n\n // This field displays a \"1\" since the statement is true.\n Assert.assertEquals(\" COMPARE 5 = \\\"2 + 3\\\"\", field.getFieldCode());\n Assert.assertEquals(\"1\", field.getResult());\n\n doc.updateFields();\n doc.save(getArtifactsDir() + \"Field.COMPARE.docx\");\n //ExEnd\n\n doc = new Document(getArtifactsDir() + \"Field.COMPARE.docx\");\n\n field = (FieldCompare) doc.getRange().getFields().get(0);\n\n TestUtil.verifyField(FieldType.FIELD_COMPARE, \" COMPARE 3 < 2\", \"0\", field);\n Assert.assertEquals(\"3\", field.getLeftExpression());\n Assert.assertEquals(\"<\", field.getComparisonOperator());\n Assert.assertEquals(\"2\", field.getRightExpression());\n\n field = (FieldCompare) doc.getRange().getFields().get(1);\n\n TestUtil.verifyField(FieldType.FIELD_COMPARE, \" COMPARE 5 = \\\"2 + 3\\\"\", \"1\", field);\n Assert.assertEquals(\"5\", field.getLeftExpression());\n Assert.assertEquals(\"=\", field.getComparisonOperator());\n Assert.assertEquals(\"\\\"2 + 3\\\"\", field.getRightExpression());\n }", "public boolean equals(Object o) {\r\n\t\tif (!(o instanceof IValuedField)) return false; //get rid of non fields\r\n\t\tIValuedField field= (IValuedField)o;\r\n\t\tboolean areEqual = type.equals(field.getType());//same type \r\n\t\tif (formal){\r\n\t\t\treturn (areEqual && field.isFormal());\r\n\t\t} else //the current field is actual\r\n\t\t\tif (((IValuedField) field).isFormal()) { //if the other is formal\r\n\t\t\t\treturn false;\r\n\t\t\t} else //if they're both actual then their values must match\r\n\t\t\t{\r\n\t\t\t\tif (varname != null) // there is a variable name\r\n\t\t\t\t\t{\r\n\t\t\t\t\tif (!(o instanceof NameValueField))\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\telse //check that names match\r\n\t\t\t\t\t\tareEqual = (areEqual && (varname.equals(((NameValueField)field).getVarName())));\r\n\t\t\t\t\t}\r\n\t\t\t\treturn areEqual && value.equals(field.getValue()); //values are the same\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\r\n\t\t\t\t\r\n\t\t\r\n\t}", "@Test\n\tpublic void testWithNullValue2() {\n\t\tAssert.assertFalse(fnull.equals(f1));\n\t}", "protected void assertSame(BytesRef lowerVal, BytesRef upperVal, boolean includeLower, boolean includeUpper) throws IOException {\n Query docValues = new ConstantScoreQuery(DocTermOrdsRangeFilter.newBytesRefRange(fieldName, lowerVal, upperVal, includeLower, includeUpper));\n MultiTermQuery inverted = new TermRangeQuery(fieldName, lowerVal, upperVal, includeLower, includeUpper);\n inverted.setRewriteMethod(MultiTermQuery.CONSTANT_SCORE_FILTER_REWRITE);\n\n TopDocs invertedDocs = searcher1.search(inverted, 25);\n TopDocs docValuesDocs = searcher2.search(docValues, 25);\n\n CheckHits.checkEqual(inverted, invertedDocs.scoreDocs, docValuesDocs.scoreDocs);\n }", "private Comparison compareValues(SimpleNode first, SimpleNode second) {\n return Objects.equals(first.jjtGetValue(), second.jjtGetValue()) ? Comparison.IS_EQUAL\n : Comparison.notEqual(\"Node values differ: \" + first.jjtGetValue() + \" vs \" + second.jjtGetValue());\n }", "@Test\n public void equals_DifferentDiningHallBitfield_Test() {\n Assert.assertFalse(bq1.equals(bq6));\n Assert.assertFalse(bq1.equals(bq7));\n }", "@Test\n\tpublic void testEquals6(){\n\t\tTemperature data1 = new Temperature (100, Temperature.Units.KELVIN);\n\t\tTemperature data2 = new Temperature (100, Temperature.Units.CELCIUS);\n\t\tassertEquals(data1.equals(data2), false);\t//Since '100 kelvin' and '100 celcius' are different, equals() function should return false \n\t\tassertTrue(data1.getValue() == 100);\t\t//equals() function should not affect return value of getValue() function and should return the original value\n\t\tassertTrue(data2.getValue() == 100);\t\t//equals() function should not affect return value of getValue() function and should return the original value\t\n\t}", "private static void compareForIdenticalKeys() {\n Integer[] identical = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1};\n\n Insertion insertion = new Insertion();\n insertion.analyzeSort(identical);\n insertion.getStat().printReport();\n\n Selection selection = new Selection();\n selection.analyzeSort(identical);\n selection.getStat().printReport();\n }", "public void testAssertPropertyReflectionEquals_notEqualsDifferentValues() {\r\n try {\r\n assertPropertyReflectionEquals(\"stringProperty\", \"xxxxxx\", testObject);\r\n fail(\"Expected AssertionFailedError\");\r\n } catch (AssertionFailedError a) {\r\n // expected\r\n }\r\n }", "@Test\r\n\tpublic void testCompareCase2() throws IOException {\r\n\t\tPerson p1 = DataUtil.readDataFromFile(\"test/data/case2/case2-person1.json\", Person.class);\r\n\t\tPerson p2 = DataUtil.readDataFromFile(\"test/data/case2/case2-person2.json\", Person.class);\r\n\r\n\t\t// Custom context\r\n\t\tString ageFieldName = FieldUtil.makeFieldName(Person.class, \"age\");\r\n\t\tIContext ctx = ObjectCompare.buildContext().register(FieldFeature.IGNORE_FIELD, ageFieldName);\r\n\t\tObjectCompare.compare(p1, p2, ctx);\r\n\t\tdebug(ctx.getDifferences());\r\n\t\tAssert.assertFalse(ctx.hasDifferences());\r\n\t}", "@Test\n public void testEqualsReturnsFalseOnDifferentEndVal() throws Exception {\n setRecordFieldValue(otherRecord, \"end\", null);\n boolean equals = record.equals(otherRecord);\n\n assertThat(equals, is(false));\n\n equals = otherRecord.equals(record);\n\n assertThat(equals, is(false));\n }", "private boolean compare(ValueType first, ValueType second) {\r\n // TODO\r\n return false;\r\n }", "@Test\n public void test_CopyValuesFrom() {\n //This test uses specified values.\n System.out.println(\"Testing MeasuredRatioModel's copyValuesFrom(MeasuredRatioModel parent)\");\n MeasuredRatioModel instance0 = new MeasuredRatioModel(\"Specific\",new BigDecimal(\"12.34567890\"),\"ABS\",new BigDecimal(\"0.987654321\"),false,true);\n MeasuredRatioModel blank = new MeasuredRatioModel();\n\n /**Initializing a Variable to test if names are equal before or after\n * If this value is set to 1 in the following try catch block, then the\n * names were not equal beforehand and should not be equal afterwards.\n * If the variable remains at 0 then the names were equal beforehand and\n * therefore should remain the same afterwards.\n */\n \n int nameAfter=0;\n try{\n assertEquals(instance0.name,blank.name);\n }\n catch(org.junit.ComparisonFailure except1){\n nameAfter=1;\n }\n //Copying Values from Specific ValueModel to Default\n blank.copyValuesFrom(instance0);\n //Test if Expected is Equal to the Result\n assertEquals(instance0.value,blank.value);\n assertEquals(instance0.oneSigma,blank.oneSigma);\n assertEquals(instance0.uncertaintyType,blank.uncertaintyType);\n assertEquals(instance0.isFracCorr(),blank.isFracCorr());\n assertEquals(instance0.isOxideCorr(),blank.isOxideCorr());\n \n if(nameAfter==1){\n //The name field should not be equal between the two ValueModels.\n try{\n assertEquals(instance0.name,blank.name);\n //Fail if expected Exception not Thrown\n fail(\"org.junit.ComparisonFailure throwable not thrown - the Name Field is being copied!\");\n }\n catch(org.junit.ComparisonFailure except0){\n \n }\n }\n //This test uses default values.\n instance0 = new MeasuredRatioModel();\n blank = new MeasuredRatioModel();\n blank.copyValuesFrom(instance0);\n assertEquals(instance0.value,blank.value);\n assertEquals(instance0.oneSigma,blank.oneSigma);\n assertEquals(instance0.uncertaintyType,blank.uncertaintyType);\n assertEquals(instance0.name,blank.name);\n assertEquals(instance0.isFracCorr(),blank.isFracCorr());\n assertEquals(instance0.isOxideCorr(),blank.isOxideCorr());\n //This test uses default values, save for the name field.\n instance0 = new MeasuredRatioModel(\"Specific\",new BigDecimal(\"213\"),\"ABS\",new BigDecimal(\"0.4324\"),true,false);\n blank = new MeasuredRatioModel(\"Specific\",new BigDecimal(\"12.4332\"),\"ABS\",new BigDecimal(\"0.654654\"),false,true);\n \n /**Initializing a Variable to test if names are equal before or after\n If this value is set to 1 in the following try catch block, then the\n * names were not equal beforehand and should not be equal afterwards.\n * If the variable remains at 0 then the names were equal beforehand and\n * therefore should remain the same afterwards.\n */\n \n nameAfter=0;\n try{\n assertEquals(instance0.name,blank.name);\n }\n catch(org.junit.ComparisonFailure except1){\n nameAfter=1;\n }\n \n //Copying Values from Specific ValueModel to Default\n blank.copyValuesFrom(instance0);\n //Test if Expected is Equal to the Result\n assertEquals(instance0.value,blank.value);\n assertEquals(instance0.oneSigma,blank.oneSigma);\n assertEquals(instance0.uncertaintyType,blank.uncertaintyType);\n assertEquals(instance0.isFracCorr(),blank.isFracCorr());\n assertEquals(instance0.isOxideCorr(),blank.isOxideCorr());\n if(nameAfter==1){\n //The name field should not be equal between the two ValueModels.\n try{\n assertEquals(instance0.name,blank.name);\n //Fail if expected Exception not Thrown\n fail(\"org.junit.ComparisonFailure throwable not thrown - the Name Field is being copied!\");\n }\n catch(org.junit.ComparisonFailure except0){\n \n }\n }\n }", "@Test\n public void testHashcodeReturnsSameValueForIdenticalRecords() {\n int hashcodeA = record.hashCode();\n int hashcodeB = otherRecord.hashCode();\n\n assertThat(hashcodeA == hashcodeB, is(true));\n }", "@Test\n \tpublic void testEqual() {\n \t\tAssert.assertTrue(f1.equals(f1));\n \t}", "private static void testStuff(int i1, int i2) {\n\t\tif (i1 != i2)\n\t\t\terrors += 1;\n\t}", "@Test\n public void equals_differentName() {\n SiteInfo si1 = new SiteInfo(\n Amount.valueOf(12000, SiteInfo.CUBIC_FOOT),\n Amount.valueOf(76, NonSI.FAHRENHEIT),\n Amount.valueOf(92, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n 56,\n Damage.CLASS2,\n Country.USA,\n \"Foo Site\"\n );\n SiteInfo si2 = new SiteInfo(\n Amount.valueOf(12000, SiteInfo.CUBIC_FOOT),\n Amount.valueOf(76, NonSI.FAHRENHEIT),\n Amount.valueOf(92, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n 56,\n Damage.CLASS2,\n Country.USA,\n \"Bar Site\"\n );\n\n Assert.assertNotEquals(si1, si2);\n }", "public boolean onFieldChange(int i, Object obj, int i2) {\n return false;\n }", "public boolean onFieldChange(int i, Object obj, int i2) {\n return false;\n }", "public boolean onFieldChange(int i, Object obj, int i2) {\n return false;\n }", "public boolean onFieldChange(int i, Object obj, int i2) {\n return false;\n }", "public boolean onFieldChange(int i, Object obj, int i2) {\n return false;\n }", "public boolean onFieldChange(int i, Object obj, int i2) {\n return false;\n }", "public boolean onFieldChange(int i, Object obj, int i2) {\n return false;\n }", "@Test\n \tpublic void testNotEqual() {\n \t\tAssert.assertFalse(f1.equals(f2));\n \t}", "@Test\n public void equals_DifferentObjects_Test() {\n Assert.assertFalse(bq1.equals(ONE));\n }", "public void testFailureDueToDups() throws Exception\n {\n try {\n String json = MAPPER.writeValueAsString(new DupFieldBean());\n fail(\"Should not pass, got: \"+json);\n } catch (InvalidDefinitionException e) {\n verifyException(e, \"Multiple fields representing\");\n }\n }", "@Test\n public void equals() {\n EditReminderDescriptor descriptorWithSameValues = new EditReminderDescriptor(DESC_REMINDER_MATHS);\n assertTrue(DESC_REMINDER_MATHS.equals(descriptorWithSameValues));\n\n // same object -> returns true\n assertTrue(DESC_REMINDER_MATHS.equals(DESC_REMINDER_MATHS));\n\n // null -> returns false\n assertFalse(DESC_REMINDER_MATHS.equals(null));\n\n // different types -> returns false\n assertFalse(DESC_REMINDER_MATHS.equals(5));\n\n // different values -> returns false\n assertFalse(DESC_REMINDER_MATHS.equals(DESC_REMINDER_SCIENCE));\n\n // different desc -> returns false\n EditReminderDescriptor editedMaths = new EditReminderDescriptorBuilder(DESC_REMINDER_MATHS)\n .withDescription(VALID_REMINDER_DESC_TWO).build();\n assertFalse(DESC_REMINDER_MATHS.equals(editedMaths));\n\n // different date -> returns false\n editedMaths = new EditReminderDescriptorBuilder(DESC_REMINDER_MATHS)\n .withReminderDate(VALID_REMINDER_DATE_TWO).build();\n assertFalse(DESC_REMINDER_MATHS.equals(editedMaths));\n }", "public boolean compareEqual(org.vcell.util.Matchable obj) {\r\n\tif (obj instanceof ReferenceDataMappingSpec){\r\n\t\tReferenceDataMappingSpec rdms = (ReferenceDataMappingSpec)obj;\r\n\r\n\t\tif (!org.vcell.util.Compare.isEqual(referenceDataColumnName,rdms.referenceDataColumnName)){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif ((fieldModelObject == null && rdms.fieldModelObject != null) ||\r\n\t\t\t(fieldModelObject != null && rdms.fieldModelObject == null)){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t//\r\n\t\t// if both are null, everything is ok\r\n\t\t// if both are non-null, then check for equivalence.\r\n\t\t//\r\n\t\tif (fieldModelObject != null && rdms.fieldModelObject != null){\r\n\t\t\tif (fieldModelObject instanceof org.vcell.util.Matchable){\r\n\t\t\t\tif (rdms.fieldModelObject instanceof org.vcell.util.Matchable){\r\n\t\t\t\t\tif (!org.vcell.util.Compare.isEqualOrNull((org.vcell.util.Matchable)this.fieldModelObject,(org.vcell.util.Matchable)rdms.fieldModelObject)){\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t//\r\n\t\t\t\t// else compare symbol type, name, and nameScope name\r\n\t\t\t\t//\t\t\t\t\r\n\t\t\t\tif (!fieldModelObject.getClass().equals(rdms.fieldModelObject.getClass())){\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\tif (!fieldModelObject.getName().equals(rdms.fieldModelObject.getName())){\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\tif (!fieldModelObject.getNameScope().getName().equals(rdms.fieldModelObject.getNameScope().getName())){\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\t\r\n\t\t\r\n\t\treturn true;\r\n\t}\r\n\treturn false;\r\n}", "private boolean valueEquals(Object val1, Object val2) {\n if (val1 == val2) {\n return true;\n }\n\n // One and only one of the value is null\n if (val1 == null || val2 == null) {\n return false;\n }\n\n return val1.equals(val2);\n }", "@Test\n public void equals() {\n EditEventDescriptor descriptorWithSameValues = new EditEventDescriptor(DESC_TUTORIAL);\n assertTrue(DESC_TUTORIAL.equals(descriptorWithSameValues));\n\n // same object -> returns true\n assertTrue(DESC_TUTORIAL.equals(DESC_TUTORIAL));\n\n // null -> returns false\n assertFalse(DESC_TUTORIAL.equals(null));\n\n // different types -> returns false\n assertFalse(DESC_TUTORIAL.equals(5));\n\n // different values -> returns false\n assertFalse(DESC_TUTORIAL.equals(DESC_EXAM));\n\n // different name -> returns false\n EditEventDescriptor editedTutorial = new EditEventDescriptorBuilder(DESC_TUTORIAL).withName(VALID_NAME_EXAM)\n .build();\n assertFalse(DESC_TUTORIAL.equals(editedTutorial));\n\n // different start time -> returns false\n editedTutorial = new EditEventDescriptorBuilder(DESC_TUTORIAL).withStartDateTime(VALID_START_DATE_TIME_EXAM)\n .build();\n assertFalse(DESC_TUTORIAL.equals(editedTutorial));\n\n // different end time -> returns false\n editedTutorial = new EditEventDescriptorBuilder(DESC_TUTORIAL).withEndDateTime(VALID_END_DATE_TIME_EXAM)\n .build();\n assertFalse(DESC_TUTORIAL.equals(editedTutorial));\n\n // different address -> returns false\n editedTutorial = new EditEventDescriptorBuilder(DESC_TUTORIAL).withAddress(VALID_ADDRESS_EXAM).build();\n assertFalse(DESC_TUTORIAL.equals(editedTutorial));\n\n // different tags -> returns false\n editedTutorial = new EditEventDescriptorBuilder(DESC_TUTORIAL).withTags(VALID_TAG_EXAMS).build();\n assertFalse(DESC_TUTORIAL.equals(editedTutorial));\n }", "@Test\n public void isSameLog_differentLog_returnFalse() {\n assertFalse(LOG_A.isSameLog(null));\n\n // different exercise and dateTime -> returns false\n Log editedLog = new LogBuilder(LOG_A)\n .withExercise(VALID_EXERCISE_B)\n .withDateTime(VALID_DATE_TIME_B)\n .build();\n assertFalse(LOG_A.isSameLog(editedLog));\n\n // different dateTime -> returns false\n editedLog = new LogBuilder(LOG_A).withDateTime(VALID_DATE_TIME_B).build();\n assertFalse(LOG_A.isSameLog(editedLog));\n }", "public boolean differ(Object a, Object b) {\n Node set1 = find(getNode(a));\n Node set2 = find(getNode(b));\n\n return set1 != set2;\n }", "private\n static\n void\n assertEventDataEqual( MingleReactorEvent ev1,\n String ev1Name,\n MingleReactorEvent ev2,\n String ev2Name )\n {\n Object o1 = null;\n Object o2 = null;\n String desc = null;\n\n switch ( ev1.type() ) {\n case VALUE: o1 = ev1.value(); o2 = ev2.value(); desc = \"value\"; break;\n case FIELD_START:\n o1 = ev1.field(); o2 = ev2.field(); desc = \"field\"; break;\n case STRUCT_START:\n o1 = ev1.structType(); o2 = ev2.structType(); desc = \"structType\";\n break;\n default: return;\n }\n\n state.equalf( o1, o2, \"%s.%s != %s.%s (%s != %s)\",\n ev1Name, desc, ev2Name, desc, o1, o2 );\n }", "@Test\n public void equals_DifferentUserId_Test() {\n Assert.assertFalse(bq1.equals(bq2));\n }", "@Test\n public void testEqualsReturnsTrueOnIdenticalRecords() {\n boolean equals = record.equals(otherRecord);\n\n assertThat(equals, is(true));\n }", "@Test\n public void equals_trulyEqual() {\n SiteInfo si1 = new SiteInfo(\n Amount.valueOf(12000, SiteInfo.CUBIC_FOOT),\n Amount.valueOf(76, NonSI.FAHRENHEIT),\n Amount.valueOf(92, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n 56,\n Damage.CLASS2,\n Country.USA,\n \"Default Site\"\n );\n SiteInfo si2 = new SiteInfo(\n Amount.valueOf(12000, SiteInfo.CUBIC_FOOT),\n Amount.valueOf(76, NonSI.FAHRENHEIT),\n Amount.valueOf(92, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n 56,\n Damage.CLASS2,\n Country.USA,\n \"Default Site\"\n );\n\n Assert.assertEquals(si1, si2);\n }", "@Test\n public void equals_DifferentPriceCents_Test() {\n Assert.assertFalse(bq1.equals(bq5));\n }", "@Test\n public void testEquality(){\n int ans = testing1.LessThanTen(testing1.getValue1(), testing1.getValue2());\n assertEquals(10, ans);\n }", "@Test\n public void equals() {\n CsvAdaptedPatient alice = new CsvAdaptedPatient(ALICE);\n CsvAdaptedPatient aliceCopy = new CsvAdaptedPatient(new PatientBuilder(ALICE).build());\n\n assertTrue(alice.equals(aliceCopy));\n\n // same object -> returns true\n assertTrue(alice.equals(alice));\n\n // null -> returns false\n assertFalse(alice.equals(null));\n\n // different type -> returns false\n assertFalse(alice.equals(5));\n\n // different patient -> returns false\n assertFalse(alice.equals(new CsvAdaptedPatient(BOB)));\n\n // different name -> returns false\n Patient editedAlice = new PatientBuilder(ALICE).withName(VALID_NAME_BOB).build();\n assertFalse(alice.equals(new CsvAdaptedPatient(editedAlice)));\n\n // different phone -> returns false\n editedAlice = new PatientBuilder(ALICE).withPhone(VALID_PHONE_BOB).build();\n assertFalse(alice.equals(new CsvAdaptedPatient(editedAlice)));\n\n // different address -> returns false\n editedAlice = new PatientBuilder(ALICE).withAddress(VALID_ADDRESS_BOB).build();\n assertFalse(alice.equals(new CsvAdaptedPatient(editedAlice)));\n\n // different remark -> returns false\n editedAlice = new PatientBuilder(ALICE).withRemark(VALID_REMARK_BOB).build();\n assertFalse(alice.equals(new CsvAdaptedPatient(editedAlice)));\n }", "public void testGetOldValue_Accuracy() {\r\n String oldValue = \"oldValue\";\r\n UnitTestHelper.setPrivateField(AuditDetail.class, auditDetail, \"oldValue\", oldValue);\r\n assertEquals(\"The oldValue value should be got properly.\", oldValue, auditDetail.getOldValue());\r\n }", "@Test\n void testAssertPropertyReflectionEquals_notEqualsDifferentValues() {\n assertFailing(() ->\n assertPropertyReflectionEquals(\"stringProperty\", \"xxxxxx\", testObject)\n );\n }", "public void testResolvedDuplicate() throws Exception\n {\n String json = MAPPER.writeValueAsString(new DupFieldBean2());\n assertEquals(json, a2q(\"{'z':4}\"));\n }", "@Test\n public void testRecordsWithDifferentEndValProduceDifferentHashCodes() throws Exception {\n setRecordFieldValue(otherRecord, \"end\", new Date(otherRecord.getEnd().getTime() + 100));\n int hashcodeA = record.hashCode();\n int hashcodeB = otherRecord.hashCode();\n\n assertThat(hashcodeA == hashcodeB, is(false));\n }", "private void assertEquivalentPair(Set<Pair> result, String s1, String s2) {\n\t\tPair resultPair = filterResult(result, s1, s2);\n\t\tassertFalse(resultPair.isMarked());\n\t}", "@Test\n\tpublic void testEqualsFalso() {\n\t\t\n\t\tassertFalse(contato1.equals(contato2));\n\t}", "public void fieldChanged(Field arg0, int arg1) {\n\t\t\n\t}", "@Test\n public void isSamePerson() {\n assertTrue(ALICE.isSamePerson(ALICE));\n\n // null -> returns false\n assertFalse(ALICE.isSamePerson(null));\n\n // different phone and email -> returns false\n Person editedAlice = new PersonBuilder(ALICE).withPhone(VALID_PHONE_BOB).withEmail(VALID_EMAIL_BOB).build();\n assertFalse(ALICE.isSamePerson(editedAlice));\n\n // different name -> returns false\n editedAlice = new PersonBuilder(ALICE).withName(VALID_NAME_BOB).build();\n assertFalse(ALICE.isSamePerson(editedAlice));\n\n // same name, same phone, different attributes -> returns true\n editedAlice = new PersonBuilder(ALICE).withEmail(VALID_EMAIL_BOB).withAddress(VALID_ADDRESS_BOB)\n .withClientSources(VALID_CLIENTSOURCE_HUSBAND).withNote(VALID_NOTE_DOG).addToArchive().build();\n assertTrue(ALICE.isSamePerson(editedAlice));\n\n // same name, same email, different attributes -> returns true\n editedAlice = new PersonBuilder(ALICE).withPhone(VALID_PHONE_BOB).withAddress(VALID_ADDRESS_BOB)\n .withClientSources(VALID_CLIENTSOURCE_HUSBAND).withNote(VALID_NOTE_DOG).addToArchive().build();\n assertTrue(ALICE.isSamePerson(editedAlice));\n\n // same name, same phone, same email, different attributes -> returns true\n editedAlice = new PersonBuilder(ALICE).withAddress(VALID_ADDRESS_BOB)\n .withClientSources(VALID_CLIENTSOURCE_HUSBAND)\n .withNote(VALID_NOTE_DOG).addToArchive().build();\n assertTrue(ALICE.isSamePerson(editedAlice));\n\n\n // null phone and email test cases start here\n Person aliceWithoutPhone = new PersonBuilder(ALICE).withoutPhone().build();\n Person aliceWithoutEmail = new PersonBuilder(ALICE).withoutEmail().build();\n Person aliceWithoutPhoneAndEmail = new PersonBuilder(ALICE).withoutPhone().withoutEmail().build();\n\n // same name, null phone, null email, different attributes -> returns true\n editedAlice = new PersonBuilder(ALICE).withoutPhone().withoutEmail().withAddress(VALID_ADDRESS_BOB)\n .withClientSources(VALID_CLIENTSOURCE_HUSBAND).withNote(VALID_NOTE_DOG).addToArchive().build();\n assertTrue(aliceWithoutPhoneAndEmail.isSamePerson(editedAlice));\n\n // same name, null phone, null and non-null email -> returns false\n editedAlice = new PersonBuilder(ALICE).withoutPhone().withoutEmail().build();\n assertFalse(aliceWithoutPhone.isSamePerson(editedAlice));\n\n // same name, null phone, same email, different attributes -> returns true\n editedAlice = new PersonBuilder(ALICE).withoutPhone().withAddress(VALID_ADDRESS_BOB)\n .withClientSources(VALID_CLIENTSOURCE_HUSBAND).withNote(VALID_NOTE_DOG).addToArchive().build();\n assertTrue(aliceWithoutPhone.isSamePerson(editedAlice));\n\n // same name, null phone, different email -> returns false\n editedAlice = new PersonBuilder(ALICE).withoutPhone().withEmail(VALID_EMAIL_BOB).build();\n assertFalse(aliceWithoutPhone.isSamePerson(editedAlice));\n\n // same name, null and non-null phone, null email -> returns false\n editedAlice = new PersonBuilder(ALICE).withoutPhone().withoutEmail().build();\n assertFalse(aliceWithoutEmail.isSamePerson(editedAlice));\n\n // same name, null and non-null phone, null and non-null email -> returns false\n editedAlice = new PersonBuilder(ALICE).withoutPhone().withoutEmail().build();\n assertFalse(ALICE.isSamePerson(editedAlice));\n\n // same name, null and non-null phone, same email, different attributes -> returns true\n editedAlice = new PersonBuilder(ALICE).withoutPhone().withAddress(VALID_ADDRESS_BOB)\n .withClientSources(VALID_CLIENTSOURCE_HUSBAND).withNote(VALID_NOTE_DOG).addToArchive().build();\n assertTrue(ALICE.isSamePerson(editedAlice));\n\n // same name, null and non-null phone, different email -> returns false\n editedAlice = new PersonBuilder(ALICE).withoutPhone().withEmail(VALID_EMAIL_BOB).build();\n assertFalse(ALICE.isSamePerson(editedAlice));\n\n // same name, same phone, null email, different attributes -> returns true\n editedAlice = new PersonBuilder(ALICE).withoutEmail().withAddress(VALID_ADDRESS_BOB)\n .withClientSources(VALID_CLIENTSOURCE_HUSBAND).withNote(VALID_NOTE_DOG).addToArchive().build();\n assertTrue(aliceWithoutEmail.isSamePerson(editedAlice));\n\n // same name, same phone, null and non-null email, different attributes -> returns true\n editedAlice = new PersonBuilder(ALICE).withoutEmail().withAddress(VALID_ADDRESS_BOB)\n .withClientSources(VALID_CLIENTSOURCE_HUSBAND).withNote(VALID_NOTE_DOG).addToArchive().build();\n assertTrue(ALICE.isSamePerson(editedAlice));\n\n // same name, different phone, null email -> returns false\n editedAlice = new PersonBuilder(ALICE).withPhone(VALID_PHONE_BOB).withoutEmail().build();\n assertFalse(aliceWithoutEmail.isSamePerson(editedAlice));\n\n // same name, different phone, null and non-null email -> returns false\n editedAlice = new PersonBuilder(ALICE).withPhone(VALID_PHONE_BOB).withoutEmail().build();\n assertFalse(ALICE.isSamePerson(editedAlice));\n\n }", "@Test\n public void cache_diff_type() {\n ClassData a = ValueSerDeGenerator.generate(context(), typeOf(MockDataModel.class));\n ClassData b = ValueSerDeGenerator.generate(context(), typeOf(MockKeyValueModel.class));\n assertThat(b, is(not(cacheOf(a))));\n }", "public void testEquals(PCEPObject object1, PCEPObject object2) {\n \tInteger test1=new Integer(2);\n\t\tobject1.equals(test1);\n \t//Test same object\n \tobject1.equals(object1);\n \t//Test change in parent\n \tobject2.setObjectClass(object1.getObjectClass()+1);\n \tobject1.equals(object2);\n \tobject2.setObjectClass(object1.getObjectClass());\n \t//Test changes in fields\n\t\tList<Field> fieldListNS = new ArrayList<Field>();\n\t\tList<Field> fieldList= Arrays.asList(object1.getClass().getDeclaredFields());\n\t\tfor (Field field : fieldList) {\n\t\t\tfieldListNS.add(field);\n\t\t\tType ty=field.getGenericType();\n\t\t\tif (!java.lang.reflect.Modifier.isStatic(field.getModifiers())) {\n\t\t\t\tif (ty instanceof Class){\n\t\t\t\t\tClass c =(Class)ty;\n\t\t\t\t\tSystem.out.println(\"XXXXXXXXXXXXXXXXXClass name: \"+c.getName()); \n\t\t\t\t\tMethod method;\n\t\t\t\t\tMethod methods;\n\t\t\t\t\tif (c.isPrimitive()){\n\t\t\t\t\ttry {\n\t\t\t\t\t\tif (c.getName().equals(\"boolean\")) {\n\t\t\t\t\t\t\tmethod = object1.getClass().getMethod(\"is\"+field.getName().replaceFirst(field.getName().substring(0, 1), field.getName().substring(0, 1).toUpperCase()));\n\t\t\t\t\t\t\tmethods = object2.getClass().getMethod(\"set\"+field.getName().replaceFirst(field.getName().substring(0, 1), field.getName().substring(0, 1).toUpperCase()),boolean.class);\n\t\t\t\t\t\t\tif (((boolean)method.invoke(object1,null))==true) {\n\t\t\t\t\t\t\t\tmethods.invoke(object2,false);\n\t\t\t\n\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\tmethods.invoke(object2,true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tobject1.equals(object2);\n\t\t\t\t\t\t\tmethods.invoke(object2,(boolean)method.invoke(object1,null));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tmethod = object1.getClass().getMethod(\"get\"+field.getName().replaceFirst(field.getName().substring(0, 1), field.getName().substring(0, 1).toUpperCase()));\n\t\t\t\t\t\t\tmethods = object2.getClass().getMethod(\"set\"+field.getName().replaceFirst(field.getName().substring(0, 1), field.getName().substring(0, 1).toUpperCase()),c);\n\t\t\t\t\t\t\tmethods.invoke(object2,77);\n\t\t\t\t\t\t\tobject1.equals(object2);\n\t\t\t\t\t\t\tmethods.invoke(object2,method.invoke(object1,null));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n \t\n }", "private List<String> rmDupInfo(List<String> fields) {\n Set<String> seen = new HashSet<>();\n List<String> uniqueNonEmptyFields = new ArrayList<>();\n for (String i : fields) {\n if (i.isEmpty() || i.equals(\".\")) {\n continue;\n } else {\n String fieldName = i.split(\"=\")[0];\n if (!seen.contains(fieldName)) {\n uniqueNonEmptyFields.add(i);\n seen.add(fieldName);\n }\n }\n }\n return uniqueNonEmptyFields;\n }", "@Test\n \tpublic void testWithNullValue() {\n \t\tAssert.assertFalse(f1.equals(fnull));\n \t}", "boolean hasSecondField();", "@Override\n public StructFields duplicate() {\n final StructFields newStruct = new StructFields();\n newStruct.fields.putAll(fields.entrySet().stream()\n .map(ent -> new Tuple<>(ent.getKey(), ent.getValue().duplicate()))\n .collect(Collectors.toMap(Tuple::getA, Tuple::getB)));\n return newStruct;\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 }", "@Test\r\n public void ObjectsAreNotTheSame() {\n try_scorers = new Try_Scorers(\"Sharief\",\"Roman\",3,9);\r\n Assert.assertNotSame(try_scorers ,try_scorers.updateGamesPlayed(4),\"The Objects are the same\"); \r\n \r\n }", "@Override\r\n public int compare(Object o1, Object o2){\r\n return ((Record)o1).getField2().compareTo(((Record)o2).getField2());\r\n }", "@Test\n public void testHashCmp() {\n DataType resultType = new VarcharType(CollationName.UTF8MB4_GENERAL_CI);\n SessionProperties sessionProperties = SessionProperties.fromExecutionContext(executionContext);\n\n final int scale = 5;\n DateTimeType dateTimeType = new DateTimeType(scale);\n PartitionField f1 = PartitionFieldBuilder.createField(dateTimeType);\n PartitionField f2 = PartitionFieldBuilder.createField(dateTimeType);\n\n String s1 = \"2020-12-12 23:59:59.33333\";\n String s2 = \"2020-12-12 23:59:59.333329\";\n\n f1.store(s1, resultType, sessionProperties);\n f2.store(s2, resultType, sessionProperties);\n int x = f1.compareTo(f2);\n Assert.assertTrue(x == 0);\n\n long[] tmp1 = {1L, 4L};\n long[] tmp2 = {1L, 4L};\n f1.hash(tmp1);\n f2.hash(tmp2);\n Assert.assertTrue(tmp1[0] == tmp2[0]);\n Assert.assertTrue(tmp1[1] == tmp2[1]);\n }", "@Test\n\tpublic void test_equals2() {\n\tTvShow t1 = new TvShow(\"Sherlock\",\"BBC\");\n\tTvShow t2 = new TvShow(\"NotSherlock\",\"BBC\");\n\tassertFalse(t1.equals(t2));\n }", "public static FieldMatcher equals() {\n return (columnName, recordOneField, recordTwoField) -> recordOneField.equals(recordTwoField);\n }", "@Override\n public boolean isDifferent(FastVector... predictions) {\n if (predictions != null && predictions.length == 2){\n return isDifferent(predictions[0],predictions[1]);\n }\n throw new IllegalArgumentException();\n }", "@Test\n \tpublic void testf1Equalf3() {\n \t\tAssert.assertTrue(f1.equals(f3));\n \t}", "@Test\n public void equals_DifferentTimeRangeStart_Test() {\n Assert.assertFalse(bq1.equals(bq3));\n }", "public void setDiff(){\n diff=true;\n }", "@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 }", "protected boolean haveDependingFields(EventType event1, EventType event2) {\r\n\t\treturn !getCommonFields(event1, event2).isEmpty();\r\n\t}", "@Test\n\tpublic void ifAppropriateAttributesInDifferentMBeansHaveSameValueReturnsThatValue() throws Exception {\n\t\tMBeanWithSingleIntAttr mbean_1 = new MBeanWithSingleIntAttr(1);\n\t\tMBeanWithSingleIntAttr mbean_2 = new MBeanWithSingleIntAttr(1);\n\n\t\tDynamicMBean mbean = createDynamicMBeanFor(mbean_1, mbean_2);\n\n\t\tassertEquals(1, mbean.getAttribute(\"value\"));\n\t}", "@Test(timeout = 4000)\n public void test24() throws Throwable {\n ClassWriter classWriter0 = new ClassWriter(1988);\n FieldVisitor fieldVisitor0 = classWriter0.visitField(2, \"Jk7s?{n+6uj\", \"Jk7s?{n+6uj\", \"Jk7s?{n+6uj\", \"Jk7s?{n+6uj\");\n FieldWriter fieldWriter0 = new FieldWriter(classWriter0, 2, \"Jk7s?{n+6uj\", \"Jk7s?{n+6uj\", \"Jk7s?{n+6uj\", \"Jk7s?{n+6uj\");\n assertFalse(fieldWriter0.equals((Object)fieldVisitor0));\n }", "@Test\n public void equalsOtherTest() {\n Device device2 = new Device(deviceID, \"other\");\n assertNotEquals(device, device2);\n }", "@Test\r\n public void testEquals() throws Exception\r\n {\r\n Object expectedValueToEqual = new Object();\r\n ValueEquals sut = new ValueEquals(\"MyReplaceId\", expectedValueToEqual);\r\n assertEquals(sut.compareDataSetElementTo(expectedValueToEqual), 0);\r\n ;\r\n }", "public static Map<String, Map<Object, Object>> getDiffirentComparisionVal(Device d1, Device d2) throws IllegalArgumentException, IllegalAccessException {\n\t\t\n\t\t//Node root = ObjectDifferBuilder.buildDefault().compare(d1, d2);\n\t\t\t\t\n\t\t//To get Device one property\n\t\tMap <Object, Object> device1Fields = getFields(d1);\n\t\t\n\t\t//To get Device one property\n\t\tMap <Object, Object> device2Fields = getFields(d2);\n\t\t\n\t\t//Map to get Device difference property value\n\t\tMap <Object, Object> DeviceResult1 = new HashMap<>();\n\t\tMap <Object, Object> DeviceResult2 = new HashMap<>();\n\t\t\n Map <String, Map<Object, Object>> deviceComparisonMap = new HashMap<>();\n\t\t device1Fields.forEach((k,v)->{\n\t\t \t \tif(null != v && !device2Fields.get(k).equals(v)){\n\t\t \t\t DeviceResult1.put(k, v);\n\t\t \t DeviceResult2.put(k, device2Fields.get(k));\n\t\t \t}\n\t\t });\n\t\t deviceComparisonMap.put(d1.getCmMacAddress(), DeviceResult1);\n\t\t deviceComparisonMap.put(d2.getCmMacAddress(), DeviceResult2);\n\t\treturn deviceComparisonMap;\n\t\t\n\t}", "public final void testDifferentNameEquals() {\n assertFalse(testTransaction1.equals(testTransaction2)); // pmd doesn't\n // like either\n // way\n }", "@Override\n public List<SDVariable> doDiff(List<SDVariable> f1) {\n List<SDVariable> out = new ArrayList<>();\n for(SDVariable v : args()){\n out.add(sameDiff.zerosLike(v));\n }\n return out;\n }", "@Test\n void compareTo_Identical_AllParts()\n {\n runIsMatchTest(AnswerType.yes, AnswerType.yes, AnswerType.yes, AnswerType.yes, ContactMatchType.Identical);\n }", "public void testOkDupFields() throws Exception\n {\n OkDupFieldBean bean = new OkDupFieldBean(1, 2);\n Map<String,Object> json = writeAndMap(MAPPER, bean);\n assertEquals(2, json.size());\n assertEquals(Integer.valueOf(1), json.get(\"x\"));\n assertEquals(Integer.valueOf(2), json.get(\"y\"));\n }", "@Test\n public void equals() {\n EditExpenseDescriptor descriptorWithSameValues = new EditExpenseDescriptor(DESC_DINNER);\n assertEquals(DESC_DINNER, descriptorWithSameValues);\n\n // same object -> returns true\n assertEquals(DESC_DINNER, DESC_DINNER);\n\n // null -> returns false\n assertNotEquals(null, DESC_DINNER);\n\n // different types -> returns false\n assertNotEquals(5, DESC_DINNER);\n\n // different values -> returns false\n assertNotEquals(DESC_DINNER, DESC_TAXES);\n\n // different name -> returns false\n EditExpenseDescriptor editedDinner = new EditExpenseDescriptorBuilder(DESC_DINNER)\n .withName(VALID_NAME_TAXES).build();\n assertNotEquals(DESC_DINNER, editedDinner);\n\n // different description -> returns false\n editedDinner = new EditExpenseDescriptorBuilder(DESC_DINNER).withDescription(VALID_DESCRIPTION_TAXES).build();\n assertNotEquals(DESC_DINNER, editedDinner);\n\n\n // different amount -> returns false\n editedDinner = new EditExpenseDescriptorBuilder(DESC_DINNER).withAmount(VALID_AMOUNT_TAXES).build();\n assertNotEquals(DESC_DINNER, editedDinner);\n\n // different tags -> returns false\n editedDinner = new EditExpenseDescriptorBuilder(DESC_DINNER).withTags(VALID_TAG_DINNER).build();\n assertNotEquals(DESC_DINNER, editedDinner);\n }", "private List<SuperSetterBasedBuilderField> deduplicateByName(List<SuperSetterBasedBuilderField> fields) {\n List<SuperSetterBasedBuilderField> result = new ArrayList<>();\n for (SuperSetterBasedBuilderField field : fields) {\n if (!alreadyContainsField(result, field)) {\n result.add(field);\n }\n }\n return result;\n }", "public boolean areLinesIdentical(Field[] line1, Field[] line2) {\n\t\tif (line1.length != line2.length) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (int i=0; i<line1.length; i++) {\n\t\t\tField f1 = line1[i];\n\t\t\tField f2 = line2[i];\n\t\t\tboolean ident = f1.isEmpty() || f2.isEmpty() || f1.getSymbol() == f2.getSymbol();\n\t\t\tif (!ident) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public void testCompareDateAndString() {\n\t\tString value = \"2012-05-08\";\r\n FormatDateField dateField = new FormatDateField();\r\n\t\tdateField.setPropertyEditor(new DateTimePropertyEditor(DateUtil.datePattern));\r\n\t\tDate date = DateUtil.convertStringToDate(value.toString());\r\n\t\tassertEquals(false, compareDateAndString(dateField.getPropertyEditor(), date, value));\r\n\t\t\r\n\t\t// 2. Date (value = \"2012-05-09\", date = 2012-05-08)\r\n\t\tvalue = \"2012-05-09\";\r\n\t\tassertEquals(true, compareDateAndString(dateField.getPropertyEditor(), date, value));\r\n\t\t\r\n\t\t// 3. DateTime (value = \"2012-05-08T00:00:00\", date = 2012-05-08T00:00:00)\r\n\t\tvalue = \"2012-05-08T00:00:00\";\r\n\t\tdateField.setPropertyEditor(new DateTimePropertyEditor(DateUtil.formatDateTimePattern));\r\n\t\tdate = DateUtil.convertStringToDate(DateUtil.dateTimePattern,value.toString());\r\n dateField.setValue(date);\r\n\t\tassertEquals(false, compareDateAndString(dateField.getPropertyEditor(), date, value));\r\n\t\t\r\n\t\t// 4. DateTime (value = \"2012-05-09T00:00:00\", date = 2012-05-08T00:00:00)\r\n\t\tvalue = \"2012-05-09T00:00:00\";\r\n\t\tassertEquals(true, compareDateAndString(dateField.getPropertyEditor(), date, value));\r\n\t\t\r\n\t\t// 5. value = date = null;\r\n\t\tassertEquals(false, compareDateAndString(dateField.getPropertyEditor(), null, null));\r\n\t\t\r\n\t\t// 6. value = null, date != null\r\n\t\tassertEquals(true, compareDateAndString(dateField.getPropertyEditor(), date, null));\r\n\t\t\r\n\t\t// 7. value != null, date = null\r\n\t\tassertEquals(true, compareDateAndString(dateField.getPropertyEditor(), null, value));\r\n\t\t\r\n\t}", "@Test\n public void testEquals_differentParameters() {\n CellIdentityNr cellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n CellIdentityNr anotherCellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI + 1,\n ALPHAL, ALPHAS, Collections.emptyList());\n\n // THEN this two objects are different\n assertThat(cellIdentityNr).isNotEqualTo(anotherCellIdentityNr);\n }", "public void testFields()\n {\n TestUtils.testNoAddedFields(getTestedClass(), null);\n }", "private static void assertEqual(ReviewFeedback first, ReviewFeedback other) {\n\t\tassertEquals(\"The result should be correct.\", first.getCreateUser(),\n\t\t\t\tother.getCreateUser());\n\t\tassertEquals(\"The result should be correct.\", first.getProjectId(),\n\t\t\t\tother.getProjectId());\n\t\tassertEquals(\"The result should be correct.\", first.getComment(),\n\t\t\t\tother.getComment());\n\t\tassertEquals(\"The result should be correct.\", first.getId(),\n\t\t\t\tother.getId());\n\t\tassertEquals(\"The result should be correct.\",\n\t\t\t\tfirst.getDetails().size(), other.getDetails().size());\n\t\tComparator<ReviewFeedbackDetail> comparator = new Comparator<ReviewFeedbackDetail>() {\n\t\t\tpublic int compare(ReviewFeedbackDetail o1, ReviewFeedbackDetail o2) {\n\t\t\t\treturn o1.getFeedbackText().hashCode()\n\t\t\t\t\t\t- o2.getFeedbackText().hashCode();\n\t\t\t}\n\t\t};\n\t\tCollections.sort(first.getDetails(), comparator);\n\t\tCollections.sort(other.getDetails(), comparator);\n\t\tfor (int i = 0; i < first.getDetails().size(); i++) {\n\t\t\tassertEquals(\"The result should be correct.\", first.getDetails()\n\t\t\t\t\t.get(i).getReviewerUserId(), other.getDetails().get(i)\n\t\t\t\t\t.getReviewerUserId());\n\t\t\tassertEquals(\"The result should be correct.\", first.getDetails()\n\t\t\t\t\t.get(i).getScore(), other.getDetails().get(i).getScore());\n\t\t\tassertEquals(\"The result should be correct.\", first.getDetails()\n\t\t\t\t\t.get(i).getFeedbackText(), other.getDetails().get(i)\n\t\t\t\t\t.getFeedbackText());\n\t\t}\n\t}", "@Test\n public void equals() {\n UpdateCommand.UpdateProfileDescriptor descriptorWithSameValues = new UpdateCommand\n .UpdateProfileDescriptor(UPDESC_1);\n assertTrue(UPDESC_1.equals(descriptorWithSameValues));\n\n // same object -> returns true\n assertTrue(UPDESC_1.equals(UPDESC_1));\n\n // null -> returns false\n assertFalse(UPDESC_1.equals(null));\n\n // different types -> returns false\n assertFalse(UPDESC_1.equals(5));\n\n // different values -> returns false\n assertFalse(UPDESC_1.equals(UPDESC_2));\n\n // different name -> returns false\n UpdateCommand.UpdateProfileDescriptor editedProfile = new UpdateProfileDescriptorBuilder(UPDESC_1)\n .withName(VALID_NAME_2).build();\n assertFalse(UPDESC_1.equals(editedProfile));\n\n // different id -> returns false\n editedProfile = new UpdateProfileDescriptorBuilder(UPDESC_1).withId(VALID_ID_2).build();\n assertFalse(UPDESC_1.equals(editedProfile));\n\n // different height -> returns false\n editedProfile = new UpdateProfileDescriptorBuilder(UPDESC_1).withHeight(VALID_HEIGHT_2).build();\n assertFalse(UPDESC_1.equals(editedProfile));\n\n // different weight -> returns false\n editedProfile = new UpdateProfileDescriptorBuilder(UPDESC_1).withWeight(VALID_WEIGHT_2).build();\n assertFalse(UPDESC_1.equals(editedProfile));\n }", "private static FieldInfos filterFields(FieldInfos fieldInfos) {\n List<FieldInfo> fieldInfoCopy = new ArrayList<>(fieldInfos.size());\n for (FieldInfo fieldInfo : fieldInfos) {\n fieldInfoCopy.add(\n new FieldInfo(\n fieldInfo.name,\n fieldInfo.number,\n false,\n false,\n false,\n IndexOptions.NONE,\n DocValuesType.NONE,\n -1,\n fieldInfo.attributes(),\n 0,\n 0,\n 0,\n 0,\n fieldInfo.getVectorSimilarityFunction(),\n fieldInfo.isSoftDeletesField()\n )\n );\n }\n FieldInfos newFieldInfos = new FieldInfos(fieldInfoCopy.toArray(new FieldInfo[0]));\n return newFieldInfos;\n }", "@Test\n\tpublic void testEquals4(){\n\t\tTemperature data1 = new Temperature (0, Temperature.Units.CELCIUS);\n\t\tTemperature data2 = new Temperature (0, Temperature.Units.CELCIUS);\n\t\tassertEquals(data1.equals(data2), true);\n\t\tassertTrue(data1.getValue() == 0);\t\t//getValue() should be the same because the unit conversion is not used\n\t\tassertTrue(data2.getValue() == 0);\t\t//getValue() should be the same because the unit conversion is not used\n\n\t}", "@Test(expected=AssertionError.class)\n\tpublic void testPassInvalidFieldToGettersAddress() {\n\t\tbeanTester.testGetterForField(\"invalid\");\n\t}", "protected boolean sameMissingInputAttributes(Instance inst1,\r\n\t\t\tInstance inst2, InstanceAttributes atts) {\r\n\t\tboolean sameMVs = true;\r\n\r\n\t\tfor (int i = 0; i < atts.getInputNumAttributes() && sameMVs; i++) {\r\n\t\t\tif (inst1.getInputMissingValues(i) != inst2\r\n\t\t\t\t\t.getInputMissingValues(i))\r\n\t\t\t\tsameMVs = false;\r\n\t\t}\r\n\r\n\t\treturn sameMVs;\r\n\t}", "@Test\r\n\tpublic void testPortfolioValueUpdate2() {\n\t\tassertTrue(\"Portfolio value must reflect current data\", false);\r\n\t}", "@Override\n\tpublic boolean isField2() {\n\t\treturn _second.isField2();\n\t}", "public boolean equalsInstruction(Instruction other) {\n if (other == this)\n return true;\n if (!(other instanceof FieldInstruction))\n return false;\n if (!super.equalsInstruction(other))\n return false;\n\n FieldInstruction ins = (FieldInstruction) other;\n String s1 = getFieldName();\n String s2 = ins.getFieldName();\n if (!(s1 == null || s2 == null || s1.equals(s2)))\n return false;\n\n s1 = getFieldTypeName();\n s2 = ins.getFieldTypeName();\n if (!(s1 == null || s2 == null || s1.equals(s2)))\n return false;\n\n s1 = getFieldDeclarerName();\n s2 = ins.getFieldDeclarerName();\n if (!(s1 == null || s2 == null || s1.equals(s2)))\n return false;\n return true;\n }" ]
[ "0.6324495", "0.62249374", "0.61573094", "0.6037697", "0.5920086", "0.58888996", "0.58854675", "0.5862201", "0.571179", "0.557898", "0.55456764", "0.54901475", "0.5470912", "0.5446864", "0.5416562", "0.541443", "0.54009604", "0.53601485", "0.53457755", "0.53414506", "0.533648", "0.5334068", "0.53319335", "0.5328248", "0.5311982", "0.53080356", "0.52945924", "0.52766335", "0.52673835", "0.52673835", "0.52673835", "0.52673835", "0.52673835", "0.52673835", "0.52673835", "0.5261844", "0.5251953", "0.52510935", "0.5234038", "0.5233095", "0.5232558", "0.522493", "0.518764", "0.51870984", "0.518408", "0.518115", "0.51665765", "0.5154991", "0.5145905", "0.5127578", "0.5122772", "0.511153", "0.5109431", "0.510342", "0.5101538", "0.5091716", "0.5090598", "0.5086672", "0.50670344", "0.5065487", "0.50579405", "0.5051502", "0.50508136", "0.5050152", "0.50121033", "0.50083125", "0.5004036", "0.49960843", "0.49871033", "0.4985155", "0.4973181", "0.49687862", "0.49600387", "0.49598232", "0.49593166", "0.495892", "0.49582866", "0.49533176", "0.49460462", "0.4945537", "0.49391642", "0.49357507", "0.49349415", "0.49343273", "0.4930999", "0.49298707", "0.49288565", "0.4927106", "0.4920779", "0.49197516", "0.49152315", "0.49135765", "0.49128821", "0.49076346", "0.4905814", "0.49024916", "0.49002194", "0.48857933", "0.48820505", "0.4879329", "0.48790634" ]
0.0
-1
Case 2: One of the field is different but we can configure it to ignore
@Test public void testCompareCase2() throws IOException { Person p1 = DataUtil.readDataFromFile("test/data/case2/case2-person1.json", Person.class); Person p2 = DataUtil.readDataFromFile("test/data/case2/case2-person2.json", Person.class); // Custom context String ageFieldName = FieldUtil.makeFieldName(Person.class, "age"); IContext ctx = ObjectCompare.buildContext().register(FieldFeature.IGNORE_FIELD, ageFieldName); ObjectCompare.compare(p1, p2, ctx); debug(ctx.getDifferences()); Assert.assertFalse(ctx.hasDifferences()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean shouldSkipField(FieldAttributes f) {\n\t\t return f.getName().equals(\"user_id\")\n || f.getName().equals(\"owner\")\n || f.getName().equals(\"recipient\")\n || f.getName().equals(\"isGood\")\n || f.getName().equals(\"reward\");\n\t\t}", "@Override\n\tprotected String[] ignoreFields() {\n\t\treturn null;\n\t}", "public boolean isObjectDifferentiaField(CharField cf) {\n return false;\n }", "@Override\n\tprotected boolean verifyFields() {\n\t\treturn false;\n\t}", "@Test\n public void testAssertObjectChangedPropertyWithIgnoredType() {\n // setup\n final TierTwoTypeWithIgnoreProperty tierTwoTypeWithIgnoreProperty = new TierTwoTypeWithIgnoreProperty(\n new IgnoredType());\n final ChangedProperty<IgnoredType> jokerProperty = Property.change(TierTwoTypeWithIgnoreProperty.IGNORED_TYPE,\n new IgnoredType());\n\n // method\n assertObject(EMPTY_STRING, tierTwoTypeWithIgnoreProperty, jokerProperty);\n }", "boolean isFieldUnitIgnored(final int field) {\n\t\treturn isFieldUnitIgnored(pattern, field);\n\t}", "protected boolean skipBlankValues() {\n return true;\n }", "@Override\n\tpublic boolean shouldSkipField(FieldAttributes classe) {\n\t\t\n\t\tfinal Expose expose = classe.getAnnotation(Expose.class);\n return expose != null && !expose.serialize();\n\t\t\n/*\t\tString className = classe.getDeclaringClass().getName();\n\t\tString fieldName = classe.getName();\n\t\t\n\t\t\t\n\t\t\n\t\treturn \n\t className.equals(Produto.class.getName())\n\t && (fieldName.equals(\"versoes\") || fieldName.equals(\"clientes\"));*/\n\t}", "@Test\n public void testEqualsReturnsFalseOnDifferentIdVal() throws Exception {\n setRecordFieldValue(otherRecord, \"id\", 42L);\n\n boolean equals = record.equals(otherRecord);\n\n assertThat(equals, is(false));\n }", "@Test(expected=AssertionError.class)\n\tpublic void testPassInvalidFieldToGettersAddress() {\n\t\tbeanTester.testGetterForField(\"invalid\");\n\t}", "public void verifyNoMatching(AcProperty e)\n {\n }", "@UsesAdsUtilities({AdsUtility.SELECTOR_BUILDER, AdsUtility.SELECTOR_FIELD})\n SelectorBuilderInterface<SelectorT> notEquals(EntityField field, String propertyValue);", "protected boolean skipNullValues() {\n return true;\n }", "private List<String> getExcludedFields() {\n List<String> temp = new ArrayList<>();\n temp.add(\"_rallyAPIMajor\");\n temp.add(\"_rallyAPIMinor\");\n temp.add(\"_ref\");\n temp.add(\"_refObjectUUID\");\n temp.add(\"_objectVersion\");\n temp.add(\"_refObjectName\");\n temp.add(\"ObjectUUID\");\n temp.add(\"VersionId\");\n temp.add(\"_type\");\n return temp;\n }", "public boolean shouldSkipField(FieldAttributes f) {\n\t\t\treturn f.getName().equals(\"currentPage\") || f.getName().equals(\"pageSize\")\r\n\t\t\t\t\t|| f.getName().equals(\"recordCount\") || f.getName().equals(\"pageCount\")\r\n\t\t\t\t\t|| f.getName().equals(\"beginPageIndex\") || f.getName().equals(\"endPageIndex\");\r\n\t\t}", "@Test\n public void testAudiTrailBadtOperId() {\n new AuditTrailFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissAuditTrail.Builder::setBadtOperId,\n RdaFissAuditTrail::getBadtOperId,\n RdaFissAuditTrail.Fields.badtOperId,\n 9);\n }", "public static FieldMatcher ignoreCase() {\n return (columnName, recordOneField, recordTwoField) -> {\n //we do not want to do a case-insensitive comparison for the key and for case-sensitive columns\n if (!caseSensitiveColumns.contains(columnName) && !columnName.equals(keyColumn)) {\n return recordOneField.equalsIgnoreCase(recordTwoField);\n } else {\n return recordOneField.equals(recordTwoField);\n }\n };\n }", "private void assertNoUnloppedDeweyVol2(String id) \n\t{\n\t solrFldMapTest.assertSolrFldHasNoValue(testFilePath, id, fldName, deweyVol2Shelfkey);\n\t}", "private void defaultCommonTableFieldShouldNotBeFound(String filter) throws Exception {\n restCommonTableFieldMockMvc\n .perform(get(ENTITY_API_URL + \"?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n\n // Check, that the count call also returns 0\n restCommonTableFieldMockMvc\n .perform(get(ENTITY_API_URL + \"/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(content().string(\"0\"));\n }", "protected abstract List<TemporalField> invalidFields();", "public void setIgnore() {\n\t\t\tignore = true;\n\t\t}", "@Test(expected=AssertionError.class)\n\tpublic void testPassInvalidToSettersAddress() {\n\t\tbeanTester.testSetterForField(\"invalid\");\n\t}", "@Override\r\n\tpublic Field[] getExcludedFields() {\n\t\treturn null;\r\n\t}", "@Test\n public void equals_DifferentUserId_Test() {\n Assert.assertFalse(bq1.equals(bq2));\n }", "private void checkNotUnknown() {\n if (isUnknown())\n throw new AnalysisException(\"Unexpected 'unknown' value!\");\n }", "@DefaultMessage(\"Please enter a unique value for this field\")\n @Key(\"gen.fieldUniqueOnlyException\")\n String gen_fieldUniqueOnlyException();", "public void testFailureDueToDups() throws Exception\n {\n try {\n String json = MAPPER.writeValueAsString(new DupFieldBean());\n fail(\"Should not pass, got: \"+json);\n } catch (InvalidDefinitionException e) {\n verifyException(e, \"Multiple fields representing\");\n }\n }", "@Override\n public boolean isDisableMetadataField() {\n return false;\n }", "public void testAssertPropertyReflectionEquals_notEqualsDifferentValues() {\r\n try {\r\n assertPropertyReflectionEquals(\"stringProperty\", \"xxxxxx\", testObject);\r\n fail(\"Expected AssertionFailedError\");\r\n } catch (AssertionFailedError a) {\r\n // expected\r\n }\r\n }", "protected boolean shouldAddProperty(String key) {\n return !key.equals(\"label\") && !key.equals(\"id\");\n }", "private void assertNoUnloppedDeweyVol1(String id) \n\t{\n\t solrFldMapTest.assertSolrFldHasNoValue(testFilePath, id, fldName, deweyVol1Shelfkey);\n\t}", "@UsesAdsUtilities({AdsUtility.SELECTOR_BUILDER})\n SelectorBuilderInterface<SelectorT> notEquals(String field, String propertyValue);", "@Updatable\n @ValidStrings({\"breaching\", \"notBreaching\", \"ignore\", \"missing\"})\n public String getTreatMissingData() {\n if (treatMissingData == null) {\n treatMissingData = \"missing\";\n }\n\n return treatMissingData;\n }", "private void assertNoUnloppedLCVol2(String id) \n\t{\n\t solrFldMapTest.assertSolrFldHasNoValue(testFilePath, id, fldName, lcVol2Shelfkey);\n\t}", "@Test(expected = UnrecognizedPropertyException.class)\n public void failOnFieldDeleted() throws IOException, URISyntaxException, ParseException {\n\n ObjectMapper mapper = new ObjectMapper();\n\n String origJsonDataFile = UserTest.class.getSimpleName() + \"_deletedField.json\";\n String jsonData = ApiTestUtil.readJSONFile(origJsonDataFile);\n\n User u = mapper.readValue(jsonData, User.class);\n assertEquals( Integer.valueOf(56239), u.getId());\n\n String targetJson = mapper.writeValueAsString(u);\n JSONObject json = ApiTestUtil.convertJSONStr2Obj(targetJson);\n JSONObject expectedJson = ApiTestUtil.convertJSONStr2Obj(jsonData);\n\n ApiTestUtil.verifyJson((Map<String, Object>)json, (Map<String, Object>)expectedJson);\n\n }", "private void validatePersistenceFieldAttributes (String className, \n\t\t\t\tString fieldName) throws ModelValidationException\n\t\t\t{\n\t\t\t\tClass fieldType = JavaTypeHelper.getPrimitiveClass(\n\t\t\t\t\tgetModel().getFieldType(className, fieldName));\n\t\t\t\tString keyName = null;\n\n\t\t\t\t// must not be a key field\n\t\t\t\tif (getPersistenceClass(className).getField(fieldName).isKey())\n\t\t\t\t\tkeyName = \"util.validation.version_field_key_field_not_allowed\";//NOI18N\n\t\t\t\telse if (Long.TYPE != fieldType)\t// must be type long\n\t\t\t\t\tkeyName = \"util.validation.version_field_type_not_allowed\";//NOI18N\n\n\t\t\t\tif (keyName != null)\n\t\t\t\t\tthrow constructFieldException(fieldName, keyName);\n\t\t\t}", "private boolean haveTwoObjsSameFields(Class classObjects, Object obj1, Object obj2, ArrayList<String> fieldsToExcludeFromCompare) {\n log.info(\"TEST: comparing two objects of class \"+classObjects.getName());\n if (obj1.getClass() != obj2.getClass()) {\n log.error(\"TEST: The two objects are instances of different classes, thus different\");\n return false;\n }\n\n try {\n PropertyDescriptor[] pds= Introspector.getBeanInfo(classObjects).getPropertyDescriptors();\n for(PropertyDescriptor pd: pds) {\n log.info(pd.getDisplayName());\n String methodName=pd.getReadMethod().getName();\n String fieldName = methodName.substring(3, methodName.length());\n\n if(fieldsToExcludeFromCompare.contains(fieldName)==true) {\n continue;\n }\n\n boolean areEqual=false;\n try {\n Object objReturned1 = pd.getReadMethod().invoke(obj1);\n Object objReturned2 =pd.getReadMethod().invoke(obj2);\n if(objReturned1!=null && objReturned2!=null) {\n areEqual=objReturned1.equals(objReturned2);\n if(objReturned1 instanceof List<?> && ((List) objReturned1).size()>0 && ((List) objReturned1).size()>0 && ((List) objReturned1).get(0) instanceof String) {\n String str1=String.valueOf(objReturned1);\n String str2=String.valueOf(objReturned2);\n areEqual=str1.equals(str2);\n\n }\n }\n else if(objReturned1==null && objReturned2==null) {\n log.info(\"TEST: Field with name \"+fieldName+\" null in both objects.\");\n areEqual=true;\n }\n else {\n //log.info(\"One of two objects is null\");\n //log.info(\"{}\",objReturned1);\n //log.info(\"{}\",objReturned2);\n }\n if(areEqual==false) {\n log.info(\"TEST: field with name \"+fieldName+\" has different values in objects. \");\n return false;\n }\n else{\n log.info(\"TEST: field with name \"+fieldName+\" has same value in both objects. \");\n }\n } catch (IllegalAccessException e) {\n\n e.printStackTrace();\n return false;\n } catch (IllegalArgumentException e) {\n e.printStackTrace();\n return false;\n } catch (InvocationTargetException e) {\n e.printStackTrace();\n return false;\n }\n }\n } catch (IntrospectionException e) {\n e.printStackTrace();\n }\n return true;\n }", "public boolean onFieldChange(int i, Object obj, int i2) {\n return false;\n }", "public boolean onFieldChange(int i, Object obj, int i2) {\n return false;\n }", "public boolean onFieldChange(int i, Object obj, int i2) {\n return false;\n }", "public boolean onFieldChange(int i, Object obj, int i2) {\n return false;\n }", "public boolean onFieldChange(int i, Object obj, int i2) {\n return false;\n }", "public boolean onFieldChange(int i, Object obj, int i2) {\n return false;\n }", "public boolean onFieldChange(int i, Object obj, int i2) {\n return false;\n }", "@Override\n public boolean mapField(Object source, Object destination, Object sourceFieldValue, ClassMap classMap, FieldMap fieldMap) {\n if (isSourceUnsetThriftField(source, fieldMap) && sourceFieldValue != null && ClassUtils.isPrimitiveOrWrapper(sourceFieldValue.getClass())) {\n logger.debug(\"Skipping field \" + fieldMap.getSrcFieldName() + \" since it is unset thrift field and is primitive\");\n return true;\n }\n return false;\n }", "public void testFieldMatchCriteriaEmptyField() {\r\n try {\r\n new FieldMatchCriteria(\" \", \"str\");\r\n fail(\"testFieldMatchCriteriaEmptyField is failure.\");\r\n } catch (IllegalArgumentException iae) {\r\n // pass\r\n } catch (Exception e) {\r\n fail(\"testFieldMatchCriteriaEmptyField is failure.\");\r\n }\r\n }", "public Value setNotDontEnum() {\n checkNotUnknown();\n if (isNotDontEnum())\n return this;\n Value r = new Value(this);\n r.flags &= ~ATTR_DONTENUM_ANY;\n r.flags |= ATTR_NOTDONTENUM;\n return canonicalize(r);\n }", "@Test\n public void noEqualsName() {\n final CourseType courseType1 = new CourseType(\"N\", \"Pic\", 5, 1);\n courseType1.setId(\"ID\");\n courseType1.setCourses(List.of(new Course(\"C1\"), new Course(\"C2\")));\n courseType1.setAllowedDishes(List.of(new Dish(\"D1\"), new Dish(\"D2\")));\n final CourseType courseType2 = new CourseType(\"N2\", \"Pic\", 5, 1);\n courseType2.setId(\"ID\");\n courseType2.setCourses(List.of(new Course(\"C1\"), new Course(\"C2\")));\n courseType2.setAllowedDishes(List.of(new Dish(\"D1\"), new Dish(\"D2\")));\n final CourseType courseTypeNull = new CourseType(null, \"Pic\", 5, 1);\n courseTypeNull.setId(\"ID\");\n courseTypeNull.setCourses(List.of(new Course(\"C1\"), new Course(\"C2\")));\n courseTypeNull.setAllowedDishes(List.of(new Dish(\"D1\"), new Dish(\"D2\")));\n\n assertNotEquals(courseType1, courseType2);\n assertNotEquals(courseType1, courseTypeNull);\n assertNotEquals(courseTypeNull, courseType1);\n }", "@Override\n protected boolean accept(Field f) {\n\t\t return !Collection.class.isAssignableFrom(f.getType()) &&\n\t\t \t\t!List.class.isAssignableFrom(f.getType()) &&\n\t\t \t\t\t\t!BaseEntity.class.isAssignableFrom(f.getType())\n\t\t \t\t\t\t&& acceptToStringField(f);\n\t\t }", "@Test\n public void testEqualsReturnsFalseOnDifferentStartVal() throws Exception {\n setRecordFieldValue(otherRecord, \"start\", null);\n boolean equals = record.equals(otherRecord);\n\n assertThat(equals, is(false));\n\n equals = otherRecord.equals(record);\n\n assertThat(equals, is(false));\n }", "@Test\n public void equals_DifferentDiningHallBitfield_Test() {\n Assert.assertFalse(bq1.equals(bq6));\n Assert.assertFalse(bq1.equals(bq7));\n }", "@Override\n\tpublic void setWrongError() {\n\t\t\n\t}", "static void ignore() {\n }", "private boolean isIgnored(DetailAST ast) {\n final String name = ast.findFirstToken(TokenTypes.IDENT).getText();\n return ignoreNamePattern != null && ignoreNamePattern.matcher(name).matches()\n || \"serialVersionUID\".equals(name);\n }", "boolean checkNoDuplicateFields() {\n\t if (duplicateNames == null | duplicateNames.isEmpty())\n\t return true;\n\t Iterator iter = duplicateNames.iterator();\n\t String names = \"\";\n\t while (iter.hasNext()) {\n\t names = names + iter.next(); \n\t }\n\t cat.error(loc,DUPLICATE_COLUMN_NAMES,new Object[] {names});\n\t return false;\n\t }", "@Test(expected = UnrecognizedPropertyException.class)\n public void failOnFieldRename() throws IOException, URISyntaxException, ParseException {\n\n ObjectMapper mapper = new ObjectMapper();\n\n String origJsonDataFile = UserTest.class.getSimpleName() + \"_desc2.json\";\n String jsonData = ApiTestUtil.readJSONFile(origJsonDataFile);\n\n User u = mapper.readValue(jsonData, User.class);\n assertEquals( Integer.valueOf(56239), u.getId());\n\n String targetJson = mapper.writeValueAsString(u);\n JSONObject json = ApiTestUtil.convertJSONStr2Obj(targetJson);\n JSONObject expectedJson = ApiTestUtil.convertJSONStr2Obj(jsonData);\n\n ApiTestUtil.verifyJson((Map<String, Object>)json, (Map<String, Object>)expectedJson);\n\n }", "public void testMultipleUnknown() throws Exception\n {\n final ProtobufMapper mapper = newObjectMapper();\n\n ThreeField threeField = new ThreeField();\n threeField.setF1(1);\n threeField.setF2(2);\n threeField.setF3(3);\n\n ProtobufSchema schemaWith3 = mapper.generateSchemaFor(ThreeField.class);\n byte[] in = mapper.writer(schemaWith3)\n .writeValueAsBytes(threeField);\n\n ProtobufSchema schemaWith1 = mapper.generateSchemaFor(OneField.class);\n OneField oneField = mapper.readerFor(OneField.class).with(schemaWith1)\n // important: skip through unknown\n .with(JsonParser.Feature.IGNORE_UNDEFINED)\n .readValue(in);\n\n assertEquals(threeField.getF3(), oneField.getF3());\n }", "public void setInvalid();", "@Test\n public void shouldNotBeAbleToInputSpecialCharactersInTradeInValueField() {\n }", "private void assertNoUnloppedLCVol1(String id) \n\t{\n\t solrFldMapTest.assertSolrFldHasNoValue(testFilePath, id, fldName, lcVol1Shelfkey);\n\t}", "private void assertNoLoppedDewey(String id) \n\t{\n\t solrFldMapTest.assertSolrFldHasNoValue(testFilePath, id, fldName, deweyLoppedShelfkey);\n\t}", "@Test\n public void testClaimNonPayInd() {\n new ClaimFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setNonPayInd,\n RdaFissClaim::getNonPayInd,\n RdaFissClaim.Fields.nonPayInd,\n 2);\n }", "public void testTwoFields() throws Exception {\n String key1 = 1 + randomAlphaOfLength(3);\n String key2 = 2 + randomAlphaOfLength(3);\n String key3 = 3 + randomAlphaOfLength(3);\n updateAndCheckSource(0, 1, fields(key1, \"foo\", key2, \"baz\"));\n updateAndCheckSource(0, 1, fields(key1, \"foo\", key2, \"baz\"));\n updateAndCheckSource(1, 2, fields(key1, \"foo\", key2, \"bir\"));\n updateAndCheckSource(1, 2, fields(key1, \"foo\", key2, \"bir\"));\n updateAndCheckSource(2, 3, fields(key1, \"foo\", key2, \"foo\"));\n updateAndCheckSource(3, 4, fields(key1, \"foo\", key2, null));\n updateAndCheckSource(3, 4, fields(key1, \"foo\", key2, null));\n updateAndCheckSource(4, 5, fields(key1, \"foo\", key2, \"foo\"));\n updateAndCheckSource(5, 6, fields(key1, null, key2, \"foo\"));\n updateAndCheckSource(5, 6, fields(key1, null, key2, \"foo\"));\n updateAndCheckSource(6, 7, fields(key1, null, key2, null));\n updateAndCheckSource(6, 7, fields(key1, null, key2, null));\n updateAndCheckSource(7, 8, fields(key1, null, key2, null, key3, null));\n\n assertEquals(5, totalNoopUpdates());\n }", "public void testFields()\n {\n TestUtils.testNoAddedFields(getTestedClass(), null);\n }", "public Value restrictToNonAttributes() {\n Value r = new Value(this);\n r.flags &= ~(PROPERTYDATA | ABSENT | PRESENT_DATA | PRESENT_ACCESSOR);\n return canonicalize(r);\n }", "@Test\n public void equals_differentName() {\n SiteInfo si1 = new SiteInfo(\n Amount.valueOf(12000, SiteInfo.CUBIC_FOOT),\n Amount.valueOf(76, NonSI.FAHRENHEIT),\n Amount.valueOf(92, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n 56,\n Damage.CLASS2,\n Country.USA,\n \"Foo Site\"\n );\n SiteInfo si2 = new SiteInfo(\n Amount.valueOf(12000, SiteInfo.CUBIC_FOOT),\n Amount.valueOf(76, NonSI.FAHRENHEIT),\n Amount.valueOf(92, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n 56,\n Damage.CLASS2,\n Country.USA,\n \"Bar Site\"\n );\n\n Assert.assertNotEquals(si1, si2);\n }", "@Test\n public void equalsOtherTest() {\n Device device2 = new Device(deviceID, \"other\");\n assertNotEquals(device, device2);\n }", "private List<String> rmDupInfo(List<String> fields) {\n Set<String> seen = new HashSet<>();\n List<String> uniqueNonEmptyFields = new ArrayList<>();\n for (String i : fields) {\n if (i.isEmpty() || i.equals(\".\")) {\n continue;\n } else {\n String fieldName = i.split(\"=\")[0];\n if (!seen.contains(fieldName)) {\n uniqueNonEmptyFields.add(i);\n seen.add(fieldName);\n }\n }\n }\n return uniqueNonEmptyFields;\n }", "private void assertNoLoppedLC(String id) \n\t{\n\t solrFldMapTest.assertSolrFldHasNoValue(testFilePath, id, fldName, lcLoppedShelfkey);\n\t}", "@Override\n\t\tprotected void resetAttribute() {\n\t\t\tsuper.resetAttribute();\n\t\t\tmissing = false;\n\t\t\tmalformed = false;\n\t\t}", "public FieldNotFoundException() {\n }", "NOT_OK2(@JsonProperty String key) { this.key = key; }", "@Ignore(\"test in testPGNT0102002, testPGNT0101001, testPGNT0101002\")\n public void testDAM30507001() {\n }", "public void assertNotSelectedValue(final String selectLocator, final String valuePattern);", "@Test\n public void labelIsNotWithInvalidPattern() {\n String[] invalidLabels = StringUtil.INVALID_USERNAME;\n for (String label : invalidLabels) {\n propertyIsNot(label, descriptionS, CodeI18N.FIELD_PATTERN_INCORRECT_USERNAME,\n \"label property does not fulfill the username pattern restrictions\");\n }\n }", "@Test\n public void shouldNotBeAbleToInputSpecialCharactersInAmountOwedOnTradeField() {\n }", "java.lang.String getField1216();", "@Test\n public void testAudiTrailBadtReas() {\n new AuditTrailFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissAuditTrail.Builder::setBadtReas,\n RdaFissAuditTrail::getBadtReas,\n RdaFissAuditTrail.Fields.badtReas,\n 5);\n }", "private void defaultAttributeShouldNotBeFound(String filter) throws Exception {\n restAttributeMockMvc.perform(get(\"/api/attributes?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n }", "@Ignore //DKH\n @Test\n public void testMakePersistentRecursesThroughReferenceFieldsSkippingNonPersistentFields() {\n }", "public Value setNotDontDelete() {\n checkNotUnknown();\n if (isNotDontDelete())\n return this;\n Value r = new Value(this);\n r.flags &= ~ATTR_DONTDELETE_ANY;\n r.flags |= ATTR_NOTDONTDELETE;\n return canonicalize(r);\n }", "@Override\r\n protected Object[] getFieldValues ()\r\n {\n return null;\r\n }", "public void setExcludedPattern(String excludedPattern)\n/* */ {\n/* 101 */ setExcludedPatterns(new String[] { excludedPattern });\n/* */ }", "private void assertDeweyVol1NotLopped(String id) \n\t{\n\t solrFldMapTest.assertSolrFldValue(testFilePath, id, fldName, deweyVol1Shelfkey);\n\t}", "public void reportIrreversibleChange() {\r\n Assert.isTrue(isReceiving());\r\n irreversibleChangeReported = true;\r\n }", "@Override\n public boolean isDisableIdentifierField() {\n return false;\n }", "@DefaultMessage(\"A record with this value already exists. Please enter a unique value for this field\")\n @Key(\"gen.fieldUniqueException\")\n String gen_fieldUniqueException();", "public void setIgnored(Boolean ignored) {\n this.ignored = ignored;\n }", "@Test\n public void noEqualsID() {\n final CourseType courseType1 = new CourseType(\"N\", \"Pic\", 5, 1);\n courseType1.setId(\"ID\");\n courseType1.setCourses(List.of(new Course(\"C1\"), new Course(\"C2\")));\n courseType1.setAllowedDishes(List.of(new Dish(\"D1\"), new Dish(\"D2\")));\n final CourseType courseType2 = new CourseType(\"N\", \"Pic\", 5, 1);\n courseType2.setId(\"ID2\");\n courseType2.setCourses(List.of(new Course(\"C1\"), new Course(\"C2\")));\n courseType2.setAllowedDishes(List.of(new Dish(\"D1\"), new Dish(\"D2\")));\n final CourseType courseTypeNull = new CourseType(\"N\", \"Pic\", 5, 1);\n courseTypeNull.setId(null);\n courseTypeNull.setCourses(List.of(new Course(\"C1\"), new Course(\"C2\")));\n courseTypeNull.setAllowedDishes(List.of(new Dish(\"D1\"), new Dish(\"D2\")));\n\n assertNotEquals(courseType1, courseType2);\n assertNotEquals(courseType1, courseTypeNull);\n assertNotEquals(courseTypeNull, courseType1);\n }", "public static boolean avoidSpecialCharsInFieldNames() {\n\t\treturn PROP_SEP_LEN > 1;\n\t}", "boolean getNddSkipValidateB(Record inputRecord);", "@Test\n public void noEqualsPicture() {\n final CourseType courseType1 = new CourseType(\"N\", \"Pic\", 5, 1);\n courseType1.setId(\"ID\");\n courseType1.setCourses(List.of(new Course(\"C1\"), new Course(\"C2\")));\n courseType1.setAllowedDishes(List.of(new Dish(\"D1\"), new Dish(\"D2\")));\n final CourseType courseType2 = new CourseType(\"N\", \"Pic2\", 5, 1);\n courseType2.setId(\"ID\");\n courseType2.setCourses(List.of(new Course(\"C1\"), new Course(\"C2\")));\n courseType2.setAllowedDishes(List.of(new Dish(\"D1\"), new Dish(\"D2\")));\n final CourseType courseTypeNull = new CourseType(\"N\", null, 5, 1);\n courseTypeNull.setId(\"ID\");\n courseTypeNull.setCourses(List.of(new Course(\"C1\"), new Course(\"C2\")));\n courseTypeNull.setAllowedDishes(List.of(new Dish(\"D1\"), new Dish(\"D2\")));\n\n assertNotEquals(courseType1, courseType2);\n assertNotEquals(courseType1, courseTypeNull);\n assertNotEquals(courseTypeNull, courseType1);\n }", "boolean hasSecondField();", "private void assertLCVol2NotLopped(String id) \n\t{\n\t solrFldMapTest.assertSolrFldValue(testFilePath, id, fldName, lcVol2Shelfkey);\n\t}", "public FieldNotFoundException(String msg) {\n super(msg);\n }", "@Test\n public void testRecordsWithDifferentIDsProduceDifferentHashCodes() throws Exception {\n setRecordFieldValue(otherRecord, \"id\", 42L);\n int hashcodeA = record.hashCode();\n int hashcodeB = otherRecord.hashCode();\n\n assertThat(hashcodeA == hashcodeB, is(false));\n }", "protected boolean acceptToStringField(Field f)\n\t{\n\t\treturn true;\n\t}", "static void warnIfNotExpectedResponse(String actual,String expected) {\n if(!actual.equals(expected)) {\n warn(\"Unexpected response from Solr: '\" + actual + \"', expected '\" + expected + \"'\");\n }\n }", "@Test\n public void testDiagnosisCodeDiagCd2() {\n new DiagnosisCodeFieldTester(false)\n .verifyStringFieldCopiedCorrectlyEmptyOK(\n FissDiagnosisCode.Builder::setDiagCd2,\n RdaFissDiagnosisCode::getDiagCd2,\n RdaFissDiagnosisCode.Fields.diagCd2,\n 7);\n }", "@SuppressWarnings(\"unused\")\r\n // used by JunitParams\r\n private\r\n Object[] badTweets() {\n return $($((String) null), $(TestDataReader.getString(\"NonJson1\")), $(\"\"),\r\n $(TestDataReader.getString(\"NonJson2\")),\r\n $(TestDataReader.getString(\"NoCreateDate\")),\r\n $(TestDataReader.getString(\"NoId\")),\r\n $(TestDataReader.getString(\"NoText\")));\r\n\r\n }", "java.lang.String getField1025();" ]
[ "0.6514285", "0.6489749", "0.62608665", "0.59728146", "0.5733222", "0.56926864", "0.5692624", "0.5645839", "0.5624558", "0.560184", "0.54798234", "0.54720175", "0.5471452", "0.5459604", "0.5373047", "0.53618854", "0.53553754", "0.53493667", "0.5339831", "0.53317565", "0.53115755", "0.5299129", "0.52946776", "0.52944916", "0.528146", "0.5275593", "0.5268907", "0.52661747", "0.5245884", "0.5243051", "0.5240641", "0.52354026", "0.5227481", "0.52230024", "0.5220178", "0.5203835", "0.5202021", "0.5185856", "0.5185856", "0.5185856", "0.5185856", "0.5185856", "0.5185856", "0.5185856", "0.5183839", "0.51824915", "0.51746845", "0.51661247", "0.51660055", "0.51588744", "0.5156158", "0.51538116", "0.51423067", "0.51388884", "0.5136981", "0.51193297", "0.5110267", "0.5106467", "0.5103058", "0.509067", "0.5076872", "0.50746495", "0.5073667", "0.50687295", "0.50675476", "0.50668186", "0.5061494", "0.5055483", "0.5054225", "0.50528425", "0.50518316", "0.50439274", "0.504197", "0.5041653", "0.50406355", "0.50382364", "0.50377786", "0.5035933", "0.5032162", "0.50316304", "0.50278187", "0.50238544", "0.502098", "0.5020694", "0.50196266", "0.50113684", "0.499444", "0.498568", "0.498531", "0.49779856", "0.49727106", "0.49676627", "0.49639434", "0.49508965", "0.49482882", "0.4947713", "0.49418902", "0.49374032", "0.49370018", "0.49324864", "0.4932471" ]
0.0
-1
Case 3: Nested collection is compared. Collection is not in a order, but entities are identical.
@Test public void testCompareCase3() throws IOException { Person p1 = DataUtil.readDataFromFile("test/data/case3/case3-person1.json", Person.class); Person p2 = DataUtil.readDataFromFile("test/data/case3/case3-person2.json", Person.class); // Custom context IContext ctx = ObjectCompare.compare(p1, p2); debug(ctx.getDifferences()); Assert.assertFalse(ctx.hasDifferences()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean compareObjects(Object object1, Object object2, AbstractSession session) {\n Object firstCollection = getRealCollectionAttributeValueFromObject(object1, session);\n Object secondCollection = getRealCollectionAttributeValueFromObject(object2, session);\n ContainerPolicy containerPolicy = getContainerPolicy();\n\n if (containerPolicy.sizeFor(firstCollection) != containerPolicy.sizeFor(secondCollection)) {\n return false;\n }\n\n if (containerPolicy.sizeFor(firstCollection) == 0) {\n return true;\n }\n Object iterFirst = containerPolicy.iteratorFor(firstCollection);\n Object iterSecond = containerPolicy.iteratorFor(secondCollection);\n\n //loop through the elements in both collections and compare elements at the\n //same index. This ensures that a change to order registers as a change.\n while (containerPolicy.hasNext(iterFirst)) {\n //fetch the next object from the first iterator.\n Object firstAggregateObject = containerPolicy.next(iterFirst, session);\n Object secondAggregateObject = containerPolicy.next(iterSecond, session);\n\n //fetch the next object from the second iterator.\n //matched object found, break to outer FOR loop\t\t\t\n if (!getReferenceDescriptor().getObjectBuilder().compareObjects(firstAggregateObject, secondAggregateObject, session)) {\n return false;\n }\n }\n return true;\n }", "@Test\n public void testAddAll_int_Collection_Order() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(1, 2, 3);\n instance.addAll(1, c);\n\n List expResult = Arrays.asList(3, 1, 2, 3, 2);\n\n for (int i = 0; i < expResult.size(); i++) {\n assertEquals(expResult.get(i), instance.get(i));\n }\n }", "public void testEquals() {\n TaskSeries s1 = new TaskSeries(\"S\");\n s1.add(new Task(\"T1\", new Date(1), new Date(2)));\n s1.add(new Task(\"T2\", new Date(11), new Date(22)));\n TaskSeries s2 = new TaskSeries(\"S\");\n s2.add(new Task(\"T1\", new Date(1), new Date(2)));\n s2.add(new Task(\"T2\", new Date(11), new Date(22)));\n TaskSeriesCollection c1 = new TaskSeriesCollection();\n c1.add(s1);\n c1.add(s2);\n TaskSeries s1b = new TaskSeries(\"S\");\n s1b.add(new Task(\"T1\", new Date(1), new Date(2)));\n s1b.add(new Task(\"T2\", new Date(11), new Date(22)));\n TaskSeries s2b = new TaskSeries(\"S\");\n s2b.add(new Task(\"T1\", new Date(1), new Date(2)));\n s2b.add(new Task(\"T2\", new Date(11), new Date(22)));\n TaskSeriesCollection c2 = new TaskSeriesCollection();\n c2.add(s1b);\n c2.add(s2b);\n }", "Collection<? extends Object> getSameAs();", "@Test\n public void testSet_Order_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n Collection c = Arrays.asList(1, 1, 7, 1, 1, 1, 1);\n instance.addAll(c);\n\n instance.set(2, 9);\n\n List<Integer> expResult = Arrays.asList(1, 1, 9, 1, 1, 1, 1);\n\n assertTrue(isEqual(expResult, instance));\n\n }", "@Test\n public void testAddAll_int_Collection_Order_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(1, 2, 3);\n instance.addAll(1, c);\n\n List expResult = Arrays.asList(3, 1, 2, 3, 2, 3, 2, 3, 2);\n\n for (int i = 0; i < expResult.size(); i++) {\n assertEquals(expResult.get(i), instance.get(i));\n }\n }", "@Test\n public void testEquals_Overflow() throws Exception {\n\n File file = File.createTempFile(\"oasis-collection-test-persistence\", \"\");\n file.mkdirs();\n file.deleteOnExit();\n\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n instance.addAll(c);\n\n SegmentedOasisList<Integer> readInstance;\n\n try (ObjectOutputStream outObjStream = new ObjectOutputStream(new FileOutputStream(file))) {\n outObjStream.writeObject(instance);\n }\n\n try (ObjectInputStream inObjStream = new ObjectInputStream(new FileInputStream(file))) {\n readInstance = (SegmentedOasisList<Integer>) inObjStream.readObject();\n }\n\n assertEquals(instance, readInstance);\n\n }", "@Test\n public void testSet_Order() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 1, 1, 1, 1);\n instance.addAll(c);\n\n instance.set(2, 9);\n\n List<Integer> expResult = Arrays.asList(1, 1, 9, 1, 1, 1, 1);\n\n assertTrue(isEqual(expResult, instance));\n\n }", "@Test\n public void testEquals() throws Exception {\n\n File file = File.createTempFile(\"oasis-collection-test-persistence\", \"\");\n file.mkdirs();\n file.deleteOnExit();\n\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n instance.addAll(c);\n\n SegmentedOasisList<Integer> readInstance;\n\n try (ObjectOutputStream outObjStream = new ObjectOutputStream(new FileOutputStream(file))) {\n outObjStream.writeObject(instance);\n }\n\n try (ObjectInputStream inObjStream = new ObjectInputStream(new FileInputStream(file))) {\n readInstance = (SegmentedOasisList<Integer>) inObjStream.readObject();\n }\n\n assertEquals(instance, readInstance);\n\n }", "public static boolean equalsUnordered( Collection<?> collection1, Collection<?> collection2 )\r\n {\r\n //\r\n boolean retval = collection1.size() == collection2.size();\r\n \r\n //\r\n for ( Object iObject : collection1 )\r\n {\r\n retval &= collection2.contains( iObject );\r\n }\r\n \r\n //\r\n return retval;\r\n }", "public void testTypedCollection()\r\n\t{\r\n broker.beginTransaction();\r\n for (int i = 1; i < 4; i++)\r\n {\r\n ProductGroupWithTypedCollection example = new ProductGroupWithTypedCollection();\r\n example.setId(i);\r\n ProductGroupWithTypedCollection group =\r\n (ProductGroupWithTypedCollection) broker.getObjectByQuery(\r\n new QueryByIdentity(example));\r\n assertEquals(\"should be equal\", i, group.getId());\r\n //System.out.println(group + \"\\n\\n\");\r\n\r\n broker.delete(group);\r\n broker.store(group);\r\n }\r\n broker.commitTransaction();\r\n\t}", "@Test\n public void testAdd_int_GenericType_Order_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n Collection c = Arrays.asList(1, 1, 7, 1, 1, 1, 1);\n instance.addAll(c);\n\n instance.add(2, 9);\n List<Integer> expResult = Arrays.asList(1, 1, 9, 7, 1, 1, 1, 1);\n\n assertTrue(isEqual(expResult, instance));\n }", "@Test\n public void testRetainAll_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(3);\n instance.add(2);\n instance.add(1);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(2, 3);\n boolean expectedResult = true;\n boolean result = instance.retainAll(c);\n\n assertEquals(expectedResult, result);\n\n }", "private static boolean compareList(List<Object> l1, List<Object> l2)\n {\n int count=0;\n for (Object o : l1)\n {\n Object temp = o;\n for (Object otemp : l2)\n {\n if (EqualsBuilder.reflectionEquals(temp, otemp))\n {\n count++;\n }\n }\n\n }\n\n if(count == l1.size()) return true;\n return false;\n\n }", "@Test\n public void testRetainAll() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n instance.add(1);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(2, 3);\n boolean expectedResult = true;\n boolean result = instance.retainAll(c);\n\n assertEquals(expectedResult, result);\n }", "@Test\n public void equalsTest() {\n prepareEntitiesForEqualityTest();\n\n assertEquals(entity0, entity1);\n }", "@Test\n public void testItem_Ordering() {\n OasisList<Integer> baseList = new SegmentedOasisList<>(2, 2);\n\n List<Integer> expResult = Arrays.asList(1, 2, 6, 8);\n baseList.addAll(expResult);\n\n for (int i = 0; i < expResult.size(); i++) {\n assertEquals(expResult.get(i), baseList.get(i));\n }\n }", "@Test\n public void testAdd_int_GenericType_Order() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 1, 1, 1, 1);\n instance.addAll(c);\n\n instance.add(2, 9);\n List<Integer> expResult = Arrays.asList(1, 1, 9, 7, 1, 1, 1, 1);\n\n assertTrue(isEqual(expResult, instance));\n }", "@Test\n public void testSubList_SubList_Item_Added() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n instance.addAll(c);\n\n List<Integer> result = (SegmentedOasisList<Integer>) instance.subList(1, 4);\n result.add(8);\n\n List<Integer> expResult = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n\n assertTrue(isEqual(expResult, instance));\n\n }", "@Test\n public void testRemove_int_Order_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n Collection c = Arrays.asList(1, 1, 7, 1, 1, 1, 1);\n instance.addAll(c);\n\n instance.remove(2);\n\n List<Integer> expResult = Arrays.asList(1, 1, 1, 1, 1, 1);\n\n assertTrue(isEqual(expResult, instance));\n\n }", "@Override\n public boolean areItemsTheSame(Concert oldConcert, Concert newConcert) {\n return oldConcert.getId() == newConcert.getId();\n }", "static void assertEqualContents(Collection<?> expected, Collection<?> provided) {\n assertEquals(expected.size(), provided.size());\n assertEquals(new HashSet<>(expected), new HashSet<>(provided));\n }", "@Test\n public void testRemove_int_Order() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 1, 1, 1, 1);\n instance.addAll(c);\n\n instance.remove(2);\n\n List<Integer> expResult = Arrays.asList(1, 1, 1, 1, 1, 1);\n\n assertTrue(isEqual(expResult, instance));\n\n }", "@Test\n public void test1POJOWriteWithTransCollection() throws KeyManagementException, NoSuchAlgorithmException, Exception {\n PojoRepository<Artifact, Long> products = client.newPojoRepository(Artifact.class, Long.class);\n // Load more than 110 objects into different collections\n Transaction t = client.openTransaction();\n try {\n for (int i = 112; i < 222; i++) {\n if (i % 2 == 0) {\n products.write(this.getArtifact(i), t, \"even\", \"numbers\");\n }\n else {\n products.write(this.getArtifact(i), t, \"odd\", \"numbers\");\n }\n }\n } catch (Exception e) {\n throw e;\n } finally {\n t.commit();\n }\n assertEquals(\"Total number of object recods\", 110, products.count(\"numbers\"));\n assertEquals(\"Collection even count\", 55, products.count(\"even\"));\n assertEquals(\"Collection odd count\", 55, products.count(\"odd\"));\n for (long i = 112; i < 222; i++) {\n // validate all the records inserted are readable\n assertTrue(\"Product id \" + i + \" does not exist\", products.exists(i));\n this.validateArtifact(products.read(i));\n }\n Transaction t2 = client.openTransaction();\n try {\n Long[] ids = { (long) 112, (long) 113 };\n products.delete(ids, t2);\n assertFalse(\"Product id 112 exists ?\", products.exists((long) 112, t2));\n // assertTrue(\"Product id 112 exists ?\",products.exists((long)112));\n products.deleteAll(t2);\n for (long i = 112; i < 222; i++) {\n assertFalse(\"Product id \" + i + \" exists ?\", products.exists(i, t2));\n // assertTrue(\"Product id \"+i+\" exists ?\",products.exists(i));\n }\n } catch (Exception e) {\n throw e;\n } finally {\n t2.commit();\n }\n // see any document exists\n for (long i = 112; i < 222; i++) {\n assertFalse(\"Product id \" + i + \" exists ?\", products.exists(i));\n }\n // see if it complains when there are no records\n products.delete((long) 112);\n products.deleteAll();\n }", "@Test\n public void testAddAll_Collection_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(3);\n instance.add(2);\n instance.add(2);\n\n Collection c = Arrays.asList(1, 2, 3);\n\n boolean expResult = true;\n boolean result = instance.addAll(c);\n assertEquals(expResult, result);\n\n }", "@Test\n public void testSubList_SubList_Item_Update_idempotent() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n instance.addAll(c);\n\n List<Integer> expResult = Arrays.asList(1, 7, 7);\n SegmentedOasisList<Integer> result = (SegmentedOasisList<Integer>) instance.subList(1, 4);\n\n instance.set(3, 8);\n\n assertTrue(isEqual(expResult, result));\n\n }", "@Test\n public void testPersistence_Elements_Overflow() throws Exception {\n\n File file = File.createTempFile(\"oasis-collection-test-persistence\", \"\");\n file.mkdirs();\n file.deleteOnExit();\n\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n instance.addAll(c);\n\n SegmentedOasisList<Integer> readInstance;\n\n try (ObjectOutputStream outObjStream = new ObjectOutputStream(new FileOutputStream(file))) {\n outObjStream.writeObject(instance);\n }\n\n try (ObjectInputStream inObjStream = new ObjectInputStream(new FileInputStream(file))) {\n readInstance = (SegmentedOasisList<Integer>) inObjStream.readObject();\n }\n\n assertEquals(instance, readInstance);\n\n }", "public static boolean isEqualSet(Collection set1, Collection set2) {\n/* 99 */ if (set1 == set2) {\n/* 100 */ return true;\n/* */ }\n/* 102 */ if (set1 == null || set2 == null || set1.size() != set2.size()) {\n/* 103 */ return false;\n/* */ }\n/* */ \n/* 106 */ return set1.containsAll(set2);\n/* */ }", "@SuppressWarnings(\"resource\")\n @Test\n public void testEquals() {\n try {\n SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions1 = new SubtenantPolicyGroupListOptions(Integer.valueOf(-51),\n Long.valueOf(105),\n Order.getDefault(),\n \"efc9e20d-db05-4f2f-b41f-016029d4faff\",\n null,\n null);\n SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions2 = new SubtenantPolicyGroupListOptions(Integer.valueOf(-51),\n Long.valueOf(105),\n Order.getDefault(),\n \"efc9e20d-db05-4f2f-b41f-016029d4faff\",\n null,\n null);\n SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions3 = new SubtenantPolicyGroupListOptions(Integer.valueOf(101),\n Long.valueOf(87),\n Order.getDefault(),\n \"99c3b952-8e9d-4dd1-9075-8be04a5e58e8\",\n null,\n null);\n assertNotNull(subtenantpolicygrouplistoptions1);\n assertNotNull(subtenantpolicygrouplistoptions2);\n assertNotNull(subtenantpolicygrouplistoptions3);\n assertNotSame(subtenantpolicygrouplistoptions2, subtenantpolicygrouplistoptions1);\n assertNotSame(subtenantpolicygrouplistoptions3, subtenantpolicygrouplistoptions1);\n assertEquals(subtenantpolicygrouplistoptions2, subtenantpolicygrouplistoptions1);\n assertEquals(subtenantpolicygrouplistoptions2, subtenantpolicygrouplistoptions1);\n assertEquals(subtenantpolicygrouplistoptions1, subtenantpolicygrouplistoptions2);\n assertEquals(subtenantpolicygrouplistoptions1, subtenantpolicygrouplistoptions1);\n assertFalse(subtenantpolicygrouplistoptions1.equals(null));\n assertNotEquals(subtenantpolicygrouplistoptions3, subtenantpolicygrouplistoptions1);\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }", "@Test\n\tpublic void testAddLinkInvalidSameLinkTwiceArrayList() {\n\t\tAddress adr = new Address();\n\t\tPerson martin = new Person(\"\\\"Martin\\\" \\\"Bl�mel\\\" \\\"19641014\\\"\");\n\t\tTypePropertyCollection proptype = (TypePropertyCollection) adr.getProperty(\"inhabitants\").getType();\n\t\tClass<?> colClassBefore = proptype.getCollectionClass();\n\t\ttry {\n\t\t\tproptype.setCollectionClass(ArrayList.class);\n\t\t\tAssert.assertSame(ArrayList.class, proptype.getCollectionClass());\n\t\t\tAssert.assertNull(adr.getInhabitants());\n\t\t\tAssert.assertNull(martin.getAddress());\n\n\t\t\t// add the same Person to the Address as inhabitant twice\n\t\t\tadr.addInhabitant(martin);\n\t\t\ttry {\n\t\t\t\t// should Assert.fail because of the association end with\n\t\t\t\t// multiplicity\n\t\t\t\t// 1\n\t\t\t\tadr.addInhabitant(martin);\n\t\t\t\tAssert.fail(\"expected ValidationException exception\");\n\t\t\t} catch (ValidationException e) {\n\t\t\t\tAssert.assertTrue(true);\n\t\t\t}\n\t\t} finally {\n\t\t\tproptype.setCollectionClass(colClassBefore);\n\t\t}\n\t}", "public void testPersistence() {\n ImmutableSet<Integer> set = new ImmutableSet();\n for (int i = -50; i < 51; i++) {\n set.add(i);\n assertTrue(set.current != set.pastVersions.get(set.pastVersions.size()-1));\n }\n for(int i = -50; i < 51; i++) {\n set.remove(i);\n assertTrue(set.current != set.pastVersions.get(set.pastVersions.size()-1));\n }\n }", "@Override\n\t\tpublic int compare(final Collection<?> first, final Collection<?> second)\n\t\t{\n\t\t\tif( first.size() < second.size() )\n\t\t\t\treturn -1;\n\t\t\telse if( first.size() > second.size() )\n\t\t\t\treturn 1;\n\t\t\treturn 0;\n\t\t}", "@Test\n @DependsOnMethod(\"testShallowCopy\")\n public void testEquals() {\n Citation citation = HardCodedCitations.EPSG;\n final PropertyAccessor accessor = createPropertyAccessor();\n assertFalse(accessor.equals(citation, HardCodedCitations.GEOTIFF, ComparisonMode.STRICT));\n assertTrue (accessor.equals(citation, HardCodedCitations.EPSG, ComparisonMode.STRICT));\n /*\n * Same test than above, but on a copy of the EPSG constant.\n */\n citation = new DefaultCitation();\n assertTrue (accessor.shallowCopy(HardCodedCitations.EPSG, citation));\n assertFalse(accessor.equals(citation, HardCodedCitations.GEOTIFF, ComparisonMode.STRICT));\n assertTrue (accessor.equals(citation, HardCodedCitations.EPSG, ComparisonMode.STRICT));\n /*\n * Identifiers shall be stored in different collection instances with equal content.\n */\n final int index = accessor.indexOf(\"identifiers\", true);\n final Object source = accessor.get(index, HardCodedCitations.EPSG);\n final Object target = accessor.get(index, citation);\n assertInstanceOf(\"identifiers\", Collection.class, source);\n assertInstanceOf(\"identifiers\", Collection.class, target);\n// assertNotSame(source, target); // TODO: require non-empty collection.\n assertEquals (source, target);\n HardCodedCitations.assertIdentifiersForEPSG((Collection<?>) source);\n HardCodedCitations.assertIdentifiersForEPSG((Collection<?>) target);\n /*\n * Set the identifiers to null, which should clear the collection.\n */\n// TODO assertEquals(\"Expected the previous value.\", source, accessor.set(index, citation, null, true));\n final Object value = accessor.get(index, citation);\n assertNotNull(\"Should have replaced null by an empty collection.\", value);\n assertTrue(\"Should have replaced null by an empty collection.\", ((Collection<?>) value).isEmpty());\n }", "public static void main(String[] args) {\n\t\tCollection c=new ArrayList();\n\t\t\n\t\tc.add(23);\n\t\tc.add(34);\n\t\t\n\t\tCollection c1=new ArrayList();\n\t\t\n\tc1.add(45);\n\tc1.add(67);\n\t\n\tc.addAll(c1);\n\tSystem.out.println(c);\n\t\n\t\n\tCollection c2=new ArrayList();\n\tc2.add(12);\n\tc2.add(23);\n\tc2.add(25);\n\t\n\tCollection c3=new ArrayList();\n\tc3.add(34);\n\tc3.add(45);\n\tc3.add(25);\n\tc3.add(25);\n\t\n\tc2.addAll(c3);\n\t\n\tSystem.out.println(c2);\n\tSystem.out.println(\"-------------------\");\n\t\n\t\n\tc2.removeAll(c3);\n\tSystem.out.println(c2);\n\t\n\tSystem.out.println(\"-------------------\");\n\tCollection c4=new ArrayList();\n\tc4.add(25);\n\tc4.add(23);\n\tc4.add(86);\n\tc4.add(98);\n\t\n\t\n\t\n\tCollection c5=new ArrayList();\n\tc5.add(25);\n\tc5.add(23);\n\tc5.add(12);\n\tc5.add(13);\n\t\n\tc4.retainAll(c5);\n\tSystem.out.println(c4);\n\t\n\tSystem.out.println(\"-------------------\");\n\t\n\tCollection c6=new ArrayList();\n\tc6.add(12);\n\tc6.add(23);\n\t\n\tObject a[]= c6.toArray();\n\tfor(int i=0;i < a.length ; i++)\n\t{\n\t\tSystem.out.println(a[i]);\n\t}\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\tc4.clear();\n\tSystem.out.println(c4);\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t}", "@Test\n public void testIsSubSet() {\n System.out.println(\"isSubSet\");\n ArrayList<Integer> arr1 = new ArrayList<>();\n arr1.add(12);\n arr1.add(10);\n arr1.add(23);\n ArrayList<Integer> arr2 = new ArrayList<>();\n arr2.add(10);\n arr2.add(23);\n Collections.sort(arr1);\n ArrayListRecursive instance = new ArrayListRecursive(arr1, arr2);\n boolean expResult = true;\n boolean result = instance.isSubSet();\n assertEquals(expResult, result);\n }", "@Test\r\n public void testToJsonCollection() {\r\n System.out.println(\"testToJsonCollection()\");\r\n Relation instance = new Relation(\"singer\", Relation.OUT);\r\n String actualResult = \"\";\r\n String result = instance.toJsonCollection();\r\n assertNotSame(result, actualResult);\r\n }", "@Test\n\tpublic void testAddLinkOkMultNtoNArrayList() {\n\t\t// configure collection properties of Location and ClosingPeriod\n\t\t// to use TreeSet as collection implementing class\n\t\t((TypePropertyCollection) (new Location()).getProperty(\"closedons\").getType())\n\t\t\t\t.setCollectionClass(ArrayList.class);\n\t\t((TypePropertyCollection) (new ClosingPeriod()).getProperty(\"locations\").getType())\n\t\t\t\t.setCollectionClass(ArrayList.class);\n\t\ttstNMAssociationInverse();\n\t}", "@Test\n public void testRetainAll_Size() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n instance.add(1);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(2, 3);\n instance.retainAll(c);\n\n int expectedResult = 5;\n assertEquals(expectedResult, instance.size());\n\n }", "@Test\n public void testRetainAll_Size_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n\n Collection c = Arrays.asList(3, 2, 3, 2, 3, 1, 2);\n instance.addAll(c);\n\n c = Arrays.asList(2, 3);\n instance.retainAll(c);\n\n int expectedResult = 6;\n assertEquals(expectedResult, instance.size());\n\n }", "@SuppressWarnings(\"rawtypes\")\n\t@Test\n\tpublic void retrieveCollections() {\n\t\t// We can also query for the collections themselves, since they are\n\t\t// first class objects.\n\n\t\tObjectSet result = db.queryByExample(new ArrayList());\n\t\tlistResult(result);\n\n\t\t// as we are initializing readouts\n\t\tassertEquals(2, result.size());\n\n\t}", "private static void compareForIdenticalKeys() {\n Integer[] identical = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1};\n\n Insertion insertion = new Insertion();\n insertion.analyzeSort(identical);\n insertion.getStat().printReport();\n\n Selection selection = new Selection();\n selection.analyzeSort(identical);\n selection.getStat().printReport();\n }", "@Test\n public void testRetainAll_Empty_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n Collection c = Arrays.asList(1, 1, 1, 1, 1, 1, 1);\n instance.addAll(c);\n\n c = Arrays.asList(2, 3);\n instance.retainAll(c);\n\n int expectedResult = 0;\n assertEquals(expectedResult, instance.size());\n\n }", "@Test\n\tpublic void testAddLinkOkMultNtoNArrayListSameLinkTwice() {\n\t\t// create 2 ClosingPeriods and 2 Locations\n\t\tTypePropertyCollection proptypeCpLocations = (TypePropertyCollection) TypeRapidBean\n\t\t\t\t.forName(ClosingPeriod.class.getName()).getPropertyType(\"locations\");\n\t\tTypePropertyCollection proptypeLocClosedons = (TypePropertyCollection) TypeRapidBean\n\t\t\t\t.forName(Location.class.getName()).getPropertyType(\"closedons\");\n\t\tClass<?> colClassCpLocationsBefore = proptypeCpLocations.getCollectionClass();\n\t\tClass<?> colClassLocClosedonsBefore = proptypeLocClosedons.getCollectionClass();\n\t\tproptypeCpLocations.setCollectionClass(ArrayList.class);\n\t\tproptypeLocClosedons.setCollectionClass(ArrayList.class);\n\t\tClosingPeriod cp1 = new ClosingPeriod(new String[] { \"20051225\", \"XMas Holidays\", \"20060101\" });\n\t\tLocation loc1 = new Location(new String[] { \"Location A\" });\n\t\ttry {\n\t\t\tcp1.addLocation(loc1);\n\t\t\tcp1.addLocation(loc1);\n\t\t\tAssert.assertEquals(2, cp1.getLocations().size());\n\t\t\tClosingPeriod cp11Inverse = loc1.getClosedons().iterator().next();\n\t\t\tAssert.assertSame(cp1, cp11Inverse);\n\t\t\tAssert.assertEquals(2, loc1.getClosedons().size());\n\t\t\tcp1.removeLocation(loc1);\n\t\t\tAssert.assertEquals(1, cp1.getLocations().size());\n\t\t\tcp1.removeLocation(loc1);\n\t\t\tAssert.assertEquals(0, cp1.getLocations().size());\n\t\t} finally {\n\t\t\tproptypeCpLocations.setCollectionClass(colClassCpLocationsBefore);\n\t\t\tproptypeLocClosedons.setCollectionClass(colClassLocClosedonsBefore);\n\t\t}\n\t}", "@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 }", "@Rollback\n @Test\n public void getAllCreditOperationsByCreditFamilyId() {\n expectedCollection.add(creditOperationFamilyExpected);\n\n //AssertUtils.assertCreditOperationsCollections(expectedCollection, actualCollection);\n }", "@Test\n public void testContainsAll_Contains() {\n\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n instance.add(1);\n instance.add(4);\n\n Collection c = Arrays.asList(1, 2, 3);\n\n boolean expResult = true;\n boolean result = instance.containsAll(c);\n assertEquals(expResult, result);\n }", "@Test\n @Ignore\n public void testTraverseAncestors() {\n System.out.println(\"testTraverseAncestors\");\n List<Person> people = dao.listAncestors(\"KWCB-HZV\", 10, \"\", false);\n assertIdsEqual(ancestors, people);\n }", "@Test\n public void testRemoveAll_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(2, 3);\n boolean expectedResult = true;\n boolean result = instance.removeAll(c);\n\n assertEquals(expectedResult, result);\n\n }", "@Test\n\tpublic void testAddLinkOkMultNtoNLinkedHashSet() {\n\t\t// configure collection properties of Location and ClosingPeriod\n\t\t// to use TreeSet as collection implementing class\n\t\t((TypePropertyCollection) (new Location()).getProperty(\"closedons\").getType())\n\t\t\t\t.setCollectionClass(LinkedHashSet.class);\n\t\t((TypePropertyCollection) (new ClosingPeriod()).getProperty(\"locations\").getType())\n\t\t\t\t.setCollectionClass(LinkedHashSet.class);\n\t\ttstNMAssociationInverse();\n\t}", "@Test\r\n public void testTransitive() throws Exception {\n\r\n EmployeeImpl emp1 = new EmployeeImpl(\"7993389\", \"gagandeep.singh@rbs.com\");\r\n EmployeeImpl emp2 = new EmployeeImpl(\"7993390\", \"ramandeep.singh@rbs.com\");\r\n EmployeeImpl emp3 = new EmployeeImpl(\"7993391\", \"aakanksha.dave@rbs.com\");\r\n\r\n Assert.assertTrue(\"Comparable implementation is incorrect\", emp3.compareTo(emp2) == 1);\r\n Assert.assertTrue(\"Comparable implementation is incorrect\", emp2.compareTo(emp1) == 1);\r\n Assert.assertTrue(\"Comparable implementation is incorrect\", emp3.compareTo(emp1) == 1);\r\n }", "void compareDataStructures();", "@Test\n public void testAddAll_Collection() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(1, 2, 3);\n\n boolean expResult = true;\n boolean result = instance.addAll(c);\n assertEquals(expResult, result);\n\n }", "public void testEquals() {\n XIntervalDataItem item1 = new XIntervalDataItem(1.0, 2.0, 3.0, 4.0);\n XIntervalDataItem item2 = new XIntervalDataItem(1.0, 2.0, 3.0, 4.0);\n item1 = new XIntervalDataItem(1.1, 2.0, 3.0, 4.0);\n item2 = new XIntervalDataItem(1.1, 2.0, 3.0, 4.0);\n item1 = new XIntervalDataItem(1.1, 2.2, 3.0, 4.0);\n item2 = new XIntervalDataItem(1.1, 2.2, 3.0, 4.0);\n item1 = new XIntervalDataItem(1.1, 2.2, 3.3, 4.0);\n item2 = new XIntervalDataItem(1.1, 2.2, 3.3, 4.0);\n item1 = new XIntervalDataItem(1.1, 2.2, 3.3, 4.4);\n item2 = new XIntervalDataItem(1.1, 2.2, 3.3, 4.4);\n }", "@Test\n public void testList(){\n ArrayList<Integer> integers = Lists.newArrayList(1, 2, 3, 4);\n ArrayList<Integer> integers2 = Lists.newArrayList(1, 2, 3, 4, 5);\n// integers2.removeAll(integers);\n// System.out.println(integers2);\n integers2.retainAll(integers);\n System.out.println(integers2);\n }", "@Test\n public void testExportImportCollection() throws Exception {\n\n // create a collection of \"thing\" entities in the first application, export to S3\n try {\n\n final UUID targetAppId = setup.getMgmtSvc().createApplication(\n organization.getUuid(), \"target\" + RandomStringUtils.randomAlphanumeric(10)).getId();\n\n final EntityManager emApp1 = setup.getEmf().getEntityManager( targetAppId );\n Map<UUID, Entity> thingsMap = new HashMap<>();\n List<Entity> things = new ArrayList<>();\n createTestEntities(emApp1, thingsMap, things, \"thing\");\n\n deleteBucket();\n exportCollection( emApp1, \"things\" );\n\n // create new second application, import the data from S3\n\n final UUID appId2 = setup.getMgmtSvc().createApplication(\n organization.getUuid(), \"second\" + RandomStringUtils.randomAlphanumeric(10)).getId();\n\n final EntityManager emApp2 = setup.getEmf().getEntityManager(appId2);\n importCollections(emApp2);\n\n // make sure that it worked\n\n logger.debug(\"\\n\\nCheck connections\\n\");\n\n List<Entity> importedThings = emApp2.getCollection(\n appId2, \"things\", null, Level.ALL_PROPERTIES).getEntities();\n assertTrue( !importedThings.isEmpty() );\n\n // two things have connections\n\n int conCount = 0;\n for ( Entity e : importedThings ) {\n Results r = emApp2.getTargetEntities(e, \"related\", null, Level.IDS);\n List<ConnectionRef> connections = r.getConnections();\n conCount += connections.size();\n }\n assertEquals( 2, conCount );\n\n logger.debug(\"\\n\\nCheck dictionaries\\n\");\n\n // first two items have things in dictionary\n\n EntityRef entity0 = importedThings.get(0);\n Map connected0 = emApp2.getDictionaryAsMap(entity0, \"connected_types\");\n Map connecting0 = emApp2.getDictionaryAsMap(entity0, \"connected_types\");\n Assert.assertEquals( 1, connected0.size() );\n Assert.assertEquals( 1, connecting0.size() );\n\n EntityRef entity1 = importedThings.get(1);\n Map connected1 = emApp2.getDictionaryAsMap(entity1, \"connected_types\");\n Map connecting1 = emApp2.getDictionaryAsMap(entity1, \"connected_types\");\n Assert.assertEquals( 1, connected1.size() );\n Assert.assertEquals( 1, connecting1.size() );\n\n // the rest rest do not have connections\n\n EntityRef entity2 = importedThings.get(2);\n Map connected2 = emApp2.getDictionaryAsMap(entity2, \"connected_types\");\n Map connecting2 = emApp2.getDictionaryAsMap(entity2, \"connected_types\");\n Assert.assertEquals( 0, connected2.size() );\n Assert.assertEquals( 0, connecting2.size() );\n\n // if entities are deleted from app1, they still exist in app2\n\n logger.debug(\"\\n\\nCheck dictionary\\n\");\n for ( Entity importedThing : importedThings ) {\n emApp1.delete( importedThing );\n }\n setup.getEntityIndex().refresh(appId2);\n\n\n importedThings = emApp2.getCollection(\n appId2, \"things\", null, Level.ALL_PROPERTIES).getEntities();\n assertTrue( !importedThings.isEmpty() );\n\n } finally {\n deleteBucket();\n }\n }", "@Test\n void twoEntryAreSame(){\n ToDo t1 = new ToDo(\"1\");\n t1.setInhalt(\"Inhalt\");\n ToDo t2 = new ToDo(\"1\");\n t2.setInhalt(\"Inhalt\");\n ToDoList list = new ToDoList();\n list.add(t1);\n list.add(t2);\n\n assertEquals(0, list.get(0).compareTo(list.get(1)));\n }", "@Test\n public void testEquality() {\n final Decimal P1 = new Decimal(700);\n final Decimal A1 = new Decimal(15.2);\n final int C1 = 5;\n Order o1 = new Order(P1, A1, C1);\n assertFalse(o1.equals(null));\n Order o2 = new Order(P1, A1, C1);\n assertTrue(o1.equals(o2));\n \n final Decimal P2 = new Decimal(0.0000000007);\n final Decimal A2 = new Decimal(15.2);\n final int C2 = 4;\n o2 = new Order(P2, A2, C2);\n assertFalse(o1.equals(o2));\n assertFalse(o2.equals(o1));\n o1 = new Order(P2, A2, C2);\n assertTrue(o1.equals(o2));\n\n // Try null count\n o2 = new Order(P2, A2, null);\n assertFalse(o1.equals(o2));\n assertFalse(o2.equals(o1));\n \n o1 = new Order(P2, A2, 0);\n assertFalse(o1.equals(o2));\n assertFalse(o2.equals(o1));\n o1 = new Order(P2, A2, -1);\n assertFalse(o1.equals(o2));\n assertFalse(o2.equals(o1));\n \n // Try both with null count\n o1 = new Order(P2, A2, null);\n assertTrue(o2.equals(o1));\n \n }", "@Test\n public void testContainsAll_Not_Contain() {\n\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n instance.add(1);\n instance.add(4);\n\n Collection c = Arrays.asList(1, 2, 5);\n\n boolean expResult = false;\n boolean result = instance.containsAll(c);\n assertEquals(expResult, result);\n }", "@Test\n public void testAddCity_City03() {\n\n System.out.println(\"addCity\");\n City cityTest = new City(new Pair(41.243345, -8.674084), \"city0\", 28);\n Set<City> expResult = new HashSet<>();\n\n expResult.add(new City(new Pair(41.243345, -8.674084), \"city0\", 28));\n expResult.add(new City(new Pair(41.237364, -8.846746), \"city1\", 72));\n expResult.add(new City(new Pair(40.519841, -8.085113), \"city2\", 81));\n expResult.add(new City(new Pair(41.118700, -8.589700), \"city3\", 42));\n expResult.add(new City(new Pair(41.467407, -8.964340), \"city4\", 64));\n expResult.add(new City(new Pair(41.337408, -8.291943), \"city5\", 74));\n expResult.add(new City(new Pair(41.314965, -8.423371), \"city6\", 80));\n expResult.add(new City(new Pair(40.822244, -8.794953), \"city7\", 11));\n expResult.add(new City(new Pair(40.781886, -8.697502), \"city8\", 7));\n expResult.add(new City(new Pair(40.851360, -8.136585), \"city9\", 65));\n\n sn10.addCity(cityTest);\n Set<City> result = sn10.getCitiesList();\n assertEquals(expResult, result);\n }", "private void generateBidirectionalCollectionChangeWorkUnits(AuditSync verSync, EntityPersister entityPersister,\n String entityName, Object[] newState, Object[] oldState,\n SessionImplementor session) {\n if (!verCfg.getGlobalCfg().isGenerateRevisionsForCollections()) {\n return;\n }\n \n // Checks every property of the entity, if it is an \"owned\" to-one relation to another entity.\n // If the value of that property changed, and the relation is bi-directional, a new revision\n // for the related entity is generated.\n String[] propertyNames = entityPersister.getPropertyNames();\n \n for (int i=0; i<propertyNames.length; i++) {\n String propertyName = propertyNames[i];\n RelationDescription relDesc = verCfg.getEntCfg().getRelationDescription(entityName, propertyName);\n if (relDesc != null && relDesc.isBidirectional() && relDesc.getRelationType() == RelationType.TO_ONE) {\n // Checking for changes\n Object oldValue = oldState == null ? null : oldState[i];\n Object newValue = newState == null ? null : newState[i];\n \n if (!Tools.entitiesEqual(session, oldValue, newValue)) {\n // We have to generate changes both in the old collection (size decreses) and new collection\n // (size increases).\n if (newValue != null) {\n // relDesc.getToEntityName() doesn't always return the entity name of the value - in case\n // of subclasses, this will be root class, no the actual class. So it can't be used here.\n String toEntityName;\n \t\t\t\t\t\tSerializable id;\n \n if (newValue instanceof HibernateProxy) {\n \t HibernateProxy hibernateProxy = (HibernateProxy) newValue;\n \t toEntityName = session.bestGuessEntityName(newValue);\n \t id = hibernateProxy.getHibernateLazyInitializer().getIdentifier();\n \t\t\t\t\t\t\t// We've got to initialize the object from the proxy to later read its state. \n \t\t\t\t\t\t\tnewValue = Tools.getTargetFromProxy(hibernateProxy);\n \t} else {\n \t\ttoEntityName = session.guessEntityName(newValue);\n \n \t\t\t\t\t\t\tIdMapper idMapper = verCfg.getEntCfg().get(toEntityName).getIdMapper();\n \tid = (Serializable) idMapper.mapToIdFromEntity(newValue);\n \t}\n \n verSync.addWorkUnit(new CollectionChangeWorkUnit(session, toEntityName, verCfg, id, newValue));\n }\n \n if (oldValue != null) {\n \tString toEntityName;\n \t\t\t\t\t\tSerializable id;\n \n \tif(oldValue instanceof HibernateProxy) {\n \t HibernateProxy hibernateProxy = (HibernateProxy) oldValue;\n \t toEntityName = session.bestGuessEntityName(oldValue);\n \t id = hibernateProxy.getHibernateLazyInitializer().getIdentifier();\n \t\t\t\t\t\t\t// We've got to initialize the object as we'll read it's state anyway.\n \t\t\t\t\t\t\toldValue = Tools.getTargetFromProxy(hibernateProxy);\n \t} else {\n \t\ttoEntityName = session.guessEntityName(oldValue);\n \n \t\t\t\t\t\t\tIdMapper idMapper = verCfg.getEntCfg().get(toEntityName).getIdMapper();\n \t\t\t\t\t\t\tid = (Serializable) idMapper.mapToIdFromEntity(oldValue);\n \t}\n \t\t\t\t\t\t\n verSync.addWorkUnit(new CollectionChangeWorkUnit(session, toEntityName, verCfg, id, oldValue));\n }\n }\n }\n }\n }", "@Test\npublic void testContactsModification(){\n Contacts before=app.db().contacts();\n ContactData modifiedContact = before.iterator().next();\n ContactData contact = new ContactData().withId(modifiedContact.getId()).withName(\"1\").withLastname(\"2\").withAddress(\"3\")\n .withHomephone(\"4\").withMobilephone(\"5\").withWorkphone(\"6\").withEmail1(\"7\").withEmail2(\"8\").withEmail3(\"9\");\n app.contact().modify(contact);\n// Contacts after = app.contact().all();\n Contacts after=app.db().contacts();\n assertEquals(after.size(),before.size());\n assertThat(after, equalTo(before.without(modifiedContact).withAdded(contact)));\n verifyContactListInUI();\n}", "@SuppressWarnings(\"serial\")\n\t@Test\n\tpublic void updateCollection() {\n\t\tdb.close();\n\t\tEmbeddedConfiguration config = Db4oEmbedded.newConfiguration();\n\t\tconfig.common().objectClass(Car.class).cascadeOnUpdate(true);\n\t\tdb = Db4oEmbedded.openFile(config, DB4OFILENAME);\n\t\tObjectSet<Car> results = db.query(new Predicate<Car>() {\n\t\t\tpublic boolean match(Car candidate) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t});\n\n\t\tAssert.assertTrue(results.hasNext());\n\n\t\tCar car = results.next();\n\n\t\tcar.getHistory().remove(0);\n\t\tdb.store(car.getHistory());\n\t\tresults = db.query(new Predicate<Car>() {\n\t\t\tpublic boolean match(Car candidate) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t});\n\n\t\twhile (results.hasNext()) {\n\t\t\tcar = results.next();\n\t\t\tfor (int idx = 0; idx < car.getHistory().size(); idx++) {\n\t\t\t\tSystem.out.println(car.getHistory().get(idx));\n\t\t\t}\n\t\t}\n\n\t}", "@Test\n public void testIntersection3()\n {\n List<Integer> expected = new ArrayList<>();\n ConciseSet set1 = new ConciseSet();\n ConciseSet set2 = new ConciseSet();\n for (int i = 0; i < 1000; i++) {\n set1.add(i);\n set2.add(i);\n expected.add(i);\n }\n\n verifyIntersection(expected, set1, set2);\n }", "@Test\n public void testAddAll_int_Collection_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(1, 2, 3);\n\n boolean expResult = true;\n boolean result = instance.addAll(1, c);\n assertEquals(expResult, result);\n\n }", "@Test\n public void testEquals03() {\n System.out.println(\"equals\");\n\n Set<User> users = new HashSet<>();\n users.add(new User(\"nick0\", \"mail_0_@sapo.pt\"));\n users.add(new User(\"nick1\", \"mail_1_@sapo.pt\"));\n users.add(new User(\"nick2\", \"mail_2_@sapo.pt\"));\n users.add(new User(\"nick3\", \"mail_3_@sapo.pt\"));\n users.add(new User(\"nick4\", \"mail_4_@sapo.pt\"));\n users.add(new User(\"nick5\", \"mail_5_@sapo.pt\"));\n users.add(new User(\"nick6\", \"mail_6_@sapo.pt\"));\n users.add(new User(\"nick7\", \"mail_7_@sapo.pt\"));\n users.add(new User(\"nick8\", \"mail_8_@sapo.pt\"));\n users.add(new User(\"nick9\", \"mail_9_@sapo.pt\"));\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 SocialNetwork otherSN = new SocialNetwork(users, cities);\n boolean result = sn10.equals(otherSN);\n assertTrue(result);\n }", "@Test\n public void testContactModification() throws IOException {\n Contacts before = app.db().contacts();\n // next() return sly4ainyi element, not last, not first\n NameFirstMiddle modifiedContact = before.iterator().next();\n //int index = before.size() -1;\n NameFirstMiddle contact = new NameFirstMiddle().\n withId(modifiedContact.getId()).\n withFirstname(properties.getProperty(\"web.contactModifiedFirstName\")).\n withLastname(properties.getProperty(\"web.contactModifiedLastName\")).\n withEmail1(properties.getProperty(\"web.contactEmail1\")).\n withEmail2(properties.getProperty(\"web.contactEmail2\")).\n withEmail3(properties.getProperty(\"web.contactEmail3\")).\n withFullAddress(properties.getProperty(\"web.contactAddress1\")).\n withHomePhone(properties.getProperty(\"web.contactHomeTel\")).\n withWorkPhone(properties.getProperty(\"web.contactWorkTel\")).\n withMobilePhone(properties.getProperty(\"web.contactMobileTel\"));\n\n app.contact().modify(contact);\n Contacts after = app.db().contacts();\n assertEquals(after.size(),before.size() );\n assertThat(after, equalTo(\n before.without(modifiedContact).withAdded(contact)));\n verifyContactListInUi();\n //-no needs after assertThat:before.remove(modifiedContact);\n //-no needs after assertThat:before.add(contact);\n // ne-uporjado4en - massiv\n // uporjado4en - spisok\n // spicok -> mnogestvoб BUT HashSet contains only unique names aND remove duplicates names\n //-no needs after assertThat:assertEquals(new HashSet<Object>(before),new HashSet<Object>(after));\n //anonimous function: sort by Id - our choice\n // no need after modifiedContact\n //Comparator<? super NameFirstMiddle> byId = (g1, g2) -> Integer.compare(g1.getId(),g2.getId());\n //before.sort(byId);\n //after.sort(byId);\n //-no needs after assertThat:assertEquals(before,after);\n }", "@Test\n public void test_getAll_2() throws Exception {\n User user1 = createUser(1, false);\n User user2 = createUser(2, false);\n createUser(3, true);\n\n List<User> res = instance.getAll();\n\n assertEquals(\"'getAll' should be correct.\", 2, res.size());\n\n User entity1 = res.get(0);\n User entity2 = res.get(1);\n if (entity1.getUsername().equals(user2.getUsername())) {\n entity1 = res.get(1);\n entity2 = res.get(0);\n }\n\n assertEquals(\"'getAll' should be correct.\", user1.getUsername(), entity1.getUsername());\n assertEquals(\"'getAll' should be correct.\", user1.getDefaultTab(), entity1.getDefaultTab());\n assertEquals(\"'getAll' should be correct.\", user1.getNetworkId(), entity1.getNetworkId());\n assertEquals(\"'getAll' should be correct.\", user1.getRole().getId(), entity1.getRole().getId());\n assertEquals(\"'getAll' should be correct.\", user1.getFirstName(), entity1.getFirstName());\n assertEquals(\"'getAll' should be correct.\", user1.getLastName(), entity1.getLastName());\n assertEquals(\"'getAll' should be correct.\", user1.getEmail(), entity1.getEmail());\n assertEquals(\"'getAll' should be correct.\", user1.getTelephone(), entity1.getTelephone());\n assertEquals(\"'getAll' should be correct.\", user1.getStatus().getId(), entity1.getStatus().getId());\n\n assertEquals(\"'getAll' should be correct.\", user2.getUsername(), entity2.getUsername());\n assertEquals(\"'getAll' should be correct.\", user2.getDefaultTab(), entity2.getDefaultTab());\n assertEquals(\"'getAll' should be correct.\", user2.getNetworkId(), entity2.getNetworkId());\n assertEquals(\"'getAll' should be correct.\", user2.getRole().getId(), entity2.getRole().getId());\n assertEquals(\"'getAll' should be correct.\", user2.getFirstName(), entity2.getFirstName());\n assertEquals(\"'getAll' should be correct.\", user2.getLastName(), entity2.getLastName());\n assertEquals(\"'getAll' should be correct.\", user2.getEmail(), entity2.getEmail());\n assertEquals(\"'getAll' should be correct.\", user2.getTelephone(), entity2.getTelephone());\n assertEquals(\"'getAll' should be correct.\", user2.getStatus().getId(), entity2.getStatus().getId());\n }", "public boolean compareElements(Object element1, Object element2, AbstractSession session) {\n if (element1.getClass() != element2.getClass()) {\n return false;\n }\n return this.getObjectBuilder(element1, session).compareObjects(element1, element2, session);\n }", "private <T extends AtlasBaseTypeDef> boolean compareLists(List<T> expected, List<T> actual) {\n if (expected.isEmpty() && actual.isEmpty()) {\n return true;\n }\n\n // initially this list contains all expected EntityDefs; we'll remove the actual EntityDefs;\n // the remaining items will contain the items found in this model but not in the other one\n final List<T> missingEntityDefs = newArrayList();\n missingEntityDefs.addAll(expected);\n\n for (T entityDef : actual) {\n Iterator<T> iter = missingEntityDefs.iterator();\n while (iter.hasNext()) {\n if (iter.next().getName().equals(entityDef.getName())) {\n iter.remove();\n break;\n }\n }\n }\n // not a full comparison since it's possible for this list to be empty but the other\n // model to have extra entities - but for our purposes that's good enough\n return missingEntityDefs.isEmpty();\n }", "@Test\n\t@SuppressWarnings(\"unchecked\")\n\tpublic void testAddAndRemoveLinkOkComponentTreeSetSorted() {\n\t\tTypeRapidBean rtypeParent = (TypeRapidBean) TypeRapidBean\n\t\t\t\t.forName(\"org.rapidbeans.test.addressbook5.Addressbook\");\n\t\tTypePropertyCollection aetypeParentSons = (TypePropertyCollection) rtypeParent.getPropertyType(\"persons\");\n\t\tClass<?> colClassBefore = aetypeParentSons.getCollectionClass();\n\t\tAssert.assertSame(TreeSet.class, colClassBefore);\n\t\tRapidBean adrbook = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Addressbook\");\n\t\tRapidBean person1 = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Person\");\n\t\tperson1.setPropValue(\"lastname\", \"A\");\n\t\tRapidBean person2 = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Person\");\n\t\tperson2.setPropValue(\"lastname\", \"B\");\n\t\tAssert.assertNull(((PropertyCollection) adrbook.getProperty(\"persons\")).getValue());\n\t\tAssert.assertNull(person1.getParentBean());\n\t\tAssert.assertNull(person2.getParentBean());\n\n\t\t// add person 2 before person 1\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person2);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person1);\n\t\tAssert.assertEquals(2,\n\t\t\t\t((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue()).size());\n\t\tIterator<Link> iter = ((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue())\n\t\t\t\t.iterator();\n\t\tAssert.assertSame(person1, iter.next());\n\t\tAssert.assertSame(person2, iter.next());\n\t\tAssert.assertSame(adrbook, person1.getParentBean());\n\t\tAssert.assertSame(adrbook, person2.getParentBean());\n\n\t\t// reset persons and add person 1 before person 2\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).setValue(null);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person1);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person2);\n\t\tAssert.assertEquals(2,\n\t\t\t\t((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue()).size());\n\t\titer = ((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue()).iterator();\n\t\tAssert.assertSame(person1, iter.next());\n\t\tAssert.assertSame(person2, iter.next());\n\t\tAssert.assertSame(adrbook, person1.getParentBean());\n\t\tAssert.assertSame(adrbook, person2.getParentBean());\n\n\t\t// remove the links again\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).removeLink(person2);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).removeLink(person1);\n\t\tAssert.assertEquals(0,\n\t\t\t\t((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue()).size());\n\t\tAssert.assertNull(person1.getParentBean());\n\t\tAssert.assertNull(person2.getParentBean());\n\t}", "@Ignore\r\n @Test\r\n public void testContainsCollection() {\r\n System.out.println(\"containsCollection\");\r\n NumberCollection nc = null;\r\n NumberCollection instance = new NumberCollection();\r\n boolean expResult = false;\r\n boolean result = instance.containsCollection(nc);\r\n assertEquals(expResult, result);\r\n \r\n }", "private static <T> void cloneCollection(Collection<T> originalCollection, Collection<T> clonedCollection, PropertyFilter propertyFilter) {\n\t\tJpaCloner jpaCloner = new JpaCloner(propertyFilter);\n\t\tSet<Object> exploredEntities = new HashSet<Object>();\n\t\tfor (T root : originalCollection) {\n\t\t\tclonedCollection.add(clone(root, jpaCloner, exploredEntities));\n\t\t}\n\t}", "public void merge(WModelObject otherObject)\n\t{\n\t\tWCollection collection = null;\n\n\t\t// Check to see if the argument is a WCollection object\n\t\ttry\n\t\t{\n\t\t\tcollection = (WCollection)otherObject;\n\t\t}\n\t\tcatch (ClassCastException exc)\n\t\t{\n\t\t\tcom.ing.connector.Registrar.logError(getClass().getName() + \": Collection objects can only be merged with other Collection objects\");\n\t\t\treturn;\n\t\t}\n\n\t\t// Check to see if the two objects are of the same class\n\t\tClass thisClass = getClass();\n\t\tClass objClass = otherObject.getClass();\n\n\t\tif (thisClass.getName().compareTo(objClass.getName()) != 0)\n\t\t{\n\t\t\tcom.ing.connector.Registrar.logError(thisClass.getName() + \": Cannot compare two different collection objects\");\n\t\t\treturn;\n\t\t}\n\n\t\tWCollection primCollection = new WCollection(thisClass.getName());\t//JFG6.0\n\n\t\tint iObjectCount = this.size();\t\t\t\t\t\t\t//JFG6.0\n\t\tcom.ing.connector.Registrar.logDebugMessage(\"prim object size = \" + iObjectCount);\n\t\tfor (int iCount = 0; iCount < iObjectCount; ++iCount)\t\t\t\t//JFG6.0\n\t\t{\n\t\t\tprimCollection.addElement(this.elementAt(iCount));\t\t\t//JFG6.0\n\t\t\t//com.ing.connector.Registrar.logDebugMessage(\"Entering inside()\");\n\t\t}\n\n primCollection.sort(\"ClassKey\",true);\t\t\t\t\t\t//JFG6.0\n collection.sort(\"ClassKey\",true);\t\t\t\t\t\t\t//JFG6.0\n\n\t\tint iSecObjectCount = collection.size();\n int iStart = 0;\t\t\t\t\t\t\t\t\t\t//JFG6.0\n com.ing.connector.Registrar.logDebugMessage(\"Sec object size = \" + iSecObjectCount);\n\t\tfor (int iSecCount = 0; iSecCount < iSecObjectCount; ++iSecCount)\n\t\t{\n\t\t WModelObject secObject = null;\n\t\t WModelObject primObject = null;\n\n\t\t secObject = collection.elementAt(iSecCount);\n\t\t boolean keyFound = false;\n\n\t\t int iPrimObjectCount = primCollection.size();\n\t\t for (int iPrimCount = iStart; iPrimCount < iPrimObjectCount; ++iPrimCount)\n\t\t {\n\t\t primObject = primCollection.elementAt(iPrimCount);\n\n int iCompare = primObject.compareTo(secObject, \"ClassKey\");\n //com.ing.connector.Registrar.logDebugMessage(\"primObject.compareTo iCompare = \" + iCompare);\n \n\t\t if (iCompare == 0)\n\t\t {\n\t\t\tkeyFound = true;\n\t\t\tcom.ing.connector.Registrar.logDebugMessage(\"prim object and sec object are equal class \" + primObject.getClass().getName());\n\t\t\tprimObject.merge(secObject);\t//LPMO264\n iStart = iPrimCount + 1;\t\t\t\t\t\t\t//JFG6.0\n \n\t\t\tbreak;\n\t\t }\n else\t\t\t\t\t\t\t\t\t\t\t//JFG6.0\n {\n\t\t if (iCompare > 0)\t\t\t\t\t\t\t\t\t//JFG6.0\n\t\t {\n\t\t\t keyFound = false;\t\t\t\t\t\t\t\t//JFG6.0\n iStart = iPrimCount;\t\t\t\t\t\t\t\t//JFG6.0\n \n\t\t break;\t\t\t\t\t\t\t\t\t\t//JFG6.0\n\n }\n }\n\t\t }\n\t\t \n\t\t //com.ing.connector.Registrar.logDebugMessage(\"is keyFound \" + keyFound);\n\t\t if (!keyFound)\n\t\t {\n\t\t addElement(secObject);\n\t\t }\n\t\t}\n\n\t\tprimCollection = null;\t\t\t\t\t\t\t\t\t//JFG6.0\n\n//\t\tint iObjectCount = collection.size();\n//\t\tfor (int iCount = 0; iCount < iObjectCount; ++iCount)\n//\t\t{\n//\t\t\taddElement(collection.elementAt(iCount));\n//\t\t}\n\t}", "@Override\n protected abstract SecondOrderCollection wrapped();", "@Test\r\n public void testVertices() {\r\n System.out.println(\"vertices\");\r\n MyDigraph instance = new MyDigraph();\r\n\r\n Object v1Element = 1;\r\n Vertex v1 = instance.insertVertex(v1Element);\r\n\r\n Collection colection = instance.vertices();\r\n boolean result = colection.contains(v1);\r\n boolean expectedResult = true;\r\n assertEquals(expectedResult, result);\r\n\r\n instance.removeVertex(v1);\r\n result = colection.contains(v1);\r\n expectedResult = false;\r\n assertEquals(expectedResult, result);\r\n }", "@Test\n public void testIterator_Overflow() {\n OasisList<Integer> baseList = new SegmentedOasisList<>(2, 2);\n baseList.addAll(Arrays.asList(1, 2, 6, 8, 7, 8, 90));\n\n Iterator<Integer> instance = baseList.iterator();\n assertTrue(isEqual(instance, baseList));\n\n }", "@Test\n public void testContainsAll_Not_Contain_Overflow() {\n\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(3);\n instance.add(2);\n instance.add(1);\n instance.add(4);\n instance.add(5);\n instance.add(4);\n instance.add(7);\n\n Collection c = Arrays.asList(1, 2, 5, 8);\n\n boolean expResult = false;\n boolean result = instance.containsAll(c);\n assertEquals(expResult, result);\n }", "@Test\n public void testSubList() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n instance.addAll(c);\n\n List expResult = Arrays.asList(1, 7, 7);\n OasisList<Integer> result = (OasisList<Integer>) instance.subList(1, 4);\n\n assertTrue(isEqual(expResult, result));\n\n }", "@Test\n public void testContainsAll_Contains_Overflow() {\n\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(3);\n instance.add(2);\n instance.add(1);\n instance.add(4);\n instance.add(5);\n instance.add(4);\n instance.add(7);\n\n Collection c = Arrays.asList(3, 4, 5, 7);\n\n boolean expResult = true;\n boolean result = instance.containsAll(c);\n assertEquals(expResult, result);\n }", "public void triCollection(){\r\n Collections.sort(collection);\r\n }", "@Test\n public void organisationEqualsWorks() {\n Organisation organisation = new Organisation();\n organisation.setName(\"Name\");\n organisation.setVertecId(1L);\n organisation.setFullAddress(\"Building, Street_no Street, City, ZIP, Country\");\n organisation.setActive(true);\n organisation.setWebsite(\"website.net\");\n organisation.setOwnerId(2L);\n\n\n Organisation org2 = new Organisation();\n org2.setName(\"Name\");\n org2.setVertecId(1L);\n org2.setBuildingName(\"Building\");\n org2.setStreet_no(\"Street_no\");\n org2.setStreet(\"Street\");\n org2.setCity(\"City\");\n org2.setZip(\"ZIP\");\n org2.setCountry(\"Country\");\n org2.setActive(true);\n org2.setWebsite(\"website.net\");\n org2.setOwnerId(2L);\n\n System.out.println(organisation.toJsonString());\n System.out.println(org2.toJsonString());\n\n assertTrue(organisation.equalsForUpdateAssertion(org2));\n }", "public void testListFK()\r\n throws Exception\r\n {\r\n try\r\n {\r\n addClassesToSchema(new Class[] {ShapeHolder3b.class, Rectangle3b.class, Circle3b.class, Square3b.class});\r\n\r\n PersistenceManager pm = pmf.getPersistenceManager();\r\n Transaction tx = pm.currentTransaction();\r\n Object id;\r\n try\r\n {\r\n // Create container and some shapes\r\n tx.begin();\r\n ShapeHolder3b container = new ShapeHolder3b(r.nextInt());\r\n Circle3 circle = new Circle3(r.nextInt(), 1.75);\r\n container.getShapeList().add(circle);\r\n Rectangle3b rectangle = new Rectangle3b(r.nextInt(), 1.0, 2.0);\r\n container.getShapeList().add(rectangle);\r\n assertEquals(2,container.getShapeList().size());\r\n pm.makePersistent(container);\r\n tx.commit();\r\n id = pm.getObjectId(container);\r\n pm.close();\r\n\r\n pm = pmf.getPersistenceManager();\r\n tx = pm.currentTransaction();\r\n tx.begin();\r\n ShapeHolder3b actual = (ShapeHolder3b) pm.getObjectById(id);\r\n assertEquals(2,actual.getShapeList().size());\r\n tx.commit();\r\n }\r\n finally\r\n {\r\n if (tx.isActive())\r\n {\r\n tx.rollback();\r\n }\r\n \r\n pm.close();\r\n }\r\n \r\n // TODO Extend this to then query the elements in the collection\r\n }\r\n finally\r\n {\r\n clean(Circle3b.class);\r\n clean(Rectangle3b.class);\r\n clean(ShapeHolder3b.class);\r\n }\r\n }", "@Test @Ignore\r\n public void testSubListSetAll() {\r\n ObservableList list = createObservableList(true);\r\n int from = 2;\r\n int to = 6;\r\n List subList = list.subList(from, to);\r\n int subSize = subList.size();\r\n List itemsOfSubList = new ArrayList(subList);\r\n// itemsOfSubList.remove(0);\r\n ListChangeReport report = new ListChangeReport(list);\r\n subList.retainAll(itemsOfSubList);\r\n assertEquals(\"wrong assumption: implementation is clever enough to detect retain same\",\r\n 1, report.getEventCount());\r\n Change c = report.getLastChange();\r\n LOG.info(\"changed list: \" + list);\r\n prettyPrint(c);\r\n assertEquals(\"single change\" , 1, getChangeCount(c));\r\n assertEquals(\"removed\", subSize, getRemovedSize(c));\r\n assertEquals(\"added\" , subSize, getAddedSize(c));\r\n assertTrue(\"single replace\" + c, wasSingleReplaced(c));\r\n }", "public void manyToManyDeleteNonOwningSideTest() throws Exception {\n EntityManager em = createEntityManager();\n \n em.getTransaction().begin();\n \n EntityA a1 = new EntityA();\n a1.setName(\"EntityA1\");\n EntityB b1 = new EntityB();\n b1.setName(\"EntityB1\");\n\n a1.getBs().add(b1);\n b1.getAs().add(a1);\n\n em.persist(a1);\n\n em.getTransaction().commit();\n\n Integer idA1 = a1.getId();\n Integer idB1 = b1.getId();\n \n em.getTransaction().begin();\n // remove the owning side\n em.remove(b1);\n try {\n em.getTransaction().commit();\n } catch (RuntimeException ex) {\n if (em.getTransaction().isActive()) {\n em.getTransaction().rollback();\n }\n em.close();\n \n throw ex;\n }\n \n clearCache();\n \n assertTrue(\"EntityA a1 should have been removed!\", \n em.createQuery(\"SELECT a FROM EntityA a WHERE a.id = ?1\").setParameter(1, idA1).getResultList().size() == 0);\n assertTrue(\"EntityB b1 should have been removed!\", \n em.createQuery(\"SELECT b FROM EntityB b WHERE b.id = ?1\").setParameter(1, idB1).getResultList().size() == 0);\n\n em.close();\n }", "@Test\n public void testEquals() {\n Coctail c1 = new Coctail(\"coctail\", new Ingredient[]{ \n new Ingredient(\"ing1\"), new Ingredient(\"ing2\")});\n Coctail c2 = new Coctail(\"coctail\", new Ingredient[]{ \n new Ingredient(\"ing1\"), new Ingredient(\"ing2\")});\n assertEquals(c1, c2);\n }", "@Test\n public void testRetainAll_Empty() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n\n instance.add(1);\n instance.add(1);\n instance.add(1);\n instance.add(1);\n\n Collection c = Arrays.asList(2, 3);\n instance.retainAll(c);\n\n int expectedResult = 0;\n assertEquals(expectedResult, instance.size());\n\n }", "@Test\n public void testIntersectionOfLists() {\n System.out.println(\"IntersectionOfLists\");\n ArrayList<Integer> arr1 = new ArrayList<>();\n arr1.add(12);\n arr1.add(10);\n arr1.add(23);\n ArrayList<Integer> arr2 = new ArrayList<>();\n arr2.add(23);\n arr2.add(10);\n Collections.sort(arr2);\n ArrayListRecursive instance = new ArrayListRecursive(arr1, arr2);\n List result = instance.IntersectionOfLists();\n Collections.sort(result);\n assertEquals(arr2, result);\n }", "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 }", "@Test\n void getByPropertyEqualSuccess() {\n List<Order> orders = dao.getByPropertyEqual(\"description\", \"February Large Long-Sleeve\");\n assertEquals(1, orders.size());\n assertEquals(2, orders.get(0).getId());\n }", "@Test\n\tvoid testEdgesAreEqualForGivenVertice() {\n\t\tLinkedHashSet<String> edges = new LinkedHashSet<String>();\n\n\t\tedges.add(\"Newark\");\n\t\tedges.add(\"New York\");\n\t\tmap.put(\"Boston\", edges);\n\t\tedges = map.get(\"Boston\");\n\t\tString[] edgesArray = new String[edges.size()];\n\t\tedgesArray = edges.toArray(edgesArray);\n\t\tAssertions.assertEquals(\"Newark\", edgesArray[0]);\n\t\tAssertions.assertEquals(\"New York\", edgesArray[1]);\n\n\t\tedges = new LinkedHashSet<String>();\n\t\tedges.add(\"Philadelphia\");\n\t\tmap.put(\"Newark\", edges);\n\t\tedgesArray = new String[edges.size()];\n\t\tedgesArray = edges.toArray(edgesArray);\n\t\tAssertions.assertEquals(\"Philadelphia\", edgesArray[0]);\n\n\t\tedges = new LinkedHashSet<String>();\n\t\tedges.add(\"Albany\");\n\t\tmap.put(\"Trenton\", edges);\n\t\tedgesArray = new String[edges.size()];\n\t\tedgesArray = edges.toArray(edgesArray);\n\t\tAssertions.assertEquals(\"Albany\", edgesArray[0]);\n\t}", "@Override\n public boolean isOwningCollection(Item item, Collection c)\n {\n Collection collection = item.getOwningCollection();\n\n if (collection != null && c.getID() == collection.getID())\n {\n return true;\n }\n\n // not the owner\n return false;\n }", "@SuppressWarnings({\"UnnecessaryLocalVariable\"})\n @Test\n void testEqualsAndHashCode(SoftAssertions softly) {\n SortOrder sortOrder0 = new SortOrder(\"i0\", true, false, true);\n SortOrder sortOrder1 = sortOrder0;\n SortOrder sortOrder2 = new SortOrder(\"i0\", true, false, true);\n\n softly.assertThat(sortOrder0.hashCode()).isEqualTo(sortOrder2.hashCode());\n //noinspection EqualsWithItself\n softly.assertThat(sortOrder0.equals(sortOrder0)).isTrue();\n //noinspection ConstantConditions\n softly.assertThat(sortOrder0.equals(sortOrder1)).isTrue();\n softly.assertThat(sortOrder0.equals(sortOrder2)).isTrue();\n\n SortOrder sortOrder3 = new SortOrder(\"i1\", true, false, true);\n softly.assertThat(sortOrder0.equals(sortOrder3)).isFalse();\n\n //noinspection EqualsBetweenInconvertibleTypes\n softly.assertThat(sortOrder0.equals(new SortOrders())).isFalse();\n }", "private void assertEqual(Iterator expected, Iterator actual) {\n\t\t\n\t}", "@Test\n void twoEntryAreNotSame(){\n ToDo t1 = new ToDo(\"1\");\n t1.setInhalt(\"Inhalt\");\n ToDo t2 = new ToDo(\"2\");\n t2.setInhalt(\"Inhalt\");\n ToDoList list = new ToDoList();\n list.add(t1);\n list.add(t2);\n\n assertEquals(-1, list.get(0).compareTo(list.get(1)));\n }", "@Test\n\t@SuppressWarnings(\"unchecked\")\n\tpublic void testAddAndRemoveLinkOkComponentTreeSetSortedChangeProperties() {\n\t\t// initialize one address book containing 4 entries\n\t\tTypeRapidBean rtypeParent = (TypeRapidBean) TypeRapidBean\n\t\t\t\t.forName(\"org.rapidbeans.test.addressbook5.Addressbook\");\n\t\tTypePropertyCollection aetypeParentSons = (TypePropertyCollection) rtypeParent.getPropertyType(\"persons\");\n\t\tClass<?> colClassBefore = aetypeParentSons.getCollectionClass();\n\t\tAssert.assertSame(TreeSet.class, colClassBefore);\n\t\tRapidBean adrbook = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Addressbook\");\n\t\tAssert.assertNull(((PropertyCollection) adrbook.getProperty(\"persons\")).getValue());\n\t\tRapidBean person1 = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Person\");\n\t\tperson1.setPropValue(\"lastname\", \"B\");\n\t\tRapidBean person2 = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Person\");\n\t\tperson2.setPropValue(\"lastname\", \"C\");\n\t\tRapidBean person3 = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Person\");\n\t\tperson3.setPropValue(\"lastname\", \"D\");\n\t\tRapidBean person4 = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Person\");\n\t\tperson4.setPropValue(\"lastname\", \"E\");\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person2);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person1);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person4);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person3);\n\t\tAssert.assertEquals(4,\n\t\t\t\t((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue()).size());\n\t\tIterator<Link> iter = ((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue())\n\t\t\t\t.iterator();\n\t\tAssert.assertSame(person1, iter.next());\n\t\tAssert.assertSame(person2, iter.next());\n\t\tAssert.assertSame(person3, iter.next());\n\t\tAssert.assertSame(person4, iter.next());\n\n\t\t// change one single property and check correct sorting\n\t\tperson2.setPropValue(\"lastname\", \"X\");\n\t\titer = ((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue()).iterator();\n\t\tAssert.assertSame(person1, iter.next());\n\t\tAssert.assertSame(person3, iter.next());\n\t\tAssert.assertSame(person4, iter.next());\n\t\tAssert.assertSame(person2, iter.next());\n\n\t\t// remove the links agains\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).removeLink(person1);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).removeLink(person2);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).removeLink(person3);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).removeLink(person4);\n\t\tAssert.assertEquals(0,\n\t\t\t\t((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue()).size());\n\t}", "@Test\n public void testRemoveAll() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(2, 3);\n boolean expectedResult = true;\n boolean result = instance.removeAll(c);\n\n assertEquals(expectedResult, result);\n\n }", "@Test\n public void testSubList_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n instance.addAll(c);\n\n List expResult = Arrays.asList(1, 7, 7);\n OasisList<Integer> result = (OasisList<Integer>) instance.subList(1, 4);\n\n assertTrue(isEqual(expResult, result));\n\n }", "static public <T> boolean bagEquals(Collection<T> source, Collection<T> arg) {\n\t\t/* make copy of arguments in order to manipulate the collection*/\n\t\tif ( source.size() != arg.size() ) {\n\t\t\treturn false;\n\t\t}\n\t\tCollection<T> myArg = new ArrayList<T>( arg );\n\t\tfor ( T elem : source ) {\n\t\t\tif ( myArg.contains(elem) ) {\n\t\t\t\tmyArg.remove(elem);\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn myArg.isEmpty();\n\t}", "@Test\n public void hashCodeTest() {\n prepareEntitiesForEqualityTest();\n\n assertEquals(entity0.hashCode(), entity1.hashCode());\n }", "@Test\r\n\tpublic void testCompareCase1() throws IOException {\r\n\t\tPerson p1 = DataUtil.readDataFromFile(\"test/data/case1/case1-person1.json\", Person.class);\r\n\t\tPerson p2 = DataUtil.readDataFromFile(\"test/data/case1/case1-person2.json\", Person.class);\r\n\r\n\t\tIContext ctx = ObjectCompare.compare(p1, p2);\r\n\t\tdebug(ctx.getDifferences());\r\n\t\tAssert.assertTrue(ctx.hasDifferences());\r\n\t\tAssert.assertEquals(4, ctx.getDifferences().size());\r\n\t}", "private void veryifyCollection(String contName, String[] subgOIDs,\n String[][] objSubgItemTypeNames,\n String[][] linkSubgItemTypeNames) {\n Container container = DB.getRootContainer().getChild(contName);\n\n // verify subgraph OIDs\n List expectedSubgOIDs = Arrays.asList(subgOIDs);\n List actualSubgOIDInts = container.getSubgraphOIDs(); // IntegerS\n List actualSubgOIDs = new ArrayList();\n for (Iterator actualSubgOIDIntIter = actualSubgOIDInts.iterator();\n actualSubgOIDIntIter.hasNext();) {\n Integer actualSubgOIDInt = (Integer) actualSubgOIDIntIter.next();\n actualSubgOIDs.add(actualSubgOIDInt.toString());\n }\n assertEquals(expectedSubgOIDs.size(), actualSubgOIDs.size());\n assertTrue(expectedSubgOIDs.containsAll(actualSubgOIDs));\n\n // verify subgraph contents\n NST objSharedItemNST = container.getItemNST(true);\n NST linkSharedItemNST = container.getItemNST(false);\n veryifSubgraphItems(objSubgItemTypeNames, objSharedItemNST);\n veryifSubgraphItems(linkSubgItemTypeNames, linkSharedItemNST);\n }" ]
[ "0.65720814", "0.61649567", "0.60724777", "0.60681456", "0.6051369", "0.60402185", "0.6028083", "0.5961524", "0.5960683", "0.5914127", "0.5884079", "0.586213", "0.5851341", "0.5827973", "0.5794389", "0.5781936", "0.57335025", "0.5717599", "0.5691936", "0.5645845", "0.55967504", "0.55905676", "0.55772513", "0.5569348", "0.55681384", "0.5565442", "0.5559009", "0.55292183", "0.55277395", "0.55196", "0.5516146", "0.55151665", "0.5481809", "0.5474089", "0.5472546", "0.5470106", "0.545084", "0.5437105", "0.5434262", "0.542985", "0.5402807", "0.5397182", "0.53827506", "0.5381879", "0.53693485", "0.53692716", "0.53471357", "0.53446823", "0.5337033", "0.53350365", "0.5331491", "0.53269434", "0.53252345", "0.5323401", "0.5322251", "0.53214955", "0.53214765", "0.5319441", "0.53149414", "0.5314512", "0.531435", "0.5308383", "0.53048986", "0.5302346", "0.53001755", "0.52890354", "0.52876514", "0.52840966", "0.5280428", "0.52793366", "0.52706784", "0.52638376", "0.5262295", "0.5254095", "0.5252539", "0.52488595", "0.52481794", "0.52461404", "0.52345127", "0.52296543", "0.5222208", "0.5219307", "0.5217885", "0.52142704", "0.52030003", "0.51999146", "0.51998615", "0.51844347", "0.51795435", "0.5178902", "0.51708287", "0.5170768", "0.5165028", "0.5152299", "0.51521397", "0.51448417", "0.5142317", "0.5136455", "0.5129215", "0.51288354", "0.51279104" ]
0.0
-1
Case 4: Nested collection is compared and differences are identified. Collection is not in a order.
@Test public void testCompareCase4() throws IOException { Person p1 = DataUtil.readDataFromFile("test/data/case4/case4-person1.json", Person.class); Person p2 = DataUtil.readDataFromFile("test/data/case4/case4-person2.json", Person.class); // Custom context IContext ctx = ObjectCompare.compare(p1, p2); debug(ctx.getDifferences()); Assert.assertTrue(ctx.hasDifferences()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testAddAll_int_Collection_Order() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(1, 2, 3);\n instance.addAll(1, c);\n\n List expResult = Arrays.asList(3, 1, 2, 3, 2);\n\n for (int i = 0; i < expResult.size(); i++) {\n assertEquals(expResult.get(i), instance.get(i));\n }\n }", "@Test\n public void testAddAll_int_Collection_Order_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(1, 2, 3);\n instance.addAll(1, c);\n\n List expResult = Arrays.asList(3, 1, 2, 3, 2, 3, 2, 3, 2);\n\n for (int i = 0; i < expResult.size(); i++) {\n assertEquals(expResult.get(i), instance.get(i));\n }\n }", "public boolean compareObjects(Object object1, Object object2, AbstractSession session) {\n Object firstCollection = getRealCollectionAttributeValueFromObject(object1, session);\n Object secondCollection = getRealCollectionAttributeValueFromObject(object2, session);\n ContainerPolicy containerPolicy = getContainerPolicy();\n\n if (containerPolicy.sizeFor(firstCollection) != containerPolicy.sizeFor(secondCollection)) {\n return false;\n }\n\n if (containerPolicy.sizeFor(firstCollection) == 0) {\n return true;\n }\n Object iterFirst = containerPolicy.iteratorFor(firstCollection);\n Object iterSecond = containerPolicy.iteratorFor(secondCollection);\n\n //loop through the elements in both collections and compare elements at the\n //same index. This ensures that a change to order registers as a change.\n while (containerPolicy.hasNext(iterFirst)) {\n //fetch the next object from the first iterator.\n Object firstAggregateObject = containerPolicy.next(iterFirst, session);\n Object secondAggregateObject = containerPolicy.next(iterSecond, session);\n\n //fetch the next object from the second iterator.\n //matched object found, break to outer FOR loop\t\t\t\n if (!getReferenceDescriptor().getObjectBuilder().compareObjects(firstAggregateObject, secondAggregateObject, session)) {\n return false;\n }\n }\n return true;\n }", "public static void main(String[] args) {\n\t\tCollection c=new ArrayList();\n\t\t\n\t\tc.add(23);\n\t\tc.add(34);\n\t\t\n\t\tCollection c1=new ArrayList();\n\t\t\n\tc1.add(45);\n\tc1.add(67);\n\t\n\tc.addAll(c1);\n\tSystem.out.println(c);\n\t\n\t\n\tCollection c2=new ArrayList();\n\tc2.add(12);\n\tc2.add(23);\n\tc2.add(25);\n\t\n\tCollection c3=new ArrayList();\n\tc3.add(34);\n\tc3.add(45);\n\tc3.add(25);\n\tc3.add(25);\n\t\n\tc2.addAll(c3);\n\t\n\tSystem.out.println(c2);\n\tSystem.out.println(\"-------------------\");\n\t\n\t\n\tc2.removeAll(c3);\n\tSystem.out.println(c2);\n\t\n\tSystem.out.println(\"-------------------\");\n\tCollection c4=new ArrayList();\n\tc4.add(25);\n\tc4.add(23);\n\tc4.add(86);\n\tc4.add(98);\n\t\n\t\n\t\n\tCollection c5=new ArrayList();\n\tc5.add(25);\n\tc5.add(23);\n\tc5.add(12);\n\tc5.add(13);\n\t\n\tc4.retainAll(c5);\n\tSystem.out.println(c4);\n\t\n\tSystem.out.println(\"-------------------\");\n\t\n\tCollection c6=new ArrayList();\n\tc6.add(12);\n\tc6.add(23);\n\t\n\tObject a[]= c6.toArray();\n\tfor(int i=0;i < a.length ; i++)\n\t{\n\t\tSystem.out.println(a[i]);\n\t}\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\tc4.clear();\n\tSystem.out.println(c4);\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t}", "@Test\n public void testSubList_SubList_Item_Added() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n instance.addAll(c);\n\n List<Integer> result = (SegmentedOasisList<Integer>) instance.subList(1, 4);\n result.add(8);\n\n List<Integer> expResult = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n\n assertTrue(isEqual(expResult, instance));\n\n }", "public static void oldTest1()\r\n\t{\n\t\tArrayList personlist = new ArrayList();\r\n\t\tpersonlist.add(new Person(\"one\"));\r\n\t\tpersonlist.add(new Person(\"two\"));\r\n\t\tpersonlist.add(new Person(\"three\"));\r\n\t\tpersonlist.add(new Worker(\"oneA\", \"job1\"));\r\n\t\tpersonlist.add(new Worker(\"oneA\", \"job2\"));\r\n\t\tPrintCollection1(personlist);\r\n\t\tPrintCollection(personlist);\r\n\t}", "@Test\n public void testSet_Order_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n Collection c = Arrays.asList(1, 1, 7, 1, 1, 1, 1);\n instance.addAll(c);\n\n instance.set(2, 9);\n\n List<Integer> expResult = Arrays.asList(1, 1, 9, 1, 1, 1, 1);\n\n assertTrue(isEqual(expResult, instance));\n\n }", "@Test\n public void testRetainAll_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(3);\n instance.add(2);\n instance.add(1);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(2, 3);\n boolean expectedResult = true;\n boolean result = instance.retainAll(c);\n\n assertEquals(expectedResult, result);\n\n }", "@Test\n public void testAdd_int_GenericType_Order_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n Collection c = Arrays.asList(1, 1, 7, 1, 1, 1, 1);\n instance.addAll(c);\n\n instance.add(2, 9);\n List<Integer> expResult = Arrays.asList(1, 1, 9, 7, 1, 1, 1, 1);\n\n assertTrue(isEqual(expResult, instance));\n }", "@Test\n public void testRetainAll() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n instance.add(1);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(2, 3);\n boolean expectedResult = true;\n boolean result = instance.retainAll(c);\n\n assertEquals(expectedResult, result);\n }", "@Test\n public void testSet_Order() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 1, 1, 1, 1);\n instance.addAll(c);\n\n instance.set(2, 9);\n\n List<Integer> expResult = Arrays.asList(1, 1, 9, 1, 1, 1, 1);\n\n assertTrue(isEqual(expResult, instance));\n\n }", "void compareDataStructures();", "public void testEquals() {\n TaskSeries s1 = new TaskSeries(\"S\");\n s1.add(new Task(\"T1\", new Date(1), new Date(2)));\n s1.add(new Task(\"T2\", new Date(11), new Date(22)));\n TaskSeries s2 = new TaskSeries(\"S\");\n s2.add(new Task(\"T1\", new Date(1), new Date(2)));\n s2.add(new Task(\"T2\", new Date(11), new Date(22)));\n TaskSeriesCollection c1 = new TaskSeriesCollection();\n c1.add(s1);\n c1.add(s2);\n TaskSeries s1b = new TaskSeries(\"S\");\n s1b.add(new Task(\"T1\", new Date(1), new Date(2)));\n s1b.add(new Task(\"T2\", new Date(11), new Date(22)));\n TaskSeries s2b = new TaskSeries(\"S\");\n s2b.add(new Task(\"T1\", new Date(1), new Date(2)));\n s2b.add(new Task(\"T2\", new Date(11), new Date(22)));\n TaskSeriesCollection c2 = new TaskSeriesCollection();\n c2.add(s1b);\n c2.add(s2b);\n }", "@Test\n public void testEquals_Overflow() throws Exception {\n\n File file = File.createTempFile(\"oasis-collection-test-persistence\", \"\");\n file.mkdirs();\n file.deleteOnExit();\n\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n instance.addAll(c);\n\n SegmentedOasisList<Integer> readInstance;\n\n try (ObjectOutputStream outObjStream = new ObjectOutputStream(new FileOutputStream(file))) {\n outObjStream.writeObject(instance);\n }\n\n try (ObjectInputStream inObjStream = new ObjectInputStream(new FileInputStream(file))) {\n readInstance = (SegmentedOasisList<Integer>) inObjStream.readObject();\n }\n\n assertEquals(instance, readInstance);\n\n }", "@Test\n public void testRemove_int_Order_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n Collection c = Arrays.asList(1, 1, 7, 1, 1, 1, 1);\n instance.addAll(c);\n\n instance.remove(2);\n\n List<Integer> expResult = Arrays.asList(1, 1, 1, 1, 1, 1);\n\n assertTrue(isEqual(expResult, instance));\n\n }", "public void triCollection(){\r\n Collections.sort(collection);\r\n }", "@Test\n public void testAdd_int_GenericType_Order() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 1, 1, 1, 1);\n instance.addAll(c);\n\n instance.add(2, 9);\n List<Integer> expResult = Arrays.asList(1, 1, 9, 7, 1, 1, 1, 1);\n\n assertTrue(isEqual(expResult, instance));\n }", "@Test\n public void testRetainAll_Size() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n instance.add(1);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(2, 3);\n instance.retainAll(c);\n\n int expectedResult = 5;\n assertEquals(expectedResult, instance.size());\n\n }", "@Test\n public void testRemove_int_Order() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 1, 1, 1, 1);\n instance.addAll(c);\n\n instance.remove(2);\n\n List<Integer> expResult = Arrays.asList(1, 1, 1, 1, 1, 1);\n\n assertTrue(isEqual(expResult, instance));\n\n }", "@Test\n public void testEquals() throws Exception {\n\n File file = File.createTempFile(\"oasis-collection-test-persistence\", \"\");\n file.mkdirs();\n file.deleteOnExit();\n\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n instance.addAll(c);\n\n SegmentedOasisList<Integer> readInstance;\n\n try (ObjectOutputStream outObjStream = new ObjectOutputStream(new FileOutputStream(file))) {\n outObjStream.writeObject(instance);\n }\n\n try (ObjectInputStream inObjStream = new ObjectInputStream(new FileInputStream(file))) {\n readInstance = (SegmentedOasisList<Integer>) inObjStream.readObject();\n }\n\n assertEquals(instance, readInstance);\n\n }", "@Test\n public void testSubList() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n instance.addAll(c);\n\n List expResult = Arrays.asList(1, 7, 7);\n OasisList<Integer> result = (OasisList<Integer>) instance.subList(1, 4);\n\n assertTrue(isEqual(expResult, result));\n\n }", "@Test\r\n public void testToJsonCollection() {\r\n System.out.println(\"testToJsonCollection()\");\r\n Relation instance = new Relation(\"singer\", Relation.OUT);\r\n String actualResult = \"\";\r\n String result = instance.toJsonCollection();\r\n assertNotSame(result, actualResult);\r\n }", "@Test\n public void testAddAll_Collection_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(3);\n instance.add(2);\n instance.add(2);\n\n Collection c = Arrays.asList(1, 2, 3);\n\n boolean expResult = true;\n boolean result = instance.addAll(c);\n assertEquals(expResult, result);\n\n }", "public static void arrayListSubtypeTest()\r\n\t{\r\n\t\tArrayList<Person> persons = new ArrayList<Person>();\r\n\t persons.add(new Person(\"twoa\"));\r\n\t persons.add(new Person(\"threea\"));\r\n\t PrintCollection(persons);\r\n\t // PrintCollection1(persons);\r\n\t PrintCollection2(persons);\r\n\t}", "@Test\n\tpublic void testDifference5() {\n\n\t\t// parameters inpt here\n\n\t\tint[] arr = { 1, 2, 3, 5, 7, 8, 9 };\n\t\tint[] diff1 = { 1, 2, 3, 7, 8 }; // this list\n\n\t\t// test difference\n\t\tSLLSet listObj2 = new SLLSet(arr);\n\t\tSLLSet listObj19 = new SLLSet(diff1);\n\t\tSLLSet listObj20 = listObj2.difference(listObj19);\n\n\t\tString expected = \"5, 9\";\n\t\tint expectedSize = 2;\n\n\t\tassertEquals(expectedSize, listObj20.getSize());\n\t\tassertEquals(expected, listObj20.toString());\n\n\t}", "@Test\n public void testItem_Ordering() {\n OasisList<Integer> baseList = new SegmentedOasisList<>(2, 2);\n\n List<Integer> expResult = Arrays.asList(1, 2, 6, 8);\n baseList.addAll(expResult);\n\n for (int i = 0; i < expResult.size(); i++) {\n assertEquals(expResult.get(i), baseList.get(i));\n }\n }", "public void testTypedCollection()\r\n\t{\r\n broker.beginTransaction();\r\n for (int i = 1; i < 4; i++)\r\n {\r\n ProductGroupWithTypedCollection example = new ProductGroupWithTypedCollection();\r\n example.setId(i);\r\n ProductGroupWithTypedCollection group =\r\n (ProductGroupWithTypedCollection) broker.getObjectByQuery(\r\n new QueryByIdentity(example));\r\n assertEquals(\"should be equal\", i, group.getId());\r\n //System.out.println(group + \"\\n\\n\");\r\n\r\n broker.delete(group);\r\n broker.store(group);\r\n }\r\n broker.commitTransaction();\r\n\t}", "@Test\n public void testRetainAll_Size_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n\n Collection c = Arrays.asList(3, 2, 3, 2, 3, 1, 2);\n instance.addAll(c);\n\n c = Arrays.asList(2, 3);\n instance.retainAll(c);\n\n int expectedResult = 6;\n assertEquals(expectedResult, instance.size());\n\n }", "@Test @Ignore\r\n public void testSubListSetAll() {\r\n ObservableList list = createObservableList(true);\r\n int from = 2;\r\n int to = 6;\r\n List subList = list.subList(from, to);\r\n int subSize = subList.size();\r\n List itemsOfSubList = new ArrayList(subList);\r\n// itemsOfSubList.remove(0);\r\n ListChangeReport report = new ListChangeReport(list);\r\n subList.retainAll(itemsOfSubList);\r\n assertEquals(\"wrong assumption: implementation is clever enough to detect retain same\",\r\n 1, report.getEventCount());\r\n Change c = report.getLastChange();\r\n LOG.info(\"changed list: \" + list);\r\n prettyPrint(c);\r\n assertEquals(\"single change\" , 1, getChangeCount(c));\r\n assertEquals(\"removed\", subSize, getRemovedSize(c));\r\n assertEquals(\"added\" , subSize, getAddedSize(c));\r\n assertTrue(\"single replace\" + c, wasSingleReplaced(c));\r\n }", "@Test\n public void testIsSubSet() {\n System.out.println(\"isSubSet\");\n ArrayList<Integer> arr1 = new ArrayList<>();\n arr1.add(12);\n arr1.add(10);\n arr1.add(23);\n ArrayList<Integer> arr2 = new ArrayList<>();\n arr2.add(10);\n arr2.add(23);\n Collections.sort(arr1);\n ArrayListRecursive instance = new ArrayListRecursive(arr1, arr2);\n boolean expResult = true;\n boolean result = instance.isSubSet();\n assertEquals(expResult, result);\n }", "Collection<? extends Object> getSameAs();", "@Override\n\t\tpublic int compare(final Collection<?> first, final Collection<?> second)\n\t\t{\n\t\t\tif( first.size() < second.size() )\n\t\t\t\treturn -1;\n\t\t\telse if( first.size() > second.size() )\n\t\t\t\treturn 1;\n\t\t\treturn 0;\n\t\t}", "@Test\n public void testSubList_SubList_Item_Update_idempotent() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n instance.addAll(c);\n\n List<Integer> expResult = Arrays.asList(1, 7, 7);\n SegmentedOasisList<Integer> result = (SegmentedOasisList<Integer>) instance.subList(1, 4);\n\n instance.set(3, 8);\n\n assertTrue(isEqual(expResult, result));\n\n }", "@Test\n\t@SuppressWarnings(\"unchecked\")\n\tpublic void testAddAndRemoveLinkOkComponentTreeSetSorted() {\n\t\tTypeRapidBean rtypeParent = (TypeRapidBean) TypeRapidBean\n\t\t\t\t.forName(\"org.rapidbeans.test.addressbook5.Addressbook\");\n\t\tTypePropertyCollection aetypeParentSons = (TypePropertyCollection) rtypeParent.getPropertyType(\"persons\");\n\t\tClass<?> colClassBefore = aetypeParentSons.getCollectionClass();\n\t\tAssert.assertSame(TreeSet.class, colClassBefore);\n\t\tRapidBean adrbook = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Addressbook\");\n\t\tRapidBean person1 = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Person\");\n\t\tperson1.setPropValue(\"lastname\", \"A\");\n\t\tRapidBean person2 = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Person\");\n\t\tperson2.setPropValue(\"lastname\", \"B\");\n\t\tAssert.assertNull(((PropertyCollection) adrbook.getProperty(\"persons\")).getValue());\n\t\tAssert.assertNull(person1.getParentBean());\n\t\tAssert.assertNull(person2.getParentBean());\n\n\t\t// add person 2 before person 1\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person2);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person1);\n\t\tAssert.assertEquals(2,\n\t\t\t\t((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue()).size());\n\t\tIterator<Link> iter = ((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue())\n\t\t\t\t.iterator();\n\t\tAssert.assertSame(person1, iter.next());\n\t\tAssert.assertSame(person2, iter.next());\n\t\tAssert.assertSame(adrbook, person1.getParentBean());\n\t\tAssert.assertSame(adrbook, person2.getParentBean());\n\n\t\t// reset persons and add person 1 before person 2\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).setValue(null);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person1);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person2);\n\t\tAssert.assertEquals(2,\n\t\t\t\t((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue()).size());\n\t\titer = ((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue()).iterator();\n\t\tAssert.assertSame(person1, iter.next());\n\t\tAssert.assertSame(person2, iter.next());\n\t\tAssert.assertSame(adrbook, person1.getParentBean());\n\t\tAssert.assertSame(adrbook, person2.getParentBean());\n\n\t\t// remove the links again\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).removeLink(person2);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).removeLink(person1);\n\t\tAssert.assertEquals(0,\n\t\t\t\t((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue()).size());\n\t\tAssert.assertNull(person1.getParentBean());\n\t\tAssert.assertNull(person2.getParentBean());\n\t}", "@Test\n public void testSubList_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n instance.addAll(c);\n\n List expResult = Arrays.asList(1, 7, 7);\n OasisList<Integer> result = (OasisList<Integer>) instance.subList(1, 4);\n\n assertTrue(isEqual(expResult, result));\n\n }", "@SuppressWarnings(\"rawtypes\")\n\t@Test\n\tpublic void retrieveCollections() {\n\t\t// We can also query for the collections themselves, since they are\n\t\t// first class objects.\n\n\t\tObjectSet result = db.queryByExample(new ArrayList());\n\t\tlistResult(result);\n\n\t\t// as we are initializing readouts\n\t\tassertEquals(2, result.size());\n\n\t}", "@Test\n\t@SuppressWarnings(\"unchecked\")\n\tpublic void testAddAndRemoveLinkOkComponentTreeSetSortedChangeProperties() {\n\t\t// initialize one address book containing 4 entries\n\t\tTypeRapidBean rtypeParent = (TypeRapidBean) TypeRapidBean\n\t\t\t\t.forName(\"org.rapidbeans.test.addressbook5.Addressbook\");\n\t\tTypePropertyCollection aetypeParentSons = (TypePropertyCollection) rtypeParent.getPropertyType(\"persons\");\n\t\tClass<?> colClassBefore = aetypeParentSons.getCollectionClass();\n\t\tAssert.assertSame(TreeSet.class, colClassBefore);\n\t\tRapidBean adrbook = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Addressbook\");\n\t\tAssert.assertNull(((PropertyCollection) adrbook.getProperty(\"persons\")).getValue());\n\t\tRapidBean person1 = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Person\");\n\t\tperson1.setPropValue(\"lastname\", \"B\");\n\t\tRapidBean person2 = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Person\");\n\t\tperson2.setPropValue(\"lastname\", \"C\");\n\t\tRapidBean person3 = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Person\");\n\t\tperson3.setPropValue(\"lastname\", \"D\");\n\t\tRapidBean person4 = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Person\");\n\t\tperson4.setPropValue(\"lastname\", \"E\");\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person2);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person1);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person4);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person3);\n\t\tAssert.assertEquals(4,\n\t\t\t\t((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue()).size());\n\t\tIterator<Link> iter = ((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue())\n\t\t\t\t.iterator();\n\t\tAssert.assertSame(person1, iter.next());\n\t\tAssert.assertSame(person2, iter.next());\n\t\tAssert.assertSame(person3, iter.next());\n\t\tAssert.assertSame(person4, iter.next());\n\n\t\t// change one single property and check correct sorting\n\t\tperson2.setPropValue(\"lastname\", \"X\");\n\t\titer = ((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue()).iterator();\n\t\tAssert.assertSame(person1, iter.next());\n\t\tAssert.assertSame(person3, iter.next());\n\t\tAssert.assertSame(person4, iter.next());\n\t\tAssert.assertSame(person2, iter.next());\n\n\t\t// remove the links agains\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).removeLink(person1);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).removeLink(person2);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).removeLink(person3);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).removeLink(person4);\n\t\tAssert.assertEquals(0,\n\t\t\t\t((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue()).size());\n\t}", "static void assertEqualContents(Collection<?> expected, Collection<?> provided) {\n assertEquals(expected.size(), provided.size());\n assertEquals(new HashSet<>(expected), new HashSet<>(provided));\n }", "@Test\n\tpublic void testAddLinkOkMultNtoNArrayList() {\n\t\t// configure collection properties of Location and ClosingPeriod\n\t\t// to use TreeSet as collection implementing class\n\t\t((TypePropertyCollection) (new Location()).getProperty(\"closedons\").getType())\n\t\t\t\t.setCollectionClass(ArrayList.class);\n\t\t((TypePropertyCollection) (new ClosingPeriod()).getProperty(\"locations\").getType())\n\t\t\t\t.setCollectionClass(ArrayList.class);\n\t\ttstNMAssociationInverse();\n\t}", "@Test\n\tpublic void testAddLinkInvalidSameLinkTwiceArrayList() {\n\t\tAddress adr = new Address();\n\t\tPerson martin = new Person(\"\\\"Martin\\\" \\\"Bl�mel\\\" \\\"19641014\\\"\");\n\t\tTypePropertyCollection proptype = (TypePropertyCollection) adr.getProperty(\"inhabitants\").getType();\n\t\tClass<?> colClassBefore = proptype.getCollectionClass();\n\t\ttry {\n\t\t\tproptype.setCollectionClass(ArrayList.class);\n\t\t\tAssert.assertSame(ArrayList.class, proptype.getCollectionClass());\n\t\t\tAssert.assertNull(adr.getInhabitants());\n\t\t\tAssert.assertNull(martin.getAddress());\n\n\t\t\t// add the same Person to the Address as inhabitant twice\n\t\t\tadr.addInhabitant(martin);\n\t\t\ttry {\n\t\t\t\t// should Assert.fail because of the association end with\n\t\t\t\t// multiplicity\n\t\t\t\t// 1\n\t\t\t\tadr.addInhabitant(martin);\n\t\t\t\tAssert.fail(\"expected ValidationException exception\");\n\t\t\t} catch (ValidationException e) {\n\t\t\t\tAssert.assertTrue(true);\n\t\t\t}\n\t\t} finally {\n\t\t\tproptype.setCollectionClass(colClassBefore);\n\t\t}\n\t}", "@Test\n public void testList(){\n ArrayList<Integer> integers = Lists.newArrayList(1, 2, 3, 4);\n ArrayList<Integer> integers2 = Lists.newArrayList(1, 2, 3, 4, 5);\n// integers2.removeAll(integers);\n// System.out.println(integers2);\n integers2.retainAll(integers);\n System.out.println(integers2);\n }", "private void veryifyCollection(String contName, String[] subgOIDs,\n String[][] objSubgItemTypeNames,\n String[][] linkSubgItemTypeNames) {\n Container container = DB.getRootContainer().getChild(contName);\n\n // verify subgraph OIDs\n List expectedSubgOIDs = Arrays.asList(subgOIDs);\n List actualSubgOIDInts = container.getSubgraphOIDs(); // IntegerS\n List actualSubgOIDs = new ArrayList();\n for (Iterator actualSubgOIDIntIter = actualSubgOIDInts.iterator();\n actualSubgOIDIntIter.hasNext();) {\n Integer actualSubgOIDInt = (Integer) actualSubgOIDIntIter.next();\n actualSubgOIDs.add(actualSubgOIDInt.toString());\n }\n assertEquals(expectedSubgOIDs.size(), actualSubgOIDs.size());\n assertTrue(expectedSubgOIDs.containsAll(actualSubgOIDs));\n\n // verify subgraph contents\n NST objSharedItemNST = container.getItemNST(true);\n NST linkSharedItemNST = container.getItemNST(false);\n veryifSubgraphItems(objSubgItemTypeNames, objSharedItemNST);\n veryifSubgraphItems(linkSubgItemTypeNames, linkSharedItemNST);\n }", "@Test\n\tpublic void testAddLinkOkMultNtoNArrayListSameLinkTwice() {\n\t\t// create 2 ClosingPeriods and 2 Locations\n\t\tTypePropertyCollection proptypeCpLocations = (TypePropertyCollection) TypeRapidBean\n\t\t\t\t.forName(ClosingPeriod.class.getName()).getPropertyType(\"locations\");\n\t\tTypePropertyCollection proptypeLocClosedons = (TypePropertyCollection) TypeRapidBean\n\t\t\t\t.forName(Location.class.getName()).getPropertyType(\"closedons\");\n\t\tClass<?> colClassCpLocationsBefore = proptypeCpLocations.getCollectionClass();\n\t\tClass<?> colClassLocClosedonsBefore = proptypeLocClosedons.getCollectionClass();\n\t\tproptypeCpLocations.setCollectionClass(ArrayList.class);\n\t\tproptypeLocClosedons.setCollectionClass(ArrayList.class);\n\t\tClosingPeriod cp1 = new ClosingPeriod(new String[] { \"20051225\", \"XMas Holidays\", \"20060101\" });\n\t\tLocation loc1 = new Location(new String[] { \"Location A\" });\n\t\ttry {\n\t\t\tcp1.addLocation(loc1);\n\t\t\tcp1.addLocation(loc1);\n\t\t\tAssert.assertEquals(2, cp1.getLocations().size());\n\t\t\tClosingPeriod cp11Inverse = loc1.getClosedons().iterator().next();\n\t\t\tAssert.assertSame(cp1, cp11Inverse);\n\t\t\tAssert.assertEquals(2, loc1.getClosedons().size());\n\t\t\tcp1.removeLocation(loc1);\n\t\t\tAssert.assertEquals(1, cp1.getLocations().size());\n\t\t\tcp1.removeLocation(loc1);\n\t\t\tAssert.assertEquals(0, cp1.getLocations().size());\n\t\t} finally {\n\t\t\tproptypeCpLocations.setCollectionClass(colClassCpLocationsBefore);\n\t\t\tproptypeLocClosedons.setCollectionClass(colClassLocClosedonsBefore);\n\t\t}\n\t}", "@Test\n public void testRemoveAll_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(2, 3);\n boolean expectedResult = true;\n boolean result = instance.removeAll(c);\n\n assertEquals(expectedResult, result);\n\n }", "@Test\n public void testRetainAll_Empty_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n Collection c = Arrays.asList(1, 1, 1, 1, 1, 1, 1);\n instance.addAll(c);\n\n c = Arrays.asList(2, 3);\n instance.retainAll(c);\n\n int expectedResult = 0;\n assertEquals(expectedResult, instance.size());\n\n }", "@Test\n\tpublic void TEAM3_CONTROLLER_UT09() {\n\t\t// PRECONDITIONS\n\t\tArrayList<Integer> a1 = new ArrayList<Integer>();\n\t\ta1.add(100);\n\t\ta1.add(200);\n\t\t\n\t\tArrayList<Integer> a2 = new ArrayList<Integer>();\n\t\ta2.add(150);\n\t\ta2.add(250);\n\t\t\n\t\tScheduleMakerController smc = new ScheduleMakerController();\n\t\t\n\t\t// INPUT\n\t\tCollection<Collection<?>> doubleElementCollection = new Vector<Collection<?>>();\n\t\tdoubleElementCollection.add(a1);\n\t\tdoubleElementCollection.add(a2);\n\t\t\n\t\t// EXPECTED OUTPUT\n\t\tboolean sizeIsOne = smc.sizeIsOne(doubleElementCollection);\n\t\tassertFalse(sizeIsOne);\n\t}", "@Ignore\r\n @Test\r\n public void testContainsCollection() {\r\n System.out.println(\"containsCollection\");\r\n NumberCollection nc = null;\r\n NumberCollection instance = new NumberCollection();\r\n boolean expResult = false;\r\n boolean result = instance.containsCollection(nc);\r\n assertEquals(expResult, result);\r\n \r\n }", "@Test\n public void testAddAll_int_Collection_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(1, 2, 3);\n\n boolean expResult = true;\n boolean result = instance.addAll(1, c);\n assertEquals(expResult, result);\n\n }", "@Test\n public void testIntersection4()\n {\n List<Integer> expected = new ArrayList<>();\n ConciseSet set1 = new ConciseSet();\n ConciseSet set2 = new ConciseSet();\n for (int i = 0; i < 1000; i++) {\n set1.add(i);\n if (i != 500) {\n set2.add(i);\n expected.add(i);\n }\n }\n\n verifyIntersection(expected, set1, set2);\n }", "@Test\n public void testIntersectionOfLists() {\n System.out.println(\"IntersectionOfLists\");\n ArrayList<Integer> arr1 = new ArrayList<>();\n arr1.add(12);\n arr1.add(10);\n arr1.add(23);\n ArrayList<Integer> arr2 = new ArrayList<>();\n arr2.add(23);\n arr2.add(10);\n Collections.sort(arr2);\n ArrayListRecursive instance = new ArrayListRecursive(arr1, arr2);\n List result = instance.IntersectionOfLists();\n Collections.sort(result);\n assertEquals(arr2, result);\n }", "@Rollback\n @Test\n public void getAllCreditOperationsByCreditFamilyId() {\n expectedCollection.add(creditOperationFamilyExpected);\n\n //AssertUtils.assertCreditOperationsCollections(expectedCollection, actualCollection);\n }", "@Test\n public void testIntersection3()\n {\n List<Integer> expected = new ArrayList<>();\n ConciseSet set1 = new ConciseSet();\n ConciseSet set2 = new ConciseSet();\n for (int i = 0; i < 1000; i++) {\n set1.add(i);\n set2.add(i);\n expected.add(i);\n }\n\n verifyIntersection(expected, set1, set2);\n }", "@Test\n @DependsOnMethod(\"testShallowCopy\")\n public void testEquals() {\n Citation citation = HardCodedCitations.EPSG;\n final PropertyAccessor accessor = createPropertyAccessor();\n assertFalse(accessor.equals(citation, HardCodedCitations.GEOTIFF, ComparisonMode.STRICT));\n assertTrue (accessor.equals(citation, HardCodedCitations.EPSG, ComparisonMode.STRICT));\n /*\n * Same test than above, but on a copy of the EPSG constant.\n */\n citation = new DefaultCitation();\n assertTrue (accessor.shallowCopy(HardCodedCitations.EPSG, citation));\n assertFalse(accessor.equals(citation, HardCodedCitations.GEOTIFF, ComparisonMode.STRICT));\n assertTrue (accessor.equals(citation, HardCodedCitations.EPSG, ComparisonMode.STRICT));\n /*\n * Identifiers shall be stored in different collection instances with equal content.\n */\n final int index = accessor.indexOf(\"identifiers\", true);\n final Object source = accessor.get(index, HardCodedCitations.EPSG);\n final Object target = accessor.get(index, citation);\n assertInstanceOf(\"identifiers\", Collection.class, source);\n assertInstanceOf(\"identifiers\", Collection.class, target);\n// assertNotSame(source, target); // TODO: require non-empty collection.\n assertEquals (source, target);\n HardCodedCitations.assertIdentifiersForEPSG((Collection<?>) source);\n HardCodedCitations.assertIdentifiersForEPSG((Collection<?>) target);\n /*\n * Set the identifiers to null, which should clear the collection.\n */\n// TODO assertEquals(\"Expected the previous value.\", source, accessor.set(index, citation, null, true));\n final Object value = accessor.get(index, citation);\n assertNotNull(\"Should have replaced null by an empty collection.\", value);\n assertTrue(\"Should have replaced null by an empty collection.\", ((Collection<?>) value).isEmpty());\n }", "@Test\n public void testPersistence_Elements_Overflow() throws Exception {\n\n File file = File.createTempFile(\"oasis-collection-test-persistence\", \"\");\n file.mkdirs();\n file.deleteOnExit();\n\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n instance.addAll(c);\n\n SegmentedOasisList<Integer> readInstance;\n\n try (ObjectOutputStream outObjStream = new ObjectOutputStream(new FileOutputStream(file))) {\n outObjStream.writeObject(instance);\n }\n\n try (ObjectInputStream inObjStream = new ObjectInputStream(new FileInputStream(file))) {\n readInstance = (SegmentedOasisList<Integer>) inObjStream.readObject();\n }\n\n assertEquals(instance, readInstance);\n\n }", "@Test\n public void testAddAll_Collection() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(1, 2, 3);\n\n boolean expResult = true;\n boolean result = instance.addAll(c);\n assertEquals(expResult, result);\n\n }", "@Test\n public void testIterator_Overflow() {\n OasisList<Integer> baseList = new SegmentedOasisList<>(2, 2);\n baseList.addAll(Arrays.asList(1, 2, 6, 8, 7, 8, 90));\n\n Iterator<Integer> instance = baseList.iterator();\n assertTrue(isEqual(instance, baseList));\n\n }", "static void AddCollections()\n\t{\n\t\tSet<String> oSet1 = null;\n\t\tSet<String> oSet2 = null;\n\t\ttry {\n\t\t\toSet1 = new TreeSet<String>();\n\t\t\toSet1.add(\"Apple\");\n\t\t\toSet1.add(\"Boy\");\n\t\t\toSet1.add(\"Cat\");\n\t\t\tSystem.out.println(oSet1);\n\t\t\t\n\t\t\toSet2 = new TreeSet<String>();\n\t\t\toSet2.add(\"Dog\");\n\t\t\toSet2.add(\"Arrow\");\n\t\t\toSet2.add(\"Frog\");\n\t\t\tSystem.out.println(oSet2);\n\t\t\t\n\t\t\toSet1.addAll(oSet2);\n\t\t\tSystem.out.println(oSet1);\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\toSet1 = null;\n\t\t\toSet2 = null;\n\t\t}\n\t}", "private static void compareForIdenticalKeys() {\n Integer[] identical = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1};\n\n Insertion insertion = new Insertion();\n insertion.analyzeSort(identical);\n insertion.getStat().printReport();\n\n Selection selection = new Selection();\n selection.analyzeSort(identical);\n selection.getStat().printReport();\n }", "@Test\n public void testRetainAll_Empty() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n\n instance.add(1);\n instance.add(1);\n instance.add(1);\n instance.add(1);\n\n Collection c = Arrays.asList(2, 3);\n instance.retainAll(c);\n\n int expectedResult = 0;\n assertEquals(expectedResult, instance.size());\n\n }", "@SuppressWarnings(\"resource\")\n @Test\n public void testEquals() {\n try {\n SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions1 = new SubtenantPolicyGroupListOptions(Integer.valueOf(-51),\n Long.valueOf(105),\n Order.getDefault(),\n \"efc9e20d-db05-4f2f-b41f-016029d4faff\",\n null,\n null);\n SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions2 = new SubtenantPolicyGroupListOptions(Integer.valueOf(-51),\n Long.valueOf(105),\n Order.getDefault(),\n \"efc9e20d-db05-4f2f-b41f-016029d4faff\",\n null,\n null);\n SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions3 = new SubtenantPolicyGroupListOptions(Integer.valueOf(101),\n Long.valueOf(87),\n Order.getDefault(),\n \"99c3b952-8e9d-4dd1-9075-8be04a5e58e8\",\n null,\n null);\n assertNotNull(subtenantpolicygrouplistoptions1);\n assertNotNull(subtenantpolicygrouplistoptions2);\n assertNotNull(subtenantpolicygrouplistoptions3);\n assertNotSame(subtenantpolicygrouplistoptions2, subtenantpolicygrouplistoptions1);\n assertNotSame(subtenantpolicygrouplistoptions3, subtenantpolicygrouplistoptions1);\n assertEquals(subtenantpolicygrouplistoptions2, subtenantpolicygrouplistoptions1);\n assertEquals(subtenantpolicygrouplistoptions2, subtenantpolicygrouplistoptions1);\n assertEquals(subtenantpolicygrouplistoptions1, subtenantpolicygrouplistoptions2);\n assertEquals(subtenantpolicygrouplistoptions1, subtenantpolicygrouplistoptions1);\n assertFalse(subtenantpolicygrouplistoptions1.equals(null));\n assertNotEquals(subtenantpolicygrouplistoptions3, subtenantpolicygrouplistoptions1);\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }", "@Test\n public void testDiff() {\n \t//create data set\n final LastWriteWinSet<String> lastWriteWinSet1 = new LastWriteWinSet<>();\n lastWriteWinSet1.add(time3, \"php\");\n lastWriteWinSet1.add(time1, \"java\");\n lastWriteWinSet1.add(time2, \"python\");\n lastWriteWinSet1.add(time1, \"scala\");\n lastWriteWinSet1.delete(time2, \"scala\");\n\n final LastWriteWinSet<String> lastWriteWinSet2 = new LastWriteWinSet<>();\n lastWriteWinSet2.add(time1, \"php\");\n lastWriteWinSet2.add(time3, \"python\");\n lastWriteWinSet2.add(time1, \"scala\");\n lastWriteWinSet2.delete(time2, \"php\");\n\n // run test\n final LastWriteWinSet<String> resultSet = lastWriteWinSet1.diff(lastWriteWinSet2);\n \n assertTrue(resultSet.getData().size() == 3);\n assertTrue(resultSet.getData().contains(\"php\"));\n assertTrue(resultSet.getData().contains(\"python\"));\n assertTrue(resultSet.getData().contains(\"java\"));\n \n final GrowOnlySet<LastWriteWinSet.ItemTD<String>> resultAddSet = resultSet.getAddSet();\n final Set<LastWriteWinSet.ItemTD<String>> addedData = resultAddSet.getData();\n assertTrue(addedData.size() == 3);\n assertTrue(addedData.contains(new LastWriteWinSet.ItemTD<>(3, \"php\")));\n assertTrue(addedData.contains(new LastWriteWinSet.ItemTD<>(1, \"java\")));\n assertTrue(addedData.contains(new LastWriteWinSet.ItemTD<>(2, \"python\")));\n\n final GrowOnlySet<LastWriteWinSet.ItemTD<String>> resultDeleteSet = resultSet.getDeleteSet();\n final Set<LastWriteWinSet.ItemTD<String>> deletedData = resultDeleteSet.getData();\n assertTrue(deletedData.size() == 1);\n assertTrue(deletedData.contains(new LastWriteWinSet.ItemTD<>(2, \"scala\")));\n }", "public void merge(WModelObject otherObject)\n\t{\n\t\tWCollection collection = null;\n\n\t\t// Check to see if the argument is a WCollection object\n\t\ttry\n\t\t{\n\t\t\tcollection = (WCollection)otherObject;\n\t\t}\n\t\tcatch (ClassCastException exc)\n\t\t{\n\t\t\tcom.ing.connector.Registrar.logError(getClass().getName() + \": Collection objects can only be merged with other Collection objects\");\n\t\t\treturn;\n\t\t}\n\n\t\t// Check to see if the two objects are of the same class\n\t\tClass thisClass = getClass();\n\t\tClass objClass = otherObject.getClass();\n\n\t\tif (thisClass.getName().compareTo(objClass.getName()) != 0)\n\t\t{\n\t\t\tcom.ing.connector.Registrar.logError(thisClass.getName() + \": Cannot compare two different collection objects\");\n\t\t\treturn;\n\t\t}\n\n\t\tWCollection primCollection = new WCollection(thisClass.getName());\t//JFG6.0\n\n\t\tint iObjectCount = this.size();\t\t\t\t\t\t\t//JFG6.0\n\t\tcom.ing.connector.Registrar.logDebugMessage(\"prim object size = \" + iObjectCount);\n\t\tfor (int iCount = 0; iCount < iObjectCount; ++iCount)\t\t\t\t//JFG6.0\n\t\t{\n\t\t\tprimCollection.addElement(this.elementAt(iCount));\t\t\t//JFG6.0\n\t\t\t//com.ing.connector.Registrar.logDebugMessage(\"Entering inside()\");\n\t\t}\n\n primCollection.sort(\"ClassKey\",true);\t\t\t\t\t\t//JFG6.0\n collection.sort(\"ClassKey\",true);\t\t\t\t\t\t\t//JFG6.0\n\n\t\tint iSecObjectCount = collection.size();\n int iStart = 0;\t\t\t\t\t\t\t\t\t\t//JFG6.0\n com.ing.connector.Registrar.logDebugMessage(\"Sec object size = \" + iSecObjectCount);\n\t\tfor (int iSecCount = 0; iSecCount < iSecObjectCount; ++iSecCount)\n\t\t{\n\t\t WModelObject secObject = null;\n\t\t WModelObject primObject = null;\n\n\t\t secObject = collection.elementAt(iSecCount);\n\t\t boolean keyFound = false;\n\n\t\t int iPrimObjectCount = primCollection.size();\n\t\t for (int iPrimCount = iStart; iPrimCount < iPrimObjectCount; ++iPrimCount)\n\t\t {\n\t\t primObject = primCollection.elementAt(iPrimCount);\n\n int iCompare = primObject.compareTo(secObject, \"ClassKey\");\n //com.ing.connector.Registrar.logDebugMessage(\"primObject.compareTo iCompare = \" + iCompare);\n \n\t\t if (iCompare == 0)\n\t\t {\n\t\t\tkeyFound = true;\n\t\t\tcom.ing.connector.Registrar.logDebugMessage(\"prim object and sec object are equal class \" + primObject.getClass().getName());\n\t\t\tprimObject.merge(secObject);\t//LPMO264\n iStart = iPrimCount + 1;\t\t\t\t\t\t\t//JFG6.0\n \n\t\t\tbreak;\n\t\t }\n else\t\t\t\t\t\t\t\t\t\t\t//JFG6.0\n {\n\t\t if (iCompare > 0)\t\t\t\t\t\t\t\t\t//JFG6.0\n\t\t {\n\t\t\t keyFound = false;\t\t\t\t\t\t\t\t//JFG6.0\n iStart = iPrimCount;\t\t\t\t\t\t\t\t//JFG6.0\n \n\t\t break;\t\t\t\t\t\t\t\t\t\t//JFG6.0\n\n }\n }\n\t\t }\n\t\t \n\t\t //com.ing.connector.Registrar.logDebugMessage(\"is keyFound \" + keyFound);\n\t\t if (!keyFound)\n\t\t {\n\t\t addElement(secObject);\n\t\t }\n\t\t}\n\n\t\tprimCollection = null;\t\t\t\t\t\t\t\t\t//JFG6.0\n\n//\t\tint iObjectCount = collection.size();\n//\t\tfor (int iCount = 0; iCount < iObjectCount; ++iCount)\n//\t\t{\n//\t\t\taddElement(collection.elementAt(iCount));\n//\t\t}\n\t}", "@Override\n protected abstract SecondOrderCollection wrapped();", "@Test\n public void testRemoveAll() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(2, 3);\n boolean expectedResult = true;\n boolean result = instance.removeAll(c);\n\n assertEquals(expectedResult, result);\n\n }", "public static void main(String[] args) {\n\n\t\tCollection<String> collection1 = new ArrayList<String>();\n\t\tcollection1.add(\"Toronto\");\n\t\tcollection1.add(\"Hamilton\");\n\t\tcollection1.add(\"London\");\n\t\tcollection1.add(\"Ottawa\");\n\t\tcollection1.add(\"Toronto\");\n\t\tSystem.out.println(\"A list of cities in c1 is \" + collection1);\n\t\tSystem.out.println(\" Is hamilton in c1? \" + collection1.contains(\"Hamilton\"));\n\t\tSystem.out.println(\"Size of collection c1 is \" + collection1.size());\n\t\tCollection<String> collection2 = new ArrayList<String>();\n\t\tcollection1.add(\"Vancouver\");\n\t\tcollection1.add(\"Delhi\");\n\t\tcollection1.add(\"chd\");\n\t\tcollection1.add(\"Toronto\");\n\t\tcollection1.addAll(collection2);\n\t\tSystem.out.println(\"combined list is : \" + collection1);\n//\t\tCollection<String> c1 = new ArrayList<String>(collection1);\n//\t\tc1.retainAll(collection2);\n//\t\tSystem.out.println(\"A list of cities in c1 is \" + c1);\n//\t\tc1.removeAll(collection2);\n//\t\tSystem.out.println(\"A list of cities in c1 is \" + c1);\n\t\t\n\t}", "@Test\n public void testAddCity_City03() {\n\n System.out.println(\"addCity\");\n City cityTest = new City(new Pair(41.243345, -8.674084), \"city0\", 28);\n Set<City> expResult = new HashSet<>();\n\n expResult.add(new City(new Pair(41.243345, -8.674084), \"city0\", 28));\n expResult.add(new City(new Pair(41.237364, -8.846746), \"city1\", 72));\n expResult.add(new City(new Pair(40.519841, -8.085113), \"city2\", 81));\n expResult.add(new City(new Pair(41.118700, -8.589700), \"city3\", 42));\n expResult.add(new City(new Pair(41.467407, -8.964340), \"city4\", 64));\n expResult.add(new City(new Pair(41.337408, -8.291943), \"city5\", 74));\n expResult.add(new City(new Pair(41.314965, -8.423371), \"city6\", 80));\n expResult.add(new City(new Pair(40.822244, -8.794953), \"city7\", 11));\n expResult.add(new City(new Pair(40.781886, -8.697502), \"city8\", 7));\n expResult.add(new City(new Pair(40.851360, -8.136585), \"city9\", 65));\n\n sn10.addCity(cityTest);\n Set<City> result = sn10.getCitiesList();\n assertEquals(expResult, result);\n }", "@Test\n public void test1POJOWriteWithTransCollection() throws KeyManagementException, NoSuchAlgorithmException, Exception {\n PojoRepository<Artifact, Long> products = client.newPojoRepository(Artifact.class, Long.class);\n // Load more than 110 objects into different collections\n Transaction t = client.openTransaction();\n try {\n for (int i = 112; i < 222; i++) {\n if (i % 2 == 0) {\n products.write(this.getArtifact(i), t, \"even\", \"numbers\");\n }\n else {\n products.write(this.getArtifact(i), t, \"odd\", \"numbers\");\n }\n }\n } catch (Exception e) {\n throw e;\n } finally {\n t.commit();\n }\n assertEquals(\"Total number of object recods\", 110, products.count(\"numbers\"));\n assertEquals(\"Collection even count\", 55, products.count(\"even\"));\n assertEquals(\"Collection odd count\", 55, products.count(\"odd\"));\n for (long i = 112; i < 222; i++) {\n // validate all the records inserted are readable\n assertTrue(\"Product id \" + i + \" does not exist\", products.exists(i));\n this.validateArtifact(products.read(i));\n }\n Transaction t2 = client.openTransaction();\n try {\n Long[] ids = { (long) 112, (long) 113 };\n products.delete(ids, t2);\n assertFalse(\"Product id 112 exists ?\", products.exists((long) 112, t2));\n // assertTrue(\"Product id 112 exists ?\",products.exists((long)112));\n products.deleteAll(t2);\n for (long i = 112; i < 222; i++) {\n assertFalse(\"Product id \" + i + \" exists ?\", products.exists(i, t2));\n // assertTrue(\"Product id \"+i+\" exists ?\",products.exists(i));\n }\n } catch (Exception e) {\n throw e;\n } finally {\n t2.commit();\n }\n // see any document exists\n for (long i = 112; i < 222; i++) {\n assertFalse(\"Product id \" + i + \" exists ?\", products.exists(i));\n }\n // see if it complains when there are no records\n products.delete((long) 112);\n products.deleteAll();\n }", "private static boolean compareList(List<Object> l1, List<Object> l2)\n {\n int count=0;\n for (Object o : l1)\n {\n Object temp = o;\n for (Object otemp : l2)\n {\n if (EqualsBuilder.reflectionEquals(temp, otemp))\n {\n count++;\n }\n }\n\n }\n\n if(count == l1.size()) return true;\n return false;\n\n }", "@Test\n public void testRemoveAll_Not_Empty_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(1);\n instance.add(2);\n\n Collection c = Arrays.asList(2, 3);\n instance.removeAll(c);\n\n int expectedResult = 1;\n assertEquals(expectedResult, instance.size());\n\n }", "@Test\n public void testAddAll_int_Collection_Size_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(1, 2, 3);\n instance.addAll(1, c);\n\n int expResult = 9;\n int result = instance.size();\n assertEquals(expResult, result);\n\n }", "@Test\n public void testIntersection6()\n {\n List<Integer> expected = new ArrayList<>();\n ConciseSet set1 = new ConciseSet();\n for (int i = 0; i < 5; i++) {\n set1.add(i);\n }\n for (int i = 1000; i < 1005; i++) {\n set1.add(i);\n }\n\n ConciseSet set2 = new ConciseSet();\n for (int i = 800; i < 805; i++) {\n set2.add(i);\n }\n for (int i = 806; i < 1005; i++) {\n set2.add(i);\n }\n\n for (int i = 1000; i < 1005; i++) {\n expected.add(i);\n }\n\n verifyIntersection(expected, set1, set2);\n }", "@Test\n public void testContainsAll_Not_Contain() {\n\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n instance.add(1);\n instance.add(4);\n\n Collection c = Arrays.asList(1, 2, 5);\n\n boolean expResult = false;\n boolean result = instance.containsAll(c);\n assertEquals(expResult, result);\n }", "@Test\r\n\t\tpublic void testIntersection() {\n\t\t\ttestingSet = new IntegerSet(list1);\r\n\t\t\ttestingSet2= new IntegerSet(list2);\r\n\t\t\t// create 3rdset = to the intersection list \r\n\t\t\ttestingSet3= new IntegerSet(intersection);\r\n\t\t\t// create 4th set =to the intersection of set1 and set2\r\n\t\t\ttestingSet4= testingSet.intersection(testingSet, testingSet2);\r\n\t\t\t// sets 3 and set 4 should be equal \r\n\t\t\t// assertEquals for these parameters is a deprecated method \r\n\t\t\tassertArrayEquals(testingSet3.toArray(),testingSet4.toArray());\t \r\n\t\t}", "@Test\n public void testIterator() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 2, 6, 8));\n\n Iterator<Integer> instance = baseList.iterator();\n assertTrue(isEqual(instance, baseList));\n\n }", "private <T> void assertDeduped(List<T> array, Comparator<T> cmp, int expectedLength) {\n List<List<T>> types = List.of(new ArrayList<T>(array), new LinkedList<>(array));\n for (List<T> clone : types) {\n // dedup the list\n CollectionUtils.sortAndDedup(clone, cmp);\n // verify unique elements\n for (int i = 0; i < clone.size() - 1; ++i) {\n assertNotEquals(cmp.compare(clone.get(i), clone.get(i + 1)), 0);\n }\n assertEquals(expectedLength, clone.size());\n }\n }", "public static boolean equalsUnordered( Collection<?> collection1, Collection<?> collection2 )\r\n {\r\n //\r\n boolean retval = collection1.size() == collection2.size();\r\n \r\n //\r\n for ( Object iObject : collection1 )\r\n {\r\n retval &= collection2.contains( iObject );\r\n }\r\n \r\n //\r\n return retval;\r\n }", "@Test\n\tpublic void testNestedCollectionAccess() throws ParseException {\n\t\tExpression expression = langParser(\"x['g'][v]\").expression();\n\t\tassertTrue(expression instanceof CollectionAccess);\n\t\tCollectionAccess collectionAccess = (CollectionAccess) expression;\n\t\tassertTrue(collectionAccess.getCollection() instanceof CollectionAccess);\n\t\tCollectionAccess collectionAccess1 = (CollectionAccess) collectionAccess.getCollection();\n\t\tassertEquals(((Identifier) collectionAccess1.getCollection()).getName(), \"x\");\n\t\tassertTrue(collectionAccess1.getKey() instanceof StringLiteral);\n\t\tassertEquals(((StringLiteral) collectionAccess1.getKey()).getValue(), \"g\");\n\t\tassertTrue(collectionAccess.getKey() instanceof Identifier);\n\t\tassertEquals(((Identifier) collectionAccess.getKey()).getName(), \"v\");\n\t}", "@Test\n public void testIntersection5()\n {\n final int[] ints1 = {33, 100000};\n final int[] ints2 = {34, 200000};\n List<Integer> expected = new ArrayList<>();\n\n ConciseSet set1 = new ConciseSet();\n for (int i : ints1) {\n set1.add(i);\n }\n ConciseSet set2 = new ConciseSet();\n for (int i : ints2) {\n set2.add(i);\n }\n\n verifyIntersection(expected, set1, set2);\n }", "@Test\r\n public void descendingSetIterator() throws Exception {\r\n TreeSet<Integer> kek = new TreeSet<>();\r\n kek.addAll(sInt);\r\n TreeSet<Integer> check = (TreeSet<Integer>) kek.descendingSet();\r\n Object[] arr1 = kek.toArray();\r\n Object[] arr2 = check.toArray();\r\n for (int i = 0; i < arr1.length; i++) {\r\n assertEquals(arr1[i], arr2[arr1.length - 1 - i]);\r\n }\r\n }", "@Test\n public void remove1() {\n RBTree<Integer> tree = new RBTree<>();\n List<Integer> add = new ArrayList<>(List.of(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10));\n List<Integer> rem = new ArrayList<>(List.of(4, 7, 9, 5));\n for (int i : add) {\n tree.add(i);\n }\n int err = 0;\n Set<Integer> remSet = new HashSet<>();\n for (int i : rem) {\n remSet.add(i);\n boolean removed = tree.remove(i);\n if (!removed && add.contains(i)) {\n System.err.println(\"Could not remove element \" + i + \"!\");\n err++;\n }\n if (removed && !add.contains(i)) {\n System.err.println(\"Removed the non-existing element \" + i + \"!\");\n err++;\n }\n for (int a : add) {\n if (!tree.contains(a) && !remSet.contains(a)) {\n System.err.println(\"Removed element \" + a + \" after removing \" + i + \"!\");\n err++;\n }\n }\n }\n for (int i : rem) {\n if (tree.remove(i)) {\n System.err.println(\"Removed a already remove element \" + i + \"!\");\n err++;\n }\n }\n for (int i : rem) {\n if (tree.contains(i)) {\n System.out.println(\"The element \" + i + \" was not removed!\");\n err++;\n }\n }\n \n assertEquals(\"There were \" + err + \" errors!\", 0, err);\n rem.retainAll(add);\n assertEquals(\"Incorrect tree size!\", add.size() - rem.size(), tree.size());\n }", "@Test\n @Ignore\n public void testTraverseAncestors() {\n System.out.println(\"testTraverseAncestors\");\n List<Person> people = dao.listAncestors(\"KWCB-HZV\", 10, \"\", false);\n assertIdsEqual(ancestors, people);\n }", "@Test\n\tpublic void TEAM3_CONTROLLER_UT08() {\n\t\t// PRECONDITIONS\n\t\tArrayList<Integer> a = new ArrayList<Integer>();\n\t\ta.add(100);\n\t\t\n\t\tScheduleMakerController smc = new ScheduleMakerController();\n\t\t\n\t\t// INPUT\n\t\tCollection<Collection<?>> singleElementCollection = new HashSet<Collection<?>>();\n\t\tsingleElementCollection.add(a);\n\t\t\n\t\t// EXPECTED OUTPUT\n\t\tboolean sizeIsOne = smc.sizeIsOne(singleElementCollection);\n\t\tassertTrue(sizeIsOne);\n\t}", "@Test\n public void testVirtualLists() throws Exception {\n assertReducesTo(\"2 dup 1 at.\", \"2 dup\");\n }", "@Test\n public void testItem_Ordering_With_Holes() {\n OasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n\n List<Integer> expResult = Arrays.asList(1, 6, 8, 19);\n instance.addAll(Arrays.asList(1, 2, 6, 8));\n\n instance.remove(1);\n instance.add(19);\n\n for (int i = 0; i < expResult.size(); i++) {\n assertEquals(expResult.get(i), instance.get(i));\n }\n }", "@Test\n public void testRemoveAll_Not_Empty() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(1);\n instance.add(2);\n\n Collection c = Arrays.asList(2, 3);\n instance.removeAll(c);\n\n int expectedResult = 1;\n assertEquals(expectedResult, instance.size());\n\n }", "public void test2() {\n //$NON-NLS-1$\n deployBundles(\"test2\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "public static void main(String[] args) {\n\t\t\n\t\t// 10 Tests: \n\t\tList<Integer> a1 = new List<>();\n\t\tList<Integer> b1 = new List<>(1, new List<>(2, new List<>(3, new List<>())));\n\t\t\n\t\tList<Integer> a2 = new List<>(1, new List<>(2, new List<>(3, new List<>())));\n\t\tList<Integer> b2 = new List<>();\n\t\t\n\t\tList<Integer> a3 = new List<>();\n\t\tList<Integer> b3 = new List<>();\n\t\t\n\t\tList<Integer> a4 = new List<>(1, new List<>(2, new List<>(3, new List<>())));\n\t\tList<Integer> b4 = new List<>(4, new List<>(5, new List<>(6, new List<>())));\n\t\t\n\t\tList<Integer> a5 = new List<>(4, new List<>(5, new List<>(6, new List<>())));\n\t\tList<Integer> b5 = new List<>(1, new List<>(2, new List<>(3, new List<>())));\n\t\t\n\t\tList<Integer> a6 = new List<>(1, new List<>(4, new List<>(6, new List<>()))); \n\t\tList<Integer> b6 = new List<>(5, new List<>(6, new List<>(9, new List<>())));\n\t\t\n\t\tList<Integer> a7 = new List<>(-6, new List<>(-5, new List<>(-4, new List<>())));\n\t\tList<Integer> b7 = new List<>(-3, new List<>(-2, new List<>(-1, new List<>())));\n\t\t\n\t\tList<Integer> a8 = new List<>(-2, new List<>(-1, new List<>(0, new List<>())));\n\t\tList<Integer> b8 = new List<>(-1, new List<>(0, new List<>(1, new List<>(2, new List<>()))));\n\t\t\n\t\tList<Integer> a9 = new List<>(-1, new List<>(0, new List<>(1, new List<>())));\n\t\tList<Integer> b9 = new List<>(3, new List<>(4, new List<>(5, new List<>())));\n\t\t\n\t\tList<Integer> a10 = new List<>(-1, new List<>(0, new List<>(1, new List<>())));\n\t\tList<Integer> b10 = new List<>(-1, new List<>(0, new List<>(1, new List<>())));\n\t\t\n\t\tSystem.out.println(unique(a1, b1));\n\t\tSystem.out.println(unique(a2, b2));\n\t\tSystem.out.println(unique(a3, b3));\n\t\tSystem.out.println(unique(a4, b4));\n\t\tSystem.out.println(unique(a5, b5));\n\t\tSystem.out.println(unique(a6, b6));\n\t\tSystem.out.println(unique(a7, b7));\n\t\tSystem.out.println(unique(a8, b8));\n\t\tSystem.out.println(unique(a9, b9));\n\t\tSystem.out.println(unique(a10, b10));\n\t\t\n\t}", "@Test\n public void testAddAll_int_Collection_Size() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(1, 2, 3);\n instance.addAll(1, c);\n\n int expResult = 5;\n int result = instance.size();\n assertEquals(expResult, result);\n\n }", "public void testPersistence() {\n ImmutableSet<Integer> set = new ImmutableSet();\n for (int i = -50; i < 51; i++) {\n set.add(i);\n assertTrue(set.current != set.pastVersions.get(set.pastVersions.size()-1));\n }\n for(int i = -50; i < 51; i++) {\n set.remove(i);\n assertTrue(set.current != set.pastVersions.get(set.pastVersions.size()-1));\n }\n }", "@Test\n public void testContainsAll_Not_Contain_Overflow() {\n\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(3);\n instance.add(2);\n instance.add(1);\n instance.add(4);\n instance.add(5);\n instance.add(4);\n instance.add(7);\n\n Collection c = Arrays.asList(1, 2, 5, 8);\n\n boolean expResult = false;\n boolean result = instance.containsAll(c);\n assertEquals(expResult, result);\n }", "@Test\r\n public void testVertices() {\r\n System.out.println(\"vertices\");\r\n MyDigraph instance = new MyDigraph();\r\n\r\n Object v1Element = 1;\r\n Vertex v1 = instance.insertVertex(v1Element);\r\n\r\n Collection colection = instance.vertices();\r\n boolean result = colection.contains(v1);\r\n boolean expectedResult = true;\r\n assertEquals(expectedResult, result);\r\n\r\n instance.removeVertex(v1);\r\n result = colection.contains(v1);\r\n expectedResult = false;\r\n assertEquals(expectedResult, result);\r\n }", "@Test\n public void testAddAll_int_Collection() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(1, 2, 3);\n\n boolean expResult = true;\n boolean result = instance.addAll(1, c);\n assertEquals(expResult, result);\n\n }", "@Test\n public void testRemoveAll_Size() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(2, 3);\n instance.removeAll(c);\n\n int expectedResult = 0;\n assertEquals(expectedResult, instance.size());\n\n }", "@Test\r\n\tpublic void testRetainsAll() {\r\n\t\tDoubleList sample = new DoubleList(list.subList(1, 5));\r\n\t\tsample.add(new Munitions(4, 24, \"cuprum\"));\r\n\t\tAssert.assertTrue(list.retainAll(sample));\r\n\t\tAssert.assertEquals(4, list.size());\r\n\t}", "@Test\n public void testContainsAll_Contains() {\n\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n instance.add(1);\n instance.add(4);\n\n Collection c = Arrays.asList(1, 2, 3);\n\n boolean expResult = true;\n boolean result = instance.containsAll(c);\n assertEquals(expResult, result);\n }", "private static void test1() {\n HashSet<Contact> contacts = new HashSet<>();\n\n Contact contact1 = new Contact(123, \"Vasiliy\", \"+380681234136\");\n\n contacts.add(contact1);\n\n\n //------------------------------------------\n\n\n Contact contact2 = new Contact(123, \"Vasiliy\", \"+380689876543\");\n\n contacts.remove(contact2);\n contacts.add(contact2);\n\n printCollection(contacts);\n }", "@Test\r\n\tpublic void testCompareCase1() throws IOException {\r\n\t\tPerson p1 = DataUtil.readDataFromFile(\"test/data/case1/case1-person1.json\", Person.class);\r\n\t\tPerson p2 = DataUtil.readDataFromFile(\"test/data/case1/case1-person2.json\", Person.class);\r\n\r\n\t\tIContext ctx = ObjectCompare.compare(p1, p2);\r\n\t\tdebug(ctx.getDifferences());\r\n\t\tAssert.assertTrue(ctx.hasDifferences());\r\n\t\tAssert.assertEquals(4, ctx.getDifferences().size());\r\n\t}", "@Test\n public void test17() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1337,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test17\");\n LinkedHashSet<Object> linkedHashSet0 = new LinkedHashSet<Object>();\n ResettableIterator<Object> resettableIterator0 = IteratorUtils.loopingIterator((Collection<?>) linkedHashSet0);\n assertEquals(false, resettableIterator0.hasNext());\n }", "@Test\n public void testGet_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n Collection c = Arrays.asList(1, 1, 7, 1, 1, 1, 1);\n instance.addAll(c);\n Integer expResult = 7;\n Integer result = instance.get(2);\n assertEquals(expResult, result);\n\n }", "@Test\n public void normal_recursive_delete_collection_in_WebDAV_collection() {\n String topCollectionName = \"topDavCollection\";\n String topDavFileName = \"topFile.txt\";\n\n String odataCollectionName = \"odataCollection\";\n String entityType = \"deleteEntType\";\n String accept = \"application/xml\";\n String complexTypeName = \"deleteComplexType\";\n String complexTypePropertyName = \"deleteComplexTypeProperty\";\n\n String davCollectionName = \"davCollection\";\n String davFileName = \"davFile.txt\";\n\n String enginesvcCollectionName = \"engineSvcCollection\";\n String srcFileName = \"srcFile.js\";\n\n try {\n // Create top collection.\n DavResourceUtils.createWebDAVCollection(Setup.TEST_CELL1, Setup.TEST_BOX1, topCollectionName,\n Setup.BEARER_MASTER_TOKEN, HttpStatus.SC_CREATED);\n // Create top dav file.\n DavResourceUtils.createWebDAVFile(Setup.TEST_CELL1, Setup.TEST_BOX1,\n topCollectionName + \"/\" + topDavFileName, \"text/html\", TOKEN, \"foobar\", HttpStatus.SC_CREATED);\n\n // Create OData collection in top collection.\n String odataCollectionPath = topCollectionName + \"/\" + odataCollectionName;\n DavResourceUtils.createODataCollection(TOKEN, HttpStatus.SC_CREATED, Setup.TEST_CELL1, Setup.TEST_BOX1,\n odataCollectionPath);\n // Create entity type.\n Http.request(\"box/entitySet-post.txt\")\n .with(\"cellPath\", Setup.TEST_CELL1)\n .with(\"boxPath\", Setup.TEST_BOX1)\n .with(\"odataSvcPath\", odataCollectionPath)\n .with(\"token\", \"Bearer \" + TOKEN)\n .with(\"accept\", accept)\n .with(\"Name\", entityType)\n .returns()\n .statusCode(HttpStatus.SC_CREATED);\n // Create complex type.\n ComplexTypeUtils.create(Setup.TEST_CELL1, Setup.TEST_BOX1,\n odataCollectionPath, complexTypeName, HttpStatus.SC_CREATED);\n // Create complex type property.\n ComplexTypePropertyUtils.create(Setup.TEST_CELL1, Setup.TEST_BOX1, odataCollectionPath,\n complexTypePropertyName, complexTypeName, \"Edm.String\", HttpStatus.SC_CREATED);\n\n // Create WebDAV collection in top collection.\n String davCollectionPath = topCollectionName + \"/\" + davCollectionName;\n DavResourceUtils.createWebDAVCollection(Setup.TEST_CELL1, Setup.TEST_BOX1, davCollectionPath,\n Setup.BEARER_MASTER_TOKEN, HttpStatus.SC_CREATED);\n // Create dav file.\n DavResourceUtils.createWebDAVFile(Setup.TEST_CELL1, Setup.TEST_BOX1, davCollectionPath + \"/\" + davFileName,\n \"text/html\", TOKEN, \"foobar\", HttpStatus.SC_CREATED);\n\n // Create EngineService collection in top collection.\n String enginesvcCollectionPath = topCollectionName + \"/\" + enginesvcCollectionName;\n DavResourceUtils.createServiceCollection(Setup.BEARER_MASTER_TOKEN, HttpStatus.SC_CREATED,\n Setup.TEST_CELL1, Setup.TEST_BOX1, enginesvcCollectionPath);\n // Create dav file.\n DavResourceUtils.createServiceCollectionSource(Setup.TEST_CELL1, Setup.TEST_BOX1, enginesvcCollectionPath,\n srcFileName, \"text/javascript\", TOKEN, \"foobar\", HttpStatus.SC_CREATED);\n\n // Recursive delete collection.\n deleteRecursive(topCollectionName, \"true\", HttpStatus.SC_NO_CONTENT);\n } finally {\n deleteRecursive(topCollectionName, \"true\", -1);\n }\n }", "@Test\n\tpublic void test1() {\n\t\t// add a new method for ordering\n\t\tMySet<String> s = loadSet();\n\t\ts.add(\"a\");\n\t\ts.add(\"b\");\n\t\ts.add(\"c\");\n\t\ts.add(\"d\");\n\t\ts.add(\"e\");\n\t\ts.add(\"f\");\n\t\ts.add(\"g\");\n\t\ts.add(\"h\");\n\t\tassertEquals(8, ((MyLinkedHashSet<String>) s).map.size());\n\n\t\tString exp = \"[ a b c d e f g h ]\";\n\t\tassertEquals(exp, s.toString());\n\n\t}" ]
[ "0.6342223", "0.62565494", "0.6096818", "0.60250825", "0.6022617", "0.601855", "0.59776294", "0.5926459", "0.5921754", "0.58816415", "0.58470947", "0.58350927", "0.58295685", "0.5808326", "0.57988656", "0.5773804", "0.57672155", "0.5757442", "0.5756103", "0.57280755", "0.5720477", "0.5713358", "0.5702774", "0.56999564", "0.569498", "0.56917286", "0.56885946", "0.5649211", "0.5649131", "0.56398755", "0.559703", "0.5596136", "0.55900097", "0.5586562", "0.5586268", "0.55861217", "0.55757", "0.5574915", "0.55659413", "0.55447507", "0.5534818", "0.55346984", "0.5531505", "0.5530842", "0.55300975", "0.55284953", "0.5520002", "0.55106145", "0.550776", "0.5501273", "0.54964477", "0.546642", "0.54472286", "0.54437834", "0.54381317", "0.54341865", "0.54258126", "0.54254276", "0.54166335", "0.54157174", "0.540855", "0.5401879", "0.5393293", "0.53764486", "0.5355709", "0.5355079", "0.5343931", "0.5335894", "0.5334671", "0.5334533", "0.5331121", "0.53301877", "0.53278005", "0.53259945", "0.5322668", "0.53208876", "0.531663", "0.5307487", "0.528783", "0.52878124", "0.5287312", "0.5269797", "0.5269411", "0.5266309", "0.5261117", "0.5258729", "0.52545977", "0.5250085", "0.52495897", "0.52484715", "0.5248321", "0.5244276", "0.5242253", "0.52366686", "0.5236646", "0.5236483", "0.52340406", "0.5233288", "0.5226702", "0.5224386", "0.52224886" ]
0.0
-1
Case 4: Nested collection is compared and differences are identified. Collection is not in a order. second level nested collection has a difference.
@Test public void testCompareCase5() throws IOException { Person p1 = DataUtil.readDataFromFile("test/data/case5/case5-person1.json", Person.class); Person p2 = DataUtil.readDataFromFile("test/data/case5/case5-person2.json", Person.class); // Custom context IContext ctx = ObjectCompare.compare(p1, p2); debug(ctx.getDifferences()); Assert.assertTrue(ctx.hasDifferences()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testAddAll_int_Collection_Order() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(1, 2, 3);\n instance.addAll(1, c);\n\n List expResult = Arrays.asList(3, 1, 2, 3, 2);\n\n for (int i = 0; i < expResult.size(); i++) {\n assertEquals(expResult.get(i), instance.get(i));\n }\n }", "@Test\n public void testAddAll_int_Collection_Order_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(1, 2, 3);\n instance.addAll(1, c);\n\n List expResult = Arrays.asList(3, 1, 2, 3, 2, 3, 2, 3, 2);\n\n for (int i = 0; i < expResult.size(); i++) {\n assertEquals(expResult.get(i), instance.get(i));\n }\n }", "public boolean compareObjects(Object object1, Object object2, AbstractSession session) {\n Object firstCollection = getRealCollectionAttributeValueFromObject(object1, session);\n Object secondCollection = getRealCollectionAttributeValueFromObject(object2, session);\n ContainerPolicy containerPolicy = getContainerPolicy();\n\n if (containerPolicy.sizeFor(firstCollection) != containerPolicy.sizeFor(secondCollection)) {\n return false;\n }\n\n if (containerPolicy.sizeFor(firstCollection) == 0) {\n return true;\n }\n Object iterFirst = containerPolicy.iteratorFor(firstCollection);\n Object iterSecond = containerPolicy.iteratorFor(secondCollection);\n\n //loop through the elements in both collections and compare elements at the\n //same index. This ensures that a change to order registers as a change.\n while (containerPolicy.hasNext(iterFirst)) {\n //fetch the next object from the first iterator.\n Object firstAggregateObject = containerPolicy.next(iterFirst, session);\n Object secondAggregateObject = containerPolicy.next(iterSecond, session);\n\n //fetch the next object from the second iterator.\n //matched object found, break to outer FOR loop\t\t\t\n if (!getReferenceDescriptor().getObjectBuilder().compareObjects(firstAggregateObject, secondAggregateObject, session)) {\n return false;\n }\n }\n return true;\n }", "public static void oldTest1()\r\n\t{\n\t\tArrayList personlist = new ArrayList();\r\n\t\tpersonlist.add(new Person(\"one\"));\r\n\t\tpersonlist.add(new Person(\"two\"));\r\n\t\tpersonlist.add(new Person(\"three\"));\r\n\t\tpersonlist.add(new Worker(\"oneA\", \"job1\"));\r\n\t\tpersonlist.add(new Worker(\"oneA\", \"job2\"));\r\n\t\tPrintCollection1(personlist);\r\n\t\tPrintCollection(personlist);\r\n\t}", "public static void main(String[] args) {\n\t\tCollection c=new ArrayList();\n\t\t\n\t\tc.add(23);\n\t\tc.add(34);\n\t\t\n\t\tCollection c1=new ArrayList();\n\t\t\n\tc1.add(45);\n\tc1.add(67);\n\t\n\tc.addAll(c1);\n\tSystem.out.println(c);\n\t\n\t\n\tCollection c2=new ArrayList();\n\tc2.add(12);\n\tc2.add(23);\n\tc2.add(25);\n\t\n\tCollection c3=new ArrayList();\n\tc3.add(34);\n\tc3.add(45);\n\tc3.add(25);\n\tc3.add(25);\n\t\n\tc2.addAll(c3);\n\t\n\tSystem.out.println(c2);\n\tSystem.out.println(\"-------------------\");\n\t\n\t\n\tc2.removeAll(c3);\n\tSystem.out.println(c2);\n\t\n\tSystem.out.println(\"-------------------\");\n\tCollection c4=new ArrayList();\n\tc4.add(25);\n\tc4.add(23);\n\tc4.add(86);\n\tc4.add(98);\n\t\n\t\n\t\n\tCollection c5=new ArrayList();\n\tc5.add(25);\n\tc5.add(23);\n\tc5.add(12);\n\tc5.add(13);\n\t\n\tc4.retainAll(c5);\n\tSystem.out.println(c4);\n\t\n\tSystem.out.println(\"-------------------\");\n\t\n\tCollection c6=new ArrayList();\n\tc6.add(12);\n\tc6.add(23);\n\t\n\tObject a[]= c6.toArray();\n\tfor(int i=0;i < a.length ; i++)\n\t{\n\t\tSystem.out.println(a[i]);\n\t}\n\t\n\t\n\t\n\t\n\t\n\t\n\n\t\n\t\n\tc4.clear();\n\tSystem.out.println(c4);\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t}", "@Test\n public void testSubList_SubList_Item_Added() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n instance.addAll(c);\n\n List<Integer> result = (SegmentedOasisList<Integer>) instance.subList(1, 4);\n result.add(8);\n\n List<Integer> expResult = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n\n assertTrue(isEqual(expResult, instance));\n\n }", "@Test\n public void testSet_Order_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n Collection c = Arrays.asList(1, 1, 7, 1, 1, 1, 1);\n instance.addAll(c);\n\n instance.set(2, 9);\n\n List<Integer> expResult = Arrays.asList(1, 1, 9, 1, 1, 1, 1);\n\n assertTrue(isEqual(expResult, instance));\n\n }", "@Test\n public void testAdd_int_GenericType_Order_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n Collection c = Arrays.asList(1, 1, 7, 1, 1, 1, 1);\n instance.addAll(c);\n\n instance.add(2, 9);\n List<Integer> expResult = Arrays.asList(1, 1, 9, 7, 1, 1, 1, 1);\n\n assertTrue(isEqual(expResult, instance));\n }", "@Test\n\t@SuppressWarnings(\"unchecked\")\n\tpublic void testAddAndRemoveLinkOkComponentTreeSetSorted() {\n\t\tTypeRapidBean rtypeParent = (TypeRapidBean) TypeRapidBean\n\t\t\t\t.forName(\"org.rapidbeans.test.addressbook5.Addressbook\");\n\t\tTypePropertyCollection aetypeParentSons = (TypePropertyCollection) rtypeParent.getPropertyType(\"persons\");\n\t\tClass<?> colClassBefore = aetypeParentSons.getCollectionClass();\n\t\tAssert.assertSame(TreeSet.class, colClassBefore);\n\t\tRapidBean adrbook = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Addressbook\");\n\t\tRapidBean person1 = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Person\");\n\t\tperson1.setPropValue(\"lastname\", \"A\");\n\t\tRapidBean person2 = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Person\");\n\t\tperson2.setPropValue(\"lastname\", \"B\");\n\t\tAssert.assertNull(((PropertyCollection) adrbook.getProperty(\"persons\")).getValue());\n\t\tAssert.assertNull(person1.getParentBean());\n\t\tAssert.assertNull(person2.getParentBean());\n\n\t\t// add person 2 before person 1\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person2);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person1);\n\t\tAssert.assertEquals(2,\n\t\t\t\t((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue()).size());\n\t\tIterator<Link> iter = ((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue())\n\t\t\t\t.iterator();\n\t\tAssert.assertSame(person1, iter.next());\n\t\tAssert.assertSame(person2, iter.next());\n\t\tAssert.assertSame(adrbook, person1.getParentBean());\n\t\tAssert.assertSame(adrbook, person2.getParentBean());\n\n\t\t// reset persons and add person 1 before person 2\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).setValue(null);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person1);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person2);\n\t\tAssert.assertEquals(2,\n\t\t\t\t((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue()).size());\n\t\titer = ((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue()).iterator();\n\t\tAssert.assertSame(person1, iter.next());\n\t\tAssert.assertSame(person2, iter.next());\n\t\tAssert.assertSame(adrbook, person1.getParentBean());\n\t\tAssert.assertSame(adrbook, person2.getParentBean());\n\n\t\t// remove the links again\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).removeLink(person2);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).removeLink(person1);\n\t\tAssert.assertEquals(0,\n\t\t\t\t((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue()).size());\n\t\tAssert.assertNull(person1.getParentBean());\n\t\tAssert.assertNull(person2.getParentBean());\n\t}", "public void triCollection(){\r\n Collections.sort(collection);\r\n }", "void compareDataStructures();", "@Test\n public void testRemove_int_Order_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n Collection c = Arrays.asList(1, 1, 7, 1, 1, 1, 1);\n instance.addAll(c);\n\n instance.remove(2);\n\n List<Integer> expResult = Arrays.asList(1, 1, 1, 1, 1, 1);\n\n assertTrue(isEqual(expResult, instance));\n\n }", "@Override\n\t\tpublic int compare(final Collection<?> first, final Collection<?> second)\n\t\t{\n\t\t\tif( first.size() < second.size() )\n\t\t\t\treturn -1;\n\t\t\telse if( first.size() > second.size() )\n\t\t\t\treturn 1;\n\t\t\treturn 0;\n\t\t}", "@Test\n\t@SuppressWarnings(\"unchecked\")\n\tpublic void testAddAndRemoveLinkOkComponentTreeSetSortedChangeProperties() {\n\t\t// initialize one address book containing 4 entries\n\t\tTypeRapidBean rtypeParent = (TypeRapidBean) TypeRapidBean\n\t\t\t\t.forName(\"org.rapidbeans.test.addressbook5.Addressbook\");\n\t\tTypePropertyCollection aetypeParentSons = (TypePropertyCollection) rtypeParent.getPropertyType(\"persons\");\n\t\tClass<?> colClassBefore = aetypeParentSons.getCollectionClass();\n\t\tAssert.assertSame(TreeSet.class, colClassBefore);\n\t\tRapidBean adrbook = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Addressbook\");\n\t\tAssert.assertNull(((PropertyCollection) adrbook.getProperty(\"persons\")).getValue());\n\t\tRapidBean person1 = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Person\");\n\t\tperson1.setPropValue(\"lastname\", \"B\");\n\t\tRapidBean person2 = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Person\");\n\t\tperson2.setPropValue(\"lastname\", \"C\");\n\t\tRapidBean person3 = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Person\");\n\t\tperson3.setPropValue(\"lastname\", \"D\");\n\t\tRapidBean person4 = RapidBeanImplParent.createInstance(\"org.rapidbeans.test.addressbook5.Person\");\n\t\tperson4.setPropValue(\"lastname\", \"E\");\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person2);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person1);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person4);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).addLink(person3);\n\t\tAssert.assertEquals(4,\n\t\t\t\t((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue()).size());\n\t\tIterator<Link> iter = ((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue())\n\t\t\t\t.iterator();\n\t\tAssert.assertSame(person1, iter.next());\n\t\tAssert.assertSame(person2, iter.next());\n\t\tAssert.assertSame(person3, iter.next());\n\t\tAssert.assertSame(person4, iter.next());\n\n\t\t// change one single property and check correct sorting\n\t\tperson2.setPropValue(\"lastname\", \"X\");\n\t\titer = ((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue()).iterator();\n\t\tAssert.assertSame(person1, iter.next());\n\t\tAssert.assertSame(person3, iter.next());\n\t\tAssert.assertSame(person4, iter.next());\n\t\tAssert.assertSame(person2, iter.next());\n\n\t\t// remove the links agains\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).removeLink(person1);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).removeLink(person2);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).removeLink(person3);\n\t\t((PropertyCollection) adrbook.getProperty(\"persons\")).removeLink(person4);\n\t\tAssert.assertEquals(0,\n\t\t\t\t((Collection<Link>) ((PropertyCollection) adrbook.getProperty(\"persons\")).getValue()).size());\n\t}", "@Test\n public void testIsSubSet() {\n System.out.println(\"isSubSet\");\n ArrayList<Integer> arr1 = new ArrayList<>();\n arr1.add(12);\n arr1.add(10);\n arr1.add(23);\n ArrayList<Integer> arr2 = new ArrayList<>();\n arr2.add(10);\n arr2.add(23);\n Collections.sort(arr1);\n ArrayListRecursive instance = new ArrayListRecursive(arr1, arr2);\n boolean expResult = true;\n boolean result = instance.isSubSet();\n assertEquals(expResult, result);\n }", "public static void arrayListSubtypeTest()\r\n\t{\r\n\t\tArrayList<Person> persons = new ArrayList<Person>();\r\n\t persons.add(new Person(\"twoa\"));\r\n\t persons.add(new Person(\"threea\"));\r\n\t PrintCollection(persons);\r\n\t // PrintCollection1(persons);\r\n\t PrintCollection2(persons);\r\n\t}", "@Test\r\n public void testToJsonCollection() {\r\n System.out.println(\"testToJsonCollection()\");\r\n Relation instance = new Relation(\"singer\", Relation.OUT);\r\n String actualResult = \"\";\r\n String result = instance.toJsonCollection();\r\n assertNotSame(result, actualResult);\r\n }", "@Test\n\tpublic void testAddLinkOkMultNtoNArrayList() {\n\t\t// configure collection properties of Location and ClosingPeriod\n\t\t// to use TreeSet as collection implementing class\n\t\t((TypePropertyCollection) (new Location()).getProperty(\"closedons\").getType())\n\t\t\t\t.setCollectionClass(ArrayList.class);\n\t\t((TypePropertyCollection) (new ClosingPeriod()).getProperty(\"locations\").getType())\n\t\t\t\t.setCollectionClass(ArrayList.class);\n\t\ttstNMAssociationInverse();\n\t}", "@Test\n public void testSet_Order() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 1, 1, 1, 1);\n instance.addAll(c);\n\n instance.set(2, 9);\n\n List<Integer> expResult = Arrays.asList(1, 1, 9, 1, 1, 1, 1);\n\n assertTrue(isEqual(expResult, instance));\n\n }", "@Test\n\tpublic void testAddLinkOkMultNtoNArrayListSameLinkTwice() {\n\t\t// create 2 ClosingPeriods and 2 Locations\n\t\tTypePropertyCollection proptypeCpLocations = (TypePropertyCollection) TypeRapidBean\n\t\t\t\t.forName(ClosingPeriod.class.getName()).getPropertyType(\"locations\");\n\t\tTypePropertyCollection proptypeLocClosedons = (TypePropertyCollection) TypeRapidBean\n\t\t\t\t.forName(Location.class.getName()).getPropertyType(\"closedons\");\n\t\tClass<?> colClassCpLocationsBefore = proptypeCpLocations.getCollectionClass();\n\t\tClass<?> colClassLocClosedonsBefore = proptypeLocClosedons.getCollectionClass();\n\t\tproptypeCpLocations.setCollectionClass(ArrayList.class);\n\t\tproptypeLocClosedons.setCollectionClass(ArrayList.class);\n\t\tClosingPeriod cp1 = new ClosingPeriod(new String[] { \"20051225\", \"XMas Holidays\", \"20060101\" });\n\t\tLocation loc1 = new Location(new String[] { \"Location A\" });\n\t\ttry {\n\t\t\tcp1.addLocation(loc1);\n\t\t\tcp1.addLocation(loc1);\n\t\t\tAssert.assertEquals(2, cp1.getLocations().size());\n\t\t\tClosingPeriod cp11Inverse = loc1.getClosedons().iterator().next();\n\t\t\tAssert.assertSame(cp1, cp11Inverse);\n\t\t\tAssert.assertEquals(2, loc1.getClosedons().size());\n\t\t\tcp1.removeLocation(loc1);\n\t\t\tAssert.assertEquals(1, cp1.getLocations().size());\n\t\t\tcp1.removeLocation(loc1);\n\t\t\tAssert.assertEquals(0, cp1.getLocations().size());\n\t\t} finally {\n\t\t\tproptypeCpLocations.setCollectionClass(colClassCpLocationsBefore);\n\t\t\tproptypeLocClosedons.setCollectionClass(colClassLocClosedonsBefore);\n\t\t}\n\t}", "public void testEquals() {\n TaskSeries s1 = new TaskSeries(\"S\");\n s1.add(new Task(\"T1\", new Date(1), new Date(2)));\n s1.add(new Task(\"T2\", new Date(11), new Date(22)));\n TaskSeries s2 = new TaskSeries(\"S\");\n s2.add(new Task(\"T1\", new Date(1), new Date(2)));\n s2.add(new Task(\"T2\", new Date(11), new Date(22)));\n TaskSeriesCollection c1 = new TaskSeriesCollection();\n c1.add(s1);\n c1.add(s2);\n TaskSeries s1b = new TaskSeries(\"S\");\n s1b.add(new Task(\"T1\", new Date(1), new Date(2)));\n s1b.add(new Task(\"T2\", new Date(11), new Date(22)));\n TaskSeries s2b = new TaskSeries(\"S\");\n s2b.add(new Task(\"T1\", new Date(1), new Date(2)));\n s2b.add(new Task(\"T2\", new Date(11), new Date(22)));\n TaskSeriesCollection c2 = new TaskSeriesCollection();\n c2.add(s1b);\n c2.add(s2b);\n }", "@Test\n\tpublic void testDifference5() {\n\n\t\t// parameters inpt here\n\n\t\tint[] arr = { 1, 2, 3, 5, 7, 8, 9 };\n\t\tint[] diff1 = { 1, 2, 3, 7, 8 }; // this list\n\n\t\t// test difference\n\t\tSLLSet listObj2 = new SLLSet(arr);\n\t\tSLLSet listObj19 = new SLLSet(diff1);\n\t\tSLLSet listObj20 = listObj2.difference(listObj19);\n\n\t\tString expected = \"5, 9\";\n\t\tint expectedSize = 2;\n\n\t\tassertEquals(expectedSize, listObj20.getSize());\n\t\tassertEquals(expected, listObj20.toString());\n\n\t}", "@Test\n public void testRetainAll_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(3);\n instance.add(2);\n instance.add(1);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(2, 3);\n boolean expectedResult = true;\n boolean result = instance.retainAll(c);\n\n assertEquals(expectedResult, result);\n\n }", "@Test\n public void testRemove_int_Order() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 1, 1, 1, 1);\n instance.addAll(c);\n\n instance.remove(2);\n\n List<Integer> expResult = Arrays.asList(1, 1, 1, 1, 1, 1);\n\n assertTrue(isEqual(expResult, instance));\n\n }", "@Test\n public void testSubList() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n instance.addAll(c);\n\n List expResult = Arrays.asList(1, 7, 7);\n OasisList<Integer> result = (OasisList<Integer>) instance.subList(1, 4);\n\n assertTrue(isEqual(expResult, result));\n\n }", "@Test\n public void testAdd_int_GenericType_Order() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 1, 1, 1, 1);\n instance.addAll(c);\n\n instance.add(2, 9);\n List<Integer> expResult = Arrays.asList(1, 1, 9, 7, 1, 1, 1, 1);\n\n assertTrue(isEqual(expResult, instance));\n }", "static void AddCollections()\n\t{\n\t\tSet<String> oSet1 = null;\n\t\tSet<String> oSet2 = null;\n\t\ttry {\n\t\t\toSet1 = new TreeSet<String>();\n\t\t\toSet1.add(\"Apple\");\n\t\t\toSet1.add(\"Boy\");\n\t\t\toSet1.add(\"Cat\");\n\t\t\tSystem.out.println(oSet1);\n\t\t\t\n\t\t\toSet2 = new TreeSet<String>();\n\t\t\toSet2.add(\"Dog\");\n\t\t\toSet2.add(\"Arrow\");\n\t\t\toSet2.add(\"Frog\");\n\t\t\tSystem.out.println(oSet2);\n\t\t\t\n\t\t\toSet1.addAll(oSet2);\n\t\t\tSystem.out.println(oSet1);\n\t\t}catch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\toSet1 = null;\n\t\t\toSet2 = null;\n\t\t}\n\t}", "@Override\n protected abstract SecondOrderCollection wrapped();", "@Test\n public void testItem_Ordering() {\n OasisList<Integer> baseList = new SegmentedOasisList<>(2, 2);\n\n List<Integer> expResult = Arrays.asList(1, 2, 6, 8);\n baseList.addAll(expResult);\n\n for (int i = 0; i < expResult.size(); i++) {\n assertEquals(expResult.get(i), baseList.get(i));\n }\n }", "@Test\n public void testSubList_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n instance.addAll(c);\n\n List expResult = Arrays.asList(1, 7, 7);\n OasisList<Integer> result = (OasisList<Integer>) instance.subList(1, 4);\n\n assertTrue(isEqual(expResult, result));\n\n }", "@Test\n public void testAddAll_Collection_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(3);\n instance.add(2);\n instance.add(2);\n\n Collection c = Arrays.asList(1, 2, 3);\n\n boolean expResult = true;\n boolean result = instance.addAll(c);\n assertEquals(expResult, result);\n\n }", "@Test\n public void testEquals_Overflow() throws Exception {\n\n File file = File.createTempFile(\"oasis-collection-test-persistence\", \"\");\n file.mkdirs();\n file.deleteOnExit();\n\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n instance.addAll(c);\n\n SegmentedOasisList<Integer> readInstance;\n\n try (ObjectOutputStream outObjStream = new ObjectOutputStream(new FileOutputStream(file))) {\n outObjStream.writeObject(instance);\n }\n\n try (ObjectInputStream inObjStream = new ObjectInputStream(new FileInputStream(file))) {\n readInstance = (SegmentedOasisList<Integer>) inObjStream.readObject();\n }\n\n assertEquals(instance, readInstance);\n\n }", "public void test2() {\n //$NON-NLS-1$\n deployBundles(\"test2\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n\tpublic void testAddLinkInvalidSameLinkTwiceArrayList() {\n\t\tAddress adr = new Address();\n\t\tPerson martin = new Person(\"\\\"Martin\\\" \\\"Bl�mel\\\" \\\"19641014\\\"\");\n\t\tTypePropertyCollection proptype = (TypePropertyCollection) adr.getProperty(\"inhabitants\").getType();\n\t\tClass<?> colClassBefore = proptype.getCollectionClass();\n\t\ttry {\n\t\t\tproptype.setCollectionClass(ArrayList.class);\n\t\t\tAssert.assertSame(ArrayList.class, proptype.getCollectionClass());\n\t\t\tAssert.assertNull(adr.getInhabitants());\n\t\t\tAssert.assertNull(martin.getAddress());\n\n\t\t\t// add the same Person to the Address as inhabitant twice\n\t\t\tadr.addInhabitant(martin);\n\t\t\ttry {\n\t\t\t\t// should Assert.fail because of the association end with\n\t\t\t\t// multiplicity\n\t\t\t\t// 1\n\t\t\t\tadr.addInhabitant(martin);\n\t\t\t\tAssert.fail(\"expected ValidationException exception\");\n\t\t\t} catch (ValidationException e) {\n\t\t\t\tAssert.assertTrue(true);\n\t\t\t}\n\t\t} finally {\n\t\t\tproptype.setCollectionClass(colClassBefore);\n\t\t}\n\t}", "@Test @Ignore\r\n public void testSubListSetAll() {\r\n ObservableList list = createObservableList(true);\r\n int from = 2;\r\n int to = 6;\r\n List subList = list.subList(from, to);\r\n int subSize = subList.size();\r\n List itemsOfSubList = new ArrayList(subList);\r\n// itemsOfSubList.remove(0);\r\n ListChangeReport report = new ListChangeReport(list);\r\n subList.retainAll(itemsOfSubList);\r\n assertEquals(\"wrong assumption: implementation is clever enough to detect retain same\",\r\n 1, report.getEventCount());\r\n Change c = report.getLastChange();\r\n LOG.info(\"changed list: \" + list);\r\n prettyPrint(c);\r\n assertEquals(\"single change\" , 1, getChangeCount(c));\r\n assertEquals(\"removed\", subSize, getRemovedSize(c));\r\n assertEquals(\"added\" , subSize, getAddedSize(c));\r\n assertTrue(\"single replace\" + c, wasSingleReplaced(c));\r\n }", "public void merge(WModelObject otherObject)\n\t{\n\t\tWCollection collection = null;\n\n\t\t// Check to see if the argument is a WCollection object\n\t\ttry\n\t\t{\n\t\t\tcollection = (WCollection)otherObject;\n\t\t}\n\t\tcatch (ClassCastException exc)\n\t\t{\n\t\t\tcom.ing.connector.Registrar.logError(getClass().getName() + \": Collection objects can only be merged with other Collection objects\");\n\t\t\treturn;\n\t\t}\n\n\t\t// Check to see if the two objects are of the same class\n\t\tClass thisClass = getClass();\n\t\tClass objClass = otherObject.getClass();\n\n\t\tif (thisClass.getName().compareTo(objClass.getName()) != 0)\n\t\t{\n\t\t\tcom.ing.connector.Registrar.logError(thisClass.getName() + \": Cannot compare two different collection objects\");\n\t\t\treturn;\n\t\t}\n\n\t\tWCollection primCollection = new WCollection(thisClass.getName());\t//JFG6.0\n\n\t\tint iObjectCount = this.size();\t\t\t\t\t\t\t//JFG6.0\n\t\tcom.ing.connector.Registrar.logDebugMessage(\"prim object size = \" + iObjectCount);\n\t\tfor (int iCount = 0; iCount < iObjectCount; ++iCount)\t\t\t\t//JFG6.0\n\t\t{\n\t\t\tprimCollection.addElement(this.elementAt(iCount));\t\t\t//JFG6.0\n\t\t\t//com.ing.connector.Registrar.logDebugMessage(\"Entering inside()\");\n\t\t}\n\n primCollection.sort(\"ClassKey\",true);\t\t\t\t\t\t//JFG6.0\n collection.sort(\"ClassKey\",true);\t\t\t\t\t\t\t//JFG6.0\n\n\t\tint iSecObjectCount = collection.size();\n int iStart = 0;\t\t\t\t\t\t\t\t\t\t//JFG6.0\n com.ing.connector.Registrar.logDebugMessage(\"Sec object size = \" + iSecObjectCount);\n\t\tfor (int iSecCount = 0; iSecCount < iSecObjectCount; ++iSecCount)\n\t\t{\n\t\t WModelObject secObject = null;\n\t\t WModelObject primObject = null;\n\n\t\t secObject = collection.elementAt(iSecCount);\n\t\t boolean keyFound = false;\n\n\t\t int iPrimObjectCount = primCollection.size();\n\t\t for (int iPrimCount = iStart; iPrimCount < iPrimObjectCount; ++iPrimCount)\n\t\t {\n\t\t primObject = primCollection.elementAt(iPrimCount);\n\n int iCompare = primObject.compareTo(secObject, \"ClassKey\");\n //com.ing.connector.Registrar.logDebugMessage(\"primObject.compareTo iCompare = \" + iCompare);\n \n\t\t if (iCompare == 0)\n\t\t {\n\t\t\tkeyFound = true;\n\t\t\tcom.ing.connector.Registrar.logDebugMessage(\"prim object and sec object are equal class \" + primObject.getClass().getName());\n\t\t\tprimObject.merge(secObject);\t//LPMO264\n iStart = iPrimCount + 1;\t\t\t\t\t\t\t//JFG6.0\n \n\t\t\tbreak;\n\t\t }\n else\t\t\t\t\t\t\t\t\t\t\t//JFG6.0\n {\n\t\t if (iCompare > 0)\t\t\t\t\t\t\t\t\t//JFG6.0\n\t\t {\n\t\t\t keyFound = false;\t\t\t\t\t\t\t\t//JFG6.0\n iStart = iPrimCount;\t\t\t\t\t\t\t\t//JFG6.0\n \n\t\t break;\t\t\t\t\t\t\t\t\t\t//JFG6.0\n\n }\n }\n\t\t }\n\t\t \n\t\t //com.ing.connector.Registrar.logDebugMessage(\"is keyFound \" + keyFound);\n\t\t if (!keyFound)\n\t\t {\n\t\t addElement(secObject);\n\t\t }\n\t\t}\n\n\t\tprimCollection = null;\t\t\t\t\t\t\t\t\t//JFG6.0\n\n//\t\tint iObjectCount = collection.size();\n//\t\tfor (int iCount = 0; iCount < iObjectCount; ++iCount)\n//\t\t{\n//\t\t\taddElement(collection.elementAt(iCount));\n//\t\t}\n\t}", "public void testTypedCollection()\r\n\t{\r\n broker.beginTransaction();\r\n for (int i = 1; i < 4; i++)\r\n {\r\n ProductGroupWithTypedCollection example = new ProductGroupWithTypedCollection();\r\n example.setId(i);\r\n ProductGroupWithTypedCollection group =\r\n (ProductGroupWithTypedCollection) broker.getObjectByQuery(\r\n new QueryByIdentity(example));\r\n assertEquals(\"should be equal\", i, group.getId());\r\n //System.out.println(group + \"\\n\\n\");\r\n\r\n broker.delete(group);\r\n broker.store(group);\r\n }\r\n broker.commitTransaction();\r\n\t}", "@Test\n public void testSubList_SubList_Item_Update_idempotent() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n instance.addAll(c);\n\n List<Integer> expResult = Arrays.asList(1, 7, 7);\n SegmentedOasisList<Integer> result = (SegmentedOasisList<Integer>) instance.subList(1, 4);\n\n instance.set(3, 8);\n\n assertTrue(isEqual(expResult, result));\n\n }", "private void veryifyCollection(String contName, String[] subgOIDs,\n String[][] objSubgItemTypeNames,\n String[][] linkSubgItemTypeNames) {\n Container container = DB.getRootContainer().getChild(contName);\n\n // verify subgraph OIDs\n List expectedSubgOIDs = Arrays.asList(subgOIDs);\n List actualSubgOIDInts = container.getSubgraphOIDs(); // IntegerS\n List actualSubgOIDs = new ArrayList();\n for (Iterator actualSubgOIDIntIter = actualSubgOIDInts.iterator();\n actualSubgOIDIntIter.hasNext();) {\n Integer actualSubgOIDInt = (Integer) actualSubgOIDIntIter.next();\n actualSubgOIDs.add(actualSubgOIDInt.toString());\n }\n assertEquals(expectedSubgOIDs.size(), actualSubgOIDs.size());\n assertTrue(expectedSubgOIDs.containsAll(actualSubgOIDs));\n\n // verify subgraph contents\n NST objSharedItemNST = container.getItemNST(true);\n NST linkSharedItemNST = container.getItemNST(false);\n veryifSubgraphItems(objSubgItemTypeNames, objSharedItemNST);\n veryifSubgraphItems(linkSubgItemTypeNames, linkSharedItemNST);\n }", "@Test\n public void testRetainAll() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n instance.add(1);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(2, 3);\n boolean expectedResult = true;\n boolean result = instance.retainAll(c);\n\n assertEquals(expectedResult, result);\n }", "@SuppressWarnings(\"rawtypes\")\n\t@Test\n\tpublic void retrieveCollections() {\n\t\t// We can also query for the collections themselves, since they are\n\t\t// first class objects.\n\n\t\tObjectSet result = db.queryByExample(new ArrayList());\n\t\tlistResult(result);\n\n\t\t// as we are initializing readouts\n\t\tassertEquals(2, result.size());\n\n\t}", "@Test\n public void testIntersectionOfLists() {\n System.out.println(\"IntersectionOfLists\");\n ArrayList<Integer> arr1 = new ArrayList<>();\n arr1.add(12);\n arr1.add(10);\n arr1.add(23);\n ArrayList<Integer> arr2 = new ArrayList<>();\n arr2.add(23);\n arr2.add(10);\n Collections.sort(arr2);\n ArrayListRecursive instance = new ArrayListRecursive(arr1, arr2);\n List result = instance.IntersectionOfLists();\n Collections.sort(result);\n assertEquals(arr2, result);\n }", "@Test\n public void normal_recursive_delete_collection_in_WebDAV_collection() {\n String topCollectionName = \"topDavCollection\";\n String topDavFileName = \"topFile.txt\";\n\n String odataCollectionName = \"odataCollection\";\n String entityType = \"deleteEntType\";\n String accept = \"application/xml\";\n String complexTypeName = \"deleteComplexType\";\n String complexTypePropertyName = \"deleteComplexTypeProperty\";\n\n String davCollectionName = \"davCollection\";\n String davFileName = \"davFile.txt\";\n\n String enginesvcCollectionName = \"engineSvcCollection\";\n String srcFileName = \"srcFile.js\";\n\n try {\n // Create top collection.\n DavResourceUtils.createWebDAVCollection(Setup.TEST_CELL1, Setup.TEST_BOX1, topCollectionName,\n Setup.BEARER_MASTER_TOKEN, HttpStatus.SC_CREATED);\n // Create top dav file.\n DavResourceUtils.createWebDAVFile(Setup.TEST_CELL1, Setup.TEST_BOX1,\n topCollectionName + \"/\" + topDavFileName, \"text/html\", TOKEN, \"foobar\", HttpStatus.SC_CREATED);\n\n // Create OData collection in top collection.\n String odataCollectionPath = topCollectionName + \"/\" + odataCollectionName;\n DavResourceUtils.createODataCollection(TOKEN, HttpStatus.SC_CREATED, Setup.TEST_CELL1, Setup.TEST_BOX1,\n odataCollectionPath);\n // Create entity type.\n Http.request(\"box/entitySet-post.txt\")\n .with(\"cellPath\", Setup.TEST_CELL1)\n .with(\"boxPath\", Setup.TEST_BOX1)\n .with(\"odataSvcPath\", odataCollectionPath)\n .with(\"token\", \"Bearer \" + TOKEN)\n .with(\"accept\", accept)\n .with(\"Name\", entityType)\n .returns()\n .statusCode(HttpStatus.SC_CREATED);\n // Create complex type.\n ComplexTypeUtils.create(Setup.TEST_CELL1, Setup.TEST_BOX1,\n odataCollectionPath, complexTypeName, HttpStatus.SC_CREATED);\n // Create complex type property.\n ComplexTypePropertyUtils.create(Setup.TEST_CELL1, Setup.TEST_BOX1, odataCollectionPath,\n complexTypePropertyName, complexTypeName, \"Edm.String\", HttpStatus.SC_CREATED);\n\n // Create WebDAV collection in top collection.\n String davCollectionPath = topCollectionName + \"/\" + davCollectionName;\n DavResourceUtils.createWebDAVCollection(Setup.TEST_CELL1, Setup.TEST_BOX1, davCollectionPath,\n Setup.BEARER_MASTER_TOKEN, HttpStatus.SC_CREATED);\n // Create dav file.\n DavResourceUtils.createWebDAVFile(Setup.TEST_CELL1, Setup.TEST_BOX1, davCollectionPath + \"/\" + davFileName,\n \"text/html\", TOKEN, \"foobar\", HttpStatus.SC_CREATED);\n\n // Create EngineService collection in top collection.\n String enginesvcCollectionPath = topCollectionName + \"/\" + enginesvcCollectionName;\n DavResourceUtils.createServiceCollection(Setup.BEARER_MASTER_TOKEN, HttpStatus.SC_CREATED,\n Setup.TEST_CELL1, Setup.TEST_BOX1, enginesvcCollectionPath);\n // Create dav file.\n DavResourceUtils.createServiceCollectionSource(Setup.TEST_CELL1, Setup.TEST_BOX1, enginesvcCollectionPath,\n srcFileName, \"text/javascript\", TOKEN, \"foobar\", HttpStatus.SC_CREATED);\n\n // Recursive delete collection.\n deleteRecursive(topCollectionName, \"true\", HttpStatus.SC_NO_CONTENT);\n } finally {\n deleteRecursive(topCollectionName, \"true\", -1);\n }\n }", "@Test\n public void testRetainAll_Size_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n\n Collection c = Arrays.asList(3, 2, 3, 2, 3, 1, 2);\n instance.addAll(c);\n\n c = Arrays.asList(2, 3);\n instance.retainAll(c);\n\n int expectedResult = 6;\n assertEquals(expectedResult, instance.size());\n\n }", "@Test\n public void testDiff() {\n \t//create data set\n final LastWriteWinSet<String> lastWriteWinSet1 = new LastWriteWinSet<>();\n lastWriteWinSet1.add(time3, \"php\");\n lastWriteWinSet1.add(time1, \"java\");\n lastWriteWinSet1.add(time2, \"python\");\n lastWriteWinSet1.add(time1, \"scala\");\n lastWriteWinSet1.delete(time2, \"scala\");\n\n final LastWriteWinSet<String> lastWriteWinSet2 = new LastWriteWinSet<>();\n lastWriteWinSet2.add(time1, \"php\");\n lastWriteWinSet2.add(time3, \"python\");\n lastWriteWinSet2.add(time1, \"scala\");\n lastWriteWinSet2.delete(time2, \"php\");\n\n // run test\n final LastWriteWinSet<String> resultSet = lastWriteWinSet1.diff(lastWriteWinSet2);\n \n assertTrue(resultSet.getData().size() == 3);\n assertTrue(resultSet.getData().contains(\"php\"));\n assertTrue(resultSet.getData().contains(\"python\"));\n assertTrue(resultSet.getData().contains(\"java\"));\n \n final GrowOnlySet<LastWriteWinSet.ItemTD<String>> resultAddSet = resultSet.getAddSet();\n final Set<LastWriteWinSet.ItemTD<String>> addedData = resultAddSet.getData();\n assertTrue(addedData.size() == 3);\n assertTrue(addedData.contains(new LastWriteWinSet.ItemTD<>(3, \"php\")));\n assertTrue(addedData.contains(new LastWriteWinSet.ItemTD<>(1, \"java\")));\n assertTrue(addedData.contains(new LastWriteWinSet.ItemTD<>(2, \"python\")));\n\n final GrowOnlySet<LastWriteWinSet.ItemTD<String>> resultDeleteSet = resultSet.getDeleteSet();\n final Set<LastWriteWinSet.ItemTD<String>> deletedData = resultDeleteSet.getData();\n assertTrue(deletedData.size() == 1);\n assertTrue(deletedData.contains(new LastWriteWinSet.ItemTD<>(2, \"scala\")));\n }", "public static void main(String[] args) {\n\t\t\n\t\t// 10 Tests: \n\t\tList<Integer> a1 = new List<>();\n\t\tList<Integer> b1 = new List<>(1, new List<>(2, new List<>(3, new List<>())));\n\t\t\n\t\tList<Integer> a2 = new List<>(1, new List<>(2, new List<>(3, new List<>())));\n\t\tList<Integer> b2 = new List<>();\n\t\t\n\t\tList<Integer> a3 = new List<>();\n\t\tList<Integer> b3 = new List<>();\n\t\t\n\t\tList<Integer> a4 = new List<>(1, new List<>(2, new List<>(3, new List<>())));\n\t\tList<Integer> b4 = new List<>(4, new List<>(5, new List<>(6, new List<>())));\n\t\t\n\t\tList<Integer> a5 = new List<>(4, new List<>(5, new List<>(6, new List<>())));\n\t\tList<Integer> b5 = new List<>(1, new List<>(2, new List<>(3, new List<>())));\n\t\t\n\t\tList<Integer> a6 = new List<>(1, new List<>(4, new List<>(6, new List<>()))); \n\t\tList<Integer> b6 = new List<>(5, new List<>(6, new List<>(9, new List<>())));\n\t\t\n\t\tList<Integer> a7 = new List<>(-6, new List<>(-5, new List<>(-4, new List<>())));\n\t\tList<Integer> b7 = new List<>(-3, new List<>(-2, new List<>(-1, new List<>())));\n\t\t\n\t\tList<Integer> a8 = new List<>(-2, new List<>(-1, new List<>(0, new List<>())));\n\t\tList<Integer> b8 = new List<>(-1, new List<>(0, new List<>(1, new List<>(2, new List<>()))));\n\t\t\n\t\tList<Integer> a9 = new List<>(-1, new List<>(0, new List<>(1, new List<>())));\n\t\tList<Integer> b9 = new List<>(3, new List<>(4, new List<>(5, new List<>())));\n\t\t\n\t\tList<Integer> a10 = new List<>(-1, new List<>(0, new List<>(1, new List<>())));\n\t\tList<Integer> b10 = new List<>(-1, new List<>(0, new List<>(1, new List<>())));\n\t\t\n\t\tSystem.out.println(unique(a1, b1));\n\t\tSystem.out.println(unique(a2, b2));\n\t\tSystem.out.println(unique(a3, b3));\n\t\tSystem.out.println(unique(a4, b4));\n\t\tSystem.out.println(unique(a5, b5));\n\t\tSystem.out.println(unique(a6, b6));\n\t\tSystem.out.println(unique(a7, b7));\n\t\tSystem.out.println(unique(a8, b8));\n\t\tSystem.out.println(unique(a9, b9));\n\t\tSystem.out.println(unique(a10, b10));\n\t\t\n\t}", "@Test\n public void testAddAll_int_Collection_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(1, 2, 3);\n\n boolean expResult = true;\n boolean result = instance.addAll(1, c);\n assertEquals(expResult, result);\n\n }", "@Test\n @Ignore\n public void testTraverseAncestors() {\n System.out.println(\"testTraverseAncestors\");\n List<Person> people = dao.listAncestors(\"KWCB-HZV\", 10, \"\", false);\n assertIdsEqual(ancestors, people);\n }", "@Test\n public void testRetainAll_Size() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n instance.add(1);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(2, 3);\n instance.retainAll(c);\n\n int expectedResult = 5;\n assertEquals(expectedResult, instance.size());\n\n }", "@Test\n\tpublic void TEAM3_CONTROLLER_UT09() {\n\t\t// PRECONDITIONS\n\t\tArrayList<Integer> a1 = new ArrayList<Integer>();\n\t\ta1.add(100);\n\t\ta1.add(200);\n\t\t\n\t\tArrayList<Integer> a2 = new ArrayList<Integer>();\n\t\ta2.add(150);\n\t\ta2.add(250);\n\t\t\n\t\tScheduleMakerController smc = new ScheduleMakerController();\n\t\t\n\t\t// INPUT\n\t\tCollection<Collection<?>> doubleElementCollection = new Vector<Collection<?>>();\n\t\tdoubleElementCollection.add(a1);\n\t\tdoubleElementCollection.add(a2);\n\t\t\n\t\t// EXPECTED OUTPUT\n\t\tboolean sizeIsOne = smc.sizeIsOne(doubleElementCollection);\n\t\tassertFalse(sizeIsOne);\n\t}", "@Test\r\n public void descendingSetIterator() throws Exception {\r\n TreeSet<Integer> kek = new TreeSet<>();\r\n kek.addAll(sInt);\r\n TreeSet<Integer> check = (TreeSet<Integer>) kek.descendingSet();\r\n Object[] arr1 = kek.toArray();\r\n Object[] arr2 = check.toArray();\r\n for (int i = 0; i < arr1.length; i++) {\r\n assertEquals(arr1[i], arr2[arr1.length - 1 - i]);\r\n }\r\n }", "@Test\n\tpublic void testNestedCollectionAccess() throws ParseException {\n\t\tExpression expression = langParser(\"x['g'][v]\").expression();\n\t\tassertTrue(expression instanceof CollectionAccess);\n\t\tCollectionAccess collectionAccess = (CollectionAccess) expression;\n\t\tassertTrue(collectionAccess.getCollection() instanceof CollectionAccess);\n\t\tCollectionAccess collectionAccess1 = (CollectionAccess) collectionAccess.getCollection();\n\t\tassertEquals(((Identifier) collectionAccess1.getCollection()).getName(), \"x\");\n\t\tassertTrue(collectionAccess1.getKey() instanceof StringLiteral);\n\t\tassertEquals(((StringLiteral) collectionAccess1.getKey()).getValue(), \"g\");\n\t\tassertTrue(collectionAccess.getKey() instanceof Identifier);\n\t\tassertEquals(((Identifier) collectionAccess.getKey()).getName(), \"v\");\n\t}", "@Test\n public void testRemoveAll_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(2, 3);\n boolean expectedResult = true;\n boolean result = instance.removeAll(c);\n\n assertEquals(expectedResult, result);\n\n }", "@SuppressWarnings(\"resource\")\n @Test\n public void testEquals() {\n try {\n SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions1 = new SubtenantPolicyGroupListOptions(Integer.valueOf(-51),\n Long.valueOf(105),\n Order.getDefault(),\n \"efc9e20d-db05-4f2f-b41f-016029d4faff\",\n null,\n null);\n SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions2 = new SubtenantPolicyGroupListOptions(Integer.valueOf(-51),\n Long.valueOf(105),\n Order.getDefault(),\n \"efc9e20d-db05-4f2f-b41f-016029d4faff\",\n null,\n null);\n SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions3 = new SubtenantPolicyGroupListOptions(Integer.valueOf(101),\n Long.valueOf(87),\n Order.getDefault(),\n \"99c3b952-8e9d-4dd1-9075-8be04a5e58e8\",\n null,\n null);\n assertNotNull(subtenantpolicygrouplistoptions1);\n assertNotNull(subtenantpolicygrouplistoptions2);\n assertNotNull(subtenantpolicygrouplistoptions3);\n assertNotSame(subtenantpolicygrouplistoptions2, subtenantpolicygrouplistoptions1);\n assertNotSame(subtenantpolicygrouplistoptions3, subtenantpolicygrouplistoptions1);\n assertEquals(subtenantpolicygrouplistoptions2, subtenantpolicygrouplistoptions1);\n assertEquals(subtenantpolicygrouplistoptions2, subtenantpolicygrouplistoptions1);\n assertEquals(subtenantpolicygrouplistoptions1, subtenantpolicygrouplistoptions2);\n assertEquals(subtenantpolicygrouplistoptions1, subtenantpolicygrouplistoptions1);\n assertFalse(subtenantpolicygrouplistoptions1.equals(null));\n assertNotEquals(subtenantpolicygrouplistoptions3, subtenantpolicygrouplistoptions1);\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }", "public ArrayList<ArrayList> difference (ArrayList<ArrayList> data, ArrayList<ArrayList> data2)\n {\n ArrayList<Document> docs = data.get(0);\n ArrayList<Double> relevance = data.get(1);\n ArrayList<Integer> occurrence = data.get(2);\n ArrayList<Integer> popularity = data.get(3);\n \n ArrayList<Document> docs2 = data2.get(0);\n ArrayList<Double> relevance2 = data2.get(1);\n ArrayList<Integer> occurrence2 = data2.get(2);\n ArrayList<Integer> popularity2 = data2.get(3);\n \n ArrayList<Document> docs3 = new ArrayList<>();\n ArrayList<Double> relevance3 = new ArrayList<>();\n ArrayList<Integer> occurrence3 = new ArrayList<>();\n ArrayList<Integer> popularity3 = new ArrayList<>();\n \n for(Document d: docs)\n {\n if(!docs2.contains(d))\n {\n int docIndex = docs.indexOf(d);\n docs3.add(d);\n relevance3.add(relevance.get(docIndex));\n occurrence3.add(occurrence.get(docIndex));\n popularity3.add(d.popularity);\n }\n \n }\n data = new ArrayList<ArrayList> ();\n data.add(docs3);\n data.add(relevance3);\n data.add(occurrence3);\n data.add(popularity3);\n \n return data;\n }", "@Test\n public void testEquals() throws Exception {\n\n File file = File.createTempFile(\"oasis-collection-test-persistence\", \"\");\n file.mkdirs();\n file.deleteOnExit();\n\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n instance.addAll(c);\n\n SegmentedOasisList<Integer> readInstance;\n\n try (ObjectOutputStream outObjStream = new ObjectOutputStream(new FileOutputStream(file))) {\n outObjStream.writeObject(instance);\n }\n\n try (ObjectInputStream inObjStream = new ObjectInputStream(new FileInputStream(file))) {\n readInstance = (SegmentedOasisList<Integer>) inObjStream.readObject();\n }\n\n assertEquals(instance, readInstance);\n\n }", "public static void main(String[] args) {\n\n\t\tCollection<String> collection1 = new ArrayList<String>();\n\t\tcollection1.add(\"Toronto\");\n\t\tcollection1.add(\"Hamilton\");\n\t\tcollection1.add(\"London\");\n\t\tcollection1.add(\"Ottawa\");\n\t\tcollection1.add(\"Toronto\");\n\t\tSystem.out.println(\"A list of cities in c1 is \" + collection1);\n\t\tSystem.out.println(\" Is hamilton in c1? \" + collection1.contains(\"Hamilton\"));\n\t\tSystem.out.println(\"Size of collection c1 is \" + collection1.size());\n\t\tCollection<String> collection2 = new ArrayList<String>();\n\t\tcollection1.add(\"Vancouver\");\n\t\tcollection1.add(\"Delhi\");\n\t\tcollection1.add(\"chd\");\n\t\tcollection1.add(\"Toronto\");\n\t\tcollection1.addAll(collection2);\n\t\tSystem.out.println(\"combined list is : \" + collection1);\n//\t\tCollection<String> c1 = new ArrayList<String>(collection1);\n//\t\tc1.retainAll(collection2);\n//\t\tSystem.out.println(\"A list of cities in c1 is \" + c1);\n//\t\tc1.removeAll(collection2);\n//\t\tSystem.out.println(\"A list of cities in c1 is \" + c1);\n\t\t\n\t}", "public ArrBag<T> difference( ArrBag<T> other )\n {\n // THIS ARRBAG WILL NEVER TRIGGER AN UPSIZE BECUASE YOU MADE IT JUST BIG ENOUGH FOR THE LARGEST POSSIBLE DIFF\n ArrBag<T> diffResult = new ArrBag<T>(this.size() + other.size());\n int differenceCount = 0;\n\n for(int i =0; i<this.size(); i++)\n {\n if(!other.contains(this.get(i)) && !diffResult.contains(this.get(i)))\n {\n diffResult.add(this.get(i));\n }\n // change the 0 to the right value for diff\n }\n return diffResult; \n }", "@Rollback\n @Test\n public void getAllCreditOperationsByCreditFamilyId() {\n expectedCollection.add(creditOperationFamilyExpected);\n\n //AssertUtils.assertCreditOperationsCollections(expectedCollection, actualCollection);\n }", "@Test\n\tpublic void testAddLinkOkMultNtoNTreeSet() {\n\t\t// configure collection properties of Location and ClosingPeriod\n\t\t// to use TreeSet as collection implementing class\n\t\t((TypePropertyCollection) (new Location()).getProperty(\"closedons\").getType())\n\t\t\t\t.setCollectionClass(TreeSet.class);\n\t\t((TypePropertyCollection) (new ClosingPeriod()).getProperty(\"locations\").getType())\n\t\t\t\t.setCollectionClass(TreeSet.class);\n\t\ttstNMAssociationInverse();\n\t}", "@Test\n public void testPersistence_Elements_Overflow() throws Exception {\n\n File file = File.createTempFile(\"oasis-collection-test-persistence\", \"\");\n file.mkdirs();\n file.deleteOnExit();\n\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n instance.addAll(c);\n\n SegmentedOasisList<Integer> readInstance;\n\n try (ObjectOutputStream outObjStream = new ObjectOutputStream(new FileOutputStream(file))) {\n outObjStream.writeObject(instance);\n }\n\n try (ObjectInputStream inObjStream = new ObjectInputStream(new FileInputStream(file))) {\n readInstance = (SegmentedOasisList<Integer>) inObjStream.readObject();\n }\n\n assertEquals(instance, readInstance);\n\n }", "@Test\n public void testRetainAll_Empty_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n Collection c = Arrays.asList(1, 1, 1, 1, 1, 1, 1);\n instance.addAll(c);\n\n c = Arrays.asList(2, 3);\n instance.retainAll(c);\n\n int expectedResult = 0;\n assertEquals(expectedResult, instance.size());\n\n }", "@Test\n public void remove1() {\n RBTree<Integer> tree = new RBTree<>();\n List<Integer> add = new ArrayList<>(List.of(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10));\n List<Integer> rem = new ArrayList<>(List.of(4, 7, 9, 5));\n for (int i : add) {\n tree.add(i);\n }\n int err = 0;\n Set<Integer> remSet = new HashSet<>();\n for (int i : rem) {\n remSet.add(i);\n boolean removed = tree.remove(i);\n if (!removed && add.contains(i)) {\n System.err.println(\"Could not remove element \" + i + \"!\");\n err++;\n }\n if (removed && !add.contains(i)) {\n System.err.println(\"Removed the non-existing element \" + i + \"!\");\n err++;\n }\n for (int a : add) {\n if (!tree.contains(a) && !remSet.contains(a)) {\n System.err.println(\"Removed element \" + a + \" after removing \" + i + \"!\");\n err++;\n }\n }\n }\n for (int i : rem) {\n if (tree.remove(i)) {\n System.err.println(\"Removed a already remove element \" + i + \"!\");\n err++;\n }\n }\n for (int i : rem) {\n if (tree.contains(i)) {\n System.out.println(\"The element \" + i + \" was not removed!\");\n err++;\n }\n }\n \n assertEquals(\"There were \" + err + \" errors!\", 0, err);\n rem.retainAll(add);\n assertEquals(\"Incorrect tree size!\", add.size() - rem.size(), tree.size());\n }", "public void test1() {\n //$NON-NLS-1$\n deployBundles(\"test1\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "Collection<? extends Object> getSameAs();", "private void compareSecondPass() {\n final int arraySize = this.oldFileNoMatch.size()\r\n + this.newFileNoMatch.size();\r\n this.compareArray = new SubsetElement[arraySize][2];\r\n final Iterator<String> oldIter = this.oldFileNoMatch.keySet()\r\n .iterator();\r\n int i = 0;\r\n while (oldIter.hasNext()) {\r\n final String key = oldIter.next();\r\n final SubsetElement oldElement = this.oldFileNoMatch.get(key);\r\n SubsetElement newElement = null;\r\n if (this.newFileNoMatch.containsKey(key)) {\r\n newElement = this.newFileNoMatch.get(key);\r\n }\r\n this.compareArray[i][0] = oldElement;\r\n this.compareArray[i][1] = newElement;\r\n i++;\r\n }\r\n // now go through the new elements and check for any that have no match.\r\n // these will be new elements with no corresponding old element\r\n final SubsetElement oldElement = null;\r\n final Iterator<String> newIter = this.newFileNoMatch.keySet()\r\n .iterator();\r\n while (newIter.hasNext()) {\r\n final String key = newIter.next();\r\n if (!this.oldFileNoMatch.containsKey(key)) {\r\n final SubsetElement newElement = this.newFileNoMatch.get(key);\r\n this.compareArray[i][0] = oldElement;\r\n this.compareArray[i][1] = newElement;\r\n i++;\r\n }\r\n\r\n }\r\n\r\n }", "@Test\n\tpublic void testAddLinkOkMultNtoNLinkedHashSet() {\n\t\t// configure collection properties of Location and ClosingPeriod\n\t\t// to use TreeSet as collection implementing class\n\t\t((TypePropertyCollection) (new Location()).getProperty(\"closedons\").getType())\n\t\t\t\t.setCollectionClass(LinkedHashSet.class);\n\t\t((TypePropertyCollection) (new ClosingPeriod()).getProperty(\"locations\").getType())\n\t\t\t\t.setCollectionClass(LinkedHashSet.class);\n\t\ttstNMAssociationInverse();\n\t}", "private void generateBidirectionalCollectionChangeWorkUnits(AuditSync verSync, EntityPersister entityPersister,\n String entityName, Object[] newState, Object[] oldState,\n SessionImplementor session) {\n if (!verCfg.getGlobalCfg().isGenerateRevisionsForCollections()) {\n return;\n }\n \n // Checks every property of the entity, if it is an \"owned\" to-one relation to another entity.\n // If the value of that property changed, and the relation is bi-directional, a new revision\n // for the related entity is generated.\n String[] propertyNames = entityPersister.getPropertyNames();\n \n for (int i=0; i<propertyNames.length; i++) {\n String propertyName = propertyNames[i];\n RelationDescription relDesc = verCfg.getEntCfg().getRelationDescription(entityName, propertyName);\n if (relDesc != null && relDesc.isBidirectional() && relDesc.getRelationType() == RelationType.TO_ONE) {\n // Checking for changes\n Object oldValue = oldState == null ? null : oldState[i];\n Object newValue = newState == null ? null : newState[i];\n \n if (!Tools.entitiesEqual(session, oldValue, newValue)) {\n // We have to generate changes both in the old collection (size decreses) and new collection\n // (size increases).\n if (newValue != null) {\n // relDesc.getToEntityName() doesn't always return the entity name of the value - in case\n // of subclasses, this will be root class, no the actual class. So it can't be used here.\n String toEntityName;\n \t\t\t\t\t\tSerializable id;\n \n if (newValue instanceof HibernateProxy) {\n \t HibernateProxy hibernateProxy = (HibernateProxy) newValue;\n \t toEntityName = session.bestGuessEntityName(newValue);\n \t id = hibernateProxy.getHibernateLazyInitializer().getIdentifier();\n \t\t\t\t\t\t\t// We've got to initialize the object from the proxy to later read its state. \n \t\t\t\t\t\t\tnewValue = Tools.getTargetFromProxy(hibernateProxy);\n \t} else {\n \t\ttoEntityName = session.guessEntityName(newValue);\n \n \t\t\t\t\t\t\tIdMapper idMapper = verCfg.getEntCfg().get(toEntityName).getIdMapper();\n \tid = (Serializable) idMapper.mapToIdFromEntity(newValue);\n \t}\n \n verSync.addWorkUnit(new CollectionChangeWorkUnit(session, toEntityName, verCfg, id, newValue));\n }\n \n if (oldValue != null) {\n \tString toEntityName;\n \t\t\t\t\t\tSerializable id;\n \n \tif(oldValue instanceof HibernateProxy) {\n \t HibernateProxy hibernateProxy = (HibernateProxy) oldValue;\n \t toEntityName = session.bestGuessEntityName(oldValue);\n \t id = hibernateProxy.getHibernateLazyInitializer().getIdentifier();\n \t\t\t\t\t\t\t// We've got to initialize the object as we'll read it's state anyway.\n \t\t\t\t\t\t\toldValue = Tools.getTargetFromProxy(hibernateProxy);\n \t} else {\n \t\ttoEntityName = session.guessEntityName(oldValue);\n \n \t\t\t\t\t\t\tIdMapper idMapper = verCfg.getEntCfg().get(toEntityName).getIdMapper();\n \t\t\t\t\t\t\tid = (Serializable) idMapper.mapToIdFromEntity(oldValue);\n \t}\n \t\t\t\t\t\t\n verSync.addWorkUnit(new CollectionChangeWorkUnit(session, toEntityName, verCfg, id, oldValue));\n }\n }\n }\n }\n }", "@Test\n public void testVirtualLists() throws Exception {\n assertReducesTo(\"2 dup 1 at.\", \"2 dup\");\n }", "@Test\n public void testUnionOfLists() {\n System.out.println(\"UnionOfLists\");\n ArrayList<Integer> arr1 = new ArrayList<>();\n arr1.add(12);\n arr1.add(10);\n arr1.add(23);\n ArrayList<Integer> arr2 = new ArrayList<>();\n arr2.add(23);\n arr2.add(10);\n Collections.sort(arr1);\n ArrayListRecursive instance = new ArrayListRecursive(arr1, arr2);\n List result = instance.UnionOfLists();\n Collections.sort(result);\n assertEquals(arr1, result);\n }", "private static boolean level2(final int current, final Object object) {\n\t\tif (current == 5 && Collection.class.isAssignableFrom(object.getClass())) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "static void assertEqualContents(Collection<?> expected, Collection<?> provided) {\n assertEquals(expected.size(), provided.size());\n assertEquals(new HashSet<>(expected), new HashSet<>(provided));\n }", "@Test\n public void testIterator_Overflow() {\n OasisList<Integer> baseList = new SegmentedOasisList<>(2, 2);\n baseList.addAll(Arrays.asList(1, 2, 6, 8, 7, 8, 90));\n\n Iterator<Integer> instance = baseList.iterator();\n assertTrue(isEqual(instance, baseList));\n\n }", "public void test44() {\n //$NON-NLS-1$\n deployBundles(\"test44\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.NON_VOLATILE_TO_VOLATILE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void testAddCity_City03() {\n\n System.out.println(\"addCity\");\n City cityTest = new City(new Pair(41.243345, -8.674084), \"city0\", 28);\n Set<City> expResult = new HashSet<>();\n\n expResult.add(new City(new Pair(41.243345, -8.674084), \"city0\", 28));\n expResult.add(new City(new Pair(41.237364, -8.846746), \"city1\", 72));\n expResult.add(new City(new Pair(40.519841, -8.085113), \"city2\", 81));\n expResult.add(new City(new Pair(41.118700, -8.589700), \"city3\", 42));\n expResult.add(new City(new Pair(41.467407, -8.964340), \"city4\", 64));\n expResult.add(new City(new Pair(41.337408, -8.291943), \"city5\", 74));\n expResult.add(new City(new Pair(41.314965, -8.423371), \"city6\", 80));\n expResult.add(new City(new Pair(40.822244, -8.794953), \"city7\", 11));\n expResult.add(new City(new Pair(40.781886, -8.697502), \"city8\", 7));\n expResult.add(new City(new Pair(40.851360, -8.136585), \"city9\", 65));\n\n sn10.addCity(cityTest);\n Set<City> result = sn10.getCitiesList();\n assertEquals(expResult, result);\n }", "@Test\n public void testAddAll_int_Collection_Size_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(1, 2, 3);\n instance.addAll(1, c);\n\n int expResult = 9;\n int result = instance.size();\n assertEquals(expResult, result);\n\n }", "@Test\n public void testList(){\n ArrayList<Integer> integers = Lists.newArrayList(1, 2, 3, 4);\n ArrayList<Integer> integers2 = Lists.newArrayList(1, 2, 3, 4, 5);\n// integers2.removeAll(integers);\n// System.out.println(integers2);\n integers2.retainAll(integers);\n System.out.println(integers2);\n }", "@Test\n public void testRemoveAll_Not_Empty_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(2);\n instance.add(3);\n instance.add(1);\n instance.add(2);\n\n Collection c = Arrays.asList(2, 3);\n instance.removeAll(c);\n\n int expectedResult = 1;\n assertEquals(expectedResult, instance.size());\n\n }", "@Test\n public void testReflectionArrayCycleLevel2() {\n final Object[] objects = new Object[1];\n final Object[] objectsLevel2 = new Object[1];\n objects[0] = objectsLevel2;\n objectsLevel2[0] = objects;\n assertEquals(\n this.toBaseString(objects) + \"[{{\" + this.toBaseString(objects) + \"}}]\",\n ToStringBuilder.reflectionToString(objects));\n assertEquals(\n this.toBaseString(objectsLevel2) + \"[{{\" + this.toBaseString(objectsLevel2) + \"}}]\",\n ToStringBuilder.reflectionToString(objectsLevel2));\n }", "public void test43() {\n //$NON-NLS-1$\n deployBundles(\"test43\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VOLATILE_TO_NON_VOLATILE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "@Test\n public void testAddAll_Collection() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n\n Collection c = Arrays.asList(1, 2, 3);\n\n boolean expResult = true;\n boolean result = instance.addAll(c);\n assertEquals(expResult, result);\n\n }", "public void testRevert() {\n\t\tthis.two.revert();\n\t\tthis.one.revert();\n\t\tthis.replayMockObjects();\n\t\tthis.aggregate.revert();\n\t\tthis.verifyMockObjects();\n\t}", "@Test\n public void test1POJOWriteWithTransCollection() throws KeyManagementException, NoSuchAlgorithmException, Exception {\n PojoRepository<Artifact, Long> products = client.newPojoRepository(Artifact.class, Long.class);\n // Load more than 110 objects into different collections\n Transaction t = client.openTransaction();\n try {\n for (int i = 112; i < 222; i++) {\n if (i % 2 == 0) {\n products.write(this.getArtifact(i), t, \"even\", \"numbers\");\n }\n else {\n products.write(this.getArtifact(i), t, \"odd\", \"numbers\");\n }\n }\n } catch (Exception e) {\n throw e;\n } finally {\n t.commit();\n }\n assertEquals(\"Total number of object recods\", 110, products.count(\"numbers\"));\n assertEquals(\"Collection even count\", 55, products.count(\"even\"));\n assertEquals(\"Collection odd count\", 55, products.count(\"odd\"));\n for (long i = 112; i < 222; i++) {\n // validate all the records inserted are readable\n assertTrue(\"Product id \" + i + \" does not exist\", products.exists(i));\n this.validateArtifact(products.read(i));\n }\n Transaction t2 = client.openTransaction();\n try {\n Long[] ids = { (long) 112, (long) 113 };\n products.delete(ids, t2);\n assertFalse(\"Product id 112 exists ?\", products.exists((long) 112, t2));\n // assertTrue(\"Product id 112 exists ?\",products.exists((long)112));\n products.deleteAll(t2);\n for (long i = 112; i < 222; i++) {\n assertFalse(\"Product id \" + i + \" exists ?\", products.exists(i, t2));\n // assertTrue(\"Product id \"+i+\" exists ?\",products.exists(i));\n }\n } catch (Exception e) {\n throw e;\n } finally {\n t2.commit();\n }\n // see any document exists\n for (long i = 112; i < 222; i++) {\n assertFalse(\"Product id \" + i + \" exists ?\", products.exists(i));\n }\n // see if it complains when there are no records\n products.delete((long) 112);\n products.deleteAll();\n }", "private static void checkRecurseUnordered(Vector<XSParticleDecl> dChildren, int min1, int max1, SubstitutionGroupHandler dSGHandler, Vector<XSParticleDecl> bChildren, int min2, int max2, SubstitutionGroupHandler bSGHandler) throws XMLSchemaException {\n/* 1306 */ if (!checkOccurrenceRange(min1, max1, min2, max2)) {\n/* 1307 */ throw new XMLSchemaException(\"rcase-RecurseUnordered.1\", new Object[] {\n/* 1308 */ Integer.toString(min1), (max1 == -1) ? \"unbounded\" : \n/* 1309 */ Integer.toString(max1), \n/* 1310 */ Integer.toString(min2), (max2 == -1) ? \"unbounded\" : \n/* 1311 */ Integer.toString(max2)\n/* */ });\n/* */ }\n/* 1314 */ int count1 = dChildren.size();\n/* 1315 */ int count2 = bChildren.size();\n/* */ \n/* 1317 */ boolean[] foundIt = new boolean[count2];\n/* */ \n/* 1319 */ for (int i = 0; i < count1; i++) {\n/* 1320 */ XSParticleDecl particle1 = dChildren.elementAt(i);\n/* */ \n/* 1322 */ int k = 0; while (true) { if (k < count2) {\n/* 1323 */ XSParticleDecl particle2 = bChildren.elementAt(k);\n/* */ try {\n/* 1325 */ particleValidRestriction(particle1, dSGHandler, particle2, bSGHandler);\n/* 1326 */ if (foundIt[k]) {\n/* 1327 */ throw new XMLSchemaException(\"rcase-RecurseUnordered.2\", null);\n/* */ }\n/* 1329 */ foundIt[k] = true;\n/* */ \n/* */ \n/* */ break;\n/* 1333 */ } catch (XMLSchemaException xMLSchemaException) {}\n/* */ k++;\n/* */ continue;\n/* */ } \n/* 1337 */ throw new XMLSchemaException(\"rcase-RecurseUnordered.2\", null); }\n/* */ \n/* */ } \n/* */ \n/* 1341 */ for (int j = 0; j < count2; j++) {\n/* 1342 */ XSParticleDecl particle2 = bChildren.elementAt(j);\n/* 1343 */ if (!foundIt[j] && !particle2.emptiable()) {\n/* 1344 */ throw new XMLSchemaException(\"rcase-RecurseUnordered.2\", null);\n/* */ }\n/* */ } \n/* */ }", "public abstract NestedSet<Artifact> auxiliary();", "@Test\r\n\tpublic void testPelikulaBaloratuDutenErabiltzaileenZerrenda() {\n\t\tArrayList<Integer> zer = BalorazioenMatrizea.getBalorazioenMatrizea().pelikulaBaloratuDutenErabiltzaileenZerrenda(p1.getPelikulaId());\r\n\t\tassertTrue(zer.size() == 2);\r\n\t\tassertTrue(zer.contains(e1.getId()));\r\n\t\tassertTrue(zer.contains(e3.getId()));\r\n\t\tassertFalse(zer.contains(e2.getId()));\r\n\t\t\r\n\t\t// p2 pelikula baloratu duten erabiltzaileen ID-ak itzuli\r\n\t\tzer = BalorazioenMatrizea.getBalorazioenMatrizea().pelikulaBaloratuDutenErabiltzaileenZerrenda(p2.getPelikulaId());\r\n\t\tassertTrue(zer.size() == 4);\r\n\t\tassertTrue(zer.contains(e1.getId()));\r\n\t\tassertTrue(zer.contains(e2.getId()));\r\n\t\tassertTrue(zer.contains(e3.getId()));\r\n\t\tassertTrue(zer.contains(e4.getId()));\r\n\t\t\r\n\t\t// p3 pelikula baloratu duten erabiltzaileen ID-ak itzuli\r\n\t\tzer = BalorazioenMatrizea.getBalorazioenMatrizea().pelikulaBaloratuDutenErabiltzaileenZerrenda(p3.getPelikulaId());\r\n\t\tassertTrue(zer.size() == 2);\r\n\t\tassertTrue(zer.contains(e2.getId()));\r\n\t\tassertTrue(zer.contains(e3.getId()));\r\n\t\tassertFalse(zer.contains(e1.getId()));\r\n\t\t\r\n\t\t// p4 pelikula baloratu duten erabiltzaileen ID-ak itzuli\r\n\t\tzer = BalorazioenMatrizea.getBalorazioenMatrizea().pelikulaBaloratuDutenErabiltzaileenZerrenda(p4.getPelikulaId());\r\n\t\tassertTrue(zer.size() == 2);\r\n\t\tassertTrue(zer.contains(e1.getId()));\r\n\t\tassertTrue(zer.contains(e3.getId()));\r\n\t\tassertFalse(zer.contains(e4.getId()));\r\n\t\t\r\n\t}", "public static boolean equalsUnordered( Collection<?> collection1, Collection<?> collection2 )\r\n {\r\n //\r\n boolean retval = collection1.size() == collection2.size();\r\n \r\n //\r\n for ( Object iObject : collection1 )\r\n {\r\n retval &= collection2.contains( iObject );\r\n }\r\n \r\n //\r\n return retval;\r\n }", "@Test\r\n\tpublic void testCompareCase1() throws IOException {\r\n\t\tPerson p1 = DataUtil.readDataFromFile(\"test/data/case1/case1-person1.json\", Person.class);\r\n\t\tPerson p2 = DataUtil.readDataFromFile(\"test/data/case1/case1-person2.json\", Person.class);\r\n\r\n\t\tIContext ctx = ObjectCompare.compare(p1, p2);\r\n\t\tdebug(ctx.getDifferences());\r\n\t\tAssert.assertTrue(ctx.hasDifferences());\r\n\t\tAssert.assertEquals(4, ctx.getDifferences().size());\r\n\t}", "private void generateBidirectionalCollectionChangeWorkUnits(AuditSync verSync, AbstractCollectionEvent event,\n PersistentCollectionChangeWorkUnit workUnit) {\n if (!verCfg.getGlobalCfg().isGenerateRevisionsForCollections()) {\n return;\n }\n \n // Checking if this is not a bidirectional relation - then, a revision needs also be generated for\n // the other side of the relation.\n RelationDescription relDesc = verCfg.getEntCfg().getRelationDescription(event.getAffectedOwnerEntityName(),\n workUnit.getReferencingPropertyName());\n \n // relDesc can be null if this is a collection of simple values (not a relation).\n if (relDesc != null && relDesc.isBidirectional()) {\n String relatedEntityName = relDesc.getToEntityName();\n IdMapper relatedIdMapper = verCfg.getEntCfg().get(relatedEntityName).getIdMapper();\n \n for (PersistentCollectionChangeData changeData : workUnit.getCollectionChanges()) {\n Object relatedObj = changeData.getChangedElement();\n Serializable relatedId = (Serializable) relatedIdMapper.mapToIdFromEntity(relatedObj);\n \n verSync.addWorkUnit(new CollectionChangeWorkUnit(event.getSession(), relatedEntityName, verCfg,\n \t\t\t\t\t\trelatedId, relatedObj));\n }\n }\n }", "private static boolean compareList(List<Object> l1, List<Object> l2)\n {\n int count=0;\n for (Object o : l1)\n {\n Object temp = o;\n for (Object otemp : l2)\n {\n if (EqualsBuilder.reflectionEquals(temp, otemp))\n {\n count++;\n }\n }\n\n }\n\n if(count == l1.size()) return true;\n return false;\n\n }", "@Test\r\n\tpublic void testErabiltzaileakBaloratuDituenPelikulenZerrenda() {\n\t\tArrayList<Integer> zer = BalorazioenMatrizea.getBalorazioenMatrizea().erabiltzaileakBaloratuDituenPelikulenZerrenda(e1.getId());\r\n\t\tassertTrue(zer.size() == 3);\r\n\t\tassertTrue(zer.contains(p1.getPelikulaId()));\r\n\t\tassertTrue(zer.contains(p2.getPelikulaId()));\r\n\t\tassertTrue(zer.contains(p4.getPelikulaId()));\r\n\t\tassertFalse(zer.contains(p3.getPelikulaId()));\r\n\t\t\r\n\t\t// e2 erabiltzaileak baloratu dituen pelikulen ID-ak itzuli\r\n\t\tzer = BalorazioenMatrizea.getBalorazioenMatrizea().erabiltzaileakBaloratuDituenPelikulenZerrenda(e2.getId());\r\n\t\tassertTrue(zer.size() == 2);\r\n\t\tassertTrue(zer.contains(p2.getPelikulaId()));\r\n\t\tassertTrue(zer.contains(p3.getPelikulaId()));\r\n\t\tassertFalse(zer.contains(p1.getPelikulaId()));\r\n\t\t\r\n\t\t// e3 erabiltzaileak baloratu dituen pelikulen ID-ak itzuli\r\n\t\tzer = BalorazioenMatrizea.getBalorazioenMatrizea().erabiltzaileakBaloratuDituenPelikulenZerrenda(e3.getId());\r\n\t\tassertTrue(zer.size() == 4);\r\n\t\tassertTrue(zer.contains(p1.getPelikulaId()));\r\n\t\tassertTrue(zer.contains(p2.getPelikulaId()));\r\n\t\tassertTrue(zer.contains(p3.getPelikulaId()));\r\n\t\tassertTrue(zer.contains(p4.getPelikulaId()));\r\n\t\t\r\n\t\t// e2 erabiltzaileak baloratu dituen pelikulen ID-ak itzuli\r\n\t\tzer = BalorazioenMatrizea.getBalorazioenMatrizea().erabiltzaileakBaloratuDituenPelikulenZerrenda(e4.getId());\r\n\t\tassertTrue(zer.size() == 1);\r\n\t\tassertTrue(zer.contains(p2.getPelikulaId()));\r\n\t\tassertFalse(zer.contains(p1.getPelikulaId()));\r\n\t\t\r\n\t}", "public void test4() {\n //$NON-NLS-1$\n deployBundles(\"test4\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertTrue(\"Is visible\", !Util.isVisible(child.getNewModifiers()));\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.VALUE, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "private void compareFirstPass() {\n this.oldFileNoMatch = new HashMap<String, SubsetElement>();\r\n Iterator<String> iter = this.oldFile.keySet().iterator();\r\n while (iter.hasNext()) {\r\n final String key = iter.next();\r\n if (!this.newFile.containsKey(key)) {\r\n final String newKey = this.oldFile.get(key).getSubsetCode()\r\n + this.oldFile.get(key).getConceptCode();\r\n this.oldFileNoMatch.put(newKey, this.oldFile.get(key));\r\n }\r\n }\r\n\r\n // Now repeat going the other way, pulling all new file no matches into\r\n // newFileNoMatch\r\n this.newFileNoMatch = new HashMap<String, SubsetElement>();\r\n iter = this.newFile.keySet().iterator();\r\n while (iter.hasNext()) {\r\n final String key = iter.next();\r\n if (!this.oldFile.containsKey(key)) {\r\n final String newKey = this.newFile.get(key).getSubsetCode()\r\n + this.newFile.get(key).getConceptCode();\r\n this.newFileNoMatch.put(newKey, this.newFile.get(key));\r\n }\r\n }\r\n\r\n // dump the initial large HashMaps to reclaim some memory\r\n this.oldFile = null;\r\n this.newFile = null;\r\n }", "private <T> void assertDeduped(List<T> array, Comparator<T> cmp, int expectedLength) {\n List<List<T>> types = List.of(new ArrayList<T>(array), new LinkedList<>(array));\n for (List<T> clone : types) {\n // dedup the list\n CollectionUtils.sortAndDedup(clone, cmp);\n // verify unique elements\n for (int i = 0; i < clone.size() - 1; ++i) {\n assertNotEquals(cmp.compare(clone.get(i), clone.get(i + 1)), 0);\n }\n assertEquals(expectedLength, clone.size());\n }\n }", "private static void compareForReverseArrays() {\n Integer[] reverse1 = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1};\n Integer[] reverse2 = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1};\n Insertion insertion = new Insertion();\n insertion.analyzeSort(reverse1);\n insertion.getStat().printReport();\n\n Selection selection = new Selection();\n selection.analyzeSort(reverse2);\n selection.getStat().printReport();\n }", "public void test18() {\n //$NON-NLS-1$\n deployBundles(\"test18\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.CHANGED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TRANSIENT_TO_NON_TRANSIENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertTrue(\"Not compatible\", DeltaProcessor.isCompatible(child));\n }", "public void test33() {\n //$NON-NLS-1$\n deployBundles(\"test33\");\n IApiBaseline before = getBeforeState();\n IApiBaseline after = getAfterState();\n IApiComponent beforeApiComponent = before.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", beforeApiComponent);\n IApiComponent afterApiComponent = after.getApiComponent(BUNDLE_NAME);\n //$NON-NLS-1$\n assertNotNull(\"no api component\", afterApiComponent);\n IDelta delta = ApiComparator.compare(beforeApiComponent, afterApiComponent, before, after, VisibilityModifiers.ALL_VISIBILITIES, null);\n //$NON-NLS-1$\n assertNotNull(\"No delta\", delta);\n IDelta[] allLeavesDeltas = collectLeaves(delta);\n //$NON-NLS-1$\n assertEquals(\"Wrong size\", 1, allLeavesDeltas.length);\n IDelta child = allLeavesDeltas[0];\n //$NON-NLS-1$\n assertEquals(\"Wrong kind\", IDelta.REMOVED, child.getKind());\n //$NON-NLS-1$\n assertEquals(\"Wrong flag\", IDelta.TYPE_ARGUMENT, child.getFlags());\n //$NON-NLS-1$\n assertEquals(\"Wrong element type\", IDelta.FIELD_ELEMENT_TYPE, child.getElementType());\n //$NON-NLS-1$\n assertFalse(\"Is compatible\", DeltaProcessor.isCompatible(child));\n }", "private void tstNMAssociationInverse() {\n\t\t// configure collection properties of Location and ClosingPeriod\n\t\t// to use TreeSet as collection implementing class\n\t\t((TypePropertyCollection) (new Location()).getProperty(\"closedons\").getType())\n\t\t\t\t.setCollectionClass(TreeSet.class);\n\t\t((TypePropertyCollection) (new ClosingPeriod()).getProperty(\"locations\").getType())\n\t\t\t\t.setCollectionClass(TreeSet.class);\n\t\t// set up two locations and closing periods\n\t\tClosingPeriod cp1 = new ClosingPeriod(\"\\\"20050101\\\" \\\"1\\\"\");\n\t\tClosingPeriod cp2 = new ClosingPeriod(\"\\\"20050201\\\" \\\"2\\\"\");\n\t\tLocation locA = new Location(\"\\\"A\\\"\");\n\t\tLocation locB = new Location(\"\\\"B\\\"\");\n\n\t\t// at the beginning all four collection properties are\n\t\t// undefined (null)\n\t\tAssert.assertNull(locA.getClosedons());\n\t\tAssert.assertNull(locB.getClosedons());\n\t\tAssert.assertNull(cp1.getLocations());\n\t\tAssert.assertNull(cp2.getLocations());\n\n\t\t// link locA with cp1\n\t\tlocA.addClosedon(cp1);\n\t\tAssert.assertEquals(1, locA.getClosedons().size());\n\t\tReadonlyListCollection<ClosingPeriod> cps = (ReadonlyListCollection<ClosingPeriod>) locA.getClosedons();\n\t\tAssert.assertSame(cp1, cps.get(0));\n\t\tAssert.assertNull(locB.getClosedons());\n\t\tReadonlyListCollection<Location> locs = (ReadonlyListCollection<Location>) cp1.getLocations();\n\t\tAssert.assertSame(locA, locs.get(0));\n\t\tAssert.assertEquals(1, cp1.getLocations().size());\n\t\tAssert.assertNull(cp2.getLocations());\n\n\t\t// link locA with cp2\n\t\tlocA.addClosedon(cp2);\n\t\tAssert.assertEquals(2, locA.getClosedons().size());\n\t\tcps = (ReadonlyListCollection<ClosingPeriod>) locA.getClosedons();\n\t\tAssert.assertSame(cp1, cps.get(0));\n\t\tAssert.assertSame(cp2, cps.get(1));\n\t\tAssert.assertNull(locB.getClosedons());\n\t\tAssert.assertEquals(1, cp1.getLocations().size());\n\t\tlocs = (ReadonlyListCollection<Location>) cp1.getLocations();\n\t\tAssert.assertSame(locA, locs.get(0));\n\t\tAssert.assertEquals(1, cp2.getLocations().size());\n\t\tlocs = (ReadonlyListCollection<Location>) cp2.getLocations();\n\t\tAssert.assertSame(locA, locs.get(0));\n\n\t\t// link locB with cp1\n\t\tlocB.addClosedon(cp1);\n\t\tAssert.assertEquals(2, locA.getClosedons().size());\n\t\tcps = (ReadonlyListCollection<ClosingPeriod>) locA.getClosedons();\n\t\tAssert.assertSame(cp1, cps.get(0));\n\t\tAssert.assertSame(cp2, cps.get(1));\n\t\tAssert.assertEquals(1, locB.getClosedons().size());\n\t\tcps = (ReadonlyListCollection<ClosingPeriod>) locB.getClosedons();\n\t\tAssert.assertSame(cp1, cps.get(0));\n\t\tAssert.assertEquals(2, cp1.getLocations().size());\n\t\tlocs = (ReadonlyListCollection<Location>) cp1.getLocations();\n\t\tAssert.assertSame(locA, locs.get(0));\n\t\tAssert.assertSame(locB, locs.get(1));\n\t\tAssert.assertEquals(1, cp2.getLocations().size());\n\t\tlocs = (ReadonlyListCollection<Location>) cp2.getLocations();\n\t\tAssert.assertSame(locA, locs.get(0));\n\n\t\t// link locB with cp2\n\t\tlocB.addClosedon(cp2);\n\t\tAssert.assertEquals(2, locA.getClosedons().size());\n\t\tcps = (ReadonlyListCollection<ClosingPeriod>) locA.getClosedons();\n\t\tAssert.assertSame(cp1, cps.get(0));\n\t\tAssert.assertSame(cp2, cps.get(1));\n\t\tAssert.assertEquals(2, locB.getClosedons().size());\n\t\tcps = (ReadonlyListCollection<ClosingPeriod>) locB.getClosedons();\n\t\tAssert.assertSame(cp1, cps.get(0));\n\t\tAssert.assertSame(cp2, cps.get(1));\n\t\tAssert.assertEquals(2, cp1.getLocations().size());\n\t\tlocs = (ReadonlyListCollection<Location>) cp1.getLocations();\n\t\tAssert.assertSame(locA, locs.get(0));\n\t\tAssert.assertSame(locB, locs.get(1));\n\t\tAssert.assertEquals(2, cp2.getLocations().size());\n\t\tlocs = (ReadonlyListCollection<Location>) cp2.getLocations();\n\t\tAssert.assertSame(locA, locs.get(0));\n\t\tAssert.assertSame(locB, locs.get(1));\n\n\t\tAssert.assertEquals(2, cp1.getLocations().size());\n\t\ttry {\n\t\t\tcp1.addLocation(locA);\n\t\t\tAssert.fail(\"expected ValidationInstanceAssocTwiceException\");\n\t\t} catch (ValidationInstanceAssocTwiceException e) {\n\t\t\tAssert.assertTrue(true);\n\t\t}\n\t\tAssert.assertEquals(2, cp1.getLocations().size());\n\t\ttry {\n\t\t\tcp1.addLocation(locB);\n\t\t\tAssert.fail(\"expected ValidationInstanceAssocTwiceException\");\n\t\t} catch (ValidationInstanceAssocTwiceException e) {\n\t\t\tAssert.assertTrue(true);\n\t\t}\n\t\tAssert.assertEquals(2, cp1.getLocations().size());\n\t\tAssert.assertEquals(2, locB.getClosedons().size());\n\t\ttry {\n\t\t\tlocB.addClosedon(cp1);\n\t\t\tAssert.fail(\"expected ValidationInstanceAssocTwiceException\");\n\t\t} catch (ValidationInstanceAssocTwiceException e) {\n\t\t\tAssert.assertTrue(true);\n\t\t}\n\t\tAssert.assertEquals(2, locB.getClosedons().size());\n\t\ttry {\n\t\t\tlocB.addClosedon(cp2);\n\t\t\tAssert.fail(\"expected ValidationInstanceAssocTwiceException\");\n\t\t} catch (ValidationInstanceAssocTwiceException e) {\n\t\t\tAssert.assertTrue(true);\n\t\t}\n\t\tAssert.assertEquals(2, locB.getClosedons().size());\n\t}", "@Ignore\r\n @Test\r\n public void testContainsCollection() {\r\n System.out.println(\"containsCollection\");\r\n NumberCollection nc = null;\r\n NumberCollection instance = new NumberCollection();\r\n boolean expResult = false;\r\n boolean result = instance.containsCollection(nc);\r\n assertEquals(expResult, result);\r\n \r\n }", "@Test\n public void testIntersection3()\n {\n List<Integer> expected = new ArrayList<>();\n ConciseSet set1 = new ConciseSet();\n ConciseSet set2 = new ConciseSet();\n for (int i = 0; i < 1000; i++) {\n set1.add(i);\n set2.add(i);\n expected.add(i);\n }\n\n verifyIntersection(expected, set1, set2);\n }", "@Test\n public void test17() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1337,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test17\");\n LinkedHashSet<Object> linkedHashSet0 = new LinkedHashSet<Object>();\n ResettableIterator<Object> resettableIterator0 = IteratorUtils.loopingIterator((Collection<?>) linkedHashSet0);\n assertEquals(false, resettableIterator0.hasNext());\n }" ]
[ "0.6127617", "0.6115955", "0.5977303", "0.59031415", "0.5879237", "0.5866703", "0.58500695", "0.5788291", "0.57667714", "0.56950074", "0.5683636", "0.5681265", "0.5663669", "0.56571263", "0.5651753", "0.5640336", "0.56279814", "0.56185234", "0.56109643", "0.56087995", "0.5591834", "0.5576075", "0.556557", "0.55582327", "0.55524933", "0.55483574", "0.554795", "0.5547802", "0.55439776", "0.55270314", "0.5523128", "0.55010355", "0.5494775", "0.5494673", "0.54697776", "0.54540306", "0.5429535", "0.542791", "0.54234135", "0.54220176", "0.54189885", "0.5415765", "0.53910303", "0.53841287", "0.53830016", "0.53792375", "0.5353666", "0.5351186", "0.53511137", "0.53508204", "0.53500307", "0.5346235", "0.5342359", "0.5337441", "0.5327562", "0.53252083", "0.5324259", "0.53099734", "0.53074414", "0.52824426", "0.5281749", "0.52768624", "0.52753806", "0.52699745", "0.5269362", "0.52670866", "0.524809", "0.52387345", "0.52309644", "0.5229143", "0.52234256", "0.52097297", "0.5206599", "0.52051294", "0.5196798", "0.5194716", "0.51939833", "0.51895076", "0.51887715", "0.51837206", "0.51751256", "0.5159975", "0.5157174", "0.514527", "0.514117", "0.5132122", "0.51302135", "0.5122312", "0.51199156", "0.51197445", "0.5115247", "0.51143175", "0.5111778", "0.51107234", "0.51091224", "0.5107845", "0.5107503", "0.5106877", "0.51035964", "0.5102759", "0.5098219" ]
0.0
-1
Tries to do clearfixing of nodes with wrong height due to float
private void compareAndSetWidthHeight(HtmlNode n) { if (n.parent != null) { int parent_height = n.parent.height; int height = n.height; if (!n.isHidden() && height > parent_height) { n.parent.height = height; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void update_height() {\r\n int tmp_height = 0;\r\n int tmp_left = -1;\r\n int tmp_right = -1;\r\n\r\n // set height of null children to -1\r\n if (leftChild != null) {\r\n tmp_left = leftChild.height;\r\n }\r\n if (rightChild != null) {\r\n tmp_right = rightChild.height;\r\n }\r\n\r\n // find highest child\r\n if (tmp_left > tmp_right) {\r\n tmp_height = tmp_left;\r\n }\r\n else {\r\n tmp_height = tmp_right;\r\n }\r\n\r\n // update this node's height\r\n height = tmp_height + 1;\r\n }", "private void updateHeight() {\n int leftHeight = height(this.leftChild);\n int rightHeight = height(this.rightChild);\n this.height = (rightHeight > leftHeight ? rightHeight : leftHeight) + 1;\n }", "public void layoutChildren() {\n super.layoutChildren();\n if (this.mFloatView != null) {\n if (this.mFloatView.isLayoutRequested() && !this.mFloatViewOnMeasured) {\n measureFloatView();\n }\n this.mFloatView.layout(0, 0, this.mFloatView.getMeasuredWidth(), this.mFloatView.getMeasuredHeight());\n this.mFloatViewOnMeasured = false;\n }\n }", "private void updateHeightAndBalanceFactor(ArrayList<Node<T>> affectedNodes) {\n\t\tfor (Node<T> node : affectedNodes) {\n\t\t\tif (node.getLeft() == null && node.getRight() == null) {\n\t\t\t\tnode.setHeight(1);\n\t\t\t} else if (node.getLeft() == null && node.getRight() != null) {\n\t\t\t\tnode.setHeight(node.getRight().getHeight() + 1);\n\t\t\t} else if (node.getLeft() != null && node.getRight() == null) {\n\t\t\t\tnode.setHeight(node.getLeft().getHeight() + 1);\n\t\t\t} else {\n\t\t\t\tnode.setHeight((\n\t\t\t\t\tnode.getLeft().getHeight() > node.getRight().getHeight() \n\t\t\t\t\t? node.getLeft().getHeight() : node.getRight().getHeight()\n\t\t\t\t\t) + 1);\n\t\t\t}\n\t\t} // After height is updated, update balance factor\n\t\t\n\t\tfor (Node<T> node : affectedNodes) {\n\t\t\tif (node.getLeft() == null) {\n\t\t\t\tif (node.getRight() == null) {\n\t\t\t\t\tnode.setBalanceFactor(0);\n\t\t\t\t} else {\n\t\t\t\t\tnode.setBalanceFactor(0 - node.getRight().getHeight());\n\t\t\t\t}\n\t\t\t} else if (node.getRight() == null) {\n\t\t\t\tif (node.getLeft() == null) {\n\t\t\t\t\tnode.setBalanceFactor(0);\n\t\t\t\t} else {\n\t\t\t\t\tnode.setBalanceFactor(node.getLeft().getHeight());\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnode.setBalanceFactor(node.getLeft().getHeight() - node.getRight().getHeight());\n\t\t\t}\n\t\t}\n\t}", "@Test\r\n public void testHeightAddNodesRight(){\r\n \ttree.add(\"g\");\r\n \ttree.add(\"f\");\r\n \ttree.add(\"e\");\r\n \tassertEquals(tree.height(),2);\r\n \t\r\n \t//testing height of 3\r\n \ttree.add(\"d\"); //height now 3, d is right\r\n \tassertEquals(tree.height(), 3);\r\n \t\r\n \ttree.add(\"c\");\r\n \ttree.add(\"b\"); \r\n \ttree.add(\"a\"); \r\n \tassertEquals(tree.height(),6); //last\r\n }", "private void updateHeight(AvlTreeNode<?, ?> n) {\n n.height = 1 + Math.max(height(n.left), height(n.right));\n }", "private int calcHeight(ChartOptions options) {\n Node n = this; // current node in the level\n int realHeight = 0;\n boolean samelevel = true; // next node in same level?\n while (n != null && samelevel) {\n int tmpHeight = 0;\n if (n.typ.matches(NodeType.TERM, NodeType.NONTERM, NodeType.EXCEPTION)) {\n tmpHeight = n.size.getHeight();\n } else if (n.typ == NodeType.ITER) {\n tmpHeight = n.sub.calcHeight(options);\n } else if (n.typ == NodeType.OPT) {\n tmpHeight = n.sub.calcHeight(options);\n } else if (n.typ == NodeType.PREDICATE) {\n tmpHeight = n.size.getHeight();\n } else if (n.typ == NodeType.RERUN) {\n tmpHeight = n.sub.calcHeight(options);\n } else if (n.typ == NodeType.ALT) {\n tmpHeight = n.sub.calcHeight(options);\n } else if (n.typ == NodeType.EPS) {\n tmpHeight = options.fontHeight() * 3 / 2;\n if (realHeight < tmpHeight) {\n tmpHeight = options.fontHeight()\n + options.componentGapHeight();\n } else {\n tmpHeight = 0;\n }\n }\n realHeight = Math.max(realHeight, tmpHeight);\n if (n.up) {\n samelevel = false;\n }\n n = n.next;\n }\n return realHeight;\n }", "private void setHeights(Node a, Node b) {\n a.setHeight(maximum(height(a.getLeftChild()), height(a.getRightChild())) + 1);\n b.setHeight(maximum(height(b.getLeftChild()), height(b.getRightChild())) + 1);\n }", "@Override\r\n\tpublic int getNodeHeight() {\n\t\treturn getNodeHeight(this);\r\n\t}", "public void recomputeHeight() {\n setVisibility(View.GONE);\n setupAnimators();\n }", "private void clearEdgeLinks() {\n edges.clear();\n //keep whole tree to maintain its position when it is expanded (within scroll pane bounds)\n Node rootNode = nodes.get(0);\n VBox rootVBox = (VBox) rootNode.getContainerPane().getParent();\n rootVBox.layout();\n Bounds rootNodeChildrenVBoxBounds = rootNode.getChildrenVBox().getBoundsInLocal();\n rootVBox.setLayoutY(Math.abs(rootVBox.getLayoutY() - ((rootNodeChildrenVBoxBounds.getHeight()) - rootNode.getHeight()) / 2 + rootNode.getLayoutY()));\n rootVBox.layout();\n\n for (int i = 0; i < nodes.size(); i++) {\n Pane containerPane = nodes.get(i).getContainerPane();\n //reposition node to the center of its children\n ObservableList<javafx.scene.Node> genericNodes = nodes.get(i).getChildrenVBox().getChildren();\n if (!genericNodes.isEmpty()) {\n nodes.get(i).setLayoutY(((nodes.get(i).getChildrenVBox().getBoundsInLocal().getHeight()) - rootNode.getHeight()) / 2);\n }\n\n for (int j = 0; j < containerPane.getChildren().size(); j++) {\n if (containerPane.getChildren().get(j) instanceof Edge) {\n containerPane.getChildren().remove(j);\n j--;\n }\n }\n }\n redrawEdges(rootNode);\n }", "public void setBestHeight() { setHeight(getBestHeight()); }", "public void ensureHeight(int h)\n {\n\tint currH = height();\n\tAssert.pre(data() == null, \"Ensure height only called on dummy node.\");\n\tif (currH < h) {\n\t int i;\n\t for (i = currH; i < h; i++) {\n\t\tnext.add(null);\n\t }\n\t}\n }", "public void onMeasure(int i, int i2) {\n int i3;\n super.onMeasure(i, i2);\n int size = View.MeasureSpec.getSize(i);\n int size2 = View.MeasureSpec.getSize(i2);\n int mode = View.MeasureSpec.getMode(i);\n int mode2 = View.MeasureSpec.getMode(i2);\n int childCount = getChildCount();\n this.f80946c.clear();\n this.f80947d.clear();\n this.f80948e.clear();\n this.f80949f = childCount;\n int i4 = 0;\n int i5 = 0;\n int i6 = 0;\n int i7 = 0;\n int i8 = 0;\n int i9 = 0;\n while (true) {\n if (i4 >= childCount) {\n break;\n }\n View childAt = getChildAt(i4);\n C32569u.m150513a((Object) childAt, C6969H.m41409d(\"G6A8BDC16BB\"));\n if (childAt.getVisibility() == 8) {\n i4++;\n } else {\n measureChild(childAt, i, i2);\n ViewGroup.LayoutParams layoutParams = childAt.getLayoutParams();\n if (layoutParams != null) {\n ViewGroup.MarginLayoutParams marginLayoutParams = (ViewGroup.MarginLayoutParams) layoutParams;\n int measuredWidth = childAt.getMeasuredWidth() + marginLayoutParams.leftMargin + marginLayoutParams.rightMargin;\n int measuredHeight = childAt.getMeasuredHeight() + marginLayoutParams.topMargin + marginLayoutParams.bottomMargin;\n int i10 = i5 + measuredWidth;\n if (i10 > size) {\n i8 += i6;\n if (i8 > size2) {\n this.f80949f = i4 - i7;\n break;\n }\n this.f80946c.add(Integer.valueOf(i6));\n this.f80947d.add(Integer.valueOf(i5));\n this.f80948e.add(Integer.valueOf(i7));\n i9 = Math.max(i5, i9);\n i5 = 0;\n i6 = 0;\n i7 = 0;\n } else {\n i6 = Math.max(i6, measuredHeight);\n i7++;\n i4++;\n i5 = i10;\n }\n } else {\n throw new TypeCastException(C6969H.m41409d(\"G6796D916FF33AA27E8018408F0E083D46890C15AAB3FEB27E900DD46E7E9CF977D9AC51FFF31A52DF401994CBCF3CAD27ECDE313BA278C3BE91B8006DFE4D1D0608DF91BA63FBE3DD60F8249FFF6\"));\n }\n }\n }\n if (i5 <= 0 || this.f80949f != childCount - 1) {\n i3 = i9;\n } else {\n i8 += i6;\n i3 = Math.max(i5, i9);\n this.f80948e.add(Integer.valueOf(i7));\n this.f80947d.add(Integer.valueOf(i5));\n this.f80946c.add(Integer.valueOf(i6));\n }\n if (mode != 1073741824) {\n size = i3;\n }\n if (mode2 != 1073741824) {\n size2 = i8;\n }\n setMeasuredDimension(size, size2);\n }", "public void draw(){\n\t\t\tint x = getPreferredSize().width/2;\n\t\t\tint y = 10;\n\t\t\tif (root() != null)\n\t\t\t\tpreOrderCell(root(), x, y, root().getColor());\n\t\t\tjgraph.getGraphLayoutCache().insert(cells.values().toArray());\n\t\t\tjgraph.getGraphLayoutCache().insert(nullnodes.toArray());\n\t\t}", "public void RBFixup(Node n) {\r\n\t\twhile(n.parent.color == 0) {\r\n\t\t\tif(n.parent == n.parent.parent.left) {\r\n\t\t\t\tNode y = n.parent.parent.right;\r\n\t\t\t\tif(y.color == 0) {\r\n\t\t\t\t\tn.parent.color = 1;\r\n\t\t\t\t\ty.color = 1;\r\n\t\t\t\t\tn.parent.parent.color = 0;\r\n\t\t\t\t\tn = n.parent.parent;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tif(n == n.parent.right) {\r\n\t\t\t\t\t\tn = n.parent;\r\n\t\t\t\t\t\tleftRotate(n);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tn.parent.color = 1;\r\n\t\t\t\t\tn.parent.parent.color = 0;\r\n\t\t\t\t\t//mark n and n's grandparent, because in the end these two nodes will be the children\r\n\t\t\t\t\t//marking will be handled in recUpdateNode\r\n\t\t\t\t\tn.marked = true;\r\n\t\t\t\t\tn.parent.parent.marked = true;\r\n\t\t\t\t\trightRotate(n.parent.parent);\r\n\t\t\t\t\tif(hFlag == 1)\r\n\t\t\t\t\t\theight--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tNode y = n.parent.parent.left;\r\n\t\t\t\tif(y.color == 0) {\r\n\t\t\t\t\tn.parent.color = 1;\r\n\t\t\t\t\ty.color = 1;\r\n\t\t\t\t\tn.parent.parent.color = 0;\r\n\t\t\t\t\tn = n.parent.parent;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tif(n == n.parent.left) {\r\n\t\t\t\t\t\tn = n.parent;\r\n\t\t\t\t\t\trightRotate(n);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tn.parent.color = 1;\r\n\t\t\t\t\tn.parent.parent.color = 0;\r\n\t\t\t\t\t//mark n and n's grandparent, because in the end these two nodes will be the children\r\n\t\t\t\t\t//marking will be handled in recUpdateNode\r\n\t\t\t\t\tn.marked = true;\r\n\t\t\t\t\tn.parent.parent.marked = true;\r\n\t\t\t\t\tleftRotate(n.parent.parent);\r\n\t\t\t\t\tif(hFlag == 1)\r\n\t\t\t\t\t\theight--;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\troot.color = 1;\r\n\t}", "public void fixHeight(BTNode<T> node){\n\t\tnode.setHeight(Math.max(height(node.getLeft()),height(node.getRight()))+1);\n\t}", "private int calcBF(Node node){\n\t\tint bf;\n\t\tif(node.left == null && node.right == null)\n\t\t\treturn 0;\n\t\tif(node.left == null){\n\t\t\tbf= -node.right.height;\n\t\t\tnode.height= 1+ node.right.height;\n\t\t}\n\t\telse if(node.right == null){\n\t\t\tbf= node.left.height;\n\t\t\tnode.height= 1+ node.left.height;\n\t\t}\n\t\telse {\n\t\t\tbf= node.left.height - node.right.height;\n\t\t\tnode.height = 1+ Math.max(node.left.height , node.right.height);\n\t\t}\n\t\treturn bf;\n\t}", "private int height(Node node) {\n return node == null ? 0 : node.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}", "private void hAndBF(Node<T> current) {\n int h = Math.max(findHeight(current.getLeft()),\n findHeight(current.getRight())) + 1;\n current.setHeight(h);\n int bf = findHeight(current.getLeft()) - findHeight(current.getRight());\n current.setBalanceFactor(bf);\n }", "private Node makeTree(Node currentNode, DataNode dataNode,\r\n\t\t\tint featureSubsetSize, int height) {\n\r\n\t\tif (dataNode.labels.size() < this.traineeDataSize / 25 || height > 7) {\r\n\t\t\treturn new Node(majority(dataNode));\r\n\t\t}\r\n\t\telse{\r\n\r\n\t\t\tEntropyCalculation e1 = new EntropyCalculation();\r\n\r\n\t\t\tNode n = e1.maxGainedElement(dataNode.features, dataNode.labels, featureSubsetSize); //new\r\n\r\n\r\n\t\t\tif(e1.zeroEntropy){\r\n\r\n\t\t\t\tcurrentNode = new Node(dataNode.labels.get(0));\r\n\r\n\t\t\t\t/*currentNode.attribute = dataNode.features;\r\n\t\t\t\tcurrentNode.decision = dataNode.labels;\r\n\t\t\t\tcurrentNode.nodeValue = dataNode.labels.get(0);*/\r\n\r\n\t\t\t\treturn currentNode;\r\n\t\t\t}\r\n\t\t\telse{\r\n\r\n\t\t\t\tcurrentNode = new Node();\r\n\r\n\t\t\t\tcurrentNode.featureIndexColumn = n.featureIndexColumn;\r\n\t\t\t\tcurrentNode.featureIndexRow = n.featureIndexRow;\r\n\r\n\t\t\t\tcurrentNode.attribute = dataNode.features;\r\n\t\t\t\tcurrentNode.decision = dataNode.labels;\r\n\r\n\t\t\t\tcurrentNode.nodeValue = dataNode.features.get(currentNode.featureIndexRow).get(currentNode.featureIndexColumn);\r\n\r\n\t\t\t\tcurrentNode.leftChild = new Node();\r\n\t\t\t\tcurrentNode.rightChild = new Node();\r\n\r\n\t\t\t\tDataNode leftNode = new DataNode();\r\n\t\t\t\tDataNode rightNode = new DataNode();\r\n\r\n\t\t\t\tfor (int i = 0; i < dataNode.features.size(); i++) {\r\n\r\n\t\t\t\t\tif(currentNode.nodeValue >= dataNode.features.get(i).get(currentNode.featureIndexColumn)) {\r\n\r\n\t\t\t\t\t\tleftNode.features.add(dataNode.features.get(i));\r\n\t\t\t\t\t\tleftNode.labels.add(dataNode.labels.get(i));\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\r\n\t\t\t\t\t\trightNode.features.add(dataNode.features.get(i));\r\n\t\t\t\t\t\trightNode.labels.add(dataNode.labels.get(i));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif((leftNode.labels.isEmpty() || rightNode.labels.isEmpty()) && height == 0){\r\n\t\t\t\t\tSystem.out.println(\"Ghapla\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcurrentNode.leftChild = makeTree(currentNode.leftChild, leftNode, featureSubsetSize, height+1);\r\n\r\n\t\t\t\tcurrentNode.rightChild = makeTree(currentNode.rightChild, rightNode, featureSubsetSize, height+1);\r\n\r\n\t\t\t\treturn currentNode;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Test\r\n public void testHeightOnlyRoot(){\r\n \t//check instances where height will be 0\r\n \tassertEquals(tree.height(), 0);\r\n \ttree.add(\"a\"); //adding to root (height still 0)\r\n \tassertEquals(tree.height(), 0 );\r\n \t\r\n }", "public void insertNode(Node newNode) {\r\n\t\thFlag = 0;\r\n\t\tif( newNode == null ) {\r\n\t\t\tthrow new NullPointerException(\"Inserted node is null\");\r\n\t\t}\r\n\t\t//if tree is empty, make this node the root\r\n\t\tif( size == 0 ) {\r\n\t\t\troot = newNode;\r\n\t\t\tnewNode.parent = nilNode;\r\n\t\t\tnewNode.left = nilNode;\r\n\t\t\tnewNode.right = nilNode;\r\n\t\t\tnewNode.color = 1;\r\n\t\t\theight = 1;\r\n\t\t} else {\r\n\t\t\t//otherwise, start at root and climb down tree until a spot is found\r\n\t\t\tNode y = nilNode;\r\n\t\t\tNode x = root;\r\n\t\t\tint count = 1;\r\n\r\n\t\t\twhile(x != nilNode) {\r\n\t\t\t\ty = x;\r\n\t\t\t\tif(newNode.key < x.key || (newNode.key == x.key && newNode.p == 1) )\r\n\t\t\t\t\tx = x.left;\r\n\t\t\t\telse\r\n\t\t\t\t\tx = x.right;\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t\tif(height < count) {\r\n\t\t\t\theight = count;\r\n\t\t\t\thFlag = 1;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\tnewNode.parent = y;\r\n\t\t\tif(newNode.key < y.key || (newNode.key == y.key && newNode.p == 1) )\r\n\t\t\t\ty.left = newNode;\r\n\t\t\telse\r\n\t\t\t\ty.right = newNode;\r\n\t\t\tnewNode.left = nilNode;\r\n\t\t\tnewNode.right = nilNode;\r\n\t\t\tnewNode.color = 0;\r\n\r\n\t\t\t//fix up tree\r\n\t\t\tRBFixup(newNode);\r\n\t\t\t\r\n\t\t\t//Time to update the vaules in each node in O(h) time\r\n\t\t\t//after the fix up, newNode may have children who need to be updated,so\r\n\t\t\t//if newNode has nonNil children, start updating from either child\r\n\t\t\tif( !newNode.right.isNil || !newNode.left.isNil ) {\r\n\t\t\t\t//start from newNode's left child (right would work too)\r\n\t\t\t\trecUpdateNode(newNode.left);\r\n\t\t\t} else {\r\n\t\t\t\t//start from newNode\r\n\t\t\t\trecUpdateNode(newNode);\r\n\t\t\t}\n\t\t}\r\n\t\tsize++;\r\n\t}", "public void bfs()\n{\n Queue q=new LinkedList();\n q.add(this.rootNode);\n printNode(this.rootNode);\n rootNode.visited=true;\n while(!q.isEmpty())\n {\n Node n=(Node)q.remove();\n Node child=null;\n while((child=getUnvisitedChildNode(n))!=null)\n {\n child.visited=true;\n printNode(child);\n q.add(child);\n }\n }\n //Clear visited property of nodes\n clearNodes();\n}", "private void subdivide() {\n if (!hasChildren) {\n hasChildren = true;\n this.children = new QuadtreeNodeChildren(this);\n } else {\n return;\n }\n }", "@Test\r\n public void testHeightCompleteTree(){\r\n \ttree.add(\"deer\");\r\n \ttree.add(\"bar\"); //adding as child to left\r\n \ttree.add(\"jar\"); //add as child to right \r\n \ttree.add(\"apple\"); //adding to right side of right node\r\n \tassertEquals(tree.height(), 2); \r\n }", "public void onMeasure(int i, int i2) {\n int i3;\n int i4;\n int size = View.MeasureSpec.getSize(i);\n int size2 = View.MeasureSpec.getSize(i2);\n int i5 = this.f61208a;\n int makeMeasureSpec = View.MeasureSpec.makeMeasureSpec(i5 >= 0 ? Math.min(size, i5) : size, 1073741824);\n int makeMeasureSpec2 = View.MeasureSpec.makeMeasureSpec(size2, 1073741824);\n int paddingLeft = getPaddingLeft() + getPaddingRight();\n int childCount = getChildCount();\n int paddingTop = getPaddingTop() + getPaddingBottom();\n int i6 = 0;\n while (true) {\n i3 = 8;\n if (i6 >= childCount) {\n break;\n }\n View childAt = getChildAt(i6);\n C17366a aVar = (C17366a) childAt.getLayoutParams();\n if (aVar.f61234a && childAt.getVisibility() != 8) {\n measureChildWithMargins(childAt, makeMeasureSpec, paddingLeft, makeMeasureSpec2, paddingTop);\n paddingTop += aVar.topMargin + childAt.getMeasuredHeight() + aVar.bottomMargin;\n }\n i6++;\n }\n int i7 = paddingTop;\n int i8 = 0;\n while (i8 < childCount) {\n View childAt2 = getChildAt(i8);\n C17366a aVar2 = (C17366a) childAt2.getLayoutParams();\n if (aVar2.f61234a || childAt2.getVisibility() == i3) {\n i4 = makeMeasureSpec;\n } else {\n i4 = makeMeasureSpec;\n measureChildWithMargins(childAt2, makeMeasureSpec, paddingLeft, makeMeasureSpec2, i7);\n i7 += aVar2.topMargin + childAt2.getMeasuredHeight() + aVar2.bottomMargin;\n }\n i8++;\n makeMeasureSpec = i4;\n i3 = 8;\n }\n this.f61213f = Math.max(0, (i7 - paddingTop) - getMaxCollapsedHeight());\n this.f61214g = i7 - this.f61213f;\n float f = 0.0f;\n if (ViewCompat.isLaidOut(this)) {\n int i9 = (this.f61212e > 0.0f ? 1 : (this.f61212e == 0.0f ? 0 : -1));\n this.f61212e = Math.min(this.f61212e, (float) this.f61213f);\n int i10 = (this.f61212e > 0.0f ? 1 : (this.f61212e == 0.0f ? 0 : -1));\n } else {\n if (!this.f61218k) {\n f = (float) this.f61213f;\n }\n this.f61212e = f;\n }\n this.f61215h = Math.max(0, size2 - i7) + ((int) this.f61212e);\n setMeasuredDimension(size, size2);\n }", "void adjustHeight(int targetHeight) {\n class Group {\n\n private final int y;\n private int h;\n private final LinkedList<Cell> cells = new LinkedList<>();\n\n public Group(int y) {\n this.y = y;\n h = 0;\n }\n\n }\n LinkedList<Group> groups = new LinkedList<>();\n groups.add(new Group(0));\n mCells.forEach((cell) -> {\n //While a cell extent is not reached, keep add cells to the group\n if (!cell.isExtension()) {\n groups.getLast().cells.add(cell);\n } else {\n //Close current group and create a new one\n groups.getLast().h = cell.getY() - groups.getLast().y;\n groups.add(new Group(cell.getY() + cell.getHeight()));\n }\n });\n groups.getLast().h = targetHeight - groups.getLast().y;\n\n //Adjust height for each group independently\n groups.stream().filter((group) -> !(group.cells.isEmpty())).forEachOrdered((group) -> {\n double alpha = group.h / group.cells\n .stream()\n .mapToInt(Cell::getHeight)\n .sum();\n\n group.cells.forEach((cell) -> {\n cell.scale(alpha);\n });\n });\n }", "public void preLayout(ZGroup node) {\n }", "int computeHeight() {\n Node<Integer>[] nodes = new Node[parent.length];\n for (int i = 0; i < parent.length; i++) {\n nodes[i] = new Node<Integer>();\n }\n int rootIndex = 0;\n for (int childIndex = 0; childIndex < parent.length; childIndex++) {\n if (parent[childIndex] == -1) {\n rootIndex = childIndex;\n } else {\n nodes[parent[childIndex]].addChild(nodes[childIndex]);\n }\n }\n return getDepth(nodes[rootIndex]);\n }", "private void bfs() {\n\t\tQueue<Node> q = new ArrayDeque<>();\n\t\tq.add(treeNodes.get(0));\n\t\twhile (!q.isEmpty()) {\n\t\t\tint size = q.size();\n\t\t\tfor (int i = 0; i < size; i++) {\n\t\t\t\tNode curr = q.poll();\n\t\t\t\ttime += curr.informTime;\n\t\t\t\tSet<Node> nextNodes = curr.nextNodes;\n\t\t\t\tif (nextNodes == null || curr.id == treeNodes.get(0).id)\n\t\t\t\t\tcontinue;\n\t\t\t\tfor (Node node : nextNodes) {\n\t\t\t\t\tq.add(node);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "public void postLayout(ZGroup node) {\n }", "public void onHeightUpdated(float f) {\n float f2;\n if ((!this.mQsExpanded || this.mQsExpandImmediate || (this.mIsExpanding && this.mQsExpandedWhenExpandingStarted)) && this.mStackScrollerMeasuringPass <= 2) {\n positionClockAndNotifications();\n }\n if (this.mQsExpandImmediate || (this.mQsExpanded && !this.mQsTracking && this.mQsExpansionAnimator == null && !this.mQsExpansionFromOverscroll)) {\n if (this.mKeyguardShowing) {\n f2 = f / ((float) getMaxPanelHeight());\n } else {\n float intrinsicPadding = (float) (this.mNotificationStackScroller.getIntrinsicPadding() + this.mNotificationStackScroller.getLayoutMinHeight());\n f2 = (f - intrinsicPadding) / (((float) calculatePanelHeightQsExpanded()) - intrinsicPadding);\n }\n int i = this.mQsMinExpansionHeight;\n setQsExpansion(((float) i) + (f2 * ((float) (this.mQsMaxExpansionHeight - i))));\n }\n updateExpandedHeight(f);\n updateHeader();\n updateNotificationTranslucency();\n updatePanelExpanded();\n updateGestureExclusionRect();\n }", "public int calcHeight(){\n\t\t\t\treturn calcNodeHeight(this.root);\n\t\t}", "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 }", "@Test\r\n public void testHeightFullTree(){\r\n \t\r\n \tBinarySearchTree<Integer> treeInt = new BinarySearchTree<Integer>();\r\n \t\r\n \ttreeInt.add(31);\r\n \ttreeInt.add(5);\r\n \ttreeInt.add(44);\r\n \t\r\n \tassertEquals(treeInt.height(), 1);\r\n \t\r\n \ttree.add(\"deer\");\r\n \ttree.add(\"bar\"); //adding as child to left\r\n \ttree.add(\"jar\"); //add as child to right \r\n \tassertEquals(tree.height(), 1); //height is now 1\r\n }", "public void rebuild() {\n\t\tif (!divided) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint totalChildren = 0;\n\t\tfor (QuadTreeNode<E> q : nodes) {\n\t\t\t// If there is a divided child then we cant do anything\n\t\t\tif (q.isDivided()) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\ttotalChildren += q.numPoints();\n\t\t}\n\t\t\n\t\t// If the sum of all the children contained in the sub nodes\n\t\t// is greater than allowed then we cant do anything\n\t\tif (totalChildren > QUADTREE_NODE_CAPACITY) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Add all the nodes from the children to this node then remvoe the nodes\n\t\tpoints = new HashMap<Point, E>();\n\t\tfor (QuadTreeNode<E> q : nodes) {\n\t\t\tpoints.putAll(q.points);\n\t\t}\n\t\t\n\t\tnodes.clear();\n\t\tdivided = false;\n\t}", "private void fillListDown(int bottomEdge, final int offset) {\n while (bottomEdge + offset < getHeight() && mLastItemPosition < mAdapter.getCount() - 1) {\n mLastItemPosition++;\n final View newBottomchild = mAdapter.getView(mLastItemPosition, getCachedView(), this);\n addAndMeasureChild(newBottomchild, LAYOUT_MODE_BELOW);\n bottomEdge += getChildHeight(newBottomchild);\n }\n }", "public boolean isRealNode() {\n\t\t\tif (this.getHeight() != -1) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "@Test\n\tpublic void test2() {\n\t\tassertEquals(-1,b.removeNode(500));\n\t\t\n\t\t//Borro una hoja\n\t\tassertEquals(0,b.removeNode(3));\n\t\tassertEquals(\"1:FB=0\\t2:FB=0\\t7:FB=0\\t10:FB=1\\t13:FB=1\\t15:FB=0\\t20:FB=-1\\t23:FB=0\\t30:FB=0\\t40:FB=0\\t43:FB=1\\t49:FB=1\\t50:FB=0\\t60:FB=0\\t65:FB=0\\t70:FB=-1\\t90:FB=0\\t100:FB=0\\t110:FB=0\\t230:FB=0\\t\",b.inOrder());\n\n\t\t//Borra un elemento con un hijo\n\t\tassertEquals(0,b.removeNode(110));\n\t\tassertEquals(\"1:FB=0\\t2:FB=0\\t7:FB=0\\t10:FB=1\\t13:FB=1\\t15:FB=0\\t20:FB=-1\\t23:FB=0\\t30:FB=0\\t40:FB=0\\t43:FB=1\\t49:FB=1\\t50:FB=0\\t60:FB=0\\t65:FB=0\\t70:FB=-1\\t90:FB=0\\t100:FB=1\\t230:FB=0\\t\",b.inOrder());\n\t\t//Borra un elemento con dos hijos\n\t\tassertEquals(0,b.removeNode(90));\n\t\tassertEquals(\"1:FB=0\\t2:FB=0\\t7:FB=0\\t10:FB=1\\t13:FB=1\\t15:FB=0\\t20:FB=-1\\t23:FB=0\\t30:FB=0\\t40:FB=0\\t43:FB=1\\t49:FB=1\\t50:FB=0\\t60:FB=0\\t65:FB=0\\t70:FB=1\\t100:FB=1\\t230:FB=0\\t\",b.inOrder());\t\n\t\t\n\t\t//Borra la raiz (30)\n\t\tassertEquals(0,b.removeNode(30));\n\t\tassertEquals(\"1:FB=0\\t2:FB=0\\t7:FB=0\\t10:FB=0\\t13:FB=0\\t15:FB=0\\t20:FB=0\\t23:FB=1\\t40:FB=0\\t43:FB=1\\t49:FB=1\\t50:FB=0\\t60:FB=0\\t65:FB=0\\t70:FB=1\\t100:FB=1\\t230:FB=0\\t\",b.inOrder());\n\t\t\n\t\t//Borro 1\\t7\\t13\n\t\tassertEquals(0,b.removeNode(1));\n\t\tassertEquals(0,b.removeNode(7));\n\t\tassertEquals(0,b.removeNode(13));\n\t\tassertEquals(\"2:FB=0\\t10:FB=1\\t15:FB=1\\t20:FB=0\\t23:FB=1\\t40:FB=0\\t43:FB=1\\t49:FB=1\\t50:FB=0\\t60:FB=0\\t65:FB=0\\t70:FB=1\\t100:FB=1\\t230:FB=0\\t\",b.inOrder());\n\t\t\n\t\t//Borro 20. RSD 2,0\n\t\tassertEquals(0,b.removeNode(20));\n\t\t\n\t\t\n\t\t\n\t\tassertEquals(\"2:FB=0\\t10:FB=0\\t15:FB=0\\t23:FB=1\\t40:FB=0\\t43:FB=1\\t49:FB=1\\t50:FB=0\\t60:FB=-1\\t65:FB=0\\t70:FB=1\\t100:FB=1\\t230:FB=0\\t\",b.inOrder());\n\t\t\n\t\t//Borro el 230. RDI -2, 1\n\t\tassertEquals(0,b.removeNode(230));\n\t\tassertEquals(\"2:FB=0\\t10:FB=0\\t15:FB=0\\t23:FB=-1\\t40:FB=0\\t43:FB=0\\t49:FB=1\\t50:FB=0\\t60:FB=0\\t65:FB=0\\t70:FB=0\\t100:FB=0\\t\",b.inOrder());\n\t\t\n\t\t//Borro 23\n\t\tassertEquals(0,b.removeNode(23));\n\t\tassertEquals(\"2:FB=0\\t10:FB=-1\\t15:FB=-1\\t40:FB=0\\t43:FB=0\\t49:FB=1\\t50:FB=0\\t60:FB=0\\t65:FB=0\\t70:FB=0\\t100:FB=0\\t\",b.inOrder());\n\t\t\n\t\t//Borro 43 (raiz) y RSI sobre el nodo 15\n\t\tassertEquals(0,b.removeNode(43));\n\t\tassertEquals(\"2:FB=0\\t10:FB=0\\t15:FB=0\\t40:FB=1\\t49:FB=1\\t50:FB=0\\t60:FB=0\\t65:FB=0\\t70:FB=0\\t100:FB=0\\t\",b.inOrder());\n\t\t\n\t}", "@Override\n public int height() {\n \treturn height(root);\n }", "private void layoutChunk(RecyclerView.Recycler recycler, RecyclerView.State state,\r\n boolean isFillBottom, boolean isPreLayout){\r\n\r\n int widthNum = 0, heightNum = 0, nextItemIndex = 0;\r\n\r\n int fakeWidthNum = 0, fakeHeightNum = 0, fakeNextItemIndex = 0;\r\n\r\n View view = null;\r\n DisappearingViewParams params = null;\r\n // If disappearingViewCache contains the params of the current view to be laid out,\r\n // get its params. This happens when too many items are removed,\r\n // and the fillGird() cannot fill to the bottom. Then scrollBy() is called.\r\n if(disappearingViewCache.containsKey(mCurrentPosition)){\r\n params = disappearingViewCache.get(mCurrentPosition);\r\n }\r\n // Get view from the recycler.\r\n view = recycler.getViewForPosition(mCurrentPosition);\r\n\r\n final LayoutParams lp = (LayoutParams) view.getLayoutParams();\r\n\r\n // Calculate the widthNum and the heightNum.\r\n // If the cache contains the widthNum and heightNum, get them from the cache.\r\n if(itemLayoutWidthCache.get(mCurrentPosition, 0) != 0){\r\n widthNum = itemLayoutWidthCache.get(mCurrentPosition);\r\n heightNum = itemLayoutHeightCache.get(mCurrentPosition);\r\n nextItemIndex = itemOccupiedStartSpan.get(mCurrentPosition);\r\n }else{\r\n // Otherwise, if LayoutParams contains them, get them from the LayoutParams.\r\n if(lp.widthNum != 0){\r\n widthNum = lp.widthNum;\r\n heightNum = lp.heightNum;\r\n }else{\r\n // Otherwise, calculate the widthNum and the heightNum\r\n // according to the size of the child view.\r\n widthNum = Math.min(2, Math.max(1, lp.width / sizePerSpan));\r\n heightNum = Math.min(2, Math.max(1, lp.height / sizePerSpan));\r\n lp.widthNum = widthNum;\r\n lp.heightNum = heightNum;\r\n }\r\n // If widthNum = 2 and there are no two sequential empty spans, just set widthNum as 1.\r\n if (isFillBottom && firstTwoEmptyBottomSpanIndex == -1) {\r\n widthNum = 1;\r\n }\r\n // Store the layout widthNum and heightNum (different from the original one).\r\n itemLayoutWidthCache.put(mCurrentPosition, widthNum);\r\n itemLayoutHeightCache.put(mCurrentPosition, heightNum);\r\n // Calculate the index of the first occupied span.\r\n if(isFillBottom) {\r\n nextItemIndex = widthNum == 1 ?\r\n firstOneEmptyBottomSpanIndex : firstTwoEmptyBottomSpanIndex;\r\n }\r\n // Store the index of the first occupied span, which is useful when scrolling up.\r\n itemOccupiedStartSpan.put(mCurrentPosition, nextItemIndex);\r\n }\r\n\r\n // Calculate fake params.\r\n if(isPreLayout && !lp.isItemRemoved()){\r\n fakeWidthNum = lp.widthNum;\r\n fakeHeightNum = lp.heightNum;\r\n if(fakeFirstTwoEmptyBottomSpanIndex == -1){\r\n fakeWidthNum = 1;\r\n }\r\n fakeNextItemIndex = fakeWidthNum == 1 ?\r\n fakeFirstOneEmptyBottomSpanIndex : fakeFirstTwoEmptyBottomSpanIndex;\r\n fakeItemLayoutWidthCache.put(fakeCurrentPosition, fakeWidthNum);\r\n fakeItemLayoutHeightCache.put(fakeCurrentPosition, fakeHeightNum);\r\n fakeItemOccupiedStartSpan.put(fakeCurrentPosition, fakeNextItemIndex);\r\n }\r\n\r\n // Calculate the left, right, top and bottom of the view to be laid out.\r\n int left = 0, right = 0, top = 0, bottom = 0;\r\n int fakeLeft = 0, fakeRight = 0, fakeTop = 0, fakeBottom = 0;\r\n\r\n // We do not need to calculate decorations for views in the disappearingViewCache.\r\n if(params == null) {\r\n calculateItemDecorationsForChild(view, mDecorInsets);\r\n }\r\n left = getPaddingLeft() + spanWidthBorders[nextItemIndex] + lp.leftMargin;\r\n right = getPaddingLeft() + spanWidthBorders[nextItemIndex + widthNum] - lp.rightMargin;\r\n if(isFillBottom){\r\n top = getPaddingTop() + spanBottomMin + lp.topMargin;\r\n bottom = getPaddingTop() + spanBottomMin + sizePerSpan * heightNum - lp.bottomMargin;\r\n }else{\r\n bottom = getPaddingTop() + spanTop[nextItemIndex] - lp.bottomMargin;\r\n top = getPaddingTop() + spanTop[nextItemIndex] - sizePerSpan * heightNum + lp.topMargin;\r\n }\r\n\r\n if(isPreLayout && !lp.isItemRemoved()){\r\n fakeLeft = getPaddingLeft() + spanWidthBorders[fakeNextItemIndex] + lp.leftMargin;\r\n fakeRight = getPaddingLeft() + spanWidthBorders[fakeNextItemIndex + fakeWidthNum]\r\n - lp.rightMargin;\r\n fakeTop = getPaddingTop() + fakeSpanBottomMin + lp.topMargin;\r\n fakeBottom = getPaddingTop() + fakeSpanBottomMin + sizePerSpan * fakeHeightNum\r\n - lp.bottomMargin;\r\n }\r\n\r\n // If we lay out the view to fill bottom, add the view to the end.\r\n if(isFillBottom) {\r\n\r\n if(!isPreLayout){\r\n addView(view);\r\n }else if(bottom + lp.bottomMargin >= getPaddingTop() || // Attached\r\n firstAttachedItemPosition != -1 ||\r\n fakeBottom + lp.bottomMargin >= getPaddingTop() || // Appearing\r\n fakeFirstAttachedItemPosition != -1){\r\n // If it is pre-layout, we just lay out attached views and appearing views.\r\n if(lp.isItemRemoved()) {\r\n addDisappearingView(view);\r\n } else {\r\n addView(view);\r\n }\r\n }\r\n }else if(!isFillBottom){ // Otherwise it is added to the beginning.\r\n addView(view, 0);\r\n }\r\n\r\n // Make measureSpec.\r\n int widthSpec, heightSpec;\r\n int fakeWidthSpec = 0, fakeHeightSpec = 0;\r\n if(params == null) {\r\n widthSpec = View.MeasureSpec.makeMeasureSpec(\r\n right - left - mDecorInsets.left - mDecorInsets.right, View.MeasureSpec.EXACTLY);\r\n heightSpec = View.MeasureSpec.makeMeasureSpec(\r\n bottom - top - mDecorInsets.top - mDecorInsets.bottom, View.MeasureSpec.EXACTLY);\r\n }else{\r\n // If disappearingViewCache contains the params,\r\n // get the widthSpec and the heightSpec from it.\r\n widthSpec = params.widthSpec;\r\n heightSpec = params.heightSpec;\r\n }\r\n\r\n if(isPreLayout && !lp.isItemRemoved()){\r\n fakeWidthSpec = View.MeasureSpec.makeMeasureSpec(\r\n fakeRight - fakeLeft - mDecorInsets.left - mDecorInsets.right,\r\n View.MeasureSpec.EXACTLY);\r\n fakeHeightSpec = View.MeasureSpec.makeMeasureSpec(\r\n fakeBottom - fakeTop - mDecorInsets.top - mDecorInsets.bottom,\r\n View.MeasureSpec.EXACTLY);\r\n }\r\n\r\n // Measure child.\r\n // If isPreLayout = true, we just measure and lay out attached views and appearing views.\r\n if(!isPreLayout ||\r\n (isPreLayout && (bottom + lp.bottomMargin >= getPaddingTop() || // Attached\r\n firstAttachedItemPosition != -1 ||\r\n fakeBottom + lp.bottomMargin >= getPaddingTop() || // Appearing\r\n fakeFirstAttachedItemPosition != -1)\r\n && !lp.isItemRemoved())){\r\n view.measure(widthSpec, heightSpec);\r\n layoutDecorated(view, left, top, right, bottom);\r\n }\r\n // If isPreLayout = true, for disappearing views, we put the params and position into cache.\r\n if(isPreLayout && (bottom + lp.bottomMargin >= getPaddingTop() || // Currently visible\r\n firstAttachedItemPosition != -1)\r\n && (fakeBottom + lp.bottomMargin < getPaddingTop() && // Invisible in real layout\r\n fakeFirstAttachedItemPosition == -1)\r\n && !lp.isItemRemoved()){\r\n disappearingViewCache.put(fakeCurrentPosition,\r\n new DisappearingViewParams(fakeWidthSpec, fakeHeightSpec,\r\n fakeLeft, fakeTop, fakeRight, fakeBottom));\r\n }\r\n // For the normal layout,\r\n // if we lay out a disappearing view, it should be removed from the cache.\r\n if(!isPreLayout && params != null){\r\n disappearingViewCache.remove(mCurrentPosition);\r\n }\r\n\r\n // update some parameters\r\n if(isFillBottom){\r\n for (int i = 0; i < widthNum; i++)\r\n spanBottom[nextItemIndex + i] += sizePerSpan * heightNum;\r\n updateSpanBottomParameters();\r\n if(!isPreLayout){\r\n lastAttachedItemPosition = mCurrentPosition;\r\n }else{\r\n // If isPreLayout = true.\r\n for (int i = 0; i < fakeWidthNum; i++)\r\n fakeSpanBottom[fakeNextItemIndex + i] += sizePerSpan * fakeHeightNum;\r\n updateFakeSpanBottomParameters();\r\n // we need to update fakeFirstAttachedItemPosition and firstAttachedItemPosition.\r\n if(fakeFirstAttachedItemPosition == -1 &&\r\n !lp.isItemRemoved() &&\r\n fakeBottom + lp.bottomMargin >= getPaddingTop()){\r\n fakeFirstAttachedItemPosition = fakeCurrentPosition;\r\n }\r\n if(firstAttachedItemPosition == -1 && bottom + lp.bottomMargin >= getPaddingTop()){\r\n firstAttachedItemPosition = mCurrentPosition;\r\n }\r\n }\r\n mCurrentPosition++;\r\n if(isPreLayout && !lp.isItemRemoved()){\r\n fakeCurrentPosition++;\r\n }\r\n // Update fakeSpanTop and spanTop.\r\n if(isPreLayout && fakeFirstAttachedItemPosition == -1){\r\n for (int i = 0; i < fakeWidthNum; i++)\r\n fakeSpanTop[fakeNextItemIndex + i] += sizePerSpan * fakeHeightNum;\r\n }\r\n if(isPreLayout && firstAttachedItemPosition == -1){\r\n for (int i = 0; i < widthNum; i++)\r\n spanTop[nextItemIndex + i] += sizePerSpan * heightNum;\r\n }\r\n }else{\r\n for (int i = 0; i < widthNum; i++)\r\n spanTop[nextItemIndex + i] -= sizePerSpan * heightNum;\r\n updateSpanTopParameters();\r\n firstAttachedItemPosition = mCurrentPosition;\r\n mCurrentPosition--;\r\n }\r\n\r\n }", "public void updateFarhenheight(){\n tempInF = ( (tempInC / 5.0 ) * 9.0 ) + 32;\n }", "private void handleUnderflow(Node node) {\n\t\t\r\n\t\tNode parent = node.getParent();\r\n\t\t\r\n\t\t//underflow in parent\r\n\t\tif (parent == null) {\r\n\t\t\t//System.out.println(\"Underflow in root!\");\r\n\t\t\tNode newRoot = new Node();\r\n\t\t\t//copy all data of root children into new root\r\n\t\t\tfor (int i = 0; i < root.getChildren().size(); i++) {\r\n\t\t\t\tfor (int j = 0; j < root.getChild(i).getData().size(); j++) {\r\n\t\t\t\t\tnewRoot.addData(root.getChild(i).getData(j));\r\n\t\t\t\t\tif (!root.getChild(i).isLeaf()) {\r\n\t\t\t\t\t\tnewRoot.addChild(root.getChild(i).getChild(j));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!root.getChild(i).isLeaf())\r\n\t\t\t\t\tnewRoot.addChild(root.getChild(i).getChild(root.getChild(i).getChildren().size()));\r\n\t\t\t}\r\n\t\t\tsize--;\r\n\t\t\troot = newRoot;\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\tint nodePosInParent = parent.getEmptyChild();\r\n\t\t\t//if right most child of parent, must borrow from left\r\n\t\t\tif (nodePosInParent == parent.getChildren().size() - 1 ) {\r\n\t\t\t\t//take right most data value from parent\r\n\t\t\t\tnode.addData(parent.removeData(parent.getData().size() - 1));\r\n\t\t\t\t\r\n\t\t\t\tif (node.getSibling(\"left\").getData().size() > 1) {\r\n\t\t\t\t\tparent.addData(node.getSibling(\"left\").removeData(node.getSibling(\"left\").getData().size() - 1));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmerge(node.getSibling(\"left\"), node);\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\t//take immediate greater value from parent\r\n\t\t\t\t//node.addData(parent.removeData(nodePosInParent));\r\n\r\n\t\t\t\t//if we can steal from right sibling\r\n\t\t\t\tif (node.getSibling(\"right\").getData().size() > 1) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t//take immediate greater value from parent\r\n\t\t\t\t\tnode.addData(parent.removeData(nodePosInParent));\r\n\t\t\t\t\t\r\n\t\t\t\t\tparent.addData(node.getSibling(\"right\").removeData(0));\r\n\t\t\t\t\t\r\n\t\t\t\t//otherwise steal from left\r\n\t\t\t\t} else if (nodePosInParent != 0 && node.getSibling(\"left\").getData().size() > 1) {\r\n\r\n\t\t\t\t\t//take immediate lesser value from parent\r\n\t\t\t\t\tnode.addData(parent.removeData(nodePosInParent - 1));\r\n\t\t\t\t\t\r\n\t\t\t\t\tparent.addData(node.getSibling(\"left\").removeData(node.getSibling(\"left\").getData().size() - 1));\r\n\t\t\t\t\t\r\n\t\t\t\t//else, merge\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\t//take immediate greater value from parent\r\n\t\t\t\t\tnode.addData(parent.removeData(nodePosInParent));\r\n\t\t\t\t\t\r\n\t\t\t\t\tmerge(node, node.getSibling(\"right\"));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void redrawEdges(Node startNode) {\n if (startNode.getChildrenVBox().getChildren().isEmpty()) {\n return;\n }\n for (javafx.scene.Node childGenericNode : startNode.getChildrenVBox().getChildren()) {\n Pane containerPane = (Pane) childGenericNode;\n Node childNode = (Node) containerPane.getChildren().get(0);\n Edge edge = new Edge(startNode, childNode);\n startNode.getContainerPane().getChildren().add(edge);\n startNode.getContainerPane().layout();\n edges.add(edge);\n redrawEdges(childNode);\n }\n }", "protected abstract void calculateH(Node node);", "private int getHeight(Node current) throws IOException {\n Node left = new Node(current.left);\r\n Node right = new Node(current.right);\r\n if (current.left == 0 && current.right == 0) {\r\n return 0;\r\n }\r\n if (current.left == 0) {\r\n return 1 + right.height;\r\n }\r\n if (current.right == 0) {\r\n return 1 + left.height;\r\n }\r\n return 1 + Math.max(left.height, right.height);\r\n }", "private int height(Node<T> node){\n if(node == null){\n return 0;\n }else{\n int leftHight = height(node.left) + 1;\n int rightHight = height(node.right) + 1;\n if(leftHight > rightHight){\n return leftHight;\n }else{\n return rightHight;\n }\n }\n }", "public void fixEdges() {\n\tfor (LayoutEdge lEdge: edgeList) {\n\t // Get the underlying edge\n\t CyEdge edge = lEdge.getEdge();\n\t CyNode target = (CyNode) edge.getTarget();\n\t CyNode source = (CyNode) edge.getSource();\n\n\t if (nodeToLayoutNode.containsKey(source) && nodeToLayoutNode.containsKey(target)) {\n\t\t// Add the connecting nodes\n\t\tlEdge.addNodes((LayoutNode) nodeToLayoutNode.get(source),\n\t\t\t (LayoutNode) nodeToLayoutNode.get(target));\n\t }\n\t}\n }", "private void m13641a(Canvas canvas) {\n int childCount = getChildCount();\n int i = 0;\n while (i < childCount) {\n View childAt = getChildAt(i);\n if (!(childAt == null || childAt.getVisibility() == 8 || !m13643a(i))) {\n m13642a(canvas, childAt.getTop() - ((LayoutParams) childAt.getLayoutParams()).topMargin);\n }\n i++;\n }\n if (m13643a(childCount)) {\n View childAt2 = getChildAt(childCount - 1);\n m13642a(canvas, childAt2 == null ? (getHeight() - getPaddingBottom()) - this.f9808d : childAt2.getBottom());\n }\n }", "@Override // android.widget.FrameLayout, android.view.View\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public void onMeasure(int r12, int r13) {\n /*\n r11 = this;\n int r0 = r11.b\n r1 = 1\n r2 = 0\n r3 = 1073741824(0x40000000, float:2.0)\n r4 = -2147483648(0xffffffff80000000, float:-0.0)\n if (r0 == 0) goto L_0x008a\n int r5 = r11.c\n if (r5 != 0) goto L_0x0010\n goto L_0x008a\n L_0x0010:\n float r0 = (float) r0\n float r5 = (float) r5\n float r0 = r0 / r5\n int r5 = android.view.View.MeasureSpec.getSize(r12)\n int r6 = android.view.View.MeasureSpec.getSize(r13)\n int r7 = android.view.View.MeasureSpec.getMode(r12)\n int r8 = android.view.View.MeasureSpec.getMode(r13)\n int r9 = r11.getChildCount()\n if (r7 != 0) goto L_0x0030\n if (r8 != 0) goto L_0x0030\n super.onMeasure(r12, r13)\n goto L_0x00dd\n L_0x0030:\n if (r7 != 0) goto L_0x0037\n float r12 = (float) r6\n float r12 = r12 * r0\n int r5 = (int) r12\n goto L_0x003f\n L_0x0037:\n if (r8 != 0) goto L_0x003a\n goto L_0x003c\n L_0x003a:\n if (r8 == r3) goto L_0x003f\n L_0x003c:\n float r12 = (float) r5\n float r12 = r12 / r0\n int r6 = (int) r12\n L_0x003f:\n r12 = 0\n r13 = 0\n L_0x0041:\n if (r12 >= r9) goto L_0x0080\n android.view.View r0 = r11.getChildAt(r12)\n int r7 = r0.getVisibility()\n r8 = 8\n if (r7 != r8) goto L_0x0050\n goto L_0x007d\n L_0x0050:\n android.view.ViewGroup$LayoutParams r7 = r0.getLayoutParams()\n if (r7 == 0) goto L_0x0067\n int r8 = r7.width\n r10 = -1\n if (r8 != r10) goto L_0x005e\n r8 = 1073741824(0x40000000, float:2.0)\n goto L_0x0060\n L_0x005e:\n r8 = -2147483648(0xffffffff80000000, float:-0.0)\n L_0x0060:\n int r7 = r7.height\n if (r7 != r10) goto L_0x0069\n r7 = 1073741824(0x40000000, float:2.0)\n goto L_0x006b\n L_0x0067:\n r8 = -2147483648(0xffffffff80000000, float:-0.0)\n L_0x0069:\n r7 = -2147483648(0xffffffff80000000, float:-0.0)\n L_0x006b:\n int r8 = android.view.View.MeasureSpec.makeMeasureSpec(r5, r8)\n int r7 = android.view.View.MeasureSpec.makeMeasureSpec(r6, r7)\n r0.measure(r8, r7)\n int r0 = r0.getMeasuredHeight()\n if (r0 <= 0) goto L_0x007d\n r13 = 1\n L_0x007d:\n int r12 = r12 + 1\n goto L_0x0041\n L_0x0080:\n if (r13 == 0) goto L_0x0086\n r11.setMeasuredDimension(r5, r6)\n goto L_0x00dd\n L_0x0086:\n r11.setMeasuredDimension(r2, r2)\n goto L_0x00dd\n L_0x008a:\n int r0 = android.view.View.MeasureSpec.getSize(r12)\n int r5 = android.view.View.MeasureSpec.getSize(r13)\n int r12 = android.view.View.MeasureSpec.getMode(r12)\n int r13 = android.view.View.MeasureSpec.getMode(r13)\n int r6 = r11.getChildCount()\n if (r0 != 0) goto L_0x00a5\n if (r5 != 0) goto L_0x00a5\n r11.setMeasuredDimension(r2, r2)\n L_0x00a5:\n com.my.target.gc r2 = r11.a\n int r7 = android.view.View.MeasureSpec.makeMeasureSpec(r0, r4)\n int r8 = android.view.View.MeasureSpec.makeMeasureSpec(r5, r4)\n r2.measure(r7, r8)\n com.my.target.gc r2 = r11.a\n int r2 = r2.getMeasuredWidth()\n com.my.target.gc r7 = r11.a\n int r7 = r7.getMeasuredHeight()\n if (r13 == r3) goto L_0x00c1\n r5 = r7\n L_0x00c1:\n if (r12 == r3) goto L_0x00c4\n r0 = r2\n L_0x00c4:\n if (r6 <= r1) goto L_0x00da\n L_0x00c6:\n if (r1 >= r6) goto L_0x00da\n android.view.View r12 = r11.getChildAt(r1)\n int r13 = android.view.View.MeasureSpec.makeMeasureSpec(r0, r4)\n int r2 = android.view.View.MeasureSpec.makeMeasureSpec(r5, r4)\n r12.measure(r13, r2)\n int r1 = r1 + 1\n goto L_0x00c6\n L_0x00da:\n r11.setMeasuredDimension(r0, r5)\n L_0x00dd:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.my.target.nativeads.views.IconAdView.onMeasure(int, int):void\");\n }", "private void reFixForDel(WAVLNode y) { // in a case of deletion of a node that doesnt exist in the tree, the method will fix the size all the way to the root\r\n\t y.sizen++;\r\n\t while(y.parent!=null) {\r\n\t\t y=y.parent;\r\n\t\t y.sizen++;\r\n\t }\r\n }", "public void updateLayout(boolean z) {\n RecyclerListView.Holder holder;\n if (this.gridView.getChildCount() <= 0) {\n RecyclerListView recyclerListView = this.gridView;\n int paddingTop = recyclerListView.getPaddingTop();\n this.scrollOffsetY = paddingTop;\n recyclerListView.setTopGlowOffset(paddingTop);\n this.containerView.invalidate();\n return;\n }\n View childAt = this.gridView.getChildAt(0);\n RecyclerListView.Holder holder2 = (RecyclerListView.Holder) this.gridView.findContainingViewHolder(childAt);\n int top = childAt.getTop();\n int dp = AndroidUtilities.dp(7.0f);\n if (top < AndroidUtilities.dp(7.0f) || holder2 == null || holder2.getAdapterPosition() != 0) {\n top = dp;\n }\n int i = top + (-AndroidUtilities.dp(11.0f));\n if (this.scrollOffsetY != i) {\n RecyclerListView recyclerListView2 = this.gridView;\n this.scrollOffsetY = i;\n recyclerListView2.setTopGlowOffset(i);\n this.stickersTab.setTranslationY((float) i);\n this.stickersSearchField.setTranslationY((float) (i + AndroidUtilities.dp(48.0f)));\n this.containerView.invalidate();\n }\n RecyclerListView.Holder holder3 = (RecyclerListView.Holder) this.gridView.findViewHolderForAdapterPosition(0);\n if (holder3 == null) {\n this.stickersSearchField.showShadow(true, z);\n } else {\n this.stickersSearchField.showShadow(holder3.itemView.getTop() < this.gridView.getPaddingTop(), z);\n }\n RecyclerView.Adapter adapter = this.gridView.getAdapter();\n StickersSearchGridAdapter stickersSearchGridAdapter2 = this.stickersSearchGridAdapter;\n if (adapter == stickersSearchGridAdapter2 && (holder = (RecyclerListView.Holder) this.gridView.findViewHolderForAdapterPosition(stickersSearchGridAdapter2.getItemCount() - 1)) != null && holder.getItemViewType() == 5) {\n FrameLayout frameLayout = (FrameLayout) holder.itemView;\n int childCount = frameLayout.getChildCount();\n float f = (float) ((-((frameLayout.getTop() - this.searchFieldHeight) - AndroidUtilities.dp(48.0f))) / 2);\n for (int i2 = 0; i2 < childCount; i2++) {\n frameLayout.getChildAt(i2).setTranslationY(f);\n }\n }\n checkPanels();\n }", "private int height(AvlTreeNode<?, ?> n) {\n if (n == null) return -1;\n return n.height;\n }", "BaleElementEvent fixup()\n{\n if (line_elements.size() > 0) addLine();\n\n BaleElementEvent ee = new BaleElementEvent(root_element,new_children);\n root_element.clear();\n for (BaleElement be : new_children) root_element.add(be);\n BoardLog.logD(\"BALE\",\"ELEMENT FIXUP ROOT \" + new_children.size());\n\n return ee;\n}", "public void layout() {\n final int N = fNodes.length;\n final double k1 = 1.0;\n final double k2 = 100.0 * 100.0;\n\n double xc = 0.0;\n double yc = 0.0;\n for (int i = 0; i < N; i++) {\n NodeBase v = (NodeBase) fNodes[i];\n \n double xv = v.getX();\n double yv = v.getY();\n \n\t\t\tIterator uIter = fGraph.sourceNodeSet(v).iterator();\n\t\t\t\n double sumfx1 = 0.0;\n double sumfy1 = 0.0;\n while (uIter.hasNext() ) {\n NodeBase u = (NodeBase) uIter.next();\n double xu = u.getX();\n double yu = u.getY();\n double dx = xv - xu;\n double dy = yv - yu;\n double d = Math.sqrt(dx * dx + dy * dy);\n d = (d == 0) ? .0001 : d;\n double c = k1 * (d - fEdgeLen) / d;\n sumfx1 += c * dx;\n sumfy1 += c * dy;\n }\n\n uIter = fGraph.iterator();\n double sumfx2 = 0.0;\n double sumfy2 = 0.0;\n while (uIter.hasNext() ) {\n NodeBase u = (NodeBase) uIter.next();\n if (u == v )\n continue;\n// System.out.println(\"electrical u = \" + u.name());\n double xu = u.getX();\n double yu = u.getY();\n double dx = xv - xu;\n double dy = yv - yu;\n double d = dx * dx + dy * dy;\n if (d > 0 ) {\n double c = k2 / (d * Math.sqrt(d));\n sumfx2 += c * dx;\n sumfy2 += c * dy;\n }\n }\n // System.out.println(\"sumfx2 = \" + sumfx2);\n // System.out.println(\"sumfy2 = \" + sumfy2);\n\n // store new positions\n fXn[i] = xv - Math.max(-5, Math.min(5, sumfx1 - sumfx2));\n fYn[i] = yv - Math.max(-5, Math.min(5, sumfy1 - sumfy2));\n\n // for determining the center of the graph\n xc += fXn[i];\n yc += fYn[i];\n }\n\n // offset from center of graph to center of drawing area\n double dx = fWidth / 2 - xc / N;\n double dy = fHeight / 2 - yc / N;\n\n // use only small steps for smooth animation\n dx = Math.max(-5, Math.min(5, dx));\n dy = Math.max(-5, Math.min(5, dy));\n\n // set new positions\n for (int i = 0; i < N; i++) {\n NodeBase v = (NodeBase) fNodes[i];\n // move each node towards center of drawing area and keep\n // it within bounds\n double x = Math.max(fMarginX, Math.min(fWidth - fMarginX, fXn[i] + dx));\n double y = Math.max(fMarginY, Math.min(fHeight - fMarginY, fYn[i] + dy));\n v.setPosition(x, y);\n }\n }", "public void onLayout(boolean z, int i, int i2, int i3, int i4) {\n int i5 = 0;\n int i6 = 0;\n int i7 = 0;\n int i8 = 0;\n int i9 = 0;\n while (i5 < this.f80949f && i6 < this.f80948e.size()) {\n View childAt = getChildAt(i5);\n C32569u.m150513a((Object) childAt, C6969H.m41409d(\"G6A8BDC16BB\"));\n if (childAt.getVisibility() == 8) {\n i7++;\n i5++;\n } else {\n ViewGroup.LayoutParams layoutParams = childAt.getLayoutParams();\n if (layoutParams != null) {\n ViewGroup.MarginLayoutParams marginLayoutParams = (ViewGroup.MarginLayoutParams) layoutParams;\n int measuredWidth = childAt.getMeasuredWidth() + marginLayoutParams.leftMargin + marginLayoutParams.rightMargin;\n int measuredHeight = childAt.getMeasuredHeight() + marginLayoutParams.topMargin + marginLayoutParams.bottomMargin;\n Integer num = this.f80948e.get(i6);\n C32569u.m150513a((Object) num, C6969H.m41409d(\"G64AFDC14BA13A43CE81AAB44FBEBC6EA\"));\n if (C32569u.m150507a(i5 - i7, num.intValue()) < 0) {\n i9 += measuredWidth;\n childAt.layout(marginLayoutParams.leftMargin + i9, marginLayoutParams.topMargin + i8, i9 - marginLayoutParams.rightMargin, (measuredHeight + i8) - marginLayoutParams.bottomMargin);\n } else {\n Integer num2 = this.f80946c.get(i6);\n C32569u.m150513a((Object) num2, C6969H.m41409d(\"G64AFDC14BA18AE20E1068473FEECCDD254\"));\n i8 += num2.intValue();\n Integer num3 = this.f80948e.get(i6);\n C32569u.m150513a((Object) num3, C6969H.m41409d(\"G64AFDC14BA13A43CE81AAB44FBEBC6EA\"));\n i7 += num3.intValue();\n i6++;\n i5--;\n i9 = 0;\n }\n i5++;\n } else {\n throw new TypeCastException(\"null cannot be cast to non-null type android.view.ViewGroup.MarginLayoutParams\");\n }\n }\n }\n }", "public int height() { return height(root); }", "public int getFirstNodeHeight()\n {\n if (firstNode == null)\n {\n return maxHeight;\n }\n return firstNodeHeight;\n }", "@objid (\"1b87bc33-5e33-11e2-b81d-002564c97630\")\n private int layout(final Node node, final int rank, final int offset, final boolean vertical, final boolean direct) {\n int rankSpacing = vertical ? BackgroundEditPart.VERTICAL_LAYOUT_RANK_BASE : BackgroundEditPart.HORIZONTAL_LAYOUT_RANK_BASE;\n int offsetSpacing = (vertical ? BackgroundEditPart.VERTICAL_LAYOUT_OFFSET_SPACING : BackgroundEditPart.HORIZONTAL_LAYOUT_OFFSET_SPACING);\n \n int newOffset = offset;\n \n EdgeList edges = direct ? node.outgoing : node.incoming;\n \n // Start by layouting children\n for (Object edgeObj : edges) {\n Edge edge = (Edge) edgeObj;\n Node nextNode = direct ? edge.target : edge.source;\n \n int rankIncrement;\n if (node instanceof EdgeBus) {\n // after a edgebus 2 rank spacing units\n rankIncrement = rankSpacing * 2;\n } else if (nextNode instanceof EdgeBus) {\n // before a edgebus 1 rank spacing units\n rankIncrement = (rankSpacing);\n } else {\n // otherwise 2 rank spacing units\n rankIncrement = rankSpacing * 2;\n }\n \n int nextRank = direct ? rank + rankIncrement : rank - rankIncrement;\n \n newOffset = offsetSpacing + layout(nextNode, nextRank, newOffset, vertical, direct);\n }\n \n if (edges.size() > 0) {\n newOffset -= offsetSpacing;\n }\n \n // Now layout node\n if (vertical) {\n // vertical layout\n node.x = offset + ((newOffset - offset) / 2);\n node.y = (rank /* * RANK_GAP */) - (node.height / 2);\n } else {\n // horizontal layout\n node.x = (rank /* * RANK_GAP */) - (node.width / 2);\n node.y = offset + ((newOffset - offset) / 2);\n }\n return newOffset;\n }", "public List<Integer> findMinHeightTrees(int n, int[][] edges) {\n\n // edge list\n // Create adjacency list\n // find nodes with edge degree\n // fill a queue with edge degree one\n // do the bfs and keep marking their heights in the path\n // as we go along and find a node with lesser possible heights, update heights\n // of that node and keep updating in consequent nodes\n\n // edge case - disconnected tree\n\n List<List<Integer>> adjList = new ArrayList<>();\n\n createAdjList(n, edges, adjList);\n\n // Revise - How to print a list?\n System.out.println(Arrays.toString(adjList.toArray()));\n\n int[] edgeDegree = new int[n];\n int[] heights = new int[n];\n for (int[] edge:\n edges) {\n edgeDegree[edge[0]]++;\n edgeDegree[edge[1]]++;\n }\n\n System.out.println(\"edgeDegree\");\n System.out.println(Arrays.toString(edgeDegree));\n\n Queue<Integer> bfsQ = new LinkedList<>();\n boolean[] visited = new boolean[n];\n for (int i = 0; i < edgeDegree.length; i++) {\n if (edgeDegree[i] == 1) {\n bfsQ.add(i);\n heights[i] = 1;\n break;\n }\n }\n\n int maxHeight = Integer.MIN_VALUE;\n while (!bfsQ.isEmpty()) {\n Integer vertex = bfsQ.poll();\n visited[vertex] = true;\n System.out.println(\"Out from queue\");\n int heightParentVertex = heights[vertex];\n maxHeight = Math.max(maxHeight, heightParentVertex);\n List<Integer> adjNodes = adjList.get(vertex);\n for (Integer adjNode:\n adjNodes) {\n if (!visited[adjNode]) {\n heights[adjNode] = heightParentVertex+1;\n bfsQ.add(adjNode);\n }\n }\n }\n\n List<Integer> ans = new ArrayList<>();\n System.out.println(\"maxHeight\");\n System.out.println(maxHeight);\n\n // if even\n for (int i = 0; i < n; i++) {\n if ( heights[i] == ((maxHeight / 2) + 1)) {\n ans.add(i);\n } else if (maxHeight % 2 == 0 && heights[i] == maxHeight / 2) {\n ans.add(i);\n }\n }\n\n return ans;\n }", "private void updateCategoriesListHeight() {\n ViewGroup.LayoutParams params = categoriesListView.getLayoutParams();\n int newHeight = 50;\n\n //I don't know why that needs a factor of 3 when deciding height. It shouldn't need that as\n //height of a child is 64dp...\n newHeight += categoriesListView.getCount() * 65 * 3;\n params.height = newHeight;\n\n categoriesListView.setLayoutParams(params);\n categoriesListView.requestLayout();\n }", "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 void updateTopNodes() {\n\t\ttopNodes.clear();\n\t\tif (this.diff == null)\n\t\t\treturn;\n\n\t\t// PSets node\n\t\tint psetCount = diff.psetCount();\n\t\tif (psetCount > 0) {\n\t\t\tpsetsNode.delete(0, psetsNode.length());\n\t\t\tpsetsNode.append(\"<html><b>PSets</b> (\").append(psetCount).append(\")</html>\");\n\t\t\ttopNodes.add(psetsNode);\n\t\t\tIterator<Comparison> it = diff.psetIterator();\n\t\t\twhile (it.hasNext())\n\t\t\t\tit.next().setParent(psetsNode);\n\t\t}\n\t\t\n\t\t// global EDAlias node\n\t\tint globlaEDAliasCount = diff.globalEDAliasCount();\n\t\tif (globlaEDAliasCount > 0) {\n\t\t\tglobalEDAliasNode.delete(0, globalEDAliasNode.length());\n\t\t\tglobalEDAliasNode.append(\"<html><b>Global EDAliases</b> (\").append(globlaEDAliasCount).append(\")</html>\");\n\t\t\ttopNodes.add(globalEDAliasNode);\n\t\t\tIterator<Comparison> it = diff.globalEDAliasIterator();\n\t\t\twhile (it.hasNext())\n\t\t\t\tit.next().setParent(globalEDAliasNode);\n\t\t}\n\n\t\t// EDSources node\n\t\tint edsourceCount = diff.edsourceCount();\n\t\tif (edsourceCount > 0) {\n\t\t\tedsourcesNode.delete(0, edsourcesNode.length());\n\t\t\tedsourcesNode.append(\"<html><b>EDSource</b> (\").append(edsourceCount).append(\")</html>\");\n\t\t\ttopNodes.add(edsourcesNode);\n\t\t\tIterator<Comparison> it = diff.edsourceIterator();\n\t\t\twhile (it.hasNext())\n\t\t\t\tit.next().setParent(edsourcesNode);\n\t\t}\n\n\t\t// ESSource node\n\t\tint essourceCount = diff.essourceCount();\n\t\tif (essourceCount > 0) {\n\t\t\tessourcesNode.delete(0, essourcesNode.length());\n\t\t\tessourcesNode.append(\"<html><b>ESSources</b> (\").append(essourceCount).append(\")</html>\");\n\t\t\ttopNodes.add(essourcesNode);\n\t\t\tIterator<Comparison> it = diff.essourceIterator();\n\t\t\twhile (it.hasNext())\n\t\t\t\tit.next().setParent(essourcesNode);\n\t\t}\n\n\t\t// ESModule node\n\t\tint esmoduleCount = diff.esmoduleCount();\n\t\tif (esmoduleCount > 0) {\n\t\t\tesmodulesNode.delete(0, esmodulesNode.length());\n\t\t\tesmodulesNode.append(\"<html><b>ESModules</b> (\").append(esmoduleCount).append(\")</html>\");\n\t\t\ttopNodes.add(esmodulesNode);\n\t\t\tIterator<Comparison> it = diff.esmoduleIterator();\n\t\t\twhile (it.hasNext())\n\t\t\t\tit.next().setParent(esmodulesNode);\n\t\t}\n\n\t\t// Service node\n\t\tint serviceCount = diff.serviceCount();\n\t\tif (serviceCount > 0) {\n\t\t\tservicesNode.delete(0, servicesNode.length());\n\t\t\tservicesNode.append(\"<html><b>Services</b> (\").append(serviceCount).append(\")</html>\");\n\t\t\ttopNodes.add(servicesNode);\n\t\t\tIterator<Comparison> it = diff.serviceIterator();\n\t\t\twhile (it.hasNext())\n\t\t\t\tit.next().setParent(servicesNode);\n\t\t}\n\n\t\t// Paths node\n\t\tint pathCount = diff.pathCount();\n\t\tif (pathCount > 0) {\n\t\t\tpathsNode.delete(0, pathsNode.length());\n\t\t\tpathsNode.append(\"<html><b>Paths</b> (\").append(pathCount).append(\")</html>\");\n\t\t\ttopNodes.add(pathsNode);\n\t\t\tIterator<Comparison> it = diff.pathIterator();\n\t\t\twhile (it.hasNext())\n\t\t\t\tit.next().setParent(pathsNode);\n\t\t}\n\n\t\t// Sequences node\n\t\tint sequenceCount = diff.sequenceCount();\n\t\tif (sequenceCount > 0) {\n\t\t\tsequencesNode.delete(0, sequencesNode.length());\n\t\t\tsequencesNode.append(\"<html><b>Sequences</b> (\").append(sequenceCount).append(\")</html>\");\n\t\t\ttopNodes.add(sequencesNode);\n\t\t\tIterator<Comparison> it = diff.sequenceIterator();\n\t\t\twhile (it.hasNext())\n\t\t\t\tit.next().setParent(sequencesNode);\n\t\t}\n\n\t\t// Tasks node\n\t\tint taskCount = diff.taskCount();\n\t\tif (taskCount > 0) {\n\t\t\ttasksNode.delete(0, tasksNode.length());\n\t\t\ttasksNode.append(\"<html><b>Tasks</b> (\").append(taskCount).append(\")</html>\");\n\t\t\ttopNodes.add(tasksNode);\n\t\t\tIterator<Comparison> it = diff.taskIterator();\n\t\t\twhile (it.hasNext())\n\t\t\t\tit.next().setParent(tasksNode);\n\t\t}\n\t\t\n\t\t// SwitchProducers node\n\t\tint switchProducerCount = diff.switchProducerCount();\n\t\tif (switchProducerCount > 0) {\n\t\t\tswitchProducersNode.delete(0, switchProducersNode.length());\n\t\t\tswitchProducersNode.append(\"<html><b>SwitchProducers</b> (\").append(switchProducerCount).append(\")</html>\");\n\t\t\ttopNodes.add(switchProducersNode);\n\t\t\tIterator<Comparison> it = diff.switchProducerIterator();\n\t\t\twhile (it.hasNext())\n\t\t\t\tit.next().setParent(switchProducersNode);\n\t\t}\n\n\t\t// Module node\n\t\tint moduleCount = diff.moduleCount();\n\t\tif (moduleCount > 0) {\n\t\t\tmodulesNode.delete(0, modulesNode.length());\n\t\t\tmodulesNode.append(\"<html><b>Modules</b> (\").append(moduleCount).append(\")</html>\");\n\t\t\ttopNodes.add(modulesNode);\n\t\t\tIterator<Comparison> it = diff.moduleIterator();\n\t\t\twhile (it.hasNext())\n\t\t\t\tit.next().setParent(modulesNode);\n\t\t}\n\t\t\n\t\t// EDAlias node\n\t\tint edAliasCount = diff.edAliasCount();\n\t\tif (edAliasCount > 0) {\n\t\t\tedAliasNode.delete(0, edAliasNode.length());\n\t\t\tedAliasNode.append(\"<html><b>EDAliases</b> (\").append(edAliasCount).append(\")</html>\");\n\t\t\ttopNodes.add(edAliasNode);\n\t\t\tIterator<Comparison> it = diff.edAliasIterator();\n\t\t\twhile (it.hasNext())\n\t\t\t\tit.next().setParent(edAliasNode);\n\t\t}\n\n\t\t// OutputModule node\n\t\tint outputCount = diff.outputCount();\n\t\tif (outputCount > 0) {\n\t\t\toutputsNode.delete(0, outputsNode.length());\n\t\t\toutputsNode.append(\"<html><b>OutputModules</b> (\").append(outputCount).append(\")</html>\");\n\t\t\ttopNodes.add(outputsNode);\n\t\t\tIterator<Comparison> it = diff.outputIterator();\n\t\t\twhile (it.hasNext())\n\t\t\t\tit.next().setParent(outputsNode);\n\t\t}\n\n\t\t// EventContent node\n\t\tint contentCount = diff.contentCount();\n\t\tif (contentCount > 0) {\n\t\t\tcontentsNode.delete(0, contentsNode.length());\n\t\t\tcontentsNode.append(\"<html><b>EventContents</b> (\").append(contentCount).append(\")</html>\");\n\t\t\ttopNodes.add(contentsNode);\n\t\t\tIterator<Comparison> it = diff.contentIterator();\n\t\t\twhile (it.hasNext())\n\t\t\t\tit.next().setParent(contentsNode);\n\t\t}\n\n\t\t// Stream node\n\t\tint streamCount = diff.streamCount();\n\t\tif (streamCount > 0) {\n\t\t\tstreamsNode.delete(0, streamsNode.length());\n\t\t\tstreamsNode.append(\"<html><b>Streams</b> (\").append(streamCount).append(\")</html>\");\n\t\t\ttopNodes.add(streamsNode);\n\t\t\tIterator<Comparison> it = diff.streamIterator();\n\t\t\twhile (it.hasNext())\n\t\t\t\tit.next().setParent(streamsNode);\n\t\t}\n\n\t\t// Dataset node\n\t\tint datasetCount = diff.datasetCount();\n\t\tif (datasetCount > 0) {\n\t\t\tdatasetsNode.delete(0, datasetsNode.length());\n\t\t\tdatasetsNode.append(\"<html><b>Datasets</b> (\").append(datasetCount).append(\")</html>\");\n\t\t\ttopNodes.add(datasetsNode);\n\t\t\tIterator<Comparison> it = diff.datasetIterator();\n\t\t\twhile (it.hasNext())\n\t\t\t\tit.next().setParent(datasetsNode);\n\t\t}\n\t}", "@Override\n protected void revert() {\n if (leftOld.next != null) leftOld.next.prev = leftOld;\n if (rightOld.prev != null) rightOld.prev.next = rightOld;\n \n // Update the first and last nodes.\n if (rightOld.prev == null) first = rightOld;\n if (leftOld.next == null) last = leftOld;\n \n // Restore the width.\n width = prevWidth;\n }", "final void layoutChildren(final boolean queryAdapter) {\n final int paddingLeft = getPaddingLeft();\n final int paddingRight = getPaddingRight();\n final int itemMargin = mItemMargin;\n final int colWidth =\n (getWidth() - paddingLeft - paddingRight - itemMargin * (mColCount - 1)) / mColCount;\n int rebuildLayoutRecordsBefore = -1;\n int rebuildLayoutRecordsAfter = -1;\n\n Arrays.fill(mItemBottoms, Integer.MIN_VALUE);\n\n final int childCount = getChildCount();\n for (int i = 0; i < childCount; i++) {\n View child = getChildAt(i);\n LayoutParams lp = (LayoutParams) child.getLayoutParams();\n int col = lp.column;\n final int[] margins = lp.margins;\n final int position = mFirstPosition + i;\n final boolean needsLayout = queryAdapter || child.isLayoutRequested();\n boolean newChild = false;\n if (position >= mItemCount) {\n // Sometimes it happens...\n final View toDelete = getSpannedChildAt(i);\n removeViewAt(i);\n if (toDelete != null) {\n // Offset children in case our last child was max spanned\n final int height = toDelete.getHeight();\n offsetChildren(height);\n }\n continue;\n }\n\n if (queryAdapter) {\n View newView = obtainView(position, child);\n if (newView != child) {\n removeViewAt(i);\n addView(newView, i);\n child = newView;\n newChild = true;\n }\n lp = (LayoutParams) child.getLayoutParams(); // Might have changed\n\n lp.column = col; // XXX Initial version of StaggeredGridView actually forgets to correct columns which is a nasty bug\n lp.margins = margins;\n }\n\n final int span = Math.min(mColCount, lp.span);\n final int widthSize = colWidth * span + itemMargin * (span - 1);\n\n if (needsLayout) {\n final int widthSpec = MeasureSpec.makeMeasureSpec(widthSize, MeasureSpec.EXACTLY);\n\n final int heightSpec;\n if (lp.height == LayoutParams.WRAP_CONTENT) {\n heightSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);\n } else if (lp.height == LayoutParams.MATCH_PARENT) {\n /*heightSpec = getChildMeasureSpec(\n MeasureSpec.makeMeasureSpec(getMeasuredHeight(), MeasureSpec.AT_MOST),\n getPaddingTop() + getPaddingBottom(),\n lp.height\n );*/\n // XXX HACK\n heightSpec = MeasureSpec.makeMeasureSpec(getMeasuredHeight() - getPaddingTop() - getPaddingBottom(),\n MeasureSpec.EXACTLY);\n } else {\n heightSpec = MeasureSpec.makeMeasureSpec(lp.height, MeasureSpec.EXACTLY);\n }\n\n child.measure(widthSpec, heightSpec);\n }\n\n int childTop = mItemBottoms[col] > Integer.MIN_VALUE ? mItemBottoms[col] + mItemMargin\n : /*child.getTop() + (*/newChild ? mItemMargin + getPaddingTop() : child.getTop()/*0)*/;\n if (span > 1) {\n int lowest = childTop;\n for (int j = col + 1; j < col + span; j++) {\n final int bottom = mItemBottoms[j] + mItemMargin;\n if (bottom > lowest) {\n lowest = bottom;\n }\n }\n childTop = lowest;\n }\n final int childHeight = child.getMeasuredHeight();\n final int childBottom = childTop + childHeight;\n final int childLeft = paddingLeft + col * (colWidth + itemMargin);\n final int childRight = childLeft + child.getMeasuredWidth();\n child.layout(childLeft, childTop, childRight, childBottom);\n\n for (int j = col; j < col + span; j++) {\n mItemBottoms[j] = childBottom;\n }\n\n final LayoutRecord rec = mLayoutRecords.get(position);\n if (rec != null && rec.height != childHeight) {\n // Invalidate our layout records for everything before this.\n rec.height = childHeight;\n /*\n * XXX was \"rebuildLayoutRecordsBefore\" previously\n * Rebuilding layout records \"before\" this position\n * leads to a nasty bug - margins for spanned children disappear\n * and the grid layouts children incorrectly\n * I DON'T REALLY KNOW WHY THIS IS SO....\n */\n rebuildLayoutRecordsAfter = position;\n }\n\n if (rec != null && rec.span != span) {\n // Invalidate our layout records for everything after this.\n rec.span = span;\n rebuildLayoutRecordsAfter = position;\n }\n\n }\n\n // Update mItemBottoms for any empty columns\n for (int i = 0; i < mColCount; i++) {\n if (mItemBottoms[i] == Integer.MIN_VALUE) {\n mItemBottoms[i] = mItemTops[i];\n }\n }\n\n if (rebuildLayoutRecordsBefore >= 0 || rebuildLayoutRecordsAfter >= 0) {\n if (rebuildLayoutRecordsBefore >= 0) {\n invalidateLayoutRecordsBeforePosition(rebuildLayoutRecordsBefore);\n }\n if (rebuildLayoutRecordsAfter >= 0) {\n invalidateLayoutRecordsAfterPosition(rebuildLayoutRecordsAfter);\n }\n for (int i = 0; i < childCount; i++) {\n final int position = mFirstPosition + i;\n final View child = getChildAt(i);\n final LayoutParams lp = (LayoutParams) child.getLayoutParams();\n LayoutRecord rec = mLayoutRecords.get(position);\n if (rec == null) {\n rec = new LayoutRecord();\n mLayoutRecords.put(position, rec);\n }\n rec.column = lp.column;\n rec.height = child.getHeight();\n rec.id = lp.id;\n final int span = Math.min(mColCount, lp.span);\n rec.span = span;\n rec.mMargins = lp.margins;\n }\n }\n }", "public void updateExpandedHeight(float f) {\n if (this.mTracking) {\n this.mNotificationStackScroller.setExpandingVelocity(getCurrentExpandVelocity());\n }\n if (this.mKeyguardBypassController.getBypassEnabled() && isOnKeyguard()) {\n f = (float) getMaxPanelHeightNonBypass();\n }\n this.mNotificationStackScroller.setExpandedHeight(f);\n updateKeyguardBottomAreaAlpha();\n updateBigClockAlpha();\n updateStatusBarIcons();\n }", "public boolean wantAnyTreeFloats() {\n return true;\n }", "private void fillGridForPreLayout(RecyclerView.Recycler recycler, RecyclerView.State state) {\r\n while ( fakeSpanBottomMin <= bottomBorder\r\n && mCurrentPosition >=0 && mCurrentPosition < state.getItemCount()) {\r\n layoutChunk(recycler, state, true, true);\r\n }\r\n }", "private int getHeightDifference(long addr) throws IOException {\n Node current = new Node(addr);\r\n Node left = new Node(current.left);\r\n Node right = new Node(current.right);\r\n\r\n if (current.left == 0) {\r\n left.height = -1;\r\n }\r\n if (current.right == 0) {\r\n right.height = -1;\r\n }\r\n return left.height - right.height;\r\n }", "private int balanceFactor() {\n return height(this.rightChild) - height(this.leftChild);\n }", "private void unhilitNode()\n {\n\tif (hilited==null) return;\n\tGraphics g = getGraphics();\n\tsetRenderColor(g,Color.black);\n\trenderCircle(g,hilited.x,hilited.y,hilited.diameter+4);\n\thilited = null;\n }", "private Node splitNode( Node nodeIn, int w, int h ){\r\n\t\tnodeIn.used = true;\r\n\t\tnodeIn.down = new Node( nodeIn.x, nodeIn.y + h + padding, nodeIn.w, nodeIn.h - h - padding );\r\n\t\tnodeIn.right = new Node( nodeIn.x + w + padding, nodeIn.y, nodeIn.w - w - padding, h );\r\n\t\treturn nodeIn;\r\n\t}", "@Override\n public void process(ElkNode graph, IElkProgressMonitor progressMonitor) {\n progressMonitor.begin(\"WorkingDummyNodePlacementPhase\", graph.getChildren().size());\n Map<Integer, List<ElkNode>> layers = Util.getLayers(graph);\n\n double maxX = 0;\n double maxY = 0;\n double maxWidth = 0;\n ArrayList<LinkedList<ElkNode>> dummyNodePositions = new ArrayList<LinkedList<ElkNode>>();\n ArrayList<LinkedList<ElkNode>> dummyNodeConnections = new ArrayList<LinkedList<ElkNode>>();\n\n for (int i = 0; i < graph.getProperty(LayerBasedMetaDataProvider.OUTPUTS_LAYER_COUNT); i++) {\n if (progressMonitor.isCanceled()) {\n progressMonitor.done();\n return;\n }\n maxY = 0;\n maxWidth = 0;\n List<ElkNode> layer = layers.getOrDefault(i, Collections.<ElkNode> emptyList());\n ArrayList<LinkedList<ElkNode>> dummyNodePositionsInLayer = new ArrayList<LinkedList<ElkNode>>();\n \n\n layer.sort(Util.COMPARE_POS_IN_LAYER);\n\n for (ElkNode node : layer) {\n if (progressMonitor.isCanceled()) {\n progressMonitor.done();\n return;\n }\n // Special case for dummy nodes\n if (node.getProperty(LayerBasedLayoutMetadata.OUTPUTS_IS_DUMMY)) {\n Boolean set = false;\n\n for (ElkEdge e : node.getIncomingEdges()) {\n if (progressMonitor.isCanceled()) {\n progressMonitor.done();\n return;\n }\n if (Util.getSource(e).getProperty(LayerBasedLayoutMetadata.OUTPUTS_IS_DUMMY)) {\n\n // Has to be at the same Y as the last Dummy connected to\n if (Util.getSource(e).getY() < maxY) {\n node.setY(maxY);\n for (LinkedList<ElkNode> dummylines : dummyNodeConnections) {\n if (dummylines.peekLast() == Util.getSource(e)) {\n changeAllBefore(dummylines, dummyNodePositions, dummyNodeConnections, maxY);\n }\n }\n maxY += node.getHeight() + 20;\n } else {\n node.setY(Util.getSource(e).getY());\n maxY = node.getY() + 20; // TODO make the margin an optiopn\n }\n set = true;\n for (LinkedList<ElkNode> dummylines : dummyNodeConnections) {\n if (progressMonitor.isCanceled()) {\n progressMonitor.done();\n return;\n }\n if (dummylines.peekLast() == Util.getSource(e)) {\n dummylines.add(node);\n }\n }\n }\n }\n if (!set) {\n node.setY(maxY);\n maxY += node.getHeight() + 20; // TODO make the margin an option\n LinkedList<ElkNode> l = new LinkedList<ElkNode>();\n l.add(node);\n dummyNodeConnections.add(l);\n }\n dummyNodePositionsInLayer.add(new LinkedList<ElkNode>());\n\n } else {\n node.setY(maxY);\n maxY += node.getHeight() + 20; // TODO make the margin an option\n }\n node.setX(maxX);\n maxWidth = Math.max(maxWidth, node.getWidth());\n for (LinkedList<ElkNode> following : dummyNodePositionsInLayer) {\n if (progressMonitor.isCanceled()) {\n progressMonitor.done();\n return;\n }\n following.add(node);\n }\n }\n\n for (ElkNode node : layer) {\n if (progressMonitor.isCanceled()) {\n progressMonitor.done();\n return;\n }\n if (node.getProperty(LayerBasedLayoutMetadata.OUTPUTS_IS_DUMMY)) {\n node.setWidth(maxWidth);\n }\n progressMonitor.worked(1);\n }\n dummyNodePositions.addAll(dummyNodePositionsInLayer);\n maxX += maxWidth + 20; // TODO make the margin an option\n\n }\n \n progressMonitor.done();\n\n }", "public void reFormatPieceLayer() {\r\n\t\tbody.removeAll();\r\n\t\tfor (int i = 0; i < 8 * 8; i++) {\r\n\t\t\tChessPiece tmpPiece = piece.get(order[i]);\r\n\t\t\tif (tmpPiece == null) {\r\n\t\t\t\tspacePieces[i].position = order[i];\r\n\t\t\t\tpiece.put(order[i], spacePieces[i]);\r\n\t\t\t\tbody.add(spacePieces[i]);\r\n\t\t\t} else {\r\n\t\t\t\tpiece.put(order[i], tmpPiece);\r\n\t\t\t\tbody.add(tmpPiece);\r\n\t\t\t}\r\n\t\t}\r\n\t\tbody.repaint();\r\n\t}", "private void subDivideNode() {\n setOriginNode();\n _subdivided = true;\n _northWest = new QuadTree<Point>(getView(), _transitionSize);\n _northEast = new QuadTree<Point>(getView(), _transitionSize);\n _southWest = new QuadTree<Point>(getView(), _transitionSize);\n _southEast = new QuadTree<Point>(getView(), _transitionSize);\n Iterator<Point> it = _elements.iterator();\n while (it.hasNext()) {\n Point p = it.next();\n QuadTree<Point> qt = quadrant(p);\n qt.add(p);\n }\n _elements = null;\n _elementsSize = 0;\n }", "public abstract int layoutHeight();", "private void clusteredLayout(JFrame jf) {\n\t\tJFrame jf2 = jf;\n\n\t\tjf2.setTitle(\"Clustered Aggregate FRLayout\");\n\t\tjf2.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\n\t\t//specify the Fruchterman-Rheingold layout algorithm\n\t\tfinal AggregateLayout<Number,Number> layout2 = \n\t\t\t\tnew AggregateLayout<Number,Number>(new FRLayout<Number,Number>(this.g));\n\t\tVisualizationViewer<Number, Number> vv2 = new VisualizationViewer<Number,Number>(layout2);\n\t\tvv2.setBackground( Color.white );\n\t\t//Tell the renderer to use our own customized color rendering\n\n\t\tvv2.getRenderContext().setVertexLabelTransformer(new ToStringLabeller());\n\t\tvv.getRenderer().getVertexLabelRenderer().setPosition(Renderer.VertexLabel.Position.CNTR);\n\n\t\tvv2.getRenderContext().setVertexFillPaintTransformer(vertexPaints);\n\t\tvv2.getRenderContext().setVertexDrawPaintTransformer(new Function<Number,Paint>() {\n\t\t\tpublic Paint apply(Number v) {\n\t\t\t\tif(vv2.getPickedVertexState().isPicked(v)) {\n\t\t\t\t\treturn Color.cyan;\n\t\t\t\t} else {\n\t\t\t\t\treturn Color.BLACK;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tvv2.getRenderContext().setEdgeDrawPaintTransformer(edgePaints);\n\n\t\tvv2.getRenderContext().setEdgeStrokeTransformer(new Function<Number,Stroke>() {\n\t\t\tprotected final Stroke THIN = new BasicStroke(1);\n\t\t\tprotected final Stroke THICK= new BasicStroke(2);\n\t\t\tpublic Stroke apply(Number e)\n\t\t\t{\n\t\t\t\tPaint c = edgePaints.getUnchecked(e);\n\t\t\t\tif (c == Color.LIGHT_GRAY)\n\t\t\t\t\treturn THIN;\n\t\t\t\telse \n\t\t\t\t\treturn THICK;\n\t\t\t}\n\t\t});\n\t\tDefaultModalGraphMouse<Number, Number> gm = new DefaultModalGraphMouse<Number, Number>();\n\t\tvv2.setGraphMouse(gm);\n\t\tContainer content = jf2.getContentPane();\n\t\tcontent.add(new GraphZoomScrollPane(vv2));\n\t\tJPanel south = new JPanel();\n\t\tJPanel grid = new JPanel(new GridLayout(2,1));\n\n\t\tsouth.add(grid);\n\n\t\tJPanel p = new JPanel();\n\t\tp.setBorder(BorderFactory.createTitledBorder(\"Mouse Mode\"));\n\t\tp.add(gm.getModeComboBox());\n\t\tsouth.add(p);\n\t\tcontent.add(south, BorderLayout.SOUTH);\n\t\tjf2.pack();\n\t\tjf2.setVisible(true);\n\n\t}", "int get_height(Node node) {\n\t\tif (node == null) \n\t\t\treturn 0;\n\t\telse if (node.leftChild == null && node.rightChild == null)\n\t\t\treturn 0;\t\t\n\t\telse return 1 + max(get_height(node.leftChild), get_height(node.rightChild));\n\t}", "public int height() { return root == null ? 0 : root.height(); }", "public void fixLayout() {\n splitPane.setDividerLocation(getWidth() / 2);\n }", "@Override\r\n\tprotected void onLayout(boolean changed, int left, int top, int right,\r\n\t\t\tint bottom) {\n\t\tfor (int i = 0; i < getChildCount(); i++) {\r\n\t\t\tfinal View child = getChildAt(i);\r\n\t\t\tif(child.getVisibility() != GONE) {\r\n\t\t\t\tfinal LayoutParams params = (LayoutParams) child.getLayoutParams();\r\n\t\t\t\t\r\n\t\t\t\tfinal int width = child.getMeasuredWidth();\r\n\t\t\t\tfinal int height = child.getMeasuredHeight();\r\n\t\t\t\t\r\n\t\t\t\tint childleft = 0;\r\n\t\t\t\tint childtop = getPaddingTop()+params.topMargin;\r\n\t\t\t\t\r\n\t\t\t\tchild.layout(childleft, childtop, childleft+width, childtop+height);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "protected void trimToSize() {\n\tnodeList.trimToSize();\n\tedgeList.trimToSize();\n }", "public abstract int getNodeColumnCount();", "public void clear() {\n\t\t\tsuper.clear();\n\t\t\tjgraph.getGraphLayoutCache().remove(nullnodes.toArray());\n\t\t\tnullnodes = new LinkedList<DefaultGraphCell>();\n\t\t}", "private void layoutNode(final GraphView myView) {\n \n \t\tString label = null;\n \t\tint tempid = 0;\n \t\tNodeView view = null;\n \n \t\tfor (final Iterator it = nodes.iterator(); it.hasNext();) {\n \t\t\t// Extract a node from JAXB-generated object\n \t\t\tfinal cytoscape.generated2.Node curNode = (cytoscape.generated2.Node) it\n \t\t\t\t\t.next();\n \n \t\t\tlabel = curNode.getLabel();\n \t\t\tfinal Graphics graphics = (Graphics) curNode.getGraphics();\n \n \t\t\tnodeGraphicsMap.put(label, graphics);\n \t\t\tview = myView.getNodeView(Cytoscape.getRootGraph().getNode(label)\n \t\t\t\t\t.getRootGraphIndex());\n \n \t\t\tif (label != null && view != null) {\n \t\t\t\tview.getLabel().setText(label);\n \n \t\t\t} else if (view != null) {\n \t\t\t\tview.getLabel().setText(\"node(\" + tempid + \")\");\n \t\t\t\ttempid++;\n \t\t\t}\n \n \t\t\tif (graphics != null && view != null) {\n \t\t\t\tlayoutNodeGraphics(graphics, view);\n \t\t\t}\n \t\t}\n \t}", "public void setHeight(double aValue)\n{\n if(_height==aValue) return; // If value already set, just return\n repaint(); // Register repaint\n firePropertyChange(\"Height\", _height, _height = aValue, -1); // Set value and fire PropertyChange\n if(_parent!=null) _parent.setNeedsLayout(true); // Rather bogus\n}", "@Override\n public int getHeight() {\n int height = 0;\n\n if (!isEmpty()) {\n height = root.getHeight();\n }\n\n return height;\n }", "@Override\n public int getPeekHeight() {\n return HeightMode.DISABLED;\n }", "private void adjustDeficientBlackSiblingNode(Node deficientNode, AtomicReference<Node> rootRef) {\n\t\tNode sibling = getSibling(deficientNode);\n if(deficientNode.parent.color == Color.BLACK && sibling.color == Color.BLACK && sibling.left.color == Color.BLACK\n && sibling.right.color == Color.BLACK) {\n \tsibling.color = Color.RED;\n adjustRootDeficiency(deficientNode.parent, rootRef);\n } else {\n adjustRedParentNode(deficientNode, rootRef);\n }\n\t}", "@Override\r\n public void onLayoutChildren(RecyclerView.Recycler recycler, RecyclerView.State state) {\r\n\r\n // Nothing to be laid out, just clear attached views and return.\r\n if(state.getItemCount() == 0){\r\n detachAndScrapAttachedViews(recycler);\r\n return;\r\n }\r\n // For the pre-layout, we need to layout current attached views and appearing views.\r\n if(state.isPreLayout()){\r\n // If nothing is attached, just return.\r\n if(getChildCount() == 0)\r\n return;\r\n // For the current attached views, find the views removed and update\r\n // removedTopAndBoundPositionCount and firstChangedPosition.\r\n final int childCount = getChildCount();\r\n for(int i = 0; i < childCount; i++){\r\n View child = getChildAt(i);\r\n RecyclerView.LayoutParams lp = (RecyclerView.LayoutParams) child.getLayoutParams();\r\n if(lp.isItemRemoved()){\r\n removedTopAndBoundPositionCount++;\r\n if(firstChangedPosition == -1 ||\r\n firstAttachedItemPosition + i < firstChangedPosition){\r\n firstChangedPosition = firstAttachedItemPosition + i;\r\n }\r\n }\r\n }\r\n // If removedTopAndBoundPositionCount = 0, items changes out of the bottom border,\r\n // So we have nothing to do during the pre-layout.\r\n // Otherwise we need to lay out current attached views and appearing views.\r\n if(removedTopAndBoundPositionCount != 0){\r\n layoutAttachedAndAppearingViews(recycler, state);\r\n }\r\n // Reset isBeforePreLayout after the pre-layout ends.\r\n isBeforePreLayout = false;\r\n return;\r\n }\r\n\r\n // The real layout.\r\n // First or empty layout, initialize layout parameters and fill.\r\n if(getChildCount() == 0){\r\n initializeLayoutParameters();\r\n fillGrid(recycler, state, true);\r\n return;\r\n }\r\n // If it is triggered with notifyDataSetChanged(),\r\n // we just clear attached views and layout from the beginning.\r\n if(isNotifyDataSetChanged){\r\n detachAndScrapAttachedViews(recycler);\r\n initializeLayoutParameters();\r\n fillGrid(recycler, state, true);\r\n isNotifyDataSetChanged = false;\r\n return;\r\n }\r\n\r\n // Adapter data set changes.\r\n if(firstChangedPosition == -1){ // No item is removed\r\n // reset parameters.\r\n mCurrentPosition = firstAttachedItemPosition;\r\n lastAttachedItemPosition = firstAttachedItemPosition;\r\n topBorder = getPaddingTop();\r\n bottomBorder = getHeight() - getPaddingBottom();\r\n spanBottom = Arrays.copyOf(spanTop, mSpanCount);\r\n updateSpanBottomParameters();\r\n // Fill the area.\r\n detachAndScrapAttachedViews(recycler);\r\n fillGrid(recycler, state, true);\r\n\r\n // Reset isBeforePreLayout.\r\n isBeforePreLayout = true;\r\n// firstChangedPosition = -1;\r\n// removedTopAndBoundPositionCount = 0;\r\n return;\r\n }\r\n // There are removed items.\r\n // Clear the cache from the firstChangedPosition\r\n for(int i = firstChangedPosition; i < state.getItemCount(); i++){\r\n if(itemLayoutWidthCache.get(i, 0) != 0){\r\n itemLayoutWidthCache.delete(i);\r\n itemLayoutHeightCache.delete(i);\r\n itemOccupiedStartSpan.delete(i);\r\n }\r\n if(fakeItemLayoutWidthCache.get(i, 0) != 0){\r\n itemLayoutWidthCache.put(i, fakeItemLayoutWidthCache.get(i));\r\n itemLayoutHeightCache.put(i, fakeItemLayoutHeightCache.get(i));\r\n itemOccupiedStartSpan.put(i, fakeItemOccupiedStartSpan.get(i));\r\n }\r\n }\r\n fakeItemLayoutWidthCache.clear();\r\n fakeItemLayoutHeightCache.clear();\r\n fakeItemOccupiedStartSpan.clear();\r\n\r\n detachAndScrapAttachedViews(recycler);\r\n\r\n // There are removed items out of the upper bound.\r\n if(firstChangedPosition < firstAttachedItemPosition) {\r\n mCurrentPosition = firstAttachedItemPosition;\r\n lastAttachedItemPosition = firstAttachedItemPosition;\r\n topBorder = getPaddingTop();\r\n bottomBorder = getHeight() - getPaddingBottom();\r\n spanBottom = Arrays.copyOf(spanTop, mSpanCount);\r\n updateSpanBottomParameters();\r\n fillGrid(recycler, state, true);\r\n // If it cannot fill until the bottomBorder, call scrollBy() to fill.\r\n if(spanBottomMax < bottomBorder){\r\n scrollBy(spanBottomMax - bottomBorder, recycler, state);\r\n }\r\n // Finally, we layout disappearing views.\r\n layoutDisappearingViews(recycler, state);\r\n }else{ // There are no removed items out of the upper bound.\r\n // Just set layout parameters and fill the visible area.\r\n mCurrentPosition = firstAttachedItemPosition;\r\n lastAttachedItemPosition = firstAttachedItemPosition;\r\n topBorder = getPaddingTop();\r\n bottomBorder = getHeight() - getPaddingBottom();\r\n spanBottom = Arrays.copyOf(spanTop, mSpanCount);\r\n updateSpanBottomParameters();\r\n fillGrid(recycler, state, true);\r\n // The number of items is too small, call scrollBy() to fill.\r\n if(spanBottomMax - bottomBorder < 0){\r\n scrollBy(spanBottomMax - bottomBorder, recycler, state);\r\n }\r\n }\r\n // After the real layout, we need to clear some parameters.\r\n isBeforePreLayout = true;\r\n firstChangedPosition = -1;\r\n removedTopAndBoundPositionCount = 0;\r\n disappearingViewCache.clear();\r\n }", "protected void drawNodes(Graphics2D g2d) {\n Rectangle2D screen = new Rectangle2D.Float(0,0,w,h);\n NodeShaper shaper = null; NodeColorer colorer = null;\n NodeShaper bkup_shaper = null; // Backup shaper for the label shaper if sticky labels are enabled\n\tfloat dist = 6.0f;\n\n\t// Prepare the label maker (if node size equates to node label... prepare that as well)\n if (node_size == NodeSize.LABEL) {\n List<String> list = new ArrayList<String>();\n if (entity_labels.size() > 0) { String top = entity_labels.get(0); entity_labels.remove(0); list.add(top); } else list.add(ENTITY_LM);\n special_lm = new LabelMaker(list, node_counter_context);\n }\n node_lm = new LabelMaker(entity_labels, node_counter_context);\n\n\t// Allocate the shaper and colorer\n switch (node_size) {\n\t case TYPE:\n\t case GRAPHINFO:\n\t case LARGE: shaper = new FixedNodeShaper(dist = 10.0f); break;\n\t case LABEL: shaper = new LabelNodeShaper(special_lm); \n bkup_shaper = new FixedNodeShaper(dist = 10.0f); break;\n\t case SMALL: shaper = new FixedNodeShaper(dist = 4.0f); break;\n\t case VARY: shaper = new VaryNodeShaper(); break;\n\t case VARY_LOG: shaper = new VaryLogNodeShaper(); break;\n case CLUSTERCO: shaper = new ClusterCoefficientShaper(); break;\n\t case INVISIBLE:\n\t default: return;\n }\n\tswitch (node_color) {\n case WHITE: colorer = new FixedNodeColorer(RTColorManager.getColor(\"background\", \"reverse\")); break;\n\t case VARY: colorer = new VaryNodeColorer(); break;\n\t case LABEL: colorer = new LabelNodeColorer(); break;\n case CLUSTERCO: colorer = new ClusterCoefficientColorer(); break;\n\t}\n\n\t// Figure out the bounding box for clipping\n Rectangle2D screenplus = new Rectangle2D.Double(screen.getX()-10,screen.getY()-10,screen.getWidth()+20,screen.getHeight()+20);\n\n Iterator<String> it = node_counter_context.binIterator();\n\twhile (it.hasNext()) {\n String node = it.next();\n Shape shape = shaper.nodeShape(node, g2d);\n if (screenplus.intersects(shape.getBounds())) {\n\t Shape tmp_shape = null;\n\t switch (node_size) {\n\t case TYPE: tmp_shape = drawNodeType(g2d, node); if (tmp_shape != null) shape = tmp_shape; break;\n case GRAPHINFO: tmp_shape = drawNodeGraphInfo(g2d, node, shape); if (tmp_shape != null) shape = tmp_shape; break;\n case LABEL: boolean single = (node_coord_set.get(node).size() == 1);\n String str = \"\"; if (single && sticky_labels.size() > 0) str = node_coord_set.get(node).iterator().next();\n if (sticky_labels.size() == 0 || sticky_labels.contains(str)) {\n g2d.setColor(RTColorManager.getColor(\"background\", \"default\")); g2d.fill(shape);\n g2d.setColor(RTColorManager.getColor(\"background\", \"reverse\")); g2d.draw(shape);\n special_lm.draw(g2d, node, (int) shape.getBounds().getCenterX(), (int) shape.getBounds().getMinY()-3, true);\n } else {\n shape = bkup_shaper.nodeShape(node, g2d);\n g2d.setColor(colorer.nodeColor(node)); g2d.fill(shape);\n }\n break;\n default: g2d.setColor(colorer.nodeColor(node)); g2d.fill(shape); break;\n\t }\n\t if (node_lm != null && draw_node_labels) node_lm.draw(g2d, node, (int) shape.getBounds().getCenterX(), \n\t (int) shape.getBounds().getMaxY(), true);\n\n // Accounting for interactivity\n all_shapes.add(shape);\n geom_to_bundles.put(shape, node_counter_context.getBundles(node));\n\t node_to_geom.put(node, shape);\n Iterator<Bundle> itb = node_counter_context.getBundles(node).iterator();\n while (itb.hasNext()) {\n\t Bundle bundle = itb.next();\n if (bundle_to_shapes.containsKey(bundle) == false) bundle_to_shapes.put(bundle, new HashSet<Shape>());\n\t bundle_to_shapes.get(bundle).add(shape);\n }\n }\n\t}\n }", "double getNewHeight();", "private int height( BinaryNode<AnyType> t )\r\n\t{\r\n\t\tif( t == null )\r\n\t\t\treturn -1;\r\n\t\telse\r\n\t\t\treturn 1 + Math.max( height( t.left ), height( t.right ) ); \r\n\t}", "private void compactVertically (List<List<NodeRealizer>> cellColumns)\n {\n for (List<NodeRealizer> cellColumn : cellColumns)\n {\n int centerIndex = (cellColumn.size () - 1) / 2;\n NodeRealizer centerRealizer = cellColumn.get (centerIndex);\n double minY = centerRealizer.getY () - GAP;\n double maxY = centerRealizer.getY () + centerRealizer.getHeight () + GAP;\n for (int i = 1; i <= centerIndex; i++)\n {\n NodeRealizer topRealizer = cellColumn.get (centerIndex - i);\n topRealizer.setY (minY - topRealizer.getHeight ());\n minY -= topRealizer.getHeight () + GAP;\n NodeRealizer bottomRealizer = cellColumn.get (centerIndex + i);\n bottomRealizer.setY (maxY);\n maxY += bottomRealizer.getHeight () + GAP;\n }\n if (cellColumn.size () % 2 == 0)\n {\n NodeRealizer bottomRealizer = cellColumn.get (cellColumn.size () - 1);\n bottomRealizer.setY (maxY);\n }\n }\n }", "@Override\r\n\tpublic int height() {\r\n\t\tif (this.root == null) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t// TODO Auto-generated method stub\r\n\t\treturn height_sub(this.root);\r\n\t}", "@Override\n\tpublic void setHeight(float height) {\n\n\t}", "private void m13644b(Canvas canvas) {\n int childCount = getChildCount();\n int i = 0;\n while (i < childCount) {\n View childAt = getChildAt(i);\n if (!(childAt == null || childAt.getVisibility() == 8 || !m13643a(i))) {\n m13645b(canvas, childAt.getLeft() - ((LayoutParams) childAt.getLayoutParams()).leftMargin);\n }\n i++;\n }\n if (m13643a(childCount)) {\n View childAt2 = getChildAt(childCount - 1);\n m13645b(canvas, childAt2 == null ? (getWidth() - getPaddingRight()) - this.f9807c : childAt2.getRight());\n }\n }", "private void layoutNodeGraphics(final Graphics graphics, final NodeView nodeView) {\n \n \t\t// Location and size of the node\n \t\tdouble x, y, h, w;\n \n \t\tx = graphics.getX();\n \t\ty = graphics.getY();\n \t\th = graphics.getH();\n \t\tw = graphics.getW();\n \n \t\tnodeView.setXPosition(x);\n \t\tnodeView.setYPosition(y);\n \n \t\tnodeView.setHeight(h);\n \t\tnodeView.setWidth(w);\n \n \t\t// Set color\n \t\tnodeView.setUnselectedPaint(getColor(graphics.getFill()));\n \n \t\t// Set border line\n \t\tnodeView.setBorderPaint(getColor(graphics.getOutline()));\n \t\tif (graphics.getWidth() != null) {\n \t\t\tnodeView.setBorderWidth(graphics.getWidth().floatValue());\n \t\t}\n \n \t\tfinal String type = graphics.getType();\n \n \t\tif (type != null) {\n \n \t\t\tif (type.equals(ELLIPSE)) {\n \t\t\t\tnodeView.setShape(NodeView.ELLIPSE);\n \t\t\t} else if (type.equals(RECTANGLE)) {\n \t\t\t\tnodeView.setShape(NodeView.RECTANGLE);\n \t\t\t} else if (type.equals(DIAMOND)) {\n \t\t\t\tnodeView.setShape(NodeView.DIAMOND);\n \t\t\t} else if (type.equals(HEXAGON)) {\n \t\t\t\tnodeView.setShape(NodeView.HEXAGON);\n \t\t\t} else if (type.equals(OCTAGON)) {\n \t\t\t\tnodeView.setShape(NodeView.OCTAGON);\n \t\t\t} else if (type.equals(PARALELLOGRAM)) {\n \t\t\t\tnodeView.setShape(NodeView.PARALELLOGRAM);\n \t\t\t} else if (type.equals(TRIANGLE)) {\n \t\t\t\tnodeView.setShape(NodeView.TRIANGLE);\n \t\t\t}\n \t\t}\n \n \t\tif (graphics.getAtt().size() != 0) {\n \n \t\t\t// This object includes non-GML graphics property.\n \t\t\tfinal Att localGraphics = (Att) graphics.getAtt().get(0);\n \t\t\tfinal Iterator it = localGraphics.getContent().iterator();\n \n \t\t\t// Extract edge graphics attributes one by one.\n \t\t\twhile (it.hasNext()) {\n \t\t\t\tfinal Object obj = it.next();\n \n \t\t\t\tif (obj.getClass() == AttImpl.class) {\n \t\t\t\t\tfinal AttImpl nodeGraphics = (AttImpl) obj;\n \t\t\t\t\tfinal String attName = nodeGraphics.getName();\n \t\t\t\t\tfinal String value = nodeGraphics.getValue();\n \n \t\t\t\t\tif (attName.equals(\"nodeTransparency\")) {\n \t\t\t\t\t\tnodeView.setTransparency(Float.parseFloat(value));\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \n \t}" ]
[ "0.6253995", "0.600218", "0.55661654", "0.54690915", "0.52906424", "0.52611816", "0.52524513", "0.5242327", "0.5219885", "0.5195378", "0.51427674", "0.51367486", "0.5106333", "0.509996", "0.5095576", "0.50820076", "0.50420445", "0.49981046", "0.49977714", "0.49860463", "0.498343", "0.49775887", "0.49677005", "0.49492", "0.49165723", "0.48961067", "0.48806947", "0.4872152", "0.48664072", "0.48470128", "0.4842204", "0.48248428", "0.48238155", "0.4822505", "0.48211205", "0.48022085", "0.4797983", "0.47946632", "0.47850507", "0.47552198", "0.47479355", "0.47472233", "0.47410652", "0.47343355", "0.47180936", "0.4716705", "0.47108212", "0.4709528", "0.46993056", "0.46916258", "0.46875167", "0.4679687", "0.46739054", "0.4670359", "0.4667421", "0.46659255", "0.46657532", "0.46648884", "0.46639037", "0.46590605", "0.46548364", "0.4643883", "0.46411258", "0.4640007", "0.462659", "0.46234965", "0.46179065", "0.46174398", "0.4616138", "0.46143183", "0.46078977", "0.4607233", "0.46020955", "0.45962602", "0.45927948", "0.45916796", "0.45795044", "0.45756075", "0.4573416", "0.4571218", "0.45701987", "0.4569369", "0.45636323", "0.45577243", "0.4557195", "0.45521036", "0.45483583", "0.45481634", "0.45474407", "0.45448282", "0.45440665", "0.45428568", "0.4538646", "0.4536594", "0.45341277", "0.45327708", "0.45207268", "0.45195287", "0.451784", "0.45178118" ]
0.53192776
4
/System.out.printf("[%s] balanced? %b\n", "()", areParensBalanced("()")); System.out.printf("[%s] balanced? %b\n", "", areParensBalanced("")); System.out.printf("[%s] balanced? %b\n", "())", areParensBalanced("())")); System.out.printf("[%s] balanced? %b\n", "(()", areParensBalanced("(()")); System.out.printf("[%s] balanced? %b\n", "()()", areParensBalanced("()()")); System.out.printf("[%s] balanced? %b\n", "(((())())())", areParensBalanced("(((())())())")); System.out.printf("[%s] balanced? %b\n", "(((()))())", areParensBalanced("(((()))())")); System.out.printf("[%s] balanced2? %b\n", "()", areParensBalanced2("()")); System.out.printf("[%s] balanced2? %b\n", "", areParensBalanced2("")); System.out.printf("[%s] balanced2? %b\n", "())", areParensBalanced2("())")); System.out.printf("[%s] balanced2? %b\n", "(()", areParensBalanced2("(()")); System.out.printf("[%s] balanced2? %b\n", "()()", areParensBalanced2("()()")); System.out.printf("[%s] balanced2? %b\n", "(((())())())", areParensBalanced2("(((())())())")); System.out.printf("[%s] balanced2? %b\n", "(((()))())", areParensBalanced2("(((()))())"));
public static void main(String[] args) { TreeNode<Integer> node = new TreeNode<>(7); node.left = new TreeNode<>(2); node.left.left = new TreeNode<>(1); node.left.right = new TreeNode<>(3); node.right = new TreeNode<>(5); node.right.left = new TreeNode<>(4); node.right.right = new TreeNode<>(8); node.right.left.left = new TreeNode<>(0); List<TreeNode<Integer>> list = TreeNode.linearize_postOrder_1(node); for (TreeNode<Integer> n : list) { System.out.printf("%d, ", n.value); } System.out.printf("\n"); list = TreeNode.linearize_postOrder_2(node); for (TreeNode<Integer> n : list) { System.out.printf("%d, ", n.value); } System.out.printf("\n"); Map<Integer, Deque<Integer>> adjacencyList = new HashMap<>(); Deque<Integer> children = new ArrayDeque<>(); children.add(2); children.add(5); adjacencyList.put(7, children); children = new ArrayDeque<>(); children.add(1); children.add(3); adjacencyList.put(2, children); children = new ArrayDeque<>(); children.add(4); children.add(8); adjacencyList.put(5, children); //adjacencyList.put(1, new ArrayDeque<>()); //adjacencyList.put(3, new ArrayDeque<>()); children = new ArrayDeque<>(); children.add(0); adjacencyList.put(4, children); //adjacencyList.put(0, new ArrayDeque<>()); //adjacencyList.put(8, new ArrayDeque<>()); GraphUtils.postOrderTraverse(adjacencyList, new Consumer<Integer>() { @Override public void accept(Integer integer) { System.out.printf("%d, ", integer); } }); System.out.printf("\n"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n String s=\"[()]{}{[()()]()}\";\n \n System.out.println(isBalanced(s));\n String s1=\"[(])\";\n System.out.println(isBalanced(s1));\n \n \n }", "public static void main(String[] args) \r\n\t\t{ \r\n\t\t\tString expr = \"(]\"; \r\n\t\t\tif (areParanthesisBalanced(expr)) \r\n\t\t\t\tSystem.out.println(\"Balanced \"); \r\n\t\t\telse\r\n\t\t\t\tSystem.out.println(\"Not Balanced \"); \r\n\t\t}", "public static void main(String[] args) {\n String s=\"[()]{}{[()()]()}\";\n char s1[]=s.toCharArray();\n Stack<Character> a=new Stack<>();\n \n for (int i = 0; i < s.length(); i++) {\n \t char x=s.charAt(i);\n// \t if(a.isEmpty()) {\n// \t\t a.push(x);\n// \t }\n \t \n\t\tif(x=='{'||x=='['||x=='('){\n\t\t\ta.push(x);\n\t\t}\n\t\telse if(x=='}'||x==']'||x==')'&& !a.isEmpty()) {\n//\t\t\tif(a.peek()=='}'||a.peek()==']'||a.peek()==')')\n\t\t\ta.pop();\n\t\t}\n\t}\n System.out.println(a.toString());\n if(a.isEmpty()) {\n \t System.out.println(\"balanced\");\n }\n else\n {\n \t System.out.println(\"Unbalanced\"); \t \n }\n\t}", "@Test\n\tpublic void parenthesses_should_notbalanced_expr()\n\t{\n\t\tString result=\"\";String expr=\"\";\n\t\t\n\t\texpr=\"(a+b(a+c)\";\n\t\t result=com.bridgelabz.util.DataStructure.BalanaceParenthes(expr);\n\t\tassertTrue(\"not balanced\", result!=\"balaced\");\n\t}", "public static void main(String[] args) {\n\t\n\t\tString exp =\"({})\";\n\t\t\n\t\tboolean b = isBalancedParenthesis(exp);\n\t\t\n\t\tSystem.out.println(b);\n\t\t\t}", "private static boolean checkBalance(String expression)\r\n {\r\n StackInterface<Character> open_delimiter_stack = new ArrayStack<>();\r\n\r\n switch(stack_type)\r\n {\r\n case(\"vector\"):\r\n open_delimiter_stack = new VectorStack<>();\r\n break;\r\n \r\n case(\"linked\"):\r\n open_delimiter_stack = new LinkedListStack<>();\r\n break;\r\n }\r\n\r\n int character_count = expression.length();\r\n boolean is_balanced = true;\r\n int index = 0;\r\n char next_character = ' ';\r\n\r\n //makes sure open delimiter hits its equivalent closer\r\n while(is_balanced && (index < character_count))\r\n {\r\n next_character = expression.charAt(index);\r\n switch(next_character)\r\n {\r\n case '(': case '{': case '[':\r\n open_delimiter_stack.push(next_character);\r\n break;\r\n case ')': case '}': case ']':\r\n if(open_delimiter_stack.isEmpty())\r\n {\r\n is_balanced = false;\r\n }\r\n else\r\n {\r\n char open_delimiter = open_delimiter_stack.pop();\r\n is_balanced = isPaired(open_delimiter, next_character);\r\n }\r\n break;\r\n default: break;\r\n }\r\n index++;\r\n }\r\n if (!open_delimiter_stack.isEmpty())\r\n {\r\n is_balanced = false;\r\n }\r\n\r\n return is_balanced;\r\n }", "public static boolean isBalanced(String str) {\n int count = 0;\n\n for (int i = 0; i < str.length() && count >= 0; i++) {\n if (str.charAt(i) == '(')\n count++;\n else if (str.charAt(i) == ')')\n count--;\n }\n\n return count == 0;\n}", "public static boolean isBalanced(String expression) {\n if ((expression.length() % 2) == 1) return false;\n else {\n char[] brackets = expression.toCharArray();\n LinkedList<Character> cList = new LinkedList<>();\n for (char bracket : brackets) {\n switch (bracket) {\n case '{':\n cList.addFirst('}');\n break;\n case '(':\n cList.addFirst(')');\n break;\n case '[':\n cList.addFirst(']');\n break;\n default:\n if (cList.isEmpty() || bracket != cList.removeFirst()) return false;\n }\n }\n return cList.isEmpty();\n }\n }", "static boolean areParanthesisBalanced(String str) \r\n\t\t{ \r\n\t\t\t// Using ArrayDeque is faster than using Stack class \r\n\t\t\tDeque<Character> stack = new ArrayDeque<Character>(); \r\n\t\t\tfor (int i = 0; i < str.length(); i++) {\r\n\t\t\tchar ch = str.charAt(i);\r\n\t\t\tif (ch == '[' || ch == '(' || ch == '{') {\r\n\t\t\t\tstack.push(ch);\r\n\t\t\t} else if ((ch == ']' || ch == '}' || ch == ')')\r\n\t\t\t\t\t&& (!stack.isEmpty())) {\r\n\t\t\t\tif (((char) stack.peek() == '(' && ch == ')')\r\n\t\t\t\t\t\t|| ((char) stack.peek() == '{' && ch == '}')\r\n\t\t\t\t\t\t|| ((char) stack.peek() == '[' && ch == ']')) {\r\n\t\t\t\t\tstack.pop();\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif ((ch == ']' || ch == '}' || ch == ')')) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\r\n\t\t\t}\r\n\t\t\treturn (stack.isEmpty());\r\n\t\t\t}", "@Test\n public void test_accepts_parens() {\n List<FARule> rules = Arrays.asList(\n new FARule(STATE0, '(', STATE1), new FARule(STATE1, ')', STATE0),\n new FARule(STATE1, '(', STATE2), new FARule(STATE2, ')', STATE1),\n new FARule(STATE2, '(', STATE3), new FARule(STATE3, ')', STATE2));\n NFARulebook rulebook = new NFARulebook(rules);\n\n NFADesign nfaDesign = new NFADesign(STATE0, Arrays.asList(STATE0), rulebook);\n assertFalse(nfaDesign.accepts(\"(()\"));\n assertFalse(nfaDesign.accepts(\"())\"));\n assertTrue(nfaDesign.accepts(\"(())\"));\n assertTrue(nfaDesign.accepts(\"(()(()()))\"));\n\n // Here is a flaw though - we can't make rules out to infinity - these brackets are balanced, but our rulebook\n // does not go out enough levels to recognize it:\n assertFalse(nfaDesign.accepts(\"(((())))\")); // Should be TRUE!\n // We can always add more levels, but there is no real solution to this problem with an NFA (no matter how many\n // rules we provide, nesting could always go 1 level deeper).\n }", "public static boolean isBalancedParentheses(String str) {\r\n\t\tStack<Character> stk = new Stack<Character>();\r\n\t\tfor (int i = 0; i < str.length(); i++) {\r\n\t\t\tchar ch = str.charAt(i);\r\n\t\t\tif (ch == '(' || ch == '[') {\r\n\t\t\t\tstk.push(ch);\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif (ch == ')' || ch == ']') {\r\n\t\t\t\tif (!stk.isEmpty() && (stk.peek() == '(' || stk.peek() == '[')) {\r\n\t\t\t\t\tstk.pop();\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tstk.push(ch);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn stk.isEmpty();\r\n\t}", "static String isBalanced(String s) {\n\n Stack<Integer> stackChars = new Stack<Integer>();\n char arr[] = s.toCharArray();\n int topElement= 0;\n for(int i=0;i<s.length();i++){\n if(i>0 && !stackChars.isEmpty()){\n topElement = stackChars.peek();\n }\n stackChars.push((int)arr[i]);\n if(topElement!=0 && stackChars.size() > 1){\n if((topElement==91 && stackChars.peek() ==93) || (topElement==123 && stackChars.peek() ==125) || \n (topElement== 40 && stackChars.peek() ==41)\n ){\n stackChars.pop();\n stackChars.pop();\n }\n }\n }\n String result = \"\";\n if(stackChars.isEmpty()){\n result = \"YES\";\n }else{\n result = \"NO\";\n }\n return result;\n }", "@Test\n public void nonBracket(){\n assertTrue(BalancedBrackets.hasBalancedBrackets(\"\"));\n }", "public boolean balancedparantheses(String exp) {\n\t\tStack<Character> stack = new Stack<Character>();\n\t\tfor (int i = 0; i < exp.length(); i++) {\n\t\t\tchar charValue = exp.charAt(i);\n\t\t\tif (charValue == '[' || charValue == '(' || charValue == '{') {\n\t\t\t\tstack.push(charValue);\n\t\t\t} else if (charValue == ']') {\n\t\t\t\tif (stack.isEmpty()) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (stack.pop() != '[') {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else if (charValue == ')') {\n\t\t\t\tif (stack.isEmpty()) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (stack.pop() != '(') {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else if (charValue == '}') {\n\t\t\t\tif (stack.isEmpty()) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tif (stack.pop() != '{') {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn stack.isEmpty();\n\t}", "private static boolean checkParanthesesIfBalanced(String input) throws Exception {\r\n\t\tStack<Character> stack = new Stack<>();\r\n\t\tchar[] charArray = input.toCharArray();\r\n\t\tfor (char c : charArray) {\r\n\t\t\tif (checkIfCharIsOpenParantheses(c)) {\r\n\t\t\t\tstack.push(c);\r\n\t\t\t} else {\r\n\t\t\t\tif (stack.isEmpty()) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t} else if (!isMatchingPair(stack.pop(), c)) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn stack.isEmpty();\r\n\t}", "private static boolean balancedBrackets(String str) {\n String openingBrackets = \"({[\";\n String closingBrackets = \")}]\";\n HashMap<Character, Character> matchingBrackets = new HashMap<>();\n matchingBrackets.put(')', '(');\n matchingBrackets.put('}', '{');\n matchingBrackets.put(']', '[');\n Stack<Character> stack = new Stack<>();\n for (int i = 0; i < str.length(); i++) {\n char c = str.charAt(i);\n if (openingBrackets.indexOf(c) != -1) {\n stack.push(c);\n } else if (closingBrackets.indexOf(c) != -1) {\n if (stack.isEmpty()) return false;\n if (stack.pop() != matchingBrackets.get(c)) return false;\n }\n }\n return stack.isEmpty();\n }", "public static void main(String[] args) {\n HashMap<Character, Character> map = new HashMap<>();\n map.put('(', ')');\n map.put('[', ']');\n map.put('{', '}');\n \n /* Test each expression for validity */\n Scanner scan = new Scanner(System.in);\n int t = scan.nextInt();\n while (t-- > 0) {\n String expression = scan.next();\n System.out.println(isBalanced(expression, map) ? \"YES\" : \"NO\" );\n }\n scan.close();\n }", "public static boolean isBalanced(String exp) {\n\t\tStack<Character> stack = new Stack<>(exp.length());\n\t\tfor (int i = 0; i < exp.length(); i++) {\n\t\t\tchar ch = exp.charAt(i);\n\t\t\tswitch (ch) {\n\t\t\tcase '(':\n\t\t\tcase '{':\n\t\t\tcase '[':\n\t\t\t\tstack.push(ch);\n\t\t\t\tbreak;\n\t\t\tcase ')': {\n\t\t\t\tchar ch1 = stack.pop();\n\t\t\t\tif (ch1 != '(')\n\t\t\t\t\treturn false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase '}': {\n\t\t\t\tchar ch1 = stack.pop();\n\t\t\t\tif (ch1 != '{')\n\t\t\t\t\treturn false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase ']': {\n\t\t\t\tchar ch1 = stack.pop();\n\t\t\t\tif (ch1 != '[')\n\t\t\t\t\treturn false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\treturn stack.isEmpty();\n\t}", "public static boolean balancedBrackets(String str) {\n Hashtable < Character, Character > lookUpClosingBracket = new Hashtable < Character, Character > ();\n lookUpClosingBracket.put('{', '}');\n lookUpClosingBracket.put('(', ')');\n lookUpClosingBracket.put('[', ']');\n\n Stack < Character > stack = new Stack < Character > ();\n\n for (int i = 0; i < str.length(); i++) {\n char currentBracket = str.charAt(i);\n\n if (currentBracket == '{' || currentBracket == '(' || currentBracket == '[')\n stack.push(currentBracket);\n else if (currentBracket == '}' || currentBracket == ')' || currentBracket == ']') {\n if (stack.isEmpty())\n return false;\n\n char openingBracket = (Character) stack.pop();\n\n char expectedClosingBracket = lookUpClosingBracket.get(openingBracket);\n\n if (currentBracket != expectedClosingBracket)\n return false;\n }\n\n }\n\n if (!stack.isEmpty())\n return false;\n\n return true;\n }", "public static boolean checkBalancedParanthese(String expr) {\n\n\t\tStackLinkedList<Character> s = new StackLinkedList<Character>();\n\n\t\tchar x;\n\n\t\tfor (int i = 0; i < expr.length(); i++) {\n\t\t\tchar ch = expr.charAt(i);\n\t\t\tswitch (ch) {\n\t\t\tcase '[':\n\t\t\t\ts.push(ch);\n\t\t\t\tbreak;\n\n\t\t\tcase '(':\n\t\t\t\ts.push(ch);\n\t\t\t\tbreak;\n\n\t\t\tcase '{':\n\t\t\t\ts.push(ch);\n\t\t\t\tbreak;\n\n\t\t\tcase ')':\n\n\t\t\t\tx = s.pop();\n\t\t\t\tif (x != '(') return false;\n\t\t\t\t\tbreak;\n\t\t\tcase ']':\n\n\t\t\t\tx = s.pop();\n\t\t\t\tif (x != '[') return false;\n\t\t\t\t break;\n\t\t\t\t\t \n\t\t\tcase '}':\n\t\t\t\tx = s.pop();\n\t\t\t\tif (x != '{') return false; \n\t\t\t\t break;\n\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tif (s.size() > 0)\n\t\t\treturn false;\n\n\t\treturn true;\n\n\t}", "private static boolean Question5(String s) {\n\t\t// take a empty stack of characters\n\t\tStack<Character> st = new Stack<Character>();\n\t\t\n\t\t// traverse the input expression\n\t\tfor(int i=0, n = s.length(); i<n ; i++) {\n\t\t\t\n\t\t\tchar curr = s.charAt(i);\n\t\t\t\n\t\t\t// if current char in the expression is a opening brace,\n\t\t\t// push it to the stack\n\t\t\tif(curr == '(' || curr == '{' || curr == '[' ) {\n\t\t\t\tst.push(curr);\n\t\t\t}\t\t\t\n\t\t\telse { // Its } or ) or ]\n\t\t\t\t\n\t\t\t\t// return false if mismatch is found (i.e. if stack is\n\t\t\t\t// empty, the number of opening braces is less than number\n\t\t\t\t// of closing brace, so expression cannot be balanced)\n\t\t\t\tif(st.isEmpty())\n\t\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t\t// pop character from the stack\n\t\t\t\tchar top = st.pop();\n\t\t\t\tif( top == '(' && curr != ')' ||\n\t\t\t\t\ttop == '[' && curr != ']' ||\n\t\t\t\t\ttop == '{' && curr != '}' )\n\t\t\t\t\treturn false;\t\t\t\n\t\t\t}\n\t\t}\n\t\t// expression is balanced only if stack is empty at this point\n\t\treturn st.isEmpty();\n\t}", "public static void printParentheses(int open,int close,String str) {\n if (open == 0 && close == 0) {\n System.out.println(str);\n return;\n }\n\n if (open > close)\n return;\n\n if (open > 0)\n printParentheses(open-1,close,str+\"(\");\n\n if (close > 0)\n printParentheses(open,close-1,str+\")\");\n }", "static boolean checkingBalanceBrackets(String brac) {\r\n\t\t\r\n\t\tStack <Character> inputString = new Stack<Character>();\r\n\t\t\r\n\t\tfor(int i=0;i<brac.length();i++) {\r\n\t\t\tchar bracChar = brac.charAt(i);\r\n\t\t\tif(bracChar == '(' || bracChar == '{' || bracChar == '[') {\r\n\t\t\t\tinputString.push(bracChar);\r\n\t\t\t\tcontinue;\r\n\t\t\t}\t\r\n\t\t\tif(inputString.isEmpty()) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t//Check if we had inputed closing braces and start check for matching Open braces\r\n\t\t\tchar localChar;\r\n\t\t\tswitch(bracChar) \r\n\t\t\t{\r\n\t\t\t\tcase')' :\r\n\t\t\t\t{\r\n\t\t\t\t\tlocalChar = inputString.pop();\r\n\t\t\t\t\tif(localChar == '{' || localChar == '[') {\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\t\r\n\t\t\t\t}\r\n\t\t\t\tcase '}' :\r\n\t\t\t\t{\r\n\t\t\t\t\tlocalChar = inputString.pop();\r\n\t\t\t\t\tif(localChar == '(' || localChar == '[') \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak; \r\n\t\t\t\t}\r\n\t\t\t\tcase ']' :\r\n\t\t\t\t{\r\n\t\t\t\t\tlocalChar = inputString.pop();\r\n\t\t\t\t\tif(localChar == '(' || localChar == '{') \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak; \r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\r\n\t\t\r\n\t\treturn (inputString.isEmpty());\r\n\t}", "public static void parens_helper(String s, int open, int closed) {\n if(open == 0 && closed == 0) {\n System.out.println(s);\n return;\n }\n if(open > 0) {\n parens_helper(s+\"(\", open-1, closed);\n }\n if(open<closed) {\n parens_helper(s+\")\", open, closed-1);\n }\n }", "public static void main(String[] args) {\n BinaryTree tree = new BinaryTree(0);\n tree.insert(1);\n tree.insert(3);\n tree.insert(4);\n tree.insert(4);\n tree.insert(4);\n tree.insert(4);\n tree.insert(4);\n\n System.out.println(tree.isBalance());\n }", "@Test\n\tvoid testValidParentheses() {\n\t\t// Test for ValidParentheses\n\t\tValidParentheses tester = new ValidParentheses();\n\t\tassertTrue(tester.isValid(\"()\"));\n\t\tassertTrue(tester.isValid(\"()[]{}\"));\n\t\tassertFalse(tester.isValid(\"(]\"));\n\t\tassertFalse(tester.isValid(\"([)]\"));\n\t\tassertTrue(tester.isValid(\"{[]}\"));\n\t\tassertFalse(tester.isValid(\"{\"));\n\t\t\n\t\t// Test for ValidParentheses2\n\t\tValidParentheses2 tester2 = new ValidParentheses2();\n\t\tassertTrue(tester2.isValid(\"()\"));\n\t\tassertTrue(tester2.isValid(\"()[]{}\"));\n\t\tassertFalse(tester2.isValid(\"(]\"));\n\t\tassertFalse(tester2.isValid(\"([)]\"));\n\t\tassertTrue(tester2.isValid(\"{[]}\"));\n\t\tassertFalse(tester2.isValid(\"{\"));\n\t\t\n\t\t// Test for ValidParentheses2\n\t\tValidParentheses3 tester3 = new ValidParentheses3();\n\t\tassertTrue(tester3.isValid(\"()\"));\n\t\tassertTrue(tester3.isValid(\"()[]{}\"));\n\t\tassertFalse(tester3.isValid(\"(]\"));\n\t\tassertFalse(tester3.isValid(\"([)]\"));\n\t\tassertTrue(tester3.isValid(\"{[]}\"));\n\t\tassertFalse(tester3.isValid(\"{\"));\n\t}", "public static void main(String[] args) {\n TreeNode root = new TreeNode(3);//true\n root.left = new TreeNode(9);\n root.right = new TreeNode(20);\n root.right.left = new TreeNode(15);\n root.right.right = new TreeNode(7);\n\n // 1\n // / \\\n // 2 2\n // / \\\n // 3 3\n // / /\n // 4 4\n TreeNode root2 = new TreeNode(1);//false\n root2.left = new TreeNode(2);\n root2.right = new TreeNode(2);\n root2.left.left = new TreeNode(3);\n root2.right.right = new TreeNode(3);\n root2.left.left.left = new TreeNode(4);\n root2.right.right.left = new TreeNode(4);\n System.out.println(new Solution().isBalanced(root2));\n }", "@Test\n public void whenSubtreeUnbalanced_isUnbalanced() {\n BinaryTree.Node n1 = new BinaryTree.Node(1);\n BinaryTree.Node n2 = new BinaryTree.Node(2);\n BinaryTree.Node n3 = new BinaryTree.Node(3);\n BinaryTree.Node n4 = new BinaryTree.Node(4);\n BinaryTree.Node n5 = new BinaryTree.Node(5);\n BinaryTree.Node n6 = new BinaryTree.Node(6);\n n1.setLeft(n2);\n n2.setLeft(n3);\n n3.setLeft(n4);\n n1.setRight(n5);\n n5.setRight(n6);\n assertFalse(BinaryTreeIsBalanced.isBalanced(new BinaryTree(n1)));\n assertFalse(BinaryTreeIsBalancedNonOO.isBalanced(n1));\n }", "public static void main(String[] args) {\n\t\tTreeNode treeNode1 = new TreeNode(15);\n\t\tTreeNode treeNode11 = new TreeNode(10);\n\t\tTreeNode treeNode12 = new TreeNode(20);\n\t\tTreeNode treeNode13 = new TreeNode(1);\n\t\tTreeNode treeNode14 = new TreeNode(11);\n\t\tTreeNode treeNode15 = new TreeNode(18);\n\t\tTreeNode treeNode16 = new TreeNode(101);\n\t\tTreeNode treeNode17 = new TreeNode(16);\n\t\tTreeNode treeNode18 = new TreeNode(19);\n\t\ttreeNode1.left = treeNode11;\n\t\ttreeNode1.right = treeNode12;\n\t\ttreeNode11.left = treeNode13;\n\t\ttreeNode11.right = treeNode14;\n\t\ttreeNode12.left = treeNode15;\n\t\ttreeNode12.right = treeNode16;\n\t\ttreeNode15.left = treeNode17;\n\t\ttreeNode15.right = treeNode18;\n\t\tSystem.out.println(balanced(treeNode15));\n\t}", "public static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tHashMap<Character, Character> map = new HashMap<>();\n\t\tmap.put('(', ')');\n\t\tmap.put('{','}');\n\t\tmap.put('[', ']');\n\t\twhile(scanner.hasNext()) {\n\t\t\tString s = scanner.next();\n\t\t\tSystem.out.println(isBalanced(s,map) ? \"true\":\"false\");\n\t\t}\n\t}", "@Override\n public String toString() {\n return printOptimalParens(1, n);\n }", "@Test\n public void whenHeightsSame_isBalanced() {\n BinaryTree.Node n1 = new BinaryTree.Node(1);\n BinaryTree.Node n2 = new BinaryTree.Node(2);\n BinaryTree.Node n3 = new BinaryTree.Node(3);\n BinaryTree.Node n4 = new BinaryTree.Node(4);\n BinaryTree.Node n5 = new BinaryTree.Node(5);\n n1.setLeft(n2);\n n2.setLeft(n3);\n n1.setRight(n4);\n n4.setRight(n5);\n assertTrue(BinaryTreeIsBalanced.isBalanced(new BinaryTree(n1)));\n assertTrue(BinaryTreeIsBalancedNonOO.isBalanced(n1));\n }", "public static void main(String[] args) {\n System.out.println(\"..............Testing Balanced Tree..............\");\n {\n BST bst = BST.createBST();\n printPreety(bst.root);\n\n System.out.println(\"Testing Balanced Tree Using Brute Force Approach: \" + isBalanced_BruteForce(bst.root) + \", number of subtrees traversed: \" + countWithBruteForce);\n System.out.println(\"Testing Balanced Tree Better way: \" + isBalanced_Better(bst.root) + \", number of subtrees traversed: \" + countWithBetterWay);\n System.out.println(\"Testing Balanced Tree Using Memoization: \" + isBalanced_Memoization(bst.root, new HashMap<>()) + \", number of subtrees traversed: \" + countWithMemoization);\n //System.out.println(\"Wrong algorithm:\" + isTreeAlmostBalanced(bst.root));\n }\n System.out.println();\n\n countWithBruteForce = 0;\n countWithBetterWay = 0;\n countWithMemoization = 0;\n\n System.out.println(\"..............Testing UnBalanced Tree..............\");\n {\n BST unBalancedBst = BST.createUnBalancedBST();\n printPreety(unBalancedBst.root);\n\n System.out.println(\"Testing UnBalanced Tree Using Brute Force Approach: \" + isBalanced_BruteForce(unBalancedBst.root) + \", number of subtrees traversed: \" + countWithBruteForce);\n System.out.println(\"Testing UnBalanced Tree Better way: \" + isBalanced_Better(unBalancedBst.root) + \", number of subtrees traversed: \" + countWithBetterWay);\n System.out.println(\"Testing UnBalanced Tree Using Memoization: \" + isBalanced_Memoization(unBalancedBst.root, new HashMap<>()) + \", number of subtrees traversed: \" + countWithMemoization);\n //System.out.println(\"Wrong algorithm:\" + isTreeAlmostBalanced(unBalancedBst.root));\n }\n System.out.println();\n\n countWithBruteForce = 0;\n countWithBetterWay = 0;\n countWithMemoization = 0;\n\n System.out.println(\"..............Testing Another UnBalanced Tree..............\");\n {\n BST anotherUnbalanced = BST.createAnotherUnBalancedBST();\n printPreety(anotherUnbalanced.root);\n\n System.out.println(\"Testing another UnBalanced Tree Using Brute Force Approach: \" + isBalanced_BruteForce(anotherUnbalanced.root) + \", number of subtrees traversed: \" + countWithBruteForce);\n System.out.println(\"Testing another UnBalanced Tree Better way: \" + isBalanced_Better(anotherUnbalanced.root) + \", number of subtrees traversed: \" + countWithBetterWay);\n System.out.println(\"Testing another UnBalanced Tree Using Memoization: \" + isBalanced_Memoization(anotherUnbalanced.root, new HashMap<>()) + \", number of subtrees traversed: \" + countWithMemoization);\n }\n\n }", "@Test\n public void whenTreeIsFull_isBalanced() {\n BinaryTree.Node n1 = new BinaryTree.Node(1);\n BinaryTree.Node n2 = new BinaryTree.Node(2);\n BinaryTree.Node n3 = new BinaryTree.Node(3);\n n1.setLeft(n2);\n n1.setRight(n3);\n assertTrue(BinaryTreeIsBalanced.isBalanced(new BinaryTree(n1)));\n assertTrue(BinaryTreeIsBalancedNonOO.isBalanced(n1));\n }", "private String toStringBody(int depth) {\n if (depth <= 1) return \"\";\n\n String ret;\n if (operator == null) {\n ret = \"\\nOperator: null\";\n }\n else {\n ret = \"\\nOperator: \" + operator.getName().toString() + \" \"\n + operator.getUid() + \" \";\n }\n\n if (unboundedBoundSymbols!=null && unboundedBoundSymbols.length > 0) {\n ret += \"\\nUnbounded bound symbols: \";\n for (int i = 0; i < unboundedBoundSymbols.length; i++) {\n ret += Strings.indent(2,unboundedBoundSymbols[i].toString(depth-1));\n }\n }\n\n if (boundedBoundSymbols != null && boundedBoundSymbols.length > 0) {\n ret += \"\\nBounded bound symbols: \" + getNumberOfBoundedBoundSymbols();\n for (int i = 0; i < boundedBoundSymbols.length; i++) {\n if (boundedBoundSymbols[i] != null && boundedBoundSymbols[i].length > 0) {\n for (int j = 0; j < boundedBoundSymbols[i].length; j++) {\n ret += Strings.indent(2, \"\\n[\" + i + \",\" + j + \"]\" +\n Strings.indent(2,boundedBoundSymbols[i][j].toString(depth-1)));\n }\n }\n }\n }\n\n if (ranges.length > 0) {\n ret += \"\\nRanges: \";\n for (int i = 0; i < ranges.length; i++)\n ret += Strings.indent(2,(ranges[i] != null ?\n ranges[i].toString(depth-1) : \"null\" ));\n }\n\n if (tupleOrs != null && tupleOrs.length > 0 /* && tupleOrs[0] */) {\n ret += \"\\nTupleOrs: \";\n for (int i = 0; i < tupleOrs.length; i++) {\n ret += Strings.indent(2, (tupleOrs[i] ? \"\\ntrue\" : \"\\nfalse\"));\n }\n }\n\n if (operands != null) {\n if (operands.length > 0) {\n ret += \"\\nOperands: \" + operands.length;\n for (int i = 0; i < operands.length; i++) {\n ret += Strings.indent(2,\n (operands[i] == null ? \"\\nnull\" : operands[i].toString(depth-1)));\n }\n }\n }\n else {\n ret += \"\\nOperands: null\";\n }\n return Strings.indent(2, ret);\n }", "@Test\r\n public void test() {\r\n assertEquals(Arrays.asList(\"()()()\", \"(())()\"), removeInvalidParentheses(\"()())()\"));\r\n assertEquals(Arrays.asList(\"(a)()()\", \"(a())()\"), removeInvalidParentheses(\"(a)())()\"));\r\n assertEquals(Arrays.asList(\"\"), removeInvalidParentheses(\")(\"));\r\n }", "@Test\n public void generate_correctOrderOfPrecedenceWithParentheses() throws Exception {\n ConditionGenerator conditionGenerator = initGenerator(PREFIX_TAG_TOKEN, STRING_ONE_TOKEN, OR_TOKEN,\n LEFT_PAREN_TOKEN, PREFIX_TAG_TOKEN, STRING_TWO_TOKEN, AND_TOKEN, PREFIX_TAG_TOKEN, STRING_THREE_TOKEN,\n RIGHT_PAREN_TOKEN, EOF_TOKEN);\n Predicate<Coin> condition = conditionGenerator.generate();\n\n assertFalse(condition.test(COIN_0));\n assertFalse(condition.test(COIN_1));\n assertFalse(condition.test(COIN_2));\n assertTrue(condition.test(COIN_3));\n assertTrue(condition.test(COIN_4));\n assertTrue(condition.test(COIN_5));\n assertTrue(condition.test(COIN_6));\n assertTrue(condition.test(COIN_7));\n }", "public void printBST(int[] myArray) {\n createArray(root, 1, myArray);\n\n System.out.println(\" \" + checkString(myArray[1]));\n System.out.println(\" \" + \" |\");\n System.out.println(\" \" + checkString(myArray[2]) + \"----------------------------------------\" + \" ^ \" + \"----------------------------------------\" + checkString(myArray[3]));\n System.out.println(\" \" + \" |\" + \" \" + \" |\");\n System.out.println(\" \" + checkString(myArray[4]) + \"----------------\" + \" ^ \" + \"----------------\" + checkString(myArray[5]) + \" \" + checkString(myArray[6]) + \"----------------\" + \" ^ \" + \"----------------\" + checkString(myArray[7]));\n System.out.println(\" \" + \" |\" + \" \" + \" |\" + \" \" + \" |\" + \" \" + \" |\");\n System.out.println(\" \" + checkString(myArray[8]) + \"---------\" + \" ^ \" + \"---------\" + checkString(myArray[9]) + \" \" + checkString(myArray[10]) + \"----------\" + \" ^ \" + \"----------\" + checkString(myArray[11]) + \" \" + checkString(myArray[12]) + \"---------\" + \" ^ \" + \"---------\" + checkString(myArray[13]) + \" \" + checkString(myArray[14]) + \"----------\" + \" ^ \" + \"----------\" + checkString(myArray[15]));\n System.out.println(\" \" + \"|\" + \" \" + \"|\" + \" \" + \"|\" + \" \" + \"|\" + \" \" + \"|\" + \" \" + \"|\" + \" \" + \"|\" + \" \" + \"|\");\n System.out.println(\" \" + checkString(myArray[16]) + \"--\" + \"^\" + \"--\" + checkString(myArray[17]) + \" \" + checkString(myArray[18]) + \"--\" + \"^\" + \"--\" + checkString(myArray[19]) + \" \" + checkString(myArray[20]) + \"--\" + \"^\" + \"--\" + checkString(myArray[21]) + \" \" + checkString(myArray[22]) + \"--\" + \"^\" + \"--\" + checkString(myArray[23]) + \" \" + checkString(myArray[24]) + \"--\" + \"^\" + \"--\" + checkString(myArray[25]) + \" \" + checkString(myArray[26]) + \"--\" + \"^\" + \"--\" + checkString(myArray[27]) + \" \" + checkString(myArray[28]) + \"--\" + \"^\" + \"--\" + checkString(myArray[29]) + \" \" + checkString(myArray[30]) + \"--\" + \"^\" + \"--\" + checkString(myArray[31]));\n }", "private void helper(StringBuilder curSb, int n, int ob, int cb){\n if(curSb.length()==2*n){\n result.add(curSb.toString());\n return;\n }\n // add open paranthese only if they are less than the max allowed\n if (ob<n){\n curSb.append('(');\n helper(curSb, n, ob+1, cb);\n curSb.deleteCharAt(curSb.length() - 1);\n }\n // add close parantheses only if they are less than the current open parentheses \n if (cb<ob){\n curSb.append(')');\n helper(curSb, n, ob, cb+1);\n curSb.deleteCharAt(curSb.length() - 1);\n }\n }", "public boolean isBalanced(BinaryTree root) {\n int result;\n result = subTreeBalance(root);\n\n if (result == -1) {\n System.out.println(\"The tree is not balanced.\");\n return false;\n } else {\n System.out.println(\"The tree is balanced.\");\n return true;\n }\n }", "static String isBalanced(String s) \n {\n Checker checker = new Checker();\n return checker.isBalanced(s);\n }", "@Test\n public void generate_correctOrderOfPrecedenceWithoutParentheses() throws Exception {\n ConditionGenerator conditionGenerator = initGenerator(PREFIX_TAG_TOKEN, STRING_ONE_TOKEN, OR_TOKEN,\n PREFIX_TAG_TOKEN, STRING_TWO_TOKEN, AND_TOKEN, PREFIX_TAG_TOKEN, STRING_THREE_TOKEN, EOF_TOKEN);\n Predicate<Coin> condition = conditionGenerator.generate();\n\n assertFalse(condition.test(COIN_0));\n assertFalse(condition.test(COIN_1));\n assertFalse(condition.test(COIN_2));\n assertTrue(condition.test(COIN_3));\n assertFalse(condition.test(COIN_4));\n assertTrue(condition.test(COIN_5));\n assertFalse(condition.test(COIN_6));\n assertTrue(condition.test(COIN_7));\n }", "private boolean isValid(char[] combinations) {\n\t\tint balance = 0;\n\t\tfor (char c : combinations) {\n\t\t\tif (c == '(') {\n\t\t\t\tbalance++;\n\t\t\t} else {\n\t\t\t\tbalance--;\n\t\t\t\tif (balance < 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn balance == 0;\n\t}", "public static void main(String[] args) {\n\n\t\t BinaryTreeBalanced tree = new BinaryTreeBalanced();\n\t\t\n\t\t tree.root = new Node(3);\n\t tree.root.left = new Node(1);\n\t tree.root.right = new Node(5);\n\t tree.root.left.left = new Node(0);\n\t tree.root.left.right = new Node(2);\n\t tree.root.right.left = new Node(4);\n\t tree.root.right.right = new Node(6);\n\t tree.root.right.right.right = new Node(7);\n\t tree.root.right.right.right.right = new Node(10);\n\t \n\t int leftTree = findLeftRight(root.left);\n\t int rightTree = findLeftRight(root.right);\n\t \n\t \n\t if(Math.abs(rightTree) - Math.abs(leftTree) <= 1){\n\t \t\t System.out.println(\"binary tree is balanced\");\n\t \t }\n\t else\n\t \t System.out.println(\"binary tree is not balanced\");\n\t \n\t}", "public String evaluate(String statement) {\n // TODO: Implement the logic here\n\n if (statement == null | statement == \"\"){\n return null;\n }\n\n String addition = \"+\";\n String substraction = \"-\";\n String multiplication = \"*\";\n String division = \"/\";\n String leftbracket = \"(\";\n String rightbracket = \")\";\n\n Stack<String> temporaryStack = new Stack<>();\n Stack<String> inputStack = new Stack<>();\n Stack<String> outputStack = new Stack<>();\n Stack<String> stackOperators = new Stack<>();\n Stack<String> reverseStack = new Stack<>();\n Stack<Double> computingStack = new Stack<>();\n\n String crutch = \"crutch\";\n stackOperators.push(crutch);\n inputStack.push(crutch);\n\n Double leftNumber;\n Double rightNumber;\n Double outResult;\n int stackCounter = 1;\n int reverseCounter = 0;\n\n String solution;\n\n if (statement.contains(\",\") | statement.contains(\"..\") | statement.contains(\"//\")| statement.contains(\"**\") | statement.contains(\"++\") |\n statement.contains(\"--\")) {\n return null;\n }\n\n//преобразование выражения в обратную польскую нотацию\n StringTokenizer stTok = new StringTokenizer(statement, \"+-*/()\", true);\n while (stTok.hasMoreTokens()) {\n temporaryStack.push(stTok.nextToken());\n stackCounter++;\n }\n while (!temporaryStack.isEmpty()){\n inputStack.push(temporaryStack.peek());\n temporaryStack.pop();\n }\n\n for (int i=1; i<stackCounter; i++){\n if (Character.isDigit(inputStack.peek().charAt(0))){\n outputStack.push(inputStack.peek());\n inputStack.pop();\n }\n else if (stackOperators.peek().equals(crutch) && (inputStack.peek().equals(addition) |\n inputStack.peek().equals(substraction) | inputStack.peek().equals(multiplication) |\n inputStack.peek().equals(division))){\n stackOperators.push(inputStack.peek());\n inputStack.pop();\n }\n else if (inputStack.peek().equals(addition) | inputStack.peek().equals(substraction)){\n while (stackOperators.peek().equals(addition) | stackOperators.peek().equals(substraction) |\n stackOperators.peek().equals(multiplication) | stackOperators.peek().equals(division)){\n outputStack.push(stackOperators.peek());\n stackOperators.pop();\n }\n stackOperators.push(inputStack.peek());\n inputStack.pop();\n }\n else if (inputStack.peek().equals(multiplication) | inputStack.peek().equals(division)){\n while (stackOperators.peek().equals(multiplication) | stackOperators.peek().equals(division)){\n outputStack.push(stackOperators.peek());\n stackOperators.pop();\n }\n stackOperators.push(inputStack.peek());\n inputStack.pop();\n }\n else if (inputStack.peek().equals(leftbracket)){\n stackOperators.push(inputStack.peek());\n inputStack.pop();\n }\n else if (inputStack.peek().equals(rightbracket)){\n while (!stackOperators.peek().equals(leftbracket)){\n outputStack.push(stackOperators.peek());\n stackOperators.pop();\n }\n if (stackOperators.peek().equals(crutch)){\n return null;\n }\n inputStack.pop();\n stackOperators.pop();\n }\n }\n while (!stackOperators.peek().equals(crutch)){\n if (stackOperators.peek().equals(leftbracket) | stackOperators.peek().equals(rightbracket)){\n return null;\n } else {\n outputStack.push(stackOperators.peek());\n stackOperators.pop();\n }\n\n }\n while (!outputStack.isEmpty()){\n reverseStack.push(outputStack.peek());\n outputStack.pop();\n reverseCounter++;\n }\n\n//вычисление выражения\n for (int i=0; i<reverseCounter; i++){\n if (Character.isDigit(reverseStack.peek().charAt(0))) {\n computingStack.push(Double.parseDouble(reverseStack.peek()));\n }\n else if (reverseStack.peek().equals(addition)){\n rightNumber = computingStack.peek();\n computingStack.pop();\n leftNumber = computingStack.peek();\n computingStack.pop();\n outResult = leftNumber + rightNumber;\n computingStack.push(outResult);\n }\n else if (reverseStack.peek().equals(substraction)){\n rightNumber = computingStack.peek();\n computingStack.pop();\n leftNumber = computingStack.peek();\n computingStack.pop();\n outResult = leftNumber - rightNumber;\n computingStack.push(outResult);\n }\n else if (reverseStack.peek().equals(multiplication)){\n rightNumber = computingStack.peek();\n computingStack.pop();\n leftNumber = computingStack.peek();\n computingStack.pop();\n outResult = leftNumber * rightNumber;\n computingStack.push(outResult);\n }\n else if (reverseStack.peek().equals(division)){\n rightNumber = computingStack.peek();\n computingStack.pop();\n leftNumber = computingStack.peek();\n computingStack.pop();\n if (rightNumber!=0){\n outResult = leftNumber / rightNumber;\n computingStack.push(outResult);\n } else\n return null;\n }\n reverseStack.pop();\n }\n\n DecimalFormat myFormatter = new DecimalFormat(\"#.####\");\n String format = myFormatter.format(computingStack.peek());\n\n solution = format.replace( ',', '.');\n\n return solution;\n }", "public static void main(String[] args) {\n\t\tBalst bl=new Balst();\r\n\t\tSystem.out.println(bl.balancedString(\"QQQQ\"));\r\n\t\t\r\n\t}", "public static void countAllPossibleParentheses(int open,int close,String str,int[] count) {\n\n if (open == 0 && close == 0) {\n System.out.println(str);\n count[0]++;\n }\n if (open > close)\n return;\n\n if (open > 0)\n countAllPossibleParentheses(open-1,close,str+\"(\",count);\n if (close > 0)\n countAllPossibleParentheses(open,close-1,str+\")\", count);\n }", "private boolean isPair(StringBuilder input) {\n\t\tboolean isPair = false;\n\t\tStack<String> balancedStack = new Stack<String>();\n\t\t\n\t\tfor(int i = 0; i < input.length(); i++)\n\t\t{\n\t\t\tif(input.charAt(i) =='(')\n\t\t\t{\n\t\t\t\tchar tempVal = input.charAt(i);\n\t\t\t\tbalancedStack.push(Character.toString(tempVal));\n\t\t\t}\n\t\t\telse if(input.charAt(i) ==')')\n\t\t\t{\n\t\t\t\tbalancedStack.pop();\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(balancedStack.empty() == true)\n\t\t{\n\t\t\tisPair = true;\n\t\t}\n\t\t\n\t\treturn isPair;\n\t}", "public static void main(String[] args) {\n\t\tList<String> result = new ArrayList<>();\n\t\tresult = validParentheses(3, 2, 2);\n\t\tfor (String str : result) {\n\t\t\tSystem.out.println(str);\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tSU.ll(\"123. Best Time to Buy and Sell Stock III\");\n//\t\tString str = \"()()\";\n\t\tString str = \"))()(()()))\";\n\t\tSystem.out.println(\"\" + longestValidParentheses(str));\n\t\tString str2 = \" ) )a ( b ) ( c( )(d )+ -) ) \";\n\t\tSystem.out.println(\"\" + longestValidParentheses2(str2));\n\t}", "private static void barGraphPrinter(double total, double remaining) {\n int ratioBase = 58;\n int ratio = (int) Math.ceil((remaining / total) * ratioBase);\n System.out.println(REPRESENTATION_MSG);\n System.out.print(\"\\t\" + LEFT_BRACKET);\n for (int i = 0; i < ratio; i++) {\n System.out.print(X);\n }\n for (int i = ratio; i < 58; i++) {\n System.out.print(SPACE);\n }\n System.out.println(RIGHT_BRACKET);\n }", "public static void main(String[] args) {\n\r\n\t\t\r\n\t\t\r\n\t\tString BETTEST = \"/+8*62-9*43\";\r\n\r\n\r\n\t\tBinaryExpressionTree<String>listBET = new BinaryExpressionTree<String>();\r\n\r\n\t\tfor (int i = 0; i < BETTEST.length(); i++) {\r\n\t\t\t\r\n\t\t\tlistBET.add(\"\" + BETTEST.charAt(i));\t\t\t\r\n\t\t}\r\n\r\n\r\n\t\tSystem.out.println(\"\\nPreOrder Traversal\");\r\n\t\tlistBET.PreorderTraversal();\r\n\t\tSystem.out.println(\"\\nPostOrder Traversal\");\r\n\t\tlistBET.PostorderTraversal();\r\n\r\n\r\n\t\t String BETTEST2 =\"/+84*32\";\r\n\t\t \r\n\t\t BinaryExpressionTree<String>listBET2 = new BinaryExpressionTree<String>();\r\n\t\t\r\n\t\t for (int i = 0; i < BETTEST2.length(); i++) {\r\n\t\t\t\t\r\n\t\t\t\tlistBET2.add(\"\" + BETTEST2.charAt(i));\t\r\n\t\t\r\n\t\r\n\t}\r\n\t\t\tSystem.out.println(\"\\nPreOrder Traversal\");\r\n\t\t\tlistBET2.PreorderTraversal();\r\n\t\t\tSystem.out.println(\"\\nPostOrder Traversal\");\r\n\t\t\tlistBET2.PostorderTraversal();\r\n\t\t\t\r\n String BETTEST3 =\"*-92/31\";\r\n\t\t \r\n\t\t BinaryExpressionTree<String>listBET3 = new BinaryExpressionTree<String>();\r\n\t\t\r\n\t\t for (int i = 0; i < BETTEST3.length(); i++) {\r\n\t\t\t\t\r\n\t\t\t\tlistBET3.add(\"\" + BETTEST3.charAt(i));\t\r\n\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t}\r\n\t\t System.out.println(\"\\nPreOrder Traversal\");\r\n\t\t\tlistBET3.PreorderTraversal();\r\n\t\t\tSystem.out.println(\"\\nPostOrder Traversal\");\r\n\t\t\t\r\n\t\t\tlistBET3.PostorderTraversal();\r\n \r\n\t\t\tString BETTEST4 =\"-/*8043\";\r\n\t\t \r\n\t\t BinaryExpressionTree<String>listBET4 = new BinaryExpressionTree<String>();\r\n\t\t\r\n\t\t for (int i = 0; i < BETTEST4.length(); i++) {\r\n\t\t\t\t\r\n\t\t\t\tlistBET4.add(\"\" + BETTEST4.charAt(i));\t\r\n\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\r\n\t}\r\n\t\t\tSystem.out.println(\"\\nPreOrder Traversal\");\r\n\t\t\tlistBET4.PreorderTraversal();\r\n\t\t\tSystem.out.println(\"\\nPostOrder Traversal\");\r\n\t\t\tlistBET4.PostorderTraversal();\r\n}", "public static void main(String[] args) {\n int n = 1;\n System.out.println(\"With 1:\");\n createParenthesis(n*2, 0, \"\");\n System.out.println(\"With 2:\");\n n = 2;\n createParenthesis(n*2, 0, \"\");\n System.out.println(\"With 3:\");\n n = 3;\n createParenthesis(n*2, 0, \"\");\n System.out.println(\"With 4:\");\n n = 4;\n createParenthesis(n*2, 0, \"\");\n System.out.println(\"With 10:\");\n n = 10;\n createParenthesis(n*2, 0, \"\");\n }", "private boolean syntaxOkay(String in){\n\t\tint numOpenBraces = 0;\n\t\tint numCloseBraces = 0;\n\t\tint countQuote = 0;\n\t\tfor(int i = 0; i < in.length(); i++){\n\t\t\tchar currentChar = in.charAt(i);\n\t\t\tif(currentChar == '{'){\n\t\t\t\tint open = i;\n\t\t\t\tnumOpenBraces++;\n\t\t\t}else if(currentChar == '}'){\n\t\t\t\tint close = i;\n\t\t\t\tnumCloseBraces++;\n\t\t\t}else if(currentChar == '\"'){\n\t\t\t\tcountQuote++;\n\t\t\t}\n\t\t}\n\t\treturn numOpenBraces == numCloseBraces && countQuote % 2 == 0;\n\t}", "@Test\n\tvoid testLongestValidParentheses() {\n\t\tassertEquals(2, new LongestValidParentheses().longestValidParentheses(\"(()\"));\n\t\tassertEquals(4, new LongestValidParentheses().longestValidParentheses(\")()())\"));\n\t\tassertEquals(0, new LongestValidParentheses().longestValidParentheses(\"\"));\n\t\tassertEquals(0, new LongestValidParentheses().longestValidParentheses(\"(\"));\n\t\tassertEquals(0, new LongestValidParentheses().longestValidParentheses(\")\"));\n\t\tassertEquals(2, new LongestValidParentheses().longestValidParentheses(\"()\"));\n\t\tassertEquals(2, new LongestValidParentheses().longestValidParentheses(\"()(()\"));\n\t\tassertEquals(22, new LongestValidParentheses().longestValidParentheses(\"((((((())))(()))()))())\"));\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\twhile(sc.hasNext()){\r\n\t\t\tString str = sc.nextLine();\r\n\t\t\tStack<String> digit = new Stack<>();\r\n\t\t\tStringBuffer buffer = new StringBuffer();\r\n\t\t\tchar ch;\r\n\t\t\tboolean isHasOperator = false;\r\n\t\t\tboolean isLegal = true;\r\n\t\t\tint len = str.length();\r\n\t\t\tint i = 0;\r\n\t\t\twhile(i<len){\r\n\t\t\t\tch = str.charAt(i);\r\n\t\t\t\tswitch (ch) {\r\n\t\t\t\tcase '[':\r\n\t\t\t\tcase '{':\r\n\t\t\t\tcase '(':\r\n\t\t\t\tcase '+':\r\n\t\t\t\tcase '-':\r\n\t\t\t\tcase '*':\r\n\t\t\t\tcase '/':\r\n\t\t\t\t\tdigit.push(ch+\"\");\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase ']':\r\n\t\t\t\tcase '}':\r\n\t\t\t\tcase ')':\r\n\t\t\t\t\tString second = null;\r\n\t\t\t\t\twhile(digit.size()>1){\r\n\t\t\t\t\t\t//!digit.peek().equals(\"{\")&&!digit.peek().equals(\"[\")&&!digit.peek().equals(\"(\")\r\n\t\t\t\t\t\tif(!digit.peek().equals(\"{\")&&!digit.peek().equals(\"[\")&&!digit.peek().equals(\"(\")&&!digit.peek().equals(\")\")\r\n\t\t\t\t\t\t\t\t&&!digit.peek().equals(\"]\")&&!digit.peek().equals(\"}\")&&!digit.peek().equals(\"+\")&&!digit.peek().equals(\"-\")&&!digit.peek().equals(\"*\")&&!digit.peek().equals(\"/\")){\r\n\t\t\t\t\t\t\tsecond = digit.pop();\r\n\t\t\t\t\t\t\tif (digit.size()>0&&(digit.peek().equals(\"+\")||digit.peek().equals(\"-\")||digit.peek().equals(\"*\")||digit.peek().equals(\"/\"))) {\r\n\t\t\t\t\t\t\t\tisHasOperator = true;\r\n\t\t\t\t\t\t\t\tdigit.pop();\r\n\t\t\t\t\t\t\t\tif (digit.size()>0) {\r\n\t\t\t\t\t\t\t\t\tsecond = digit.pop();\r\n\t\t\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\t\t\tisLegal = false;\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\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tisLegal = false;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tString first = digit.pop();\r\n\t\t\t\t\t\tif (digit.size()>0&&!digit.peek().equals(\"{\")&&!digit.peek().equals(\"[\")&&!digit.peek().equals(\"(\")) {\r\n\t\t\t\t\t\t\tif (digit.peek().equals(\"+\")||digit.peek().equals(\"-\")||digit.peek().equals(\"*\")||digit.peek().equals(\"/\")) {\r\n\t\t\t\t\t\t\t\tisHasOperator = true;\r\n\t\t\t\t\t\t\t\tdigit.pop();\r\n\t\t\t\t\t\t\t\tif (isHasOperator&&!digit.peek().equals(\"{\")&&!digit.peek().equals(\"[\")&&!digit.peek().equals(\"(\")&&!digit.peek().equals(\")\")\r\n\t\t\t\t\t\t\t\t\t\t&&!digit.peek().equals(\"]\")&&!digit.peek().equals(\"}\")&&!digit.peek().equals(\"+\")&&!digit.peek().equals(\"-\")&&!digit.peek().equals(\"*\")&&!digit.peek().equals(\"/\")) {\r\n\t\t\t\t\t\t\t\t\tsecond = digit.pop();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (second==null) {\r\n\t\t\t\t\t\tisLegal = false;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tdigit.pop();\r\n\t\t\t\t\t\tdigit.push(second);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbuffer.append(ch);\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\twhile(i<len&&ch!='+'&&ch!='-'&&ch!='*'&&ch!='/'&&ch!='['&&ch!='{'&&ch!='('&&ch!=')'&&ch!=']'&&ch!='}'){\r\n\t\t\t\t\t\tch = str.charAt(i);\r\n\t\t\t\t\t\tbuffer.append(ch);\r\n\t\t\t\t\t\ti++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdigit.push(buffer.toString());\r\n\t\t\t\t\tbuffer.setLength(0);\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif (!isLegal) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (digit.size()==1&&!digit.peek().equals(\"{\")&&!digit.peek().equals(\"[\")&&!digit.peek().equals(\"(\")) {\r\n\t\t\t\t\r\n\t\t\t}else {\r\n\t\t\t\tisLegal = false;\r\n\t\t\t}\r\n\t\t\tSystem.out.println(isLegal);\r\n\t\t}\r\n\t}", "private void helper(StringBuilder sb, List<String> result, \n int n, int left, int right) {\n if (left == n && right == n) { // base case: left and right parentheses used out\n result.add(sb.toString());\n return;\n }\n \n // case 1: still have left parenthesis left, add '('\n if (left <= n) {\n sb.append('(');\n helper(sb, result, n, left + 1, right);\n sb.deleteCharAt(sb.length() - 1);\n }\n \n // case 2: still have left parenthesis need to be matched, add ')'\n if (left > right) {\n sb.append(')');\n helper(sb, result, n, left, right + 1);\n sb.deleteCharAt(sb.length() - 1);\n }\n }", "public int longestValidParenthesesBrute(String s) {\n Stack<Integer> stack = new Stack<>();\n stack.push(-2);\n\n for (int i = 0; i < s.length(); i++) {\n if (s.charAt(i) == '(') {\n stack.push(-1);\n } else if (s.charAt(i) == ')') {\n int count = 0;\n while (true) {\n int len = stack.pop();\n if (len == -1) {\n count += 2;\n stack.push(count);\n break;\n } else if (len == -2) {\n stack.push(-2);\n if (count > 0) {\n stack.push(count);\n stack.push(-2);\n } else {\n stack.push(-2);\n }\n break;\n } else {\n count += len;\n }\n }\n }\n }\n int maxLength = 0;\n int count = 0;\n while (!stack.empty()) {\n int len = stack.pop();\n if (len == -2 || len == -1) {\n maxLength = Math.max(maxLength, count);\n count = 0;\n } else {\n count += len;\n }\n }\n\n return Math.max(maxLength, count);\n }", "public static void main(String[] args) {\n\t\tString s = \"((({}{}[])))\";\n\t\tValidBrackets vb = new ValidBrackets();\n\t\tSystem.out.println(vb.isValid(s));\n\t\t\n\t}", "private String printOptimalParens(int i, int j) {\n if (i == j) {\n return \"A[\" + i + \"]\";\n } else {\n return \"(\" + printOptimalParens(i, s[i][j])\n + printOptimalParens(s[i][j] + 1, j) + \")\";\n }\n }", "public boolean isBalanced(TreeNode root) {\n if(root == null) return true;\n \n //key is node, value is height of subtree rooted at this node\n HashMap<TreeNode, Integer> hs = new HashMap<TreeNode, Integer>();\n \n Stack<TreeNode> stack = new Stack<TreeNode>();\n stack.push(root);\n \n while(!stack.isEmpty()){\n //check next node in scope. We may have done both subtrees or only one subtree of this scope\n //so we firstly use peek() and use hashMap to decide next step, then decide whether pop it out\n TreeNode curr = stack.peek();\n \n if( (curr.left == null || hs.containsKey(curr.left)) && (curr.right == null || hs.containsKey(curr.right)) ){\n //if we have done both subtrees, then we need to check if subtree rooted at this node is balanced\n int l = curr.left == null? 0 : hs.get(curr.left);\n int r = curr.right == null? 0 : hs.get(curr.right);\n \n //if it is imbalanced, then return false directly\n if(Math.abs(l - r) > 1 ) return false;\n \n //otherwise update info in the HashMap, and pop it out\n hs.put(curr, Math.max(l, r) + 1);\n stack.pop();\n }else{\n \n if(curr.left != null && !hs.containsKey(curr.left) ){\n //if we have left subtree, but not visit it before, then start visit it\n stack.push(curr.left);\n }else{\n //if we dont have left subtree, or we have visited left subtree, then we need to start\n //visit right subtree\n stack.push(curr.right);\n }\n }\n }\n \n //all nodes are checked, return true\n return true;\n }", "@Test\n\tpublic void testBracketsWithoutOperators() throws BcException, IOException {\n\t\tString[] params = { \"((5)0)\" };\n\t\tbcApp.run(params, inStream, outStream);\n\t\tfail(\"Should have thrown exception but did not!\");\n\n\t}", "@Override\n\tpublic Object visit(ASTParen node, Object data) {\n\t\tSystem.out.print(\"(\");\n\t\tnode.childrenAccept(this, data);\n\t\tSystem.out.print(\")\");\n\t\treturn null;\n\t}", "public static void main(String[] args) throws IOException {\n BufferedReader f = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));\n char[] s = f.readLine().toCharArray();\n int cnt = 0;\n int other = 0;\n for(char i: s) {\n if(i == '(') {\n cnt++;\n } else if(i == ')') {\n cnt--;\n } else {\n other++;\n }\n }\n if(other > cnt) {\n out.println(-1);\n } else {\n int[] res = new int[other];\n Arrays.fill(res, 1);\n res[other-1] += cnt-other;\n int idx = 0;\n boolean flag = false;\n cnt = 0;\n for(char i: s) {\n if(i == '(') {\n cnt++;\n } else if(i == ')') {\n if(cnt == 0) {\n flag = true;\n break;\n }\n cnt--;\n } else {\n if(cnt < res[idx]) {\n flag = true;\n break;\n }\n cnt -= res[idx];\n idx++;\n }\n }\n if(flag || cnt != 0) {\n out.println(-1);\n } else {\n for(int i: res) {\n out.println(i);\n }\n }\n }\n f.close();\n out.close();\n }", "public void printStars(double rating) {\n String s = String.format(\"%.1f\", rating);\n if(rating <= 1)\n println(\"★☆☆☆☆(\" + s + \")\");\n else if(rating <= 2)\n println(\"★★☆☆☆(\" + s + \")\");\n else if(rating <= 3)\n println(\"★★★☆☆(\" + s + \")\");\n else if(rating <= 4)\n println(\"★★★★☆(\" + s + \")\");\n else\n println(\"★★★★★(\" + s + \")\");\n println();\n }", "private void assertProperExpression(String expression) throws InvalidExpressionException {\n char lastItem = '^';\n int parentheseseCount = 0;\n\n for (int i = 0; i < expression.length(); i++) {\n char item = expression.charAt(i);\n // ignore spaces\n if (item == ' ') continue;\n\n // asserts that item is digit or operator\n if (!isDigit(item) && !isOperator(item) && !isParenthesis(item))\n throw new InvalidExpressionException(\"INVALID CHARACTER\", i);\n // asserts that here are more open parentheses than closed\n if (item == '(') parentheseseCount++;\n if (item == ')') parentheseseCount--;\n if (parentheseseCount < 0)\n throw new InvalidExpressionException(\"TOO MANY CLOSING PARENTHESES\", i); \n // asserts there are never two digits in a row\n if (isDigit(lastItem) && isDigit(item))\n throw new InvalidExpressionException(\"TOO MANY DIGITS IN NUMBER\", i);\n // asserts coefficients to expressions in parentheses have astrisks: \"6(1)\" invalid\n if (isDigit(lastItem) && item == '(')\n throw new InvalidExpressionException(\"USE ASTRISK FOR MULTIPLICATION\", i);\n // asserts there are never two operators in a row, except for parentheses\n if (isOperator(lastItem) && isOperator(item))\n throw new InvalidExpressionException(\"TOO MANY OPERATORS IN A ROW\", i);\n // asserts there are no parenthesese open or closed on operators: \"+)\" or \"(+\"\n if (isOperator(lastItem) && item == ')' || lastItem == '(' && isOperator(item))\n throw new InvalidExpressionException(\"PARENTHESIS NEXT TO OPERATOR\", i);\n // asserts there are no empty parenthesis: \"()\"\n if (lastItem == '(' && item == ')')\n throw new InvalidExpressionException(\"EMPTY PARENTHESESE ARE INVALID\", i);\n // asserts the expression does not end with an operator\n if (i == expression.length()-1 && isOperator(item))\n throw new InvalidExpressionException(\"INVALID OPERATOR AT END OF EXPRESSION\", i);\n\n lastItem = item;\n }\n\n // asserts parenthesese were all closed\n if (parentheseseCount != 0)\n throw new InvalidExpressionException(\"TOO MANY OPENING PARENTHESES\");\n }", "public static void main(String[] args) {\n String s = \"(ed(et(oc))el)\";\n// String s = \"a(bcdefghijkl(mno)p)q\";\n System.out.println(reverseParentheses(s));\n }", "public static int longestValidParentheses_bf(String s) {\n if (s == null || s.length() <= 1) {\n return 0;\n }\n\n int len = s.length();\n int ans = 0;\n for (int i = 0; i < len; i++) {\n if (s.charAt(i) == ')') {\n continue;\n }\n\n for (int j = len; j >= i + 2; j--) {\n if ((j - i) % 2 == 1) {\n continue;\n }\n String subStr = s.substring(i, j);\n if (checkValid(subStr)) {\n ans = Math.max(ans, j - i);\n }\n }\n }\n\n return ans;\n }", "@Override\n public String necessaryParentheses() {\n // per il primo nodo, supponiamo che il padre abbia precedenza negativa (vedere il prossimo metodo per la\n // spiegazione)\n return necessaryParentheses(-1, false);\n }", "private static String convertToPostfix(String str) {\n Stack<Character> stack = new Stack<>();\n StringBuilder postfix = new StringBuilder();\n\n\n for (int index = 0; index < str.length(); index++) {\n char c = str.charAt(index);\n\n //if c is a digit, an algebraic variable, a dot, or blank (String formatting helper) it is added to\n //the postfix expression\n if ( Character.isLetterOrDigit(c) || c == '.' || c == ' ' ) {\n postfix.append(c);\n\n //if c is a left parenthesis it is added to the stack and a blank (string format helper) is appended\n //to postfix expression.\n } else if ( c == '(' ) {\n stack.push(c);\n postfix.append(\" \");\n\n //if c is an operator the stack is pop and added to the postfix expression only if c's precedence is\n // smaller or equal to the topmost operator in the stack. Otherwise, c is just added to the stack\n } else if ( isOperator(c) ) {\n while (!stack.isEmpty() && precedence(c) <= precedence(stack.peek()) ) {\n postfix.append(stack.pop()).append(\" \");\n }\n stack.push(c);\n\n //if c is a right parenthesis and the stack is not empty, the stack is then popped and added to the\n //postfix expression until a left parenthesis is encountered. If there is no left parenthesis then an\n //exception is thrown with a misplaced parenthesis statement\n } else if ( c == ')') {\n boolean hasLeftParenthesis = false;\n while ( !stack.isEmpty() ) {\n char popped = stack.pop();\n if ( popped == '(' ) {\n hasLeftParenthesis = true;\n break;\n } else {\n postfix.append(popped).append(\" \");\n }\n }//end of inner-loop\n if ( !hasLeftParenthesis ) {\n throw new ArithmeticException(\"Misplaced parenthesis\");\n }\n }\n }//end of for-loop\n\n //If stack is not empty, the stack is then popped and added to the postfix expression. If a left parenthesis is\n //found then an exception is thrown with a misplaced parenthesis statement;\n while (!stack.isEmpty()) {\n if (stack.peek() == '(') {\n throw new ArithmeticException(\"Misplaced parenthesis\");\n }\n postfix.append(stack.pop()).append(\" \");\n }\n\n //String is trimmed, double spaces are replaced by single spaces, and returned\n return postfix.toString().trim().replaceAll(\" \", \" \");\n }", "private static String fixBrackets(String reg) {\n while (reg.contains(\"()*\"))\n reg = removeChars(reg, reg.indexOf(\"()*\"), \"()*\".length());\n\n int i = reg.indexOf(\"(\");\n do {\n if (reg.charAt(i) == '(') {\n int j = 1;\n boolean leave = false;\n boolean removeBracket = true;\n do {\n if (reg.charAt(i + j) == '(') {\n bracketStack.push(i);\n bracketRemove.push(removeBracket);\n i = i + j;\n j = 1;\n removeBracket = true;\n } else if (reg.charAt(i + j) == ')') {\n if (removeBracket) {\n if (j == 2 && reg.contains(String.valueOf(QUOTE)))\n leave = false;\n else if (j > 2 && i + j + 1 < reg.length()\n && reg.charAt(i + j + 1) == '*') {\n i = i + j + 1;\n leave = true;\n }\n if (!leave) {\n reg = removeChars(reg, i + j, 1);\n reg = removeChars(reg, i, 1);\n if (bracketStack.size() > 0) {\n i = bracketStack.pop();\n removeBracket = bracketRemove.pop();\n j = 1;\n } else\n leave = true;\n }\n } else {\n if (bracketStack.size() > 0) {\n j = i + j + 1;\n i = bracketStack.pop();\n j = j - i;\n removeBracket = bracketRemove.pop();\n } else {\n i = i + j;\n leave = true;\n }\n }\n } else if (reg.charAt(i + j) == '|' && reg.charAt(i + j - 1) != QUOTE) {\n removeBracket = false;\n j++;\n } else\n j++;\n } while (!leave);\n }\n i++;\n } while (i < reg.length());\n\n return reg;\n }", "void prettyPrint(StatePrettyPrinter pp);", "public static void main(String[] args) {\n\t\tString str = \"{}{(}))}\";\n//\t\tString str = \")\";\n\t\tint n = str.length();\n\t\tSystem.out.println(fun(str, n));\n\t}", "public boolean isBalanced() {\n\t if (checkHeight(root)==-1)\n\t \t\treturn false;\n\t \telse\n\t \t\treturn true;\n\t}", "@Test\n public void complex_isUnbalanced() {\n BinaryTree.Node n4 = new BinaryTree.Node(4);\n BinaryTree.Node n3 = new BinaryTree.Node(3);\n n3.setLeft(n4);\n\n BinaryTree.Node n6 = new BinaryTree.Node(6);\n BinaryTree.Node n7 = new BinaryTree.Node(7);\n BinaryTree.Node n5 = new BinaryTree.Node(5);\n n5.setLeft(n6);\n n5.setRight(n7);\n\n BinaryTree.Node n2 = new BinaryTree.Node(2);\n n2.setLeft(n3);\n n2.setRight(n5);\n\n BinaryTree.Node n8 = new BinaryTree.Node(8);\n BinaryTree.Node n1 = new BinaryTree.Node(1);\n n1.setLeft(n2);\n n1.setRight(n8);\n\n assertFalse(BinaryTreeIsBalanced.isBalanced(new BinaryTree(n1)));\n assertFalse(BinaryTreeIsBalancedNonOO.isBalanced(n1));\n }", "private boolean isBracketAhead() {\r\n\t\treturn expression[currentIndex] == '(' || expression[currentIndex] == ')';\r\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"1. Dialing code for Tucson, AZ: \" + 520);\r\n\t\tSystem.out.println(\"2. Dialing code for Tempe, AZ: \" + 480);\r\n\t\tSystem.out.println(\"3. It is good to be \" + 9 + 9);\r\n\t\tSystem.out.println(\"4. It is good to be \" + (9 + 9));\r\n\t\tSystem.out.println(\"5. \" + 15.0 / 4.0);\r\n\t\tSystem.out.println(\"6. \" + 15.0 / 4);\r\n\t\tSystem.out.println(\"7. \" + 15 / 4.0);\r\n\t\tSystem.out.println(\"8. \" + 15 / 4);\r\n\t\tSystem.out.println(\"9. \" + 27 % 5);\r\n\t\tSystem.out.println(\"10. \" + 43 % 11);\r\n\t\tSystem.out.println(\"11. \" + -20 % 6);\r\n\t\tSystem.out.println(\"12. \" + (11 + 7 * 4));\r\n\t\tSystem.out.println(\"13. \" + ((11 + 7) * 4));\r\n\t\tSystem.out.println(\"14. \" + (8 * 4 + 10 / 2 + 7));\r\n\t\tSystem.out.println(\"15. \" + (28 % 6 + 9 % 4));\r\n\t\tSystem.out.println(\"16. \" + ((3 + 56 % 9) / 4));\r\n\t\tSystem.out.println(\"17. \" + ((3 + 56 % 9) / 4.0));\r\n\t\tSystem.out.println(\"18. \" + (150 / 2 / 2 / 2));\r\n\t\tSystem.out.println(\"19. \" + (150.0 / 2 / 2 / 2));\r\n\t\tSystem.out.println(\"20. \" + (150 / (2 / 2) / 2));\r\n\t\tint num;\r\n\t\tnum = 4;\r\n\t\tnum = num * 3;\r\n\t\tSystem.out.println(\"21. \" + num);\r\n\t\tint ber;\r\n\t\tber = 4;\r\n\t\tber = ber / 5;\r\n\t\tSystem.out.println(\"22. \" + ber);\r\n\t\tdouble total;\r\n\t\ttotal = 67;\r\n\t\ttotal = total + 2;\r\n\t\ttotal = total * 3;\r\n\t\ttotal = total / 9.0;\r\n\t\tSystem.out.println(\"23. \" + total);\r\n\t\tdouble width;\r\n\t\twidth = 1.8;\r\n\t\twidth = (43 - width * 10);\r\n\t\twidth = width / 6;\r\n\t\tSystem.out.println(\"24. \" + width);\r\n\t\tint count;\r\n\t\tdouble frac;\r\n\t\tcount = 17;\r\n\t\tfrac = 3.0 / 4.0;\r\n\t\tfrac = count * frac;\r\n\t\tcount = ((count + 7) / 3);\r\n\t\tfrac = count + frac;\r\n\t\tSystem.out.println(\"25. \" + count);\r\n\t\tSystem.out.println(\" \" + frac);\r\n\t\t\t\t\t\r\n\t}", "public static void main(String[] args){\n String s = \"()()()\";\n System.out.println(find_max_length_of_matching_parentheses(s));\n }", "private int doCheckBrackets(String text) {\n int countLeftBracket = 0;\n int countRightBracket = 0;\n\n String[] members = text.split(\"\");\n for (int i = 0; i < members.length; i++){\n if (members[i].equals(\"(\")){\n countLeftBracket++;\n }else if (members[i].equals(\")\")){\n countRightBracket++;\n }\n }\n\n return countLeftBracket - countRightBracket;\n }", "public static void main(String[] args) {\n int n = 4;\n char[] cs = new char[8];\n printParenthesis(0, 4, 0, 0, cs);\n //System.out.println(\"012143\");\n }", "void gobble() {\n while( level > 0 &&\n !is(TK.LPAREN) &&\n !is(TK.ID) &&\n !is(TK.NUM) &&\n !is(TK.EOF) ) {\n scan();\n }\n }", "@Test\n public void complex_isBalanced() {\n BinaryTree.Node n4 = new BinaryTree.Node(4);\n BinaryTree.Node n3 = new BinaryTree.Node(3);\n n3.setLeft(n4);\n\n BinaryTree.Node n6 = new BinaryTree.Node(6);\n BinaryTree.Node n7 = new BinaryTree.Node(7);\n BinaryTree.Node n5 = new BinaryTree.Node(5);\n n5.setLeft(n6);\n n5.setRight(n7);\n\n BinaryTree.Node n2 = new BinaryTree.Node(2);\n n2.setLeft(n3);\n n2.setRight(n5);\n\n BinaryTree.Node n9 = new BinaryTree.Node(9);\n BinaryTree.Node n8 = new BinaryTree.Node(8);\n n8.setRight(n9);\n\n BinaryTree.Node n1 = new BinaryTree.Node(1);\n n1.setLeft(n2);\n n1.setRight(n8);\n\n assertTrue(BinaryTreeIsBalanced.isBalanced(new BinaryTree(n1)));\n assertTrue(BinaryTreeIsBalancedNonOO.isBalanced(n1));\n }", "public boolean validCheck(String input) {\n\n int open= 0, closed = 0; //To count number of open and closed brackets\n\n if (input.length() >= 3 && input.length() <= 20) {\n inputArray = input.toCharArray(); //Convert the string to a Char Array\n\n if(!Character.isDigit(inputArray[0])) //If the first character isn't a number, it's not valid e.g +3*6\n return false;\n\n for (int i = 0; i < inputArray.length; i++) {\n\n if(inputArray[i] == '(') //if open bracket increment the open value..\n open +=1;\n if(inputArray[i] == ')') //same but with closed bracket\n closed+=1;\n\n if(i+1 < inputArray.length){ //to avoid array index out of bounds exception\n if (Character.isDigit(inputArray[i]) && Character.isDigit(inputArray[i + 1])) { //This makes sure no double digits\n return false;\n } else if ((validOperator(inputArray[i])) && (validOperator(inputArray[i + 1]) && inputArray[i+1] != '(')){ //no 2 operators in a row BUT ok if operator and open bracket\n if(inputArray[i] != ')'){ //To allow operand after a closed bracket e.g (3+1)+2\n return false;\n }\n\n }\n }\n if (!Character.isDigit(inputArray[i]) && !validOperator(inputArray[i])) { //not a number AND not a valid operator\n return false;\n }\n }\n\n if(open!= closed){ //Make sure the all open brackets are closed\n return false;\n }\n return true;\n\n }\n\n return false;\n }", "public static void fundation(){\n Scanner keyboard = new Scanner(System.in);//Keyboard input initializer\r\n String STR; //string for yes or no\r\n System.out.println(\"Would you like to donate to LDJ bank? (y/n)\");\r\n System.out.println();\r\n System.out.printf(\">\");\r\n STR = keyboard.next(); //the user inputs y or n in order to say if they want to donate or not\r\n if(STR.equals(\"y\")){ //if they want to donate\r\n System.out.println();\r\n System.out.println(\"Insert the amount to donate\");\r\n System.out.println();\r\n System.out.printf(\"> $\");\r\n FUNDATION = keyboard.nextInt(); //the promt is printed and the amount is requested\r\n if(FUNDATION <= BALANCE){//if the amount to donate is minor to the balance you can donate\r\n FUNDATIONM = FUNDATIONM + FUNDATION; //the fundation money plus the amount to be donated\r\n BALANCE = BALANCE - FUNDATION; //the user balance minus the fundation money\r\n System.out.println(\"Thank you for donating!\");\r\n }\r\n else {\r\n System.out.println(\"Insufficient Balance\");\r\n }\r\n }\r\n else if(STR.equals(\"n\")){ //if n then prints blank\r\n System.out.println();\r\n }\r\n System.out.println(\"We'll continue with the operation\");\r\n System.out.println();\r\n System.out.println(\"Done\");\r\n }", "private static int getClosingParenPosition(MethodInvocationTree tree, VisitorState state) {\n int startPosition = ASTHelpers.getStartPosition(tree);\n if (startPosition == Position.NOPOS) {\n return Position.NOPOS;\n }\n\n return Streams.findLast(\n ErrorProneTokens.getTokens(state.getSourceForNode(tree), state.context).stream()\n .filter(t -> t.kind() == RPAREN))\n .map(token -> startPosition + token.pos())\n .orElse(Position.NOPOS);\n }", "private void checkBalance(Node n) {\n if (n == mRoot) { // case 1: new node is root.\n n.mIsRed = false; // Paint it black.\n }\n // Case 2: Parent is black...\n else if (!n.mParent.mIsRed) {} // nothing will happen.\n // Case 3: Parent and Uncle are red.\n else if (getUncle(n).mIsRed) {\n n.mParent.mIsRed = false;\n getUncle(n).mIsRed = false; // Repaint P, U and G\n getGrandparent(n).mIsRed = true; \n checkBalance(getGrandparent(n)); // Recurse on G\n }\n // Case 4: n is LR or RL grandchild\n else if (n == getGrandparent(n).mLeft.mRight) { // n is LR\n singleRotateLeft(n.mParent); // Rotate on P\n singleRotateRight(n.mParent); // Then on G... which is now n's parent\n n.mIsRed = false; n.mRight.mIsRed = true; // Repaint G and P\n // These two lines were case 5, modified so as to not screw up.\n }\n else if (n == getGrandparent(n).mRight.mLeft) {// n is RL\n singleRotateRight(n.mParent);\n singleRotateLeft(n.mParent); // As above, reversed.\n n.mIsRed = false; n.mLeft.mIsRed = true;\n }\n // Case 5: n is LL or RR grandchild\n else if (n == getGrandparent(n).mLeft.mLeft) {// n is LL\n singleRotateRight(getGrandparent(n));\n n.mParent.mIsRed = false; // Rotate at G, repainting as above\n n.mParent.mRight.mIsRed = true;\n }\n else if (n == getGrandparent(n).mRight.mRight) { // n is RR\n singleRotateLeft(getGrandparent(n));\n n.mParent.mIsRed = false; // Same here.\n n.mParent.mLeft.mIsRed = true;\n }\n }", "private StringBuilder trailingSign(StringBuilder sb, boolean negative) {\n\t\t\tif (negative && flag.contains(Flags.PARENTHESES)) {\n\t\t\t\tsb.append(')');\n\t\t\t}\n\t\t\treturn sb;\n\t\t}", "public boolean correcto(String pars)\n {\n //><\n Stack pos= new Stack();\n ArrayList pos1= new ArrayList(2);\n ArrayList pos2= new ArrayList(2);\n for(int i=0; i<pars.length(); i++)\n {\n if(pars.charAt(i) == '(')\n {\n pos.push(i);\n }\n else if(pars.charAt(i) == ')')\n {\n if(pos.empty() == false)\n {\n pos1.add(pos.pop());\n pos1.add(i);\n }\n else\n {\n pos2.add(i);\n }\n }\n }\n \n int i=0;\n System.out.println(\"Con pareja\");\n while(i < pos1.size())\n {\n System.out.println(\"[\"+pos1.get(i)+\",\"+pos1.get(i+1)+\"]\");\n i+=2;\n }\n \n if(pos.empty()==true && pos2.isEmpty()==true)\n {\n return true;\n }\n else\n {\n System.out.println(\"\\nSin pareja\");\n if(pos.isEmpty()==false)\n {\n System.out.println(pos);\n }\n else\n {\n System.out.println(pos2);\n }\n return false;\n }\n }", "private boolean isParenthesis(char x) {\n return x == '(' || x == ')';\n }", "private void helper(StringBuilder curSb, int n, int c){\n if(curSb.length()==2*n){\n // if valid combination, add it to the result\n if (c==0) {\n result.add(curSb.toString());\n } // else, cannot proceed further, return to backtrack\n return;\n }\n // add open paranthese only if they are less than the max allowed\n if (c<n){\n curSb.append('(');\n helper(curSb, n, c+1);\n curSb.setLength(curSb.length() - 1);\n }\n // add close parantheses only if there is atleast one open parentheses\n if (c>0){\n curSb.append(')');\n helper(curSb, n, c-1);\n curSb.setLength(curSb.length() - 1);\n }\n }", "public static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint t = Integer.parseInt(br.readLine());\n\n\t\tfor (int i = 0; i < t; i++) {\n\t\t\tStack<Integer> stk = new Stack<>();\n\t\t\tString[] input = br.readLine().split(\"\");\n\t\t\tboolean wrong = false;\n\t\t\t\n\t\t\t\n\t\t\tfor (int j = 0; j <input.length; j++) {\n\t\t\t\tif(input[j].equals(\"(\"))\n\t\t\t\t\tstk.push(1);\n\t\t\t\telse if(input[j].equals(\")\")) {\n\t\t\t\t\t if(stk.isEmpty()) {\n\t\t\t\t\t\t wrong = true;\n\t\t\t\t\t\t break;\n\t\t\t\t\t }\n\t\t\t\t\t stk.pop();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(stk.isEmpty() && !wrong)\n\t\t\t\tSystem.out.println(\"YES\");\n\t\t\telse\n\t\t\t\tSystem.out.println(\"NO\");\n\t\t}\n\n\t\t\n\n\t}", "String format(double balance);", "public static boolean IsBalance(TreeNode node)\r\n\t{\r\n\t\tif(node == null)\r\n\t\t\treturn true;\r\n\t\tint leftHeight = GetHeight(node.left);\r\n\t\tint rightHeight = GetHeight(node.right);\r\n\t\t\r\n\t\tint diff = Math.abs(leftHeight - rightHeight);\r\n\t\t\r\n\t\tif(diff > 1)\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\treturn IsBalance(node.left)&& IsBalance(node.right);\r\n\t}", "@Test\n public void assertTaxBracketBoundariesWithoutPrecision() {\n BigDecimal minimumSalary = BigDecimal.ZERO;\n BigDecimal maximumSalary = new BigDecimal(10000);\n TaxBracket zeroTo10k = createTaxBracket(minimumSalary, maximumSalary);\n validateSalaryFitsWithinBracket(zeroTo10k, minimumSalary);\n validateSalaryFitsWithinBracket(zeroTo10k, maximumSalary);\n validateSalaryFitsWithinBracket(zeroTo10k, minimumSalary.add(BigDecimal.ONE));\n validateSalaryFitsWithinBracket(zeroTo10k, maximumSalary.subtract(BigDecimal.ONE));\n\n // Make sure when the bounds are breached, that the tax bracket does not apply anymore\n validateSalaryDoesNotFitWithinBracket(zeroTo10k, minimumSalary.subtract(BigDecimal.ONE));\n validateSalaryDoesNotFitWithinBracket(zeroTo10k, maximumSalary.add(BigDecimal.ONE));\n }", "private static void render(String s)\n {\n if (s.equals(\"{\"))\n {\n buf_.append(\"\\n\");\n indent();\n buf_.append(s);\n _n_ = _n_ + INDENT_WIDTH;\n buf_.append(\"\\n\");\n indent();\n }\n else if (s.equals(\"(\") || s.equals(\"[\"))\n buf_.append(s);\n else if (s.equals(\")\") || s.equals(\"]\"))\n {\n backup();\n buf_.append(s);\n buf_.append(\" \");\n }\n else if (s.equals(\"}\"))\n {\n int t;\n _n_ = _n_ - INDENT_WIDTH;\n for(t=0; t<INDENT_WIDTH; t++) {\n backup();\n }\n buf_.append(s);\n buf_.append(\"\\n\");\n indent();\n }\n else if (s.equals(\",\"))\n {\n backup();\n buf_.append(s);\n buf_.append(\" \");\n }\n else if (s.equals(\";\"))\n {\n backup();\n buf_.append(s);\n buf_.append(\"\\n\");\n indent();\n }\n else if (s.equals(\"\")) return;\n else\n {\n buf_.append(s);\n buf_.append(\" \");\n }\n }", "private boolean precedence(String input) {\n\t\tboolean complies = true;\n\t\t\n\t\tif(((input.equals(\"+\")) || (input.equals(\"-\"))) && (operationStack.empty() == false))\n\t\t{\n\t\t\tif((operationStack.peek().equals(\"*\")) || (operationStack.peek().equals(\"/\")))\n\t\t\t{\n\t\t\t\tcomplies = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn complies;\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(bb(\"{{}\"));\n\t\tSystem.out.println(bb(\"[[]\"));\n\t\tSystem.out.println(bb(\"({}[])\"));\n\t}", "public boolean isBalanced ();", "public void printBranchSubstitutions() {\n\t\tArrayList<TreeBranch> allBranches = phylogeny.getBranches();\n\t\tIterator<TreeBranch> i = allBranches.iterator();\n\t\twhile(i.hasNext()){\n\t\t\tTreeBranch someBranch = i.next();\n\t\t\tSystem.out.println(someBranch);\n\t\t\tStateComparison.printStateComparisonBetweenTwoNodes(someBranch.getParentNode().states, someBranch.getDaughterNode().states, someBranch.getParentNode().getContent(), someBranch.getDaughterNode().getContent());\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t}", "@Test\n public void ensureCompileTreeWorksAsIntended() throws Exception {\n String formula = \"#euro{2$+25$}\";\n CommonTree ast = new MonetaryExpressionCompiler().compileTree(formula);\n boolean verdict = ast.toStringTree().equals(\"(euro (+ ($ 2) ($ 25)))\");\n assertEquals(true, verdict);\n }", "public boolean isParenth(String x){\n if (x.equals(\")\") || x.equals(\"(\")){\n return true;\n }\n \n return false;\n }" ]
[ "0.72516453", "0.71085817", "0.70088285", "0.68331707", "0.6742805", "0.6414668", "0.6302725", "0.62190616", "0.6218073", "0.6213652", "0.6037073", "0.6002984", "0.59634775", "0.5949843", "0.5907058", "0.58640486", "0.58089066", "0.5797831", "0.5794589", "0.575033", "0.569029", "0.56860167", "0.56484437", "0.56476426", "0.5611248", "0.55296975", "0.54583836", "0.54499716", "0.5443775", "0.5388072", "0.53533727", "0.53197527", "0.5318846", "0.5304094", "0.53003734", "0.5284302", "0.5270434", "0.52441233", "0.5193476", "0.51853865", "0.5185244", "0.5177533", "0.5156312", "0.5148604", "0.50938994", "0.5049344", "0.5047608", "0.5000708", "0.49986103", "0.4981191", "0.49786896", "0.49772638", "0.4974366", "0.49653012", "0.49634844", "0.49554747", "0.4948519", "0.49221352", "0.4888751", "0.48754406", "0.48740983", "0.48586378", "0.48439538", "0.48383528", "0.48193374", "0.48178402", "0.48016402", "0.4794267", "0.47846723", "0.4761013", "0.47599366", "0.4757602", "0.475569", "0.4755131", "0.47509983", "0.4746123", "0.4738203", "0.4733992", "0.47253436", "0.47172415", "0.47097707", "0.47011098", "0.4697389", "0.46926177", "0.46887127", "0.4688006", "0.46857223", "0.46669844", "0.46630263", "0.46602163", "0.46600932", "0.46586934", "0.46514714", "0.46490806", "0.46452063", "0.4638219", "0.46347207", "0.46335977", "0.46324193", "0.46280676", "0.46277675" ]
0.0
-1
size MUST be 2^n; capacity is size1: at least one element MUST be empty
public IntMap(int size){ hashMask=size-1; indexMask=(size<<1)-1; data=new int[size<<1]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void ensureCapacity()\n\t{\n\t\tif (elements.length == size)\n\t\t\telements = Arrays.copyOf(elements, 2 * size + 1);\n\t}", "private void ensureCapacity() {\n\t\n\t\tif (elements.length == size) {\n\t\t\tT[] oldElements = elements;\n\t\t\t\n\t\t\telements = (T[]) new Object[2 * elements.length + 1];\n\t\t\t\n\t\t\tSystem.arraycopy(oldElements, 0, elements, 0, size);\n\t\t\n\t\t}\n\t\n\t}", "@Override\n public void ensureCapacity(int index) {\n\n }", "private void ensureCapacity() {\n\t\tif (numberOfElements == capacity) {\n\t\t\tT[] newArray = (T[])new Object[(numberOfElements+1) * CAPACITY_MULTIPLIER];\n\t\t\tSystem.arraycopy(elements,0,newArray,0,numberOfElements);\n\t\t\telements = newArray;\n\t\t}\n\t}", "public int capacity();", "public int capacity();", "int capacity();", "int capacity();", "public abstract int capacity();", "private void ensureCapacity() {\n if(size() >= (0.75 * data.length)) // size() == curSize\n resize(2 * size());\n }", "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 return size == k;\n}", "private void ensureCapacity(int capacity) {\n\t\t\tif(capacity > elementData.length) {\n\t\t\t\tint newCap = elementData.length * 2 + 1;\n\t\t\t\tif(capacity > newCap) {\n\t\t\t\t\tnewCap = capacity;\n\t\t\t\t}\n\t\t\t\telementData = Arrays.copyOf(elementData, newCap);\n\t\t\t}\n\t\t}", "private void ensureCapacity() {\n if ( top + 1 < storage.length ) {\n return;\n }\n storage = Arrays.copyOf( storage, storage.length * 2 );\n }", "private void resize(int capacity) {\r\n assert capacity >= n;\r\n Item[] temp = (Item[]) new Object[capacity];\r\n for (int i = 0; i < n; i++) {\r\n temp[i] = list[(first + i) % list.length];\r\n }\r\n list = temp;\r\n first = 0;prior=list.length-1;\r\n last = n-1;latter=n;}", "private void resize(int capacity)\r\n {\r\n assert capacity >= n;\r\n Item[] temp = (Item[]) new Object[capacity];\r\n for (int i = 0; i < n; i++)\r\n temp[i] = a[i];\r\n a = temp;\r\n }", "@Override\n public int size() {\n return this.capacity;\n }", "public void ensureCapacity(int minCapacity);", "private void ensureCapacity() {\n int newSize = elements.length * 2;\n Object[] newElements = new Object[newSize];\n for (int i = 0; i < elements.length; i++) {\n newElements[i] = elements[i];\n }\n elements = newElements;\n }", "@Override\n public boolean isFull(){\n return (count == size);\n \n }", "private void ensureCapacity(int index) {\n\t\t\tint overflow = index - list.size();\n\t\t\twhile (overflow-- >= 0) {\n\t\t\t\tlist.add(null);\n\t\t\t}\n\t\t}", "private void resize(int capacity) {\n assert capacity >= n;\n\n Item[] temp = (Item[]) new Object[capacity];\n for (int i = 0; i < n; i++) {\n temp[i] = a[i];\n }\n a = temp;\n }", "abstract protected int getCapacity();", "public int capacity() {\n\t\treturn elements.length();\n\t}", "private void checkIfArrayFull() {\n\n if(this.arrayList.length == this.elementsInArray) {\n size *= 2;\n arrayList = Arrays.copyOf(arrayList, size);\n }\n }", "private void resize(int capacity) {\n// assert capacity >= N;\n// StdOut.println(\"resize capacity:\"+ capacity);\n// StdOut.println(\"resize count:\"+ count);\n \n Item[] temp = (Item[]) new Object[capacity];\n int index = 0;\n for (int i = 0; i < N; i++) {\n if (randomizedQueue[i] != null){\n// StdOut.println(\"resize index :\"+ index);\n// StdOut.println(\"resize i :\"+ i);\n// StdOut.println(\"resize N :\"+ N);\n// StdOut.println(\"resize randomizedQueue[i] :\"+ randomizedQueue[i]);\n// StdOut.println(\"--------------------------------------------------\");\n temp[index] = randomizedQueue[i];\n index++;\n }\n }\n randomizedQueue = temp;\n }", "public int getCapacity();", "public boolean isEmpty(){ return size==0;}", "static int noValueSize() {\r\n return itemSize(false) * 2;\r\n }", "@Override\n public boolean offer(E e) {\n if(e== null || (limited && size >= length)) {\n return false;\n }\n queue[size++] = e;\n Arrays.sort(queue, comparator);\n if(size >= queue.length) {\n queueResize();\n }\n return true;\n }", "@SuppressWarnings(\"unchecked\")\n private void resize() {\n int newCap = Math.max(capacity*2, DEFAULT_CAP);\n if(size < list.length) return;\n \n Object[] temp = new Object[newCap];\n for(int i = 0; i < list.length; i++) {\n temp[i] = list[i];\n }\n list = (E[])temp;\n capacity = newCap;\n }", "@Override\r\n public boolean isEmpty() {\n return size == 0;\r\n }", "public boolean offer (E e) throws NullPointerException\n {\n if(e == null)\n {\n throw new NullPointerException();\n }\n if(size() < cap)\n {\n arrayList.add(e);\n size++;\n bubbleUp(size() - 1);\n return true;\n }\n else //doubles the cap by creating a new array.\n {\n cap = cap*2;\n ArrayList<E> newArray = new ArrayList<E>(cap);\n for(int i = 0; i < size(); i++)\n {\n newArray.add(arrayList.get(i));\n }\n arrayList = newArray;\n offer(e);\n return true;\n }\n }", "private void resize(int capacity) {// O(N)\r\n\t\tthis.capacity=capacity;\r\n\t\tE[] temp=(E[])list;\t//temporary list that stores old array\r\n\t\t//array of new required length initialized\r\n\t\tlist=new Object[this.capacity];\r\n\t\t//loop executes until all elements are copied from temp to list array\r\n\t\tfor (int i=0;i<size;i++) {\r\n\t\t\tlist[i]=temp[i];\r\n\t\t}\r\n\t}", "public boolean isFull()\n { \n return count == elements.length; \n }", "public int capacity() {\n\t\t// Report max number of elements before expansion\n\t\t// O(1)\n\t\treturn data.length;\n\t}", "private void ensureCapacity()\n {\n if (numberOfEntries >= dictionary.length - 1)\n {\n int newCapacity = 2 * dictionary.length;\n checkCapacity(newCapacity); // Is capacity too big?\n dictionary = Arrays.copyOf(dictionary, newCapacity + 1);\n } // end if\n }", "public int capacity()\r\n/* 81: */ {\r\n/* 82:116 */ ensureAccessible();\r\n/* 83:117 */ return this.array.length;\r\n/* 84: */ }", "public int size(){return n;}", "private void ensureCapacity(int len) {\n\t\tif( m_numBites + len > m_bites.length ) {\n\t\t\tbyte[] newBites = new byte[(m_bites.length + len)*2];\n\t\t\tSystem.arraycopy(m_bites, 0, newBites, 0, m_numBites);\n\t\t\tm_bites = newBites;\n\t\t}\n\t}", "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 int capacity() { return store.length; }", "private void growSize() {\n size++;\n\n if (size > maxSize) {\n if (keys.length == Integer.MAX_VALUE) {\n throw new IllegalStateException(\"Max capacity reached at size=\" + size);\n }\n\n // Double the capacity.\n rehash(keys.length << 1);\n }\n }", "@Override\n\tpublic int size() {\n\t\treturn N;\n\t}", "public boolean isFull() {\n\t\treturn(this.size == this.capacity);\n\t}", "public boolean empty() { \t \n\t\t return size <= 0;\t \n }", "public void testEmptyFull() {\n SynchronousQueue q = new SynchronousQueue();\n assertTrue(q.isEmpty());\n\tassertEquals(0, q.size());\n assertEquals(0, q.remainingCapacity());\n assertFalse(q.offer(zero));\n }", "public BetterParkingLot( int size )\n\t{\n\t\tsuper(size);\n queue = new PriorityQueue<Integer>(size);\n\n // add all available parking slots in zero-indexed form\n for(int i=0; i <= size; i++) // this is my only problem. It HAS to be O(n) here.\n queue.add(i);\n\t}", "public boolean isEmpty()\n {\n return size <= 0;\n }", "private void ensureCapacity() {\n int newLength = (this.values.length * 3) / 2 + 1;\n Object[] newValues = new Object[newLength];\n System.arraycopy(this.values, 0, newValues, 0, this.values.length);\n this.values = newValues;\n }", "public void clear() {\n\t\tthis.size = 0;\n\t\tthis.elements = new Object[capacity];\n\t}", "public boolean isFull() {\n return count == capacity;\n }", "public boolean isEmpty() { return size == 0; }", "public boolean isEmpty() { return size == 0; }", "public boolean isEmpty() { return size == 0; }", "public boolean isFull(){\n \treturn count==capacity;\n }", "public void trimToSize() {\r\n for (int i=size(); i-->0;)\r\n if (get(i)==null)\r\n remove(i);\r\n }", "@Test\r\n\tpublic void permutationsTestSize2() throws BoundedQueueException {\r\n\t\tbq.enqueue(1);\r\n\t\tbq.enqueue(2);\r\n\t\tassertEquals(\"Permutations output\",\"[[1, 2], [2, 1]]\",\tbq.permutations().toString());\r\n\t}", "@Override\n public boolean isEmpty()\n {\n return size == 0;\n }", "@Override\r\n public boolean isEmpty() {\r\n return size == 0;\r\n }", "public boolean isFull() {\n return size == cnt;\n }", "int increaseCapacity(int expectedCapacity)\r\n/* 425: */ {\r\n/* 426:456 */ int newCapacity = this.elements.length;\r\n/* 427:457 */ int maxCapacity = this.maxCapacity;\r\n/* 428: */ do\r\n/* 429: */ {\r\n/* 430:459 */ newCapacity <<= 1;\r\n/* 431:460 */ } while ((newCapacity < expectedCapacity) && (newCapacity < maxCapacity));\r\n/* 432:462 */ newCapacity = Math.min(newCapacity, maxCapacity);\r\n/* 433:463 */ if (newCapacity != this.elements.length) {\r\n/* 434:464 */ this.elements = ((Recycler.DefaultHandle[])Arrays.copyOf(this.elements, newCapacity));\r\n/* 435: */ }\r\n/* 436:467 */ return newCapacity;\r\n/* 437: */ }", "@Override\n public int size() { return size; }", "public void ensureCapacity(int capacity) {\n if (capacity > this.capacity) {\n int newSize = this.capacity + this.capacity >> 1;\n if (newSize < capacity) {\n newSize = capacity;\n }\n ArrayMapEntry<K, V>[] newArray = new ArrayMapEntry[newSize];\n int i = length;\n while (i-- > 0) {\n newArray[i] = data[i];\n }\n this.capacity = newSize;\n data = newArray;\n }\n }", "@Override\n public boolean isEmpty() {\n return size == 0;\n }", "@Override\n public boolean isEmpty() {\n return size == 0;\n }", "@Override\n public boolean isEmpty() {\n return size == 0;\n }", "@Override\n public boolean isEmpty() {\n return size == 0;\n }", "@Override\n public boolean isEmpty() {\n return size == 0;\n }", "@SuppressWarnings(\"unchecked\")\r\n\tprivate void resize(int capacity) {\r\n\t\tItem[] copy = (Item[]) new Object[capacity];\r\n\t\tfor (int i = 0; i < count; i++)\r\n\t\t\tcopy[i] = arr[i];\r\n\t\tarr = copy;\r\n\t}", "@Test\n public void testSize() {\n PriorityQueue<Integer> instance = new PriorityQueue<>();\n assertEquals(0, instance.size());\n instance.insert(1);\n instance.insert(2);\n assertEquals(2, instance.size());\n }", "@SuppressWarnings(\"unchecked\")\n\t private boolean grow() {\n\n\t /* \n\t * Add code here \n\t * Expand capacity (double it) and copy old array contents to the\n\t * new one. \n\t */\n\t\t \n\t\t capacity = (capacity*2);\n\t\t E[] new_elements = elements;\n\t\t elements = (E[])new Object[capacity];\n\t\t for(int i=0; i<new_elements.length;i++){\n\t\t\t elements[i] = new_elements[i];\n\t\t }\n\t System.out.println(\"Capacity reached. Increasing storage...\");\n\t System.out.println(\"New capacity is \" + capacity + \" elements\");\n\n\t return true;\n\t }", "private void ensureCapacityInternal(int minCapacity) {\n if (element == DEFAULTCAPACITY_EMPTY_ELEMENTDATA) {\n minCapacity = Math.max(DEFAULT_CAPACITY, minCapacity);\n }\n modCount++;\n if (minCapacity - element.length > 0) {\n // overflow-conscious code\n int oldCapacity = element.length;\n int newCapacity = oldCapacity + (oldCapacity >> 1);\n if (newCapacity - minCapacity < 0)\n newCapacity = minCapacity;\n if (newCapacity - MAX_ARRAY_SIZE > 0)\n newCapacity = hugeCapacity(minCapacity);\n // minCapacity is usually close to size, so this is a win:\n element = Arrays.copyOf(element, newCapacity);\n }\n }", "public HeapPriorityQueue(int size)\n\t{\n\t\tstorage = new Comparable[size + 1];\n\t\tcurrentSize = 0;\n\t}", "@Override\r\n\tpublic boolean isfull() {\n\t\t\r\n\t\treturn count == size ;\r\n\t}", "private void ensureCapacity(final int minCapacity) {\n // If the array becomes full, double the size\n if (capacity <= (minCapacity + 1)) {\n final int newCap = capacity * 2;\n arrayList = Arrays.copyOf(arrayList, newCap);\n capacity = newCap;\n }\n }", "public int getInitialCapacity();", "public SimpleList(int capacity) {\n this.values = new Object[capacity];\n }", "public void testFairEmptyFull() {\n SynchronousQueue q = new SynchronousQueue(true);\n assertTrue(q.isEmpty());\n\tassertEquals(0, q.size());\n assertEquals(0, q.remainingCapacity());\n assertFalse(q.offer(zero));\n }", "private boolean ifFull() {\n return items.length == size;\n }", "public int size() {\r\n assert numElements >= 0 : numElements;\r\n assert numElements <= capacity : numElements;\r\n assert numElements >= elementsByFitness.size() : numElements;\r\n return numElements;\r\n }", "private void grow() {\n capacity *= 2;\n Object[] temp = new Object[capacity];\n for (int i = 0; i < values.length; i++) temp[i] = values[i];\n values = temp;\n }", "private boolean isFull() {\n\t\treturn (size == bq.length);\n\t}", "public boolean add(ElementType element){\n if(this.contains(element)){\n return false;\n }\n else{\n if(size==capacity){\n reallocate();\n }\n elements[size]=element;\n size++;\n }\n return true;\n }", "public FixedSizeList(int capacity) {\n // YOUR CODE HERE\n }", "@SuppressWarnings(\"unchecked\") // this will stop Java complaining about the cast\n private void ensureCapacity() {\n if (count == data.length) { //if count is equal to the length of data a new array is made doubling the initial size, it then makes the data collection == to the temp collection\n E[] temp = (E[]) new String[data.length * 2]; //effectivly increasing the size of the array\n for (int i = 0; i < data.length; i++) {\n temp[i] = data[i];\n }\n data = temp;\n }\n }", "private void resize() {\n if (ifFull() || ifTooEmpty()) {\n int capacity = items.length;\n if (ifFull()) {\n capacity *= 2;\n } else if (ifTooEmpty()) {\n capacity /= 2;\n }\n Item[] newArray = (Item[]) new Object[capacity];\n int lastIndex = moveBack(nextLast, 1);\n int firstIndex = moveForward(nextFirst, 1);\n System.arraycopy(items, 0, newArray, 0, lastIndex + 1);\n int numOfReminder = size - (lastIndex + 1);\n int newFirstIndex = newArray.length - numOfReminder;\n System.arraycopy(items, firstIndex, newArray, newFirstIndex, numOfReminder);\n items = newArray;\n nextFirst = moveBack(newFirstIndex, 1);\n nextLast = moveForward(lastIndex, 1);\n return;\n }\n return;\n }", "public boolean isFull()\r\n\t{\r\n\t\treturn (count == capacity);\r\n\t}", "@Test\n public void testMassiveStackOfNothing() {\n\n System.out.println(\"isEmpty\");\n\n int sizeTest = 10000;\n int expectedSize = 0;\n \n String tempString = null;\n String expected = null;\n \n int emptySize = instance.size();\n assertEquals(emptySize, 0);\n assertEquals(instance.isEmpty(), true);\n\n for (int i = 0; i < sizeTest; i++) {\n instance.push(tempString);\n }\n\n int fourSize = instance.size();\n assertEquals(fourSize, expectedSize);\n assertEquals(instance.isEmpty(), true);\n\n for (int i = sizeTest; i > 0; i--) {\n\n String result = instance.pop();\n\n assertEquals(expected, result);\n\n }\n\n int zeroSize = instance.size();\n assertEquals(zeroSize, 0);\n assertEquals(instance.isEmpty(), true);\n\n String shouldBeNull = instance.pop();\n\n assertEquals(shouldBeNull, null);\n\n assertEquals(instance.size(), 0);\n assertEquals(instance.isEmpty(), true);\n\n }", "public boolean isEmpty() {\n return size == 0;\n}", "@SuppressWarnings(\"unchecked\")\n public ArrBag( int optionalCapacity )\n {\n theArray = (T[]) new Object[optionalCapacity ];\n count = 0; // i.e. logical size, actual number of elems in the array\n }", "private boolean isEmpty() { return getSize() == 0; }", "protected abstract boolean reachedContractLimit(int size);", "protected void checkSize(){\n if (size == data.length){\n resize( 2 * data.length);\n }\n }", "public boolean isEmpty(){\n return size==0;\n }", "@Override\n\tpublic int remainingCapacity() {\n\t\treturn 0;\n\t}", "public MyArrayList(int capacity){\n if(capacity >= 0)\n elements = new Object[capacity];\n else\n throw new IllegalArgumentException(\"capacity: \" + capacity);\n }", "@Test\n public void testMassiveStack() {\n\n System.out.println(\"isEmpty\");\n\n int sizeTest = 10000;\n\n List<String> elementList = new ArrayList();\n String tempString = \"\";\n\n for (int i = 0; i < sizeTest; i++) {\n\n tempString = tempString + \"z\";\n elementList.add(tempString);\n\n }\n\n int emptySize = instance.size();\n assertEquals(emptySize, 0);\n assertEquals(instance.isEmpty(), true);\n\n for (String string : elementList) {\n instance.push(string);\n }\n\n int fourSize = instance.size();\n assertEquals(fourSize, sizeTest);\n assertEquals(instance.isEmpty(), false);\n\n for (int i = sizeTest; i > 0; i--) {\n\n String result = instance.pop();\n\n String expected = elementList.get(i - 1);\n\n assertEquals(expected, result);\n\n }\n\n int zeroSize = instance.size();\n assertEquals(zeroSize, 0);\n assertEquals(instance.isEmpty(), true);\n\n String shouldBeNull = instance.pop();\n\n assertEquals(shouldBeNull, null);\n\n assertEquals(instance.size(), 0);\n assertEquals(instance.isEmpty(), true);\n\n }", "public boolean empty() {\n return size <= 0;\n }", "private void resize(long capacity) {\n if ((noresize == true || m >= MAXTABLESIZE) && capacity != M) return;\n CuckooHashST<Key,Value> tmp;\n if (NT != NUMBEROFTABLES) tmp = new CuckooHashST<Key,Value>(capacity, NT);\n else tmp = new CuckooHashST<Key,Value>(capacity);\n for (int i = 0; i < entries.length; i++)\n for (int j = 0; j < entries[i].length; j++)\n if (entries[i][j] != null && entries[i][j]._1 != null && entries[i][j]._2 != null)\n tmp.put(entries[i][j]._1, entries[i][j]._2);\n entries = tmp.entries;\n m = tmp.m;\n M = tmp.M;\n N = tmp.N;\n ha = tmp.ha;\n na = tmp.na;\n }", "@Override\n public int size() {\n return size;\n }" ]
[ "0.7433702", "0.70418644", "0.683548", "0.6754281", "0.67530346", "0.67530346", "0.66767657", "0.66767657", "0.6653048", "0.66097647", "0.6560569", "0.6549498", "0.65383554", "0.6511266", "0.6458191", "0.6421716", "0.6407911", "0.6391674", "0.63903487", "0.63407385", "0.6292645", "0.6273529", "0.6271372", "0.6230949", "0.61937654", "0.61875993", "0.61607385", "0.61544365", "0.6145333", "0.61436653", "0.61404103", "0.61303556", "0.61035234", "0.6099783", "0.6084301", "0.60807514", "0.6069778", "0.60519344", "0.60504365", "0.6049151", "0.60267395", "0.60198355", "0.6014175", "0.601338", "0.5985528", "0.5975867", "0.59727675", "0.5965229", "0.59602183", "0.5949089", "0.5940691", "0.59300536", "0.59233916", "0.59233916", "0.59233916", "0.59191483", "0.59145117", "0.5912416", "0.59123063", "0.5906775", "0.5896926", "0.5890294", "0.5874572", "0.58697027", "0.5865959", "0.5865959", "0.5865959", "0.5865959", "0.5865959", "0.58659524", "0.58613", "0.5856968", "0.5854862", "0.58523065", "0.5849963", "0.5848966", "0.5848464", "0.5834978", "0.5834525", "0.582733", "0.5818541", "0.5813239", "0.58103466", "0.5806932", "0.580288", "0.5802288", "0.5793745", "0.5776644", "0.57752246", "0.57704306", "0.57609683", "0.57592696", "0.575641", "0.5756268", "0.5754071", "0.5748855", "0.5740922", "0.5730846", "0.57286745", "0.5728304", "0.5719593" ]
0.0
-1
same key must be used with the same hash
void put(final int hash, final int key, final int value){ //System.out.println("put("+hash+","+key+","+value+")"); if(key==0){ hasZeroKey=true; zeroValue=value; return; } int i=(hash&hashMask)<<1; int k; while((k=data[i])!=0 && k!=key) i=(i+2)&indexMask; data[i]=key; data[i+1]=value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void hashCodeDifferentId() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tkey1.setId(2);\n\t\tAssert.assertNotEquals(key1.hashCode(), key2.hashCode());\n\t}", "@Test\n\tpublic void hashCodeSameObject() {\n\t\tProductScanImageURIKey key = this.getDefaultKey();\n\t\tAssert.assertEquals(key.hashCode(), key.hashCode());\n\t}", "@Test\n\tpublic void hashCodeSimilarObjects() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tAssert.assertEquals(key1.hashCode(), key2.hashCode());\n\t}", "@Test\n\tpublic void hashCodeDifferentSequenceNumber() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tkey1.setSequenceNumber(2);\n\t\tAssert.assertNotEquals(key1.hashCode(), key2.hashCode());\n\t}", "@Override\n public int hashCode() {\n return key.hashCode();\n }", "private int getHash(Object key) {\n return key.hashCode();\n }", "private int hash2(T key) { //first two char length\r\n\r\n if(key.toString().length() ==1){ //in the case that the key is only one char long\r\n return key.toString().charAt(0)%newTable.length;\r\n }\r\n return (26 * key.toString().charAt(0)+key.toString().charAt(1))% newTable.length;\r\n\r\n }", "private int hash1(T key) {\n return (key.toString().charAt(0) + key.toString().length())%newTable.length;\r\n }", "static int getHash(long key) {\n int hash = (int) ((key >>> 32) ^ key);\n // a supplemental secondary hash function\n // to protect against hash codes that don't differ much\n hash = ((hash >>> 16) ^ hash) * 0x45d9f3b;\n hash = ((hash >>> 16) ^ hash) * 0x45d9f3b;\n hash = (hash >>> 16) ^ hash;\n return hash;\n }", "protected abstract int hashOfObject(Object key);", "@Override\n public int hashCode() {\n return 1;\n }", "private int hash(Key key) {\n\t\treturn (key.hashCode() & 0x7fffffff) % M;\n\t}", "private int hash1(K key) {\n int h = 0;\n int seed = 31;//素数\n String s = key.toString();\n for (int i = 0; i != s.length(); ++i) {\n h = seed * h + s.charAt(i);\n }\n return h % length;\n }", "@Test\n void testSameHashCodes() {\n assertEquals(loginRequest1.hashCode(), loginRequest1.hashCode());\n }", "public abstract int getHash();", "@Override \n int hashCode();", "@Override\n public int hashCode() {\n return (this.key == null ? 0 : this.key.hashCode()) ^ (this.value == null ? 0 : this.value.hashCode());\n }", "private boolean equalKeys(Object other) {\n if (this==other) {\n return true;\n }\n if (!(other instanceof Acquirente)) {\n return false;\n }\n Acquirente that = (Acquirente) other;\n if (this.getIdacquirente() != that.getIdacquirente()) {\n return false;\n }\n return true;\n }", "String getHash();", "String getHash();", "@Override\n public int hashCode() {\n int result = 42;\n int prime = 37;\n for (char ch : key.toCharArray()) {\n result = prime * result + (int) ch;\n }\n result = prime * result + summary.length();\n result = prime * result + value;\n return result;\n }", "int getHash();", "@Test\n\tpublic void equalsSameObject() {\n\t\tProductScanImageURIKey key = this.getDefaultKey();\n\t\tboolean equals = key.equals(key);\n\t\tAssert.assertTrue(equals);\n\t}", "public HASH256 getHash1(){return hash1;}", "@SuppressWarnings(\"resource\")\n @Test\n public void testHashCode() {\n try {\n ApiKey apikey1 = new ApiKey(\"bd1f89fbddbde18d4244b748ca1d250b\", new Date(1570127622312L), -54,\n \"bd1f89fbddbde18d4244b748ca1d250b\", \"fdf184b3-81d4-449f-ad84-da9d9f4732b2\", 73,\n \"d8fff014-0bf4-46d5-b2da-3391ccc51619\", \"bd1f89fbddbde18d4244b748ca1d250b\",\n ApiKeyStatus.getDefault(), new Date(1570127620753L));\n ApiKey apikey2 = new ApiKey(\"bd1f89fbddbde18d4244b748ca1d250b\", new Date(1570127622312L), -54,\n \"bd1f89fbddbde18d4244b748ca1d250b\", \"fdf184b3-81d4-449f-ad84-da9d9f4732b2\", 73,\n \"d8fff014-0bf4-46d5-b2da-3391ccc51619\", \"bd1f89fbddbde18d4244b748ca1d250b\",\n ApiKeyStatus.getDefault(), new Date(1570127620753L));\n assertNotNull(apikey1);\n assertNotNull(apikey2);\n assertNotSame(apikey2, apikey1);\n assertEquals(apikey2, apikey1);\n assertEquals(apikey2.hashCode(), apikey1.hashCode());\n int hashCode = apikey1.hashCode();\n for (int i = 0; i < 5; i++) {\n assertEquals(hashCode, apikey1.hashCode());\n }\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }", "@Test\n\tpublic void equalsSimilarObjects() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tboolean equals = key1.equals(key2);\n\t\tSystem.out.println();\n\t\tAssert.assertTrue(equals);\n\t}", "@Override\n int hashCode();", "private int hashOf(String key) {\n return key.length();\n }", "@Override\n public int hashCode() {\n // name's hashCode is multiplied by an arbitrary prime number (13)\n // in order to make sure there is a difference in the hashCode between\n // these two parameters:\n // name: a value: aa\n // name: aa value: a\n return key.hashCode() * 13 + (value == null ? 0 : value.hashCode());\n }", "@Override\n public int hashCode();", "private int hash(K key) {\n return (key.hashCode() & 0x7fffffff) % keys.length;\n }", "@Override\n\tpublic int hash(K key)\n\t{\n\t\treturn (key.hashCode() & 0x7fffffff) % M;\n\t}", "private void rehash()\n {\n int hTmp = 37;\n\n if ( isHR != null )\n {\n hTmp = hTmp * 17 + isHR.hashCode();\n }\n\n if ( id != null )\n {\n hTmp = hTmp * 17 + id.hashCode();\n }\n\n if ( attributeType != null )\n {\n hTmp = hTmp * 17 + attributeType.hashCode();\n }\n \n h = hTmp;\n }", "private int hash(Key key) {\n int h = key.hashCode();\n h ^= (h >>> 20) ^ (h >>> 12) ^ (h >>> 7) ^ (h >>> 4);\n return h & (m-1);\n }", "private static int initHash() {\n return 0x811c9DC5; // unsigned 2166136261\n }", "@Override\n\t\tpublic int hashCode()\n\t\t{\n\t\t\treturn key.hashCode() * 31 + value.hashCode();\n\t\t}", "@Test\n public void testBackdoorModificationSameKey()\n {\n testBackdoorModificationSameKey(this);\n }", "@Test\n\tpublic void hashCodeNullID() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tkey1.setId(LONG_ZERO);\n\t\tAssert.assertNotEquals(key1.hashCode(), key2.hashCode());\n\t}", "private int hash (k key) {\n\t\treturn Math.abs(key.hashCode())\t% buckets.length;\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 }", "private int getHash(K key) {\n return key == null ? 0 : key.hashCode();\n }", "protected abstract boolean equalityTest(Object key, Object key2);", "@Override\n public boolean equals(Object other) {\n if (!(other instanceof Sha256Hash)) return false;\n return Arrays.equals(bytes, ((Sha256Hash) other).bytes);\n }", "int hash(T key) throws IOException, NoSuchAlgorithmException {\n\t\tByteArrayOutputStream b = new ByteArrayOutputStream();\n ObjectOutputStream o = new ObjectOutputStream(b);\n o.writeObject(key);\n byte[] data = b.toByteArray();\n \n //hash key using MD5 algorithm\n\t\t//System.out.println(\"Start MD5 Digest\");\n MessageDigest md = MessageDigest.getInstance(\"MD5\");\n md.update(data);//this updates the digest using the specified byte array\n \tbyte[] hash = md.digest();\n \tByteBuffer wrapped = ByteBuffer.wrap(hash); // big-endian by default\n \tint hashNum = wrapped.getInt(); \n \treturn hashNum;\n \t\n\t}", "@Override\n public int hashCode()\n {\n return hashCode;\n }", "public void setHash() throws NoSuchAlgorithmException {\n\t\tString transformedName = new StringBuilder().append(this.titulo).append(this.profesor)\n .append(this.descripcion).append(this.materia.getUniversidad()).append(this.materia.getDepartamento())\n\t\t\t\t.append(this.materia.getCarrera()).append(this.materia.getIdMateria()).append(new Date().getTime()).toString();\n\t\tMessageDigest messageDigest = MessageDigest.getInstance(\"MD5\");\n\t\tmessageDigest.update(transformedName.getBytes(StandardCharsets.UTF_8));\n\t\tthis.hash = new BigInteger(1, messageDigest.digest()).toString(16);\n\t}", "private boolean equalKeys(Object other) {\n if (this==other) {\n return true;\n }\n if (!(other instanceof Sanpham)) {\n return false;\n }\n Sanpham that = (Sanpham) other;\n Object myMasp = this.getMasp();\n Object yourMasp = that.getMasp();\n if (myMasp==null ? yourMasp!=null : !myMasp.equals(yourMasp)) {\n return false;\n }\n return true;\n }", "private int hasher() {\n int i = 0;\n int hash = 0;\n while (i != length) {\n hash += hashableKey.charAt(i++);\n hash += hash << 10;\n hash ^= hash >> 6;\n }\n hash += hash << 3;\n hash ^= hash >> 11;\n hash += hash << 15;\n return getHash(hash);\n }", "@Test\r\n public void testHash() {\r\n Settings expResult = Settings.EXPERT;\r\n int kod = 16 * 30 * 99;\r\n assertEquals(expResult.hashCode(), kod);\r\n \r\n expResult = Settings.INTERMEDIATE;\r\n kod = 16 * 16 * 40;\r\n assertEquals(expResult.hashCode(), kod);\r\n \r\n expResult = Settings.BEGINNER;\r\n kod = 9 * 9 * 10;\r\n assertEquals(expResult.hashCode(), kod);\r\n }", "@Test\n\tpublic void hashCodeNullSequenceNumber() {\n\t\tProductScanImageURIKey key1 = this.getDefaultKey();\n\t\tProductScanImageURIKey key2 = this.getDefaultKey();\n\t\tkey1.setSequenceNumber(LONG_ZERO);\n\t\tAssert.assertNotEquals(key1.hashCode(), key2.hashCode());\n\t}", "@Override\n public abstract int hashCode();", "@Override\n public abstract int hashCode();", "@Override\n public abstract int hashCode();", "@Override\n\tpublic int hashCode() {\n\t\treturn getKey() != null ? getKey().hashCode() : 0;\n\t}", "@Override\r\n\t\tpublic int hashCode() {\n\t\t\tsynchronized (mutex) {\r\n\t\t\t\treturn pair.hashCode();\r\n\t\t\t}\r\n\t\t}", "@Override\n\t\tpublic int hashCode() {\n\t\t\treturn Integer.parseInt(lat.toString()) ^ Integer.parseInt(lng.toString());\n\t\t\t//return super.hashCode();\n\t\t}", "private boolean equalKeys(Object other) {\n if (this==other) {\n return true;\n }\n if (!(other instanceof RegistrationItems)) {\n return false;\n }\n RegistrationItems that = (RegistrationItems) other;\n Object myRegItemUid = this.getRegItemUid();\n Object yourRegItemUid = that.getRegItemUid();\n if (myRegItemUid==null ? yourRegItemUid!=null : !myRegItemUid.equals(yourRegItemUid)) {\n return false;\n }\n return true;\n }", "public void testHashFunction(){\r\n Token otherToken;\r\n\r\n try{\r\n token = new Token(TokenType.ID, \"abc\", 5);\r\n otherToken = new Token(TokenType.ID, \"abc\", 6);\r\n //assertTrue(token.hashCode() == 28456490);\r\n assertTrue(token.hashCode() == otherToken.hashCode());\r\n\r\n otherToken = new Token(TokenType.STRING, \"abc\", 5);\r\n assertFalse(token.hashCode() == otherToken.hashCode());\r\n\r\n token = new Token(TokenType.Q_MARK, \"?\", 10);\r\n otherToken = new Token(TokenType.Q_MARK, \"?\", 10);\r\n assertTrue(token.hashCode() == otherToken.hashCode());\r\n\r\n otherToken = new Token(TokenType.STRING, \"?\", 10);\r\n assertFalse(token.hashCode() == otherToken.hashCode());\r\n\r\n otherToken = new Token(TokenType.PERIOD, \".\", 10);\r\n assertFalse(token.hashCode() == otherToken.hashCode());\r\n \r\n }catch(ParserException e){\r\n };\r\n }", "@Override\r\n public int hashCode() {\n int key=(Integer)(this.capsule.get(0)); // Get the key\r\n Integer bkey=Integer.parseInt(Integer.toBinaryString(key)); // Convert into binary \r\n int n=setcount(bkey); //counts the number of 1's in the binary\r\n key=key*n + Objects.hashCode(this.capsule.get(0)); //multiplies that with the hashcode of the pId\r\n return key;\r\n }", "@Test\n public void testKeyEquivalence() throws Exception {\n ScanResultMatchInfo matchInfo1 = ScanResultMatchInfo.fromWifiConfiguration(mConfig1);\n ScanResultMatchInfo matchInfo1Prime = ScanResultMatchInfo.fromWifiConfiguration(mConfig1);\n ScanResultMatchInfo matchInfo2 = ScanResultMatchInfo.fromWifiConfiguration(mConfig2);\n assertFalse(matchInfo1 == matchInfo1Prime); // Checking assumption\n MacAddress mac1 = MacAddressUtils.createRandomUnicastAddress();\n MacAddress mac2 = MacAddressUtils.createRandomUnicastAddress();\n assertNotEquals(mac1, mac2); // really tiny probability of failing here\n\n WifiCandidates.Key key1 = new WifiCandidates.Key(matchInfo1, mac1, 1);\n\n assertFalse(key1.equals(null));\n assertFalse(key1.equals((Integer) 0));\n // Same inputs should give equal results\n assertEquals(key1, new WifiCandidates.Key(matchInfo1, mac1, 1));\n // Equal inputs should give equal results\n assertEquals(key1, new WifiCandidates.Key(matchInfo1Prime, mac1, 1));\n // Hash codes of equal things should be equal\n assertEquals(key1.hashCode(), key1.hashCode());\n assertEquals(key1.hashCode(), new WifiCandidates.Key(matchInfo1, mac1, 1).hashCode());\n assertEquals(key1.hashCode(), new WifiCandidates.Key(matchInfo1Prime, mac1, 1).hashCode());\n\n // Unequal inputs should give unequal results\n assertFalse(key1.equals(new WifiCandidates.Key(matchInfo2, mac1, 1)));\n assertFalse(key1.equals(new WifiCandidates.Key(matchInfo1, mac2, 1)));\n assertFalse(key1.equals(new WifiCandidates.Key(matchInfo1, mac1, 2)));\n }", "@Override\n public int hashCode() {\n return super.hashCode();\n }", "private int hash3(T key) { //last char + length of word\r\n char lastchar = key.toString().charAt( key.toString().length()-1 );\r\n return (lastchar + key.toString().length())%newTable.length;\r\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 static int hashCode(byte key) {\n return (int) key;\n }", "@Override\n\tpublic int hashCode() {\n\t\treturn map.hashCode() ^ y() << 16 ^ x();\n\t}", "private boolean equalKeys(Object other) {\n if (this==other) {\n return true;\n }\n if (!(other instanceof User)) {\n return false;\n }\n User that = (User) other;\n if (this.getIduser() != that.getIduser()) {\n return false;\n }\n return true;\n }", "public int hash2 ( String key )\n {\n int hashVal = 0;\n if(key != null){\n for( int i = 0; i < key.length(); i++ )\n hashVal = (37 * hashVal) + key.charAt(i);\n //if(hashVal != 0)\n return hashVal % tableSize;\n //else\n // return 0;\n }\n else{\n //System.out.println(\"Key is null\");\n return 0;\n }\n }", "@Override\n public final int hashCode() {\n return super.hashCode();\n }", "@Override\r\n public int hashCode() {\r\n return super.hashCode();\r\n }", "@Override\n public int hashCode()\n {\n if (hash != 0) {\n return hash;\n }\n\n hash = provider.hashCode() * 127 + id.hashCode();\n return hash;\n }", "protected int myHashKey(KeyType key) {\n int hashValue;\n hashValue = key.hashCode() % mTableSize;\n if (hashValue < 0) {\n hashValue += mTableSize;\n }\n return hashValue;\n }", "@Override\n public int hashCode() {\n return mKey.hashCode();\n }", "public int hashCode() {\n/* 781 */ return getUniqueId().hashCode();\n/* */ }", "@Override\n public int hashCode() {\n return 0;\n }", "@Override\n\tpublic long getHashCode(String key) {\n\t\tlong hash = 0;\n\t\tlong b = 378551;\n\t\tlong a = 63689;\n\t\tint tmp = 0;\n\t\tfor (int i = 0; i < key.length(); i++) {\n\t\t\ttmp = key.charAt(i);\n\t\t\thash = hash * a + tmp;\n\t\t\ta *= b;\n\t\t}\n\t\treturn hash;\n\t}", "@SuppressWarnings(\"resource\")\n @Test\n public void testHashCode() {\n try {\n SubtenantApiKey subtenantapikey1 = new SubtenantApiKey(\"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n new Date(1574704661913L), -32, null,\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n \"ef1cd9b8-3221-4391-aefc-23518f83faa3\", -25,\n \"e25f9e8a-ec98-4538-8132-816a43b1d1d2\",\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n SubtenantApiKeyStatus.getDefault(),\n new Date(1574704664911L));\n SubtenantApiKey subtenantapikey2 = new SubtenantApiKey(\"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n new Date(1574704661913L), -32, null,\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n \"ef1cd9b8-3221-4391-aefc-23518f83faa3\", -25,\n \"e25f9e8a-ec98-4538-8132-816a43b1d1d2\",\n \"4f267f967f7d1f5e3fa0d6abaccdb4bf\",\n SubtenantApiKeyStatus.getDefault(),\n new Date(1574704664911L));\n assertNotNull(subtenantapikey1);\n assertNotNull(subtenantapikey2);\n assertNotSame(subtenantapikey2, subtenantapikey1);\n assertEquals(subtenantapikey2, subtenantapikey1);\n assertEquals(subtenantapikey2.hashCode(), subtenantapikey1.hashCode());\n int hashCode = subtenantapikey1.hashCode();\n for (int i = 0; i < 5; i++) {\n assertEquals(hashCode, subtenantapikey1.hashCode());\n }\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }", "private static void generateHashkey(byte[] id, int[] hash_key) {\n MessageDigest sha;\n try {\n sha = MessageDigest.getInstance(\"md5\");\n sha.update(id);\n byte[] out = sha.digest();\n int offset = 0;\n for (int i = 0; i < 4; i++) {\n int temp = ByteArrayUtility.toInteger(out, offset);\n offset += 4;\n if (temp < 0) {\n temp = (-1) * temp + 2 ^ 31;\n }\n hash_key[i] = temp % (DIGEST_SIZE * 32);\n }\n } catch (NoSuchAlgorithmException e) {\n throw new HyperCastFatalRuntimeException(e);\n }\n }", "@Override\n public int hashCode() {\n return super.hashCode();\n }", "@Override\n public int hashCode() {\n return super.hashCode();\n }", "@Override\n public int hashCode() {\n return super.hashCode();\n }", "@Override\n public int hashCode() {\n return super.hashCode();\n }", "@Override\n public int hashCode ()\n {\n int hash = 7;\n hash = 53 * hash + Arrays.hashCode (this.bytes);\n return hash;\n }", "@Override\r\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\r\n\t}", "@Override\r\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\r\n\t}", "@Override\r\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\r\n\t}", "private int hash2(K key){\r\n return indexFor(hash(key.hashCode2()), capacity);\r\n }", "private void getHashKey(){\n try {\n PackageInfo info = getPackageManager().getPackageInfo(getString(R.string.app_package_name), PackageManager.GET_SIGNATURES);\n\n for (Signature signature : info.signatures)\n {\n try {\n MessageDigest md = MessageDigest.getInstance(\"SHA\");\n\n md.update(signature.toByteArray());\n Log.d(\"KeyHash:\", Base64.encodeToString(md.digest(), Base64.DEFAULT));\n } catch (NoSuchAlgorithmException nsa)\n {\n Log.d(\"exception\" , \"No algorithmn\");\n Assert.assertTrue(false);\n }\n }\n } catch (PackageManager.NameNotFoundException nnfe)\n {\n Log.d(\"exception\" , \"Name not found\");\n Assert.assertNull(\"Name not found\", nnfe);\n }\n }", "@Override\n public int hashCode()\n {\n if ( h == 0 )\n {\n rehash();\n }\n\n return h;\n }", "public int hash1 ( String key )\n {\n int hashVal = 0;\n if(key != null){\n for( int i = 0; i < key.length(); i++ )\n hashVal += key.charAt(i);\n \n //if(hashVal != 0)\n return hashVal % tableSize;\n //else\n // return 0;\n }\n else{\n //System.out.println(\"Key is null\");\n return 0 ;\n }\n\n }", "@Override\n\t public int hashCode();", "@Override\n\tpublic int hashCode() {\n\t\treturn Objects.hash(sigla);\n\t}", "@Override\n\tpublic int hashCode() {\n\t\treturn idx1.hashCode() * 811 + idx2.hashCode();\n\t}", "@Test\n public void hashCodeTest2() {\n Device device2 = new Device(\"other\", token);\n assertNotEquals(device.hashCode(), device2.hashCode());\n }", "@Override\n public int hashCode() {\n return hashCode;\n }", "private int hash(T x)\n {\n // calcolo della chiave ridotta - eventualmente negativa\n int h = x.hashCode() % v.length;\n\n // calcolo del valore assoluto\n if (h < 0)\n h = -h;\n \n return h; \n }", "@Test\n public void testRecordsWithDifferentIDsProduceDifferentHashCodes() throws Exception {\n setRecordFieldValue(otherRecord, \"id\", 42L);\n int hashcodeA = record.hashCode();\n int hashcodeB = otherRecord.hashCode();\n\n assertThat(hashcodeA == hashcodeB, is(false));\n }", "int _hash(int maximum);", "@Override\r\n public int hashCode() {\r\n int hash = 7;\r\n hash = 19 * hash + (int) (this.grauDeEquilibrio ^ (this.grauDeEquilibrio >>> 32));\r\n return hash;\r\n }", "private String hashKey(String key) throws NoSuchAlgorithmException {\n MessageDigest md = MessageDigest.getInstance(\"MD5\");\n byte[] hashInBytes = md.digest(key.getBytes(StandardCharsets.UTF_8));\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < hashInBytes.length; i++) {\n sb.append(Integer.toString((hashInBytes[i] & 0xff) + 0x100, 16).substring(1));\n }\n String s = sb.toString();\n return s;\n }", "@Override\r\n \tpublic int hashCode() {\n \t\treturn id.hashCode();\r\n \t}", "@Override\n public int hashCode() {\n return (first != null ? 41 * first.hashCode() : 0) + (second != null ? second.hashCode() : 0);\n }" ]
[ "0.7003196", "0.6981641", "0.6782015", "0.66996485", "0.66639173", "0.6551842", "0.65059423", "0.64616054", "0.6441431", "0.64369047", "0.6432322", "0.64242554", "0.6341809", "0.63311756", "0.6319842", "0.63002264", "0.6299673", "0.62746817", "0.62705094", "0.62705094", "0.62662435", "0.6265707", "0.62632155", "0.62554884", "0.62383306", "0.62354463", "0.62177825", "0.62068", "0.6204125", "0.6199437", "0.6195231", "0.61749357", "0.6173987", "0.6173808", "0.6169443", "0.6137922", "0.61226875", "0.6096205", "0.6084231", "0.60703176", "0.60695803", "0.6065446", "0.60630584", "0.6062347", "0.6049932", "0.60348547", "0.603472", "0.60313815", "0.60298014", "0.60182667", "0.60088927", "0.60088927", "0.60088927", "0.59993637", "0.5991056", "0.598848", "0.59705687", "0.59680283", "0.5965402", "0.5958247", "0.5957299", "0.5953515", "0.59520274", "0.5933033", "0.59241056", "0.5918768", "0.5917597", "0.5907336", "0.59033006", "0.5901962", "0.59009403", "0.58958966", "0.5894569", "0.589369", "0.5892786", "0.58851135", "0.58806896", "0.5869543", "0.5869543", "0.5869543", "0.5869543", "0.58660555", "0.5865582", "0.5865582", "0.5865582", "0.5864748", "0.5857432", "0.58568096", "0.5854653", "0.5853621", "0.58522594", "0.5842505", "0.58412695", "0.5837901", "0.5836956", "0.5831692", "0.583017", "0.58267623", "0.5826324", "0.5825067", "0.58239096" ]
0.0
-1
Devolve um Array de Produtos vindo da API
public static ArrayList<Produto> parserJsonProdutos(JSONArray response, Context context){ System.out.println("--> Produto: " + response); ArrayList<Produto> tempListaProdutos = new ArrayList<Produto>(); try { for (int i = 0; i < response.length(); i++){ JSONObject produto = (JSONObject)response.get(i); int id = produto.getInt("id"); int preco_unitario = produto.getInt("preco_unitario"); int id_tipoproduto = produto.getInt("id_tipo"); String designacao = produto.getString("designacao"); Produto auxProduto = new Produto(id, preco_unitario, id_tipoproduto, designacao); tempListaProdutos.add(auxProduto); } } catch (JSONException e) { e.printStackTrace(); Toast.makeText(context, "Error: " + e.getMessage(), Toast.LENGTH_SHORT).show(); } return tempListaProdutos; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GET(\"montaje/proyectos/ver/\")\n Call<List<clsProyecto>> getProyectos();", "public Collection<Proyecto> leerProyectosCollection() {\n\t\t\tRestTemplate plantilla = new RestTemplate();\n\t\t\tProyecto[] proyecto = plantilla.getForObject(\"http://localhost:5000/proyectos\", Proyecto[].class);\n\t\t\tList<Proyecto> listaProyectos = Arrays.asList(proyecto);\n\t\t\treturn listaProyectos;\n\t\t}", "public List<Produto> buscarProdutos(){\n return new ArrayList<>();\n }", "private List<String[]> trovaPazienti(Long idMedico) {\r\n\r\n\t\t\tLog.i(\"trovaPazienti\", \"fase iniziale\");\r\n\r\n\t\t\tSoapObject request = new SoapObject(getString(R.string.NAMESPACE),\r\n\t\t\t\t\t\"trovaPazienti\");\r\n\t\t\trequest.addProperty(\"idMedico\", idMedico);\r\n\r\n\t\t\tSoapSerializationEnvelope envelope = new SoapSerializationEnvelope(\r\n\t\t\t\t\tSoapEnvelope.VER10);\r\n\t\t\tenvelope.setAddAdornments(false);\r\n\t\t\tenvelope.implicitTypes = true;\r\n\t\t\tenvelope.setOutputSoapObject(request);\r\n\r\n\t\t\tHttpTransportSE androidHttpTransport = new HttpTransportSE(\r\n\t\t\t\t\tgetString(R.string.URL));\r\n\r\n\t\t\tandroidHttpTransport.debug = true;\r\n\r\n\t\t\tList<String[]> pazienti = new ArrayList<String[]>();\r\n\r\n\t\t\ttry {\r\n\t\t\t\tString soapAction = \"\\\"\" + getString(R.string.NAMESPACE)\r\n\t\t\t\t\t\t+ \"trovaPazienti\" + \"\\\"\";\r\n\t\t\t\tandroidHttpTransport.call(soapAction, envelope);\r\n\r\n\t\t\t\tLog.i(\"trovaPazienti\", \"inviata richiesta\");\r\n\r\n\t\t\t\tSoapPrimitive response = (SoapPrimitive) envelope.getResponse();\r\n\r\n\t\t\t\tLog.i(\"trovaPazienti\", \"ricevuta risposta\");\r\n\r\n\t\t\t\tString responseData = response.toString();\r\n\r\n\t\t\t\tJSONObject obj = new JSONObject(responseData);\r\n\r\n\t\t\t\tLog.i(\"response\", obj.toString());\r\n\r\n\t\t\t\tJSONArray arr = obj.getJSONArray(\"mieiPazienti\");\r\n\r\n\t\t\t\tfor (int i = 0; i < arr.length(); i++) {\r\n\t\t\t\t\tString[] paziente = new String[2];\r\n\t\t\t\t\tJSONObject objPaz = new JSONObject(arr.getString(i));\r\n\t\t\t\t\tpaziente[0] = objPaz.get(\"idPaziente\").toString();\r\n\t\t\t\t\tpaziente[1] = objPaz.get(\"nome\").toString() + \" \"\r\n\t\t\t\t\t\t\t+ objPaz.get(\"cognome\").toString();\r\n\t\t\t\t\tpazienti.add(paziente);\r\n\t\t\t\t}\r\n\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tLog.e(\"WS Error->\", e.toString());\r\n\t\t\t}\r\n\t\t\treturn pazienti;\r\n\t\t}", "public List getProdutos() {\n\t\treturn null;\n\t}", "public List<JsonObject> notasDeVentas(){\n String nv[][]= pedidoMaterialRepository.buscarNotaVenta();\n List<JsonObject> js = new ArrayList<JsonObject>();\n \n for (int i=0;i<nv.length;i++){\n \n JsonObject jo = new JsonObject();\n jo.put(\"notaDeVenta\", nv[i][0]);\n jo.put(\"descripcion\", nv[i][1]);\n jo.put(\"cliente\", nv[i][2]);\n js.add(jo);\n }\n \n return js;\n }", "@POST\r\n @GET\r\n @Path(\"/v1.0/produtos\")\r\n @Consumes({ WILDCARD })\r\n @Produces({ APPLICATION_ATOM_XML, APPLICATION_JSON + \"; charset=UTF-8\" })\r\n public Response listarProdutos() {\r\n\r\n log.debug(\"listarProdutos: {}\");\r\n\r\n try {\r\n\r\n List<Produto> produtos = produtoSC.listar();\r\n\r\n return respostaHTTP.construirResposta(produtos);\r\n\r\n } catch (Exception e) {\r\n\r\n return respostaHTTP.construirRespostaErro(e);\r\n }\r\n }", "private static Vuelo[] partidas(Vuelo [] vuelosArray){\n Ciudad concordia = new Ciudad(\"CON\",\"Concordia\");\n\n Vuelo[] listado = new Vuelo[0];\n for (Vuelo vuelo: vuelosArray) {\n if (vuelo.getCiudadOrigen().equals(concordia)) {\n listado = agregarVuelo(listado, vuelo);\n }\n }\n return listado;\n }", "public Response getProdutos_e_suas_receitas() {\n\t\tList<Produto> lista = ((ProdutoDao) getDao()).buscarProdutos_e_suas_receitas();\n\t\tif (lista != null) {\n\t\t\tList<Produto> produtos = new ArrayList<>();\n\t\t\t// percorrer a lista retornado do BD.\n\t\t\tfor (Produto produto : lista) {\n\t\t\t\tList<ItemReceita> componentes = new ArrayList<>();\n\t\t\t\t// pega os componentes da receita de cada produto.\n\t\t\t\tfor (ItemReceita item : produto.getReceita().getComponentes()) {\n\t\t\t\t\tcomponentes.add(new ItemReceita(item.getComponente(), item.getQtdUtilizada()));\n\t\t\t\t}\n\t\t\t\t// add um novo produto com os dados da lista percorrida.\n\t\t\t\tprodutos.add(new Produto(produto.getCodigo(), produto.getDescricao(), produto.getCategoria(),\n\t\t\t\t\t\tproduto.getSimbolo(), produto.getPreco(),\n\t\t\t\t\t\tnew Receita(produto.getReceita().getCodigo(), produto.getReceita().getRendimento(),\n\t\t\t\t\t\t\t\tproduto.getReceita().getTempoPreparo(), componentes)));\n\t\t\t}\n\t\t\t// converte a lista com os novos produtos para uma string em JSON.\n\t\t\tString listaEmJson = converterParaArrayJSON(produtos);\n\t\t\t// retorna um response com o lista de produtos em JSON.\n\t\t\tsetResposta(mensagemSucesso(listaEmJson));\n\t\t} else {\n\t\t\t// retorna um response informando que não possui cadastro.\n\t\t\tsetResposta(mensagemNaoEncontrado());\n\t\t}\n\t\treturn getResposta();\n\n\t}", "public static Object[] getArrayDeObjectosPB(int codigo,String nombre,String fabricante,float precio, String stock, String tipo, String caract){\r\n Object[] v = new Object[7];\r\n \r\n v[0] = codigo;\r\n v[1] = nombre;\r\n v[2] = fabricante;\r\n v[3] = precio;\r\n v[4] = stock;\r\n v[5] = tipo;\r\n v[6] = caract;\r\n\r\n return v;\r\n }", "public Productos1[] buscarTodos() {\n\t\treturn productosColeccion.values().toArray(new Productos1[productosColeccion.size()]);// y te mide lo que ocupa procutosColeccion.\r\n\r\n\t}", "@GET\n\t@Path(\"/tipost\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic ArrayList<TipoTransmisionDTO> listarTiposT(){\n\t\tSystem.out.println(\"ini: listarTiposT()\");\n\t\t\n\t\tTipoTransmisionService tipotService = new TipoTransmisionService();\n\t\tArrayList<TipoTransmisionDTO> lista = tipotService.ListadoTipoTransmision();\n\t\t\n\t\tif (lista == null) {\n\t\t\tSystem.out.println(\"Listado Vacío\");\n\t\t}else {\n\t\t\tSystem.out.println(\"Consulta Exitosa\");\n\t\t}\n\n\t\tSystem.out.println(\"fin: listarTiposT()\");\n\t\t\n\t\treturn lista;\n\t}", "@Override\n\tpublic List<Produto> listPorId(int id) throws Exception {\n\t\treturn null;\n\t}", "public abstract DtPropuesta[] getPropuestasPopulares();", "@Nullable\r\n public static List<JSONArray> retrieveProducts(final Context context, int offset, List<String> shopList)\r\n {\r\n List<JSONArray> content = new ArrayList<>();\r\n\r\n try\r\n {\r\n final SharedPreferencesManager sharedPreferencesManager = new SharedPreferencesManager(context);\r\n\r\n final boolean man = sharedPreferencesManager.retrieveUser().getMan();\r\n\r\n final List<RequestFuture<JSONArray>> futures = new ArrayList<>();\r\n\r\n // Metemos en content el resultado de cada uno\r\n for (int i = 0; i < shopList.size(); i++)\r\n {\r\n final String fixedURL = Utils.fixUrl(Properties.SERVER_URL + \":\" + Properties.SERVER_SPRING_PORT\r\n + \"/products/\" + shopList.get(i) + \"/\" + man + \"/\" + offset);\r\n\r\n Log.d(Properties.TAG, \"[REST_CLIENT_SINGLETON] Conectando con: \" + fixedURL\r\n + \" para traer los productos de hace \" + Integer.toString(offset) + \" dias\");\r\n\r\n futures.add(RequestFuture.<JSONArray>newFuture());\r\n\r\n // Creamos una peticion\r\n final JsonArrayRequest jsonObjReq = new JsonArrayRequest(Request.Method.GET\r\n , fixedURL\r\n , null\r\n , futures.get(i)\r\n , futures.get(i));\r\n\r\n // La mandamos a la cola de peticiones\r\n VolleySingleton.getInstance(context).addToRequestQueue(jsonObjReq);\r\n Log.d(Properties.TAG, \"[REST_CLIENT_SINGLETON] Petición (\" + shopList.get(i) + \") creada y enviada\");\r\n }\r\n\r\n for (int i = 0; i < shopList.size(); i++)\r\n {\r\n try\r\n {\r\n JSONArray response = futures.get(i).get(20, TimeUnit.SECONDS);\r\n\r\n Log.d(Properties.TAG, \"[REST_CLIENT_SINGLETON] Respuesta (\" + shopList.get(i) + \") recibida\");\r\n\r\n content.add(response);\r\n\r\n } catch (InterruptedException e) {\r\n ExceptionPrinter.printException(\"REST_CLIENT_SINGLETON\", e);\r\n\r\n return null;\r\n }\r\n }\r\n\r\n // Si content es vacio, es que han fallado todas las conexiones.\r\n if (content.isEmpty())\r\n {\r\n Log.d(Properties.TAG, \"[REST_CLIENT_SINGLETON] Todas las peticiones han fallado\");\r\n\r\n return null;\r\n }\r\n\r\n } catch(Exception ex) {\r\n ExceptionPrinter.printException(\"REST_CIENT_SINGLETON\", ex);\r\n\r\n return null;\r\n }\r\n\r\n return content;\r\n }", "public ArrayList<Proposta> retornaPropostasPeloIdFreela(int idUsuario) {\n\n ArrayList<Proposta> listaDePropostas = new ArrayList<>();\n\n conectarnoBanco();\n\n String sql = \"SELECT * FROM proposta\";\n\n try {\n\n st = con.createStatement();\n\n rs = st.executeQuery(sql);\n\n while (rs.next()) {\n\n if(idUsuario == rs.getInt(\"id_usuario\")){\n Proposta propostaTemp = new Proposta(rs.getString(\"propostaRealizada\"), rs.getFloat(\"valorProposta\"), rs.getInt(\"id_usuario\"), rs.getInt(\"id_projeto\"),rs.getInt(\"id_client\"));\n\n listaDePropostas.add(propostaTemp);\n }\n \n sucesso = true;\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao retornar propostas pelo id do Freelancer = \" + ex.getMessage());\n sucesso = false;\n } finally {\n try {\n\n if (con != null && pst != null) {\n con.close();\n pst.close();\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao fechar o bd = \" + ex.getMessage());\n }\n\n }\n\n return listaDePropostas;\n }", "public List<Pregunta> getPreguntasUsuario(Usuario user);", "public ArrayList<Proposta> retornaPropostasPeloIdCliente(int idCliente) {\n\n ArrayList<Proposta> listaDePropostas = new ArrayList<>();\n\n conectarnoBanco();\n\n String sql = \"SELECT * FROM proposta\";\n\n try {\n\n st = con.createStatement();\n\n rs = st.executeQuery(sql);\n\n while (rs.next()) {\n\n if(idCliente == rs.getInt(\"id_client\")){\n Proposta propostaTemp = new Proposta(rs.getString(\"propostaRealizada\"), rs.getFloat(\"valorProposta\"), rs.getInt(\"id_usuario\"), rs.getInt(\"id_projeto\"),rs.getInt(\"id_client\"));\n\n listaDePropostas.add(propostaTemp);\n }\n \n sucesso = true;\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao retornar propostas pelo id do cliente = \" + ex.getMessage());\n sucesso = false;\n } finally {\n try {\n\n if (con != null && pst != null) {\n con.close();\n pst.close();\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao fechar o bd = \" + ex.getMessage());\n }\n\n }\n\n return listaDePropostas;\n }", "public List<Tb_Prod_Painel_PromoBeans> getProdPainelConfig(Integer terminal, Integer painel) throws SQLException {\r\n try (Connection conexao = new ConexaoLocalDBMySql().getConnect()) {\r\n String sql = \"SELECT tb_prod_painel_promo.* FROM tb_prod_painel_promo \"\r\n + \"where terminal=? and painel=? order by tb_prod_painel_promo.idtb_painel_promo\"; \r\n PreparedStatement pstm = conexao.prepareStatement(sql);\r\n pstm.setInt(1, terminal);\r\n pstm.setInt(2, painel);\r\n ResultSet rs = pstm.executeQuery();\r\n List<Tb_Prod_Painel_PromoBeans> lpb = new ArrayList<>();\r\n while (rs.next()) {\r\n Tb_Prod_Painel_PromoBeans pb = new Tb_Prod_Painel_PromoBeans();\r\n pb.setCodigo(rs.getString(\"codigo\"));\r\n pb.setDescricao(rs.getString(\"descricao\"));\r\n pb.setUnid(rs.getString(\"unid\"));\r\n pb.setValor1(rs.getFloat(\"valor1\"));\r\n pb.setValor2(rs.getFloat(\"valor2\"));\r\n pb.setOferta(rs.getBoolean(\"oferta\"));\r\n pb.setReceita(rs.getString(\"receita\")); \r\n pb.setTerminal(rs.getInt(\"terminal\"));\r\n pb.setPainel(rs.getInt(\"painel\"));\r\n lpb.add(pb);\r\n }\r\n rs.close();\r\n pstm.close();\r\n conexao.close();\r\n return lpb;\r\n }\r\n }", "public static Object[] getArrayDeObjectos(int codigo,String nombre,String fabricante,float precio, String stock) {\r\n Object[] v = new Object[6];\r\n try {\r\n Statement stmt = singleton.conn.createStatement();\r\n \r\n ResultSet rs = stmt.executeQuery(\"SELECT c.nombre FROM articulos a,categorias c,prodcategoria p \"\r\n + \"WHERE a.codigo = p.articulo AND c.categoria_id = p.categoria AND a.codigo = \"+codigo);\r\n\r\n v[0] = codigo;\r\n v[1] = nombre;\r\n v[2] = fabricante;\r\n v[3] = precio;\r\n v[4] = stock;\r\n \r\n if(rs.first()){\r\n String categories = rs.getString(\"nombre\");\r\n while(rs.next()){\r\n categories = categories + \", \"+rs.getString(\"nombre\");\r\n }\r\n v[5] = categories;\r\n }\r\n \r\n } catch (SQLException ex) {\r\n \r\n }\r\n return v;\r\n }", "List<Plaza> consultarPlazas();", "public void listarProvincia() {\n provincias = JPAFactoryDAO.getFactory().getProvinciaDAO().find();\n// for(int i=0;i<provincias.size();i++ ){\n// System.out.println(\"lista:\"+provincias.get(i).getNombreprovincia());\n// }\n }", "public JSONArray ObtenerTipoProducto()\r\n {\r\n JSONArray Tproductos = new JSONArray();\r\n JSONObject Tproducto = new JSONObject();\r\n \r\n try\r\n {\r\n this.cn = getConnection();\r\n this.st = this.cn.createStatement();\r\n String sql;\r\n sql = \"SELECT * FROM tipo_producto\";\r\n this.rs = this.st.executeQuery(sql);\r\n \r\n while(this.rs.next())\r\n {\r\n TipoProducto tp = new TipoProducto(rs.getString(\"cod_tipo_producto\"), rs.getString(\"nombre_tipo_producto\"));\r\n Tproducto = tp.getJSONObject();\r\n System.out.printf(Tproducto.toString());\r\n Tproductos.add(Tproducto);\r\n }\r\n \r\n this.desconectar();\r\n }\r\n \r\n catch(Exception e)\r\n {\r\n e.printStackTrace();\r\n }\r\n \r\n return(Tproductos);\r\n }", "@Override\n\tpublic List<Produto> listar(Produto entidade) {\n\t\treturn null;\n\t}", "public List<Tb_Prod_Painel_PromoBeans> getProdPainel(Integer terminal, Integer painel) throws SQLException {\r\n try (Connection conexao = new ConexaoLocalDBMySql().getConnect()) {\r\n String sql = \"SELECT tb_prod_painel_promo.* FROM tb_prod_painel_promo \"\r\n + \" INNER JOIN tb_prod ON(tb_prod_painel_promo.codigo=tb_prod.codigo) where terminal=? and painel=? order by tb_prod_painel_promo.idtb_painel_promo\"; \r\n PreparedStatement pstm = conexao.prepareStatement(sql);\r\n pstm.setInt(1, terminal);\r\n pstm.setInt(2, painel);\r\n ResultSet rs = pstm.executeQuery();\r\n List<Tb_Prod_Painel_PromoBeans> lpb = new ArrayList<>();\r\n while (rs.next()) {\r\n Tb_Prod_Painel_PromoBeans pb = new Tb_Prod_Painel_PromoBeans();\r\n pb.setCodigo(rs.getString(\"codigo\"));\r\n pb.setDescricao(rs.getString(\"descricao\"));\r\n pb.setUnid(rs.getString(\"unid\"));\r\n pb.setValor1(rs.getFloat(\"valor1\"));\r\n pb.setValor2(rs.getFloat(\"valor2\"));\r\n pb.setOferta(rs.getBoolean(\"oferta\"));\r\n pb.setReceita(rs.getString(\"receita\")); \r\n pb.setTerminal(rs.getInt(\"terminal\"));\r\n pb.setPainel(rs.getInt(\"painel\"));\r\n lpb.add(pb);\r\n }\r\n rs.close();\r\n pstm.close();\r\n conexao.close();\r\n return lpb;\r\n }\r\n }", "@Nullable\r\n public static JSONArray retrieveDescubreShops(final Context context)\r\n {\r\n JSONArray content;\r\n\r\n try\r\n {\r\n SharedPreferencesManager sharedPreferencesManager = new SharedPreferencesManager(context);\r\n\r\n long id = sharedPreferencesManager.retrieveUser().getId();\r\n\r\n RequestFuture<JSONArray> future = RequestFuture.newFuture();\r\n\r\n final String fixedURL = Utils.fixUrl(Properties.SERVER_URL + \":\" + Properties.SERVER_SPRING_PORT\r\n + \"/descubre/\" + id);\r\n\r\n Log.d(Properties.TAG, \"[REST_CLIENT_SINGLETON] Conectando con: \" + fixedURL + \" para traer las tiendas recomendadas\");\r\n\r\n // Creamos una peticion\r\n final JsonArrayRequest jsonObjReq = new JsonArrayRequest(Request.Method.GET\r\n , fixedURL\r\n , null\r\n , future\r\n , future);\r\n\r\n // La mandamos a la cola de peticiones\r\n VolleySingleton.getInstance(context).addToRequestQueue(jsonObjReq);\r\n Log.d(Properties.TAG, \"[REST_CLIENT_SINGLETON] Petición creada y enviada\");\r\n\r\n try\r\n {\r\n content = future.get(20, TimeUnit.SECONDS);\r\n Log.d(Properties.TAG, \"[REST_CLIENT_SINGLETON] Respuesta recibida del servidor\");\r\n\r\n } catch (InterruptedException e) {\r\n ExceptionPrinter.printException(\"REST_CLIENT_SINGLETON\", e);\r\n\r\n return null;\r\n }\r\n\r\n // Si content es vacio, es que han fallado todas las conexiones.\r\n if (content == null)\r\n {\r\n Log.d(Properties.TAG, \"[REST_CLIENT_SINGLETON] No se ha recibido nada\");\r\n\r\n return null;\r\n }\r\n\r\n } catch (Exception e) {\r\n ExceptionPrinter.printException(\"REST_CLIENT_SINGLETON\", e);\r\n\r\n return null;\r\n }\r\n\r\n return content;\r\n }", "public static Object[] getArrayDeObjectosProc(int codigo,String nombre,String fabricante,float precio, String stock, int vel, String tipo, int nucleos,String caract){\r\n Object[] v = new Object[9];\r\n \r\n v[0] = codigo;\r\n v[1] = nombre;\r\n v[2] = fabricante;\r\n v[3] = precio;\r\n v[4] = stock;\r\n v[5] = vel;\r\n v[6] = tipo;\r\n v[7] = nucleos;\r\n v[8] = caract;\r\n\r\n return v;\r\n }", "public List<Tiposservicios> getTiposServicios(HashMap parametros);", "public List<NotaDeCredito> procesar();", "private List<Produto> todosProdutos() {\n\t\treturn produtoService.todosProdutos();\n\t}", "public static List<Punto> getPuntos(){\n\t\t\n\t\tList<Punto> puntos = new ArrayList<Punto>();\n\t\ttry{\n\n\t\t\t//-12.045916, -75.195270\n\t\t\t\n\t\t\tPunto p1 = new Punto(1,-12.037512,-75.183327,0.0);\n\t\t\tp1.setDatos(getDatos(\"16/06/2017 09:00:00\", 2 , 1));\n\t\t\t\n\t\t\tPunto p2 = new Punto(2,-12.041961,-75.184786,0.0);\n\t\t\tp2.setDatos(getDatos(\"16/06/2017 09:00:00\",1 , 2));\n\t\t\t\n\t\t\tPunto p3 = new Punto(3,-12.0381,-75.1841,0.0);\n\t\t\tp3.setDatos(getDatos(\"16/06/2017 09:00:00\",2 , 2));\n\t\t\t\n\t\t\tPunto p4 = new Punto(4,-12.041542,-75.185816,0.0);\n\t\t\tp4.setDatos(getDatos(\"16/06/2017 11:00:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p5 = new Punto(5,-12.037764,-75.181096,0.0);\n\t\t\tp5.setDatos(getDatos(\"16/06/2017 11:15:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p6 = new Punto(6,-12.042801,-75.190108,0.0);\n\t\t\tp6.setDatos(getDatos(\"16/06/2017 11:00:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p7 = new Punto(7,-12.04364,-75.184014,0.0);\n\t\t\tp7.setDatos(getDatos(\"16/06/2017 11:00:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p8 = new Punto(8,-12.045739,-75.185387,0.0);\n\t\t\tp8.setDatos(getDatos(\"16/06/2017 11:30:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p9 = new Punto(9,-12.04683,-75.187361,0.0);\n\t\t\tp9.setDatos(getDatos(\"16/06/2017 11:50:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p10 = new Punto(10,-12.050775,-75.187962,0.0);\n\t\t\tp10.setDatos(getDatos(\"16/06/2017 12:30:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p11 = new Punto(11,-12.053797,-75.184271,0.0);\n\t\t\tp11.setDatos(getDatos(\"16/06/2017 13:00:00\",0 , 0));\n\t\t\t\n\t\t\tpuntos.add(p8);\n\t\t\tpuntos.add(p9);\n\t\t\tpuntos.add(p3);\n\t\t\tpuntos.add(p4);\n\t\t\tpuntos.add(p5);\n\t\t\tpuntos.add(p6);\n\t\t\tpuntos.add(p7);\n\t\t\tpuntos.add(p10);\n\t\t\tpuntos.add(p1);\n\t\t\tpuntos.add(p2);\n\t\t\tpuntos.add(p11);\n\t\t\t\n\t\t\t\n\t\t}catch(Exception e ){\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\t\n\t\treturn puntos;\n\t\n\t}", "List<ParqueaderoEntidad> listar();", "@Override\n public ArrayList<Propiedad> getPropiedadesCliente() throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO \"\n + \"= 'Activo'\");\n return resultado;\n }", "public biz.belcorp.www.canonico.ffvv.vender.TPedidoDetalle[] getPedidoDetalle(){\n return localPedidoDetalle;\n }", "public static void apagarProduto(){\n if(ListaDProduto.size() == 0){\n SaidaDados(\"Nehum produto cadastrado!!\");\n return;\n }\n \n String pesquisarNome = Entrada(\"Informe o nome do produto que deseja deletar: \");\n for(int i =0; i < ListaDProduto.size(); i++){\n \n Produto produtoProcurado = ListaDProduto.get(i);\n \n if(pesquisarNome.equalsIgnoreCase(produtoProcurado.getNome())){\n ListaDProduto.remove(i);\n SaidaDados(\"Produto deletado com sucesso!!\");\n }\n \n }\n \n }", "public List<Tripulante> obtenerTripulantes();", "private static DocumentoType[] getDocumentoTypeFromBPSDettaglioCartellaResponse( DettaglioCartellaAvvisoResponse response) {\r\n\t\t \r\n\t\tit.equitalia.dettagliocartellaavviso.wsdl.DocumentoType bpelDocumentoType = response.getCartellaAvviso().getDocumento();\r\n\t\t \r\n\t\tDocumentoType[] result = new DocumentoType[1];\r\n \t \r\n \t\tDocumentoType documentoType = new DocumentoType(); \r\n \t\tresult[0] = documentoType;\r\n\r\n \t\tIdentificativoDocumentoType identificativoDocumentoType = new IdentificativoDocumentoType();\r\n \t\tidentificativoDocumentoType.setTipoDocumento(bpelDocumentoType.getIdDocumento().getTipoDocumento() );\t\t//DATATYPEID=1 \tDescrizione\r\n \t\tidentificativoDocumentoType.setNumeroDocumento(bpelDocumentoType.getIdDocumento().getNumeroDocumento() );\t //DATATYPEID=2 \t\tN° Cartella \r\n \t\tdocumentoType.setIdDocumento(identificativoDocumentoType);\r\n \t\t\r\n \t\tit.equitalia.gestorefascicolows.dati.EnteType[] enti = new it.equitalia.gestorefascicolows.dati.EnteType[bpelDocumentoType.getEnte().length];\r\n \t\t \r\n \t\t \r\n \t\tfor (int iEnte = 0; iEnte < bpelDocumentoType.getEnte().length; iEnte++) {\r\n \t\t\tEnteType enteType = new EnteType();\r\n \t\tenteType.setDescrizione(bpelDocumentoType.getEnte()[iEnte].getDescrizione()); \t//DATATYPEID=3 \t\tEnte\r\n \t\tenti[iEnte] = enteType;\r\n\t\t}\r\n \t\t\r\n \t\tdocumentoType.setEnte(enti);\r\n\r\n \t\tdocumentoType.setDataNotifica(bpelDocumentoType.getDataNotifica()) ; //DATATYPEID=4 \t\t\tData Notifica\r\n \t\tdocumentoType.setImportoTotaleDocumento(bpelDocumentoType.getImportoTotaleDocumento().doubleValue()) ; //DATATYPEID=5 \t\tImporto Iniziale\r\n \t\tdocumentoType.setImportoInizialeTributi(bpelDocumentoType.getImportoInizialeTributi().doubleValue()) ; //DATATYPEID=6 \t\tImporto a ruolo\r\n \t\tdocumentoType.setImportoTotaleCompensi(bpelDocumentoType.getImportoTotaleCompensi().doubleValue()); // DATATYPEID=7 \t\tCompensi entro le scadenze\r\n \t\tdocumentoType.setImportoTotaleNotifica(bpelDocumentoType.getImportoTotaleNotifica().doubleValue()); //DATATYPEID=8 \t\tDiritti di Notifica\r\n\r\n \t\tdocumentoType.setImportoResiduoDocumento(bpelDocumentoType.getImportoResiduoDocumento().doubleValue()); // DATATYPEID=9 \t\tImporto da Pagare \r\n \t\tdocumentoType.setImportoResiduoTributi(bpelDocumentoType.getImportoResiduoTributi().doubleValue()); // DATATYPEID=10 \t\tImporti a ruolo residui\r\n \t\tdocumentoType.setImportoResiduoCompensi(bpelDocumentoType.getImportoResiduoCompensi().doubleValue()); //DATATYPEID=11 \t\tCompensi oltre le scadenze\r\n \t\tdocumentoType.setImportoResiduoNotifica(bpelDocumentoType.getImportoResiduoNotifica().doubleValue()); // DATATYPEID=12 \t\tDiritti di Notifica\r\n \t\tdocumentoType.setImportoInteressiMora(bpelDocumentoType.getImportoInteressiMora().doubleValue()); // DATATYPEID=13 \t\tInteressi di mora\r\n \t\tdocumentoType.setImportoSpeseProcedure(bpelDocumentoType.getImportoSpeseProcedure().doubleValue()); //DATATYPEID=14 \t\tSpese di Procedura\r\n \t\tdocumentoType.setImportoAltreSpese(bpelDocumentoType.getImportoAltreSpese().doubleValue()); \t\t\t\t//DATATYPEID=15 \t\tAltre Spese\r\n \t\tdocumentoType.setFlagSospensione(bpelDocumentoType.getFlagSospensione()); //DATATYPEID=16 \t\tSospensioni\r\n \t\tdocumentoType.setFlagSgravio(bpelDocumentoType.getFlagSgravio()); // DATATYPEID=17 \t\tSgravi\r\n \t\tdocumentoType.setFlagRateazione(bpelDocumentoType.getFlagRateazione()); //DATATYPEID=18 \t\tRateazioni\r\n \t\tdocumentoType.setFlagProcedura(bpelDocumentoType.getFlagProcedura()); //DATATYPEID=19 \t\tProcedure \r\n \t\t\r\n \t\tdocumentoType.setNumeroRav( bpelDocumentoType.getNumeroRav() ); \t\t//DATATYPEID=12 \t\tNumero RAV \r\n \r\n \tdocumentoType.setRObjectId(\"-\") ;\t\t//DATATYPEID=91 \t\t\r\n \t\tdocumentoType.setStatoPdf(CartellaDAOImpl.STATO_DOCUMENTUM_NON_RICHIESTO) ;\t\t//DATATYPEID=92 \t\t\r\n \t\tdocumentoType.setStatoRelate(CartellaDAOImpl.STATO_DOCUMENTUM_NON_RICHIESTO) ;\t\t//DATATYPEID=93 \t\t \r\n \t\t\r\n \t\r\n\t\treturn result ;\r\n\t\r\n\t}", "List<Videogioco> retriveByPiattaforma(String piattaforma);", "public static ArrayList<obj_dos_campos> carga_tipo_producto() {\n ArrayList<obj_dos_campos> lista = new ArrayList<obj_dos_campos>();\n Connection c=null;\n try {\n c = conexion_odbc.Connexion_datos();\n Statement s = c.createStatement();\n ResultSet rs = s.executeQuery(\"select tip_prod_idn as data, tip_prod_nombre as label from tipo_producto order by tip_prod_nombre desc\");\n lista.add(new obj_dos_campos(\"0\",\"-- Seleccione --\"));\n while (rs.next()){\n lista.add(new obj_dos_campos(rs.getString(\"data\"),rs.getString(\"label\")));\n }\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n c.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n return lista;\n }", "private static Vuelo[] arribos(Vuelo [] vuelosArray) {\n Ciudad concordia = new Ciudad(\"CON\",\"Concordia\");\n\n Vuelo[] listado = new Vuelo[0];\n for (Vuelo vuelo: vuelosArray) {\n if (vuelo.getCiudaDestino().equals(concordia)) {\n listado = agregarVuelo(listado, vuelo);\n }\n }\n return listado;\n }", "List<Pacote> buscarPorTransporte(Transporte transporte);", "private static String[] descompresor(String jsonObj) {\n\n try {\n Gson gson = new Gson();\n JsonElement elemento = gson.fromJson(jsonObj, JsonElement.class);\n JsonObject respuesta = elemento.getAsJsonObject();\n\n JsonElement clima = respuesta.get(\"weather\");\n JsonObject estadoClima = clima.getAsJsonArray().get(0).getAsJsonObject();\n JsonObject main = respuesta.get(\"main\").getAsJsonObject();\n JsonObject coordenadas = respuesta.get(\"coord\").getAsJsonObject();\n JsonObject sys = respuesta.get(\"sys\").getAsJsonObject();\n\n String temp = main.get(\"temp\").getAsString();\n String sensacion_termica = main.get(\"feels_like\").getAsString();\n String descripcion = estadoClima.get(\"description\").getAsString();\n\n String longitud = coordenadas.get(\"lon\").getAsString();\n String latitud = coordenadas.get(\"lat\").getAsString();\n\n String pais = sys.get(\"country\").getAsString();\n\n return new String[] { pais, longitud, latitud, descripcion, temp, sensacion_termica };\n\n } catch (Exception e) {\n return null;\n }\n }", "public List<Produto> listar() {\n return manager.createQuery(\"select distinct (p) from Produto p\", Produto.class).getResultList();\n }", "public List<Produto> consultarProdutos(int consulta, String valor) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n Statement stmt = null;\r\n ResultSet rs = null;\r\n List<Produto> produtos = new ArrayList<>();\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.createStatement();\r\n //Se a consulta for igual a zero(0) uma lista de todos os produtos \"cervejas\" e recuperada\r\n if (consulta == 0) {\r\n rs = stmt.executeQuery(consultas[consulta]);\r\n //Se a consulta for igual a tres(3) uma lista de todos os produtos \"cervejas\" e recuperada a parti do preco\r\n } else {\r\n rs = stmt.executeQuery(consultas[consulta] + \"'\" + valor + \"'\");\r\n }\r\n Produto produto;\r\n while (rs.next()) {\r\n produto = new Produto();\r\n produto.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n produto.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n produto.setPais(rs.getString(\"PAIS\"));\r\n produto.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n produto.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n produto.setRotulo(rs.getString(\"ROTULO\"));\r\n produto.setPreco(rs.getString(\"PRECO\"));\r\n produto.setVolume(rs.getString(\"VOLUME\"));\r\n produto.setTeor(rs.getString(\"TEOR\"));\r\n produto.setCor(rs.getString(\"COR\"));\r\n produto.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n produto.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n produto.setDescricao(rs.getString(\"DESCRICAO\"));\r\n produto.setSabor(rs.getString(\"SABOR\"));\r\n produto.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n produto.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n produto.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n produtos.add(produto);\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return produtos;\r\n }", "public List<Tb_Prod_Painel_PromoBeans> getProdPainelTabelas(Integer terminal, String painel) throws SQLException {\r\n try (Connection conexao = new ConexaoLocalDBMySql().getConnect()) {\r\n String sql = \"SELECT tb_prod_painel_promo.* FROM tb_prod_painel_promo \"\r\n + \" INNER JOIN tb_prod ON(tb_prod_painel_promo.codigo=tb_prod.codigo) where terminal=? and painel in(\" + painel + \") order by tb_prod_painel_promo.idtb_painel_promo\"; \r\n PreparedStatement pstm = conexao.prepareStatement(sql);\r\n pstm.setInt(1, terminal); \r\n ResultSet rs = pstm.executeQuery();\r\n List<Tb_Prod_Painel_PromoBeans> lpb = new ArrayList<>(); \r\n while (rs.next()) {\r\n Tb_Prod_Painel_PromoBeans pb = new Tb_Prod_Painel_PromoBeans();\r\n pb.setCodigo(rs.getString(\"codigo\"));\r\n pb.setDescricao(rs.getString(\"descricao\"));\r\n pb.setUnid(rs.getString(\"unid\"));\r\n pb.setValor1(rs.getFloat(\"valor1\"));\r\n pb.setValor2(rs.getFloat(\"valor2\"));\r\n pb.setOferta(rs.getBoolean(\"oferta\"));\r\n pb.setReceita(rs.getString(\"receita\")); \r\n pb.setTerminal(rs.getInt(\"terminal\"));\r\n pb.setPainel(rs.getInt(\"painel\"));\r\n lpb.add(pb);\r\n }\r\n rs.close();\r\n pstm.close();\r\n conexao.close();\r\n return lpb;\r\n }\r\n }", "private static void listaProdutosCadastrados() throws Exception {\r\n String nomeCategoria;\r\n ArrayList<Produto> lista = arqProdutos.toList();\r\n if (!lista.isEmpty()) {\r\n System.out.println(\"\\t** Lista dos produtos cadastrados **\\n\");\r\n }\r\n for (Produto p : lista) {\r\n if (p != null && p.getID() != -1) {\r\n nomeCategoria = getNomeCategoria(p.idCategoria - 1);\r\n System.out.println(\r\n \"Id: \" + p.getID()\r\n + \"\\nNome: \" + p.nomeProduto\r\n + \"\\nDescricao: \" + p.descricao\r\n + \"\\nPreco: \" + tf.format(p.preco)\r\n + \"\\nMarca: \" + p.marca\r\n + \"\\nOrigem: \" + p.origem\r\n );\r\n if (nomeCategoria != null) {\r\n System.out.println(\"Categoria: \" + nomeCategoria);\r\n } else {\r\n System.out.println(\"Categoria: \" + p.idCategoria);\r\n }\r\n System.out.println();\r\n Thread.sleep(500);\r\n }\r\n }\r\n }", "@GET\n\t@Path(\"/tipos\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic ArrayList<TipoAutoDTO> listarTipos(){\n\t\tSystem.out.println(\"ini: listarTipos()\");\n\t\t\n\t\tTipoAutoService tipoService = new TipoAutoService();\n\t\tArrayList<TipoAutoDTO> lista = tipoService.ListadoTipoAuto();\n\t\t\n\t\tif (lista == null) {\n\t\t\tSystem.out.println(\"Listado Vacío\");\n\t\t}else {\n\t\t\tSystem.out.println(\"Consulta Exitosa\");\n\t\t}\n\n\t\tSystem.out.println(\"fin: listarTipos()\");\n\t\t\n\t\treturn lista;\n\t}", "@GET(\"rest/emprego\")\n Call<List<Posto>> callListPostoSINE();", "public static void main(String[] args) {\n Gson json = new Gson();\n RestPregunta client = new RestPregunta();\n ArrayList value = client.getPreguntasCuestionario(ArrayList.class, \"68\");\n for(Object ob: value){ \n System.out.println(ob);\n Pregunta pregunta = json.fromJson(ob.toString(), Pregunta.class);\n System.out.println(pregunta.getPregunta());\n }\n client.close();\n //Gson json = new Gson();\n RestPregunta restPregunta = new RestPregunta();\n ArrayList<Pregunta> lista = new ArrayList();\n ArrayList values = restPregunta.getPreguntasCuestionario(ArrayList.class,\"68\");\n for(Object pro: values){\n Pregunta pregunta = json.fromJson(pro.toString(), Pregunta.class);\n lista.add(new Pregunta(pregunta.getIdPregunta(), pregunta.getIdCuestionario(), pregunta.getPuntoAsignado(), pregunta.getPuntoObtenido(), pregunta.getPregunta())); \n }\n// Pregunta pregunta = client.getPregunta(Pregunta.class, \"1\");\n// System.out.println(pregunta);\n// System.out.println(pregunta.toString());\n \n// ArrayList value = client.getPreguntas(ArrayList.class);\n // ArrayList<Pregunta> list = new ArrayList();\n// System.out.println(value);\n \n //list.add(pregunta);\n \n //System.out.println(pregunta.getArchivoimg2());\n \n// Pregunta p = new Pregunta(1,14,400,300,\"5000?\",\"C:\\\\Users\\\\Matias\\\\Pictures\\\\Pictures\\\\Sample Pictures\\\\Desert.jpg\", inputStream,\" \");\n //Object ob = p;\n// client.addPregunta(p, Pregunta.class);\n// System.out.println(list);\n \n }", "public static List getAllPrices() {\n List polovniautomobili = new ArrayList<>();\n try {\n CONNECTION = DriverManager.getConnection(URL, USERNAME, PASSWORD);\n String query = \"SELECT cena FROM polovni\";\n try (PreparedStatement ps = CONNECTION.prepareStatement(query)) {\n ResultSet result = ps.executeQuery();\n while (result.next()) {\n int naziv = result.getInt(\"cena\");\n polovniautomobili.add(naziv);\n\n }\n\n ps.close();\n CONNECTION.close();\n }\n CONNECTION.close();\n } catch (SQLException ex) {\n Logger.getLogger(Register.class.getName()).log(Level.SEVERE, null, ex);\n }\n return polovniautomobili;\n }", "@Override\n public ArrayList<Propiedad> getPrecioCliente(double pMenor, double pMayor) throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ESTADO = 'ACTIVO' AND \"\n + \"PRECIO >= \" + pMenor + \" AND PRECIO <= \" + pMayor);\n return resultado;\n }", "public List<Tripulante> buscarTodosTripulantes();", "@GetMapping(\"/procesadors\")\n @Timed\n public List<Procesador> getAllProcesadors() {\n log.debug(\"REST request to get all Procesadors\");\n List<Procesador> procesadors = procesadorRepository.findAll();\n return procesadors;\n }", "@RequestMapping(method = RequestMethod.GET)\n\tpublic @ResponseBody List<ServicoPessoa> getServicoPessoas()\n\t\t\tthrows Exception {\n\t\ttry {\n\t\t\tList<ServicoPessoa> servicoPessoas = servicoPessoaService.getServicoPessoas();\n\t\t\treturn servicoPessoas;\n\t\t} catch (Exception e) {\n\t\t\tthrow e;\n\t\t}\n\t}", "private void removeProdutos() {\n Collection<IProduto> prods = this.controller.getProdutos();\n for(IProduto p : prods) System.out.println(\" -> \" + p.getCodigo() + \" \" + p.getNome());\n System.out.println(\"Insira o codigo do produto que pretende remover da lista de produtos?\");\n String codigo = Input.lerString();\n // Aqui devia se verificar se o produto existe mas nao sei fazer isso.\n this.controller.removeProdutoControl(codigo);\n }", "@Override\n public List<Produto> filtrarProdutos() {\n\n Query query = em.createQuery(\"SELECT p FROM Produto p ORDER BY p.id DESC\");\n\n// query.setFirstResult(pageRequest.getPageNumber() * pageRequest.getPageSize());\n// query.setMaxResults(pageRequest.getPageSize());\n return query.getResultList();\n }", "@Override\n public ArrayList<Propiedad> getPropiedadesAgente(String pId) throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ID_AGENTE \"\n + \"= '\" + pId + \"'\");\n return resultado;\n }", "List<BeanPedido> getPedidos();", "public static List<Parte> listarPartes(){\n List <Parte> partes=new ArrayList<>();\n Conexion.conectar();\n String sql = \"call ppartes.partesList (?)\";\n \n try {\n CallableStatement cs = Conexion.getConexion().prepareCall(sql);\n cs.registerOutParameter(1, OracleTypes.CURSOR);\n cs.execute();\n \n ResultSet rs = (ResultSet) cs.getObject(1);\n while (rs.next()){\n Parte p = new Parte();\n p.setFecha(rs.getString(\"fecha\"));\n p.setKmInicial(rs.getBigDecimal(\"kmInicial\"));\n p.setKmFinal(rs.getBigDecimal(\"kmFinal\"));\n p.setGastoPeaje(rs.getBigDecimal(\"gastosPeaje\")); \n p.setGastoDietas(rs.getBigDecimal(\"gastosDietas\"));\n p.setGastoCombustible(rs.getBigDecimal(\"gastosCombustible\"));\n p.setGastoVarios(rs.getBigDecimal(\"otrosGastos\"));\n p.setIncidencias(rs.getString(\"incidencias\"));\n p.setEstado(rs.getString(\"estado\"));\n p.setValidado(rs.getString(\"validado\"));\n p.setHorasExtras(rs.getBigDecimal(\"horasExtras\"));\n p.setIdTrabajador(rs.getBigDecimal(\"TRABAJADORES_ID\"));\n p.setNotasAdministrativas(rs.getString(\"notasAdministrativas\"));\n partes.add(p);\n }\n \n rs.close();\n cs.close();\n Conexion.desconectar();\n return partes;\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"No se puede efectuar la conexión, hable con el administrador del sistema\" + ex.getMessage());\n }\n return null;\n }", "public List<Pregunta> getPreguntasMasVotadas(int limit);", "public String[] requisicaoPassageiros() {\n\t\tConector con = new Conector();\r\n\t\tString params[] = new String[1];\r\n\t\tString resultado;\r\n\t\tString passageiros[];\r\n\r\n\t\tparams[0] = \"op=7\";\r\n\r\n\t\tresultado = con.sendHTTP(params);\r\n\r\n\t\tpassageiros = resultado.split(\";\");\r\n\r\n\t\treturn passageiros;\r\n\t}", "public List<Product> getFullProductList(){\n\t\t/*\n\t\t * La lista dei prodotti da restituire.\n\t\t */\n\t\tList<Product> productList = new ArrayList<Product>();\n\t\t\n\t\t/*\n\t\t * Preleviamo il contenuto della tabella PRODOTTO.\n\t\t */\n\t\tStatement productStm = null;\n\t\tResultSet productRs = null;\n\t\t\n\t\ttry{\n\t\t\tproductStm = connection.createStatement();\n\t\t\tString sql = \"SELECT * FROM PRODOTTO;\";\n\t\t\tproductRs = productStm.executeQuery(sql);\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"DB issue: failed to retrive product data from database.\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\ttry{\n\t\t\tproductList = this.getProductListFromRs(productRs);\n\t\t\tproductStm.close(); // Chiude anche il ResultSet productRs\n\t\t\tConnector.releaseConnection(connection);\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tSystem.out.println(\"ResultSet issue 2: failed to retrive data from ResultSet.\\n\");\n\t\t\tSystem.out.println(sqle.getClass().getName() + \": \" + sqle.getMessage());\n\t\t}\n\t\t\n\t\treturn productList;\n\t}", "public static List<Parte> partesTFA(){\n List <Parte> partes=new ArrayList<>();\n Conexion.conectar();\n String sql = \"call ppartes.partesTA (?)\";\n \n try {\n CallableStatement cs = Conexion.getConexion().prepareCall(sql);\n \n \n \n cs.registerOutParameter(1, OracleTypes.CURSOR);\n cs.execute();\n \n ResultSet rs = (ResultSet) cs.getObject(1);\n while (rs.next()){\n Parte p = new Parte();\n p.setFecha(rs.getString(\"fecha\"));\n p.setKmInicial(rs.getBigDecimal(\"kmInicial\"));\n p.setKmFinal(rs.getBigDecimal(\"kmFinal\"));\n p.setGastoPeaje(rs.getBigDecimal(\"gastosPeaje\")); \n p.setGastoDietas(rs.getBigDecimal(\"gastosDietas\"));\n p.setGastoCombustible(rs.getBigDecimal(\"gastosCombustible\"));\n p.setGastoVarios(rs.getBigDecimal(\"otrosGastos\"));\n p.setIncidencias(rs.getString(\"incidencias\"));\n p.setEstado(rs.getString(\"estado\"));\n p.setValidado(rs.getString(\"validado\"));\n p.setHorasExtras(rs.getBigDecimal(\"horasExtras\"));\n p.setIdTrabajador(rs.getBigDecimal(\"TRABAJADORES_ID\"));\n p.setNotasAdministrativas(rs.getString(\"notasAdministrativas\"));\n partes.add(p);\n }\n \n rs.close();\n cs.close();\n Conexion.desconectar();\n return partes;\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"No se puede efectuar la conexión, hable con el administrador del sistema\" + ex.getMessage());\n }\n return null;\n }", "public static Object[] getArrayDeObjectosPrinter(int codigo,String nombre,String fabricante,float precio, String stock, String tipo, String color,int ppm){\r\n Object[] v = new Object[8];\r\n \r\n v[0] = codigo;\r\n v[1] = nombre;\r\n v[2] = fabricante;\r\n v[3] = precio;\r\n v[4] = stock;\r\n v[5] = tipo;\r\n v[6] = color;\r\n v[7] = ppm;\r\n\r\n return v;\r\n }", "static public Product[] retrieve(int[] id) {\n\t\t\n\t\tProduct[] list = null;\n\t\t\n\t\treturn list;\n\t}", "private void getPTs(){\n mPyTs = estudioAdapter.getListaPesoyTallasSinEnviar();\n //ca.close();\n }", "public List<GrupoLocalResponse> buscarTodos();", "@Test\n public void deve_retornar_um_objeto_projetosresponse() {\n ProjetosResponse projetosResponse = ProjetoResponseStub.getProjetosResponse();\n ProjetosResponse response = ProjetoMapper.maptoProjetoResponse(ProjetoModelStub.getProjetoModelList());\n Assert.assertEquals(projetosResponse, response);\n }", "public List<Perguntas> getPerguntas(String servico) {\r\n String idSolicitacao = \"\";\r\n List<Perguntas> perguntas = new ArrayList<>();\r\n\r\n String sql = \"Select\\n\"\r\n + \" perguntas.Id_Perguntas,\\n\"\r\n + \" perguntas.pergunta,\\n\"\r\n + \" perguntas.Servico_id_servico,\\n\"\r\n + \" solicitacoes.id_solicitacao\\n\"\r\n + \"FROM \\n\"\r\n + \"\tpid \\n\"\r\n + \"\\n\"\r\n + \"INNER JOIN solicitacoes on (pid.cod_pid= solicitacoes.PID_cod_pid)\\n\"\r\n + \" INNER JOIN servico on\t(solicitacoes.Servico_id_servico=servico.id_servico)\\n\"\r\n + \" INNER JOIN perguntas on \t(servico.id_servico=perguntas.Servico_id_servico)\\n\"\r\n + \" WHERE solicitacoes.em_chamado = 3 and servico.id_servico = \" + servico + \";\";\r\n\r\n stmt = null;\r\n rs = null;\r\n\r\n try {\r\n stmt = conn.createStatement();\r\n rs = stmt.executeQuery(sql);\r\n while (rs.next()) {\r\n Perguntas p = new Perguntas();\r\n\r\n p.setIdPerguntas(rs.getInt(1));\r\n p.setIdServico(rs.getInt(3));\r\n p.setPergunta(rs.getString(2));\r\n idSolicitacao = rs.getString(4);\r\n perguntas.add(p);\r\n }\r\n mudaStatus(idSolicitacao);\r\n\r\n return perguntas;\r\n\r\n } catch (SQLException | ArrayIndexOutOfBoundsException ex) {\r\n Logger.getLogger(SimpleQueries.class\r\n .getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n return perguntas;\r\n }", "public static List<ViajeEntidad> getListaViajesEntidad(){\n List<ViajeEntidad> viajes = new ArrayList<>();\n Date date = new Date();\n ViajeEntidadPK viajePK = new ViajeEntidadPK();\n TaxiEntidad taxiByPkPlacaTaxi = new TaxiEntidad();\n ClienteEntidad clienteByPkCorreoCliente = new ClienteEntidad();\n clienteByPkCorreoCliente.setPkCorreoUsuario(\"gerente11@gerente.com\");\n TaxistaEntidad taxistaByCorreoTaxi = new TaxistaEntidad();\n taxistaByCorreoTaxi.setPkCorreoUsuario(\"gerente11@gerente.com\");\n OperadorEntidad agendaOperador = new OperadorEntidad();\n agendaOperador.setPkCorreoUsuario(\"gerente11@gerente.com\");\n\n viajePK.setPkPlacaTaxi(\"CCC11\");\n viajePK.setPkFechaInicio(\"2019-01-01 01:01:01\");\n viajes.add(new ViajeEntidad(viajePK, \"2019-01-01 02:01:01\",\"5000\", 2, \"origen\",\"destino\", \"agenda\", \"agenda2\", taxiByPkPlacaTaxi, clienteByPkCorreoCliente, taxistaByCorreoTaxi, agendaOperador));\n viajePK.setPkPlacaTaxi(\"DDD11\");\n viajes.add(new ViajeEntidad(viajePK, \"2019-01-01 02:01:01\",\"5000\", 2, \"origen\",\"destino\", \"agenda\", \"agenda2\", taxiByPkPlacaTaxi, clienteByPkCorreoCliente, taxistaByCorreoTaxi, agendaOperador));\n viajePK.setPkPlacaTaxi(\"EEE11\");\n viajes.add(new ViajeEntidad(viajePK, \"2019-01-01 02:01:01\",\"5000\", 2, \"origen\",\"destino\", \"agenda\", \"agenda2\", taxiByPkPlacaTaxi, clienteByPkCorreoCliente, taxistaByCorreoTaxi, agendaOperador));\n\n return viajes;\n }", "@CrossOrigin(origins = \"http://localhost:8000\")\n @ApiOperation(value = \"Get all the orders\", produces = \"application/json\", response = PizzaOrder.class, responseContainer = \"List\")\n @RequestMapping(value = \"/orders\", method = RequestMethod.GET)\n public Iterable<PizzaOrder> getPizzaOrders() {\n\t//logger.info(\"TrackingId:89a80896-35a4-468c-9ec3-b762ab161429|ClientId:89a80897-35a4-468c-9ec3-b762ab161429|Find all Ordered Pizza\"); \n\t Iterable<PizzaOrder> pizzaOrderIterable = pizzaOrderService.findAll();\n\t try{\n\t\t\t\t\n\t\t\t\tIterator<PizzaOrder> pizzaOrderIter = pizzaOrderIterable.iterator();\n\t\t\t\tStringBuffer pizzaOrderBuffer = new StringBuffer();\n\t\t\t\tpizzaOrderBuffer.append(\"TrackingId:89a80896-35a4-468c-9ec3-b762ab161429|ClientId:89a80897-35a4-468c-9ec3-b762ab161429|Ordered Pizza List : \");\n\t\t\t\twhile(pizzaOrderIter.hasNext()){\n\t\t\t\t\tPizzaOrder pizzaOrdObj = pizzaOrderIter.next();\n\t\t\t\t\tSet<Pizza> pizzaSet = pizzaOrdObj.getPizzas();\n\t\t\t\t\tIterator<Pizza> pizzaItr = pizzaSet.iterator();\n\t\t\t\t\twhile(pizzaItr.hasNext()){\n\t\t\t\t\t\tpizzaOrderBuffer.append(pizzaItr.next().getName());\n\t\t\t\t\t\tpizzaOrderBuffer.append(\"##\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlogger.info(pizzaOrderBuffer.toString());\n\t }catch(Exception ex){\n\t\t\tex.printStackTrace();\n\t }\n\t\n return pizzaOrderIterable;\n }", "public ArrayList<ProductoDTO> mostrartodos() {\r\n\r\n\r\n PreparedStatement ps;\r\n ResultSet res;\r\n ArrayList<ProductoDTO> arr = new ArrayList();\r\n try {\r\n\r\n ps = conn.getConn().prepareStatement(SQL_READALL);\r\n res = ps.executeQuery();\r\n while (res.next()) {\r\n\r\n arr.add(new ProductoDTO(res.getInt(1), res.getString(2), res.getString(3), res.getInt(4), res.getInt(5), res.getString(6), res.getString(7), res.getString(8), res.getString(9)));\r\n }\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"error vuelva a intentar\");\r\n } finally {\r\n conn.cerrarconexion();\r\n\r\n }\r\n return arr;\r\n\r\n }", "public static List<Parte> partesTFC(){\n List <Parte> partes=new ArrayList<>();\n Conexion.conectar();\n String sql = \"call ppartes.partesTC (?)\";\n \n try {\n CallableStatement cs = Conexion.getConexion().prepareCall(sql);\n \n \n \n cs.registerOutParameter(1, OracleTypes.CURSOR);\n cs.execute();\n \n ResultSet rs = (ResultSet) cs.getObject(1);\n while (rs.next()){\n Parte p = new Parte();\n p.setFecha(rs.getString(\"fecha\"));\n p.setKmInicial(rs.getBigDecimal(\"kmInicial\"));\n p.setKmFinal(rs.getBigDecimal(\"kmFinal\"));\n p.setGastoPeaje(rs.getBigDecimal(\"gastosPeaje\")); \n p.setGastoDietas(rs.getBigDecimal(\"gastosDietas\"));\n p.setGastoCombustible(rs.getBigDecimal(\"gastosCombustible\"));\n p.setGastoVarios(rs.getBigDecimal(\"otrosGastos\"));\n p.setIncidencias(rs.getString(\"incidencias\"));\n p.setEstado(rs.getString(\"estado\"));\n p.setValidado(rs.getString(\"validado\"));\n p.setHorasExtras(rs.getBigDecimal(\"horasExtras\"));\n p.setIdTrabajador(rs.getBigDecimal(\"TRABAJADORES_ID\"));\n p.setNotasAdministrativas(rs.getString(\"notasAdministrativas\"));\n partes.add(p);\n }\n \n rs.close();\n cs.close();\n Conexion.desconectar();\n return partes;\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, \"No se puede efectuar la conexión, hable con el administrador del sistema\" + ex.getMessage());\n }\n return null;\n }", "public ArrayList<Proposta> buscarPropostasSemFiltro() {\n\n ArrayList<Proposta> listaDePropostas = new ArrayList<>();\n\n conectarnoBanco();\n\n String sql = \"SELECT * FROM proposta\";\n\n try {\n\n st = con.createStatement();\n\n rs = st.executeQuery(sql);\n\n System.out.println(\"Lista de propostas: \");\n\n while (rs.next()) {\n\n Proposta propostaTemp = new Proposta(rs.getString(\"propostaRealizada\"), rs.getFloat(\"valorProposta\"), rs.getInt(\"id_usuario\"), rs.getInt(\"id_projeto\"),rs.getInt(\"id_client\"));\n\n System.out.println(\"Proposta = \" + propostaTemp.getPropostaRealizada());\n System.out.println(\"Valor da Proposta = \" + propostaTemp.getValorProposta());\n\n System.out.println(\"---------------------------------\");\n\n listaDePropostas.add(propostaTemp);\n\n sucesso = true;\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao buscar propostas = \" + ex.getMessage());\n sucesso = false;\n } finally {\n try {\n\n if (con != null && pst != null) {\n con.close();\n pst.close();\n }\n\n } catch (SQLException ex) {\n System.out.println(\"Erro ao fechar o bd = \" + ex.getMessage());\n }\n\n }\n\n return listaDePropostas;\n }", "Product getPProducts();", "public List<Object[]> getRetencionesAnuladas(int mes, int anio, int idOrganizacion, Sucursal sucursalFP, Sucursal sucursalRetencion, PuntoDeVenta puntoVentaRetencion, String orden, TipoComprobanteSRI tipoComprobante)\r\n/* 125: */ {\r\n/* 126:175 */ StringBuilder sql = new StringBuilder();\r\n/* 127: */ \r\n/* 128:177 */ sql.append(\" SELECT a.fechaEmisionDocumento, f.fechaRegistro, f.fechaEmision, CONCAT(f.establecimiento,'-',f.puntoEmision,'-',f.numero), f.identificacionProveedor, \");\r\n/* 129: */ \r\n/* 130:179 */ sql.append(\" \\t'', f.montoIva*0, f.montoIva*0, f.montoIva*0, '', '', \");\r\n/* 131: */ \r\n/* 132:181 */ sql.append(\" \\tCONCAT(a.establecimiento,'-',a.puntoEmision,'-',a.numeroDesde), f.montoIva*0, f.montoIva*0, f.montoIva*0, f.nombreProveedor, \");\r\n/* 133: */ \r\n/* 134:183 */ sql.append(\"\\tf.montoIva*0, f.montoIva*0, '', a.autorizacion, f.fechaRegistro, f.autorizacion, '', 'ANULADO', f.idFacturaProveedorSRI,'' \");\r\n/* 135:184 */ sql.append(\" FROM AnuladoSRI a, FacturaProveedorSRI f \");\r\n/* 136:185 */ sql.append(\" WHERE a.documentoRelacionado = f.idFacturaProveedorSRI \");\r\n/* 137:186 */ sql.append(\" AND a.tipoComprobanteSRI = :tipoComprobante \");\r\n/* 138:187 */ sql.append(\" AND a.anio = :anio AND a.mes = :mes \");\r\n/* 139:188 */ sql.append(\" AND a.idOrganizacion = :idOrganizacion \");\r\n/* 140:189 */ if (sucursalFP != null) {\r\n/* 141:190 */ sql.append(\" AND f.idSucursal = :idSucursal \");\r\n/* 142: */ }\r\n/* 143:192 */ if (sucursalRetencion != null) {\r\n/* 144:193 */ sql.append(\" AND a.establecimiento = :sucursalRetencion \");\r\n/* 145: */ }\r\n/* 146:195 */ if (puntoVentaRetencion != null) {\r\n/* 147:196 */ sql.append(\" AND a.puntoEmision = :puntoVentaRetencion \");\r\n/* 148: */ }\r\n/* 149:198 */ Query query = this.em.createQuery(sql.toString());\r\n/* 150:199 */ query.setParameter(\"mes\", Integer.valueOf(mes));\r\n/* 151:200 */ query.setParameter(\"anio\", Integer.valueOf(anio));\r\n/* 152:201 */ query.setParameter(\"idOrganizacion\", Integer.valueOf(idOrganizacion));\r\n/* 153:202 */ query.setParameter(\"tipoComprobante\", tipoComprobante);\r\n/* 154:203 */ if (sucursalFP != null) {\r\n/* 155:204 */ query.setParameter(\"idSucursal\", Integer.valueOf(sucursalFP.getId()));\r\n/* 156: */ }\r\n/* 157:206 */ if (sucursalRetencion != null) {\r\n/* 158:207 */ query.setParameter(\"sucursalRetencion\", sucursalRetencion.getCodigo());\r\n/* 159: */ }\r\n/* 160:209 */ if (puntoVentaRetencion != null) {\r\n/* 161:210 */ query.setParameter(\"puntoVentaRetencion\", puntoVentaRetencion.getCodigo());\r\n/* 162: */ }\r\n/* 163:213 */ return query.getResultList();\r\n/* 164: */ }", "public List getPorPertenceAProduto(long id) throws DaoException {\n\t\tsetMontador(null);\n\t\tString sql;\n \tsql = \"select \" + camposOrdenadosJoin() + \" from \" + tabelaSelect() + \n outterJoinAgrupado() +\n \t\" where id_produto_pa = \" + id + orderByLista();\n \tsetMontador(getMontadorAgrupado());\n \treturn getListaSql(sql);\n\t}", "@GetMapping(\"/produtos\")\n @Timed\n public ResponseEntity<List<Produto>> getAllProdutos(@ApiParam Pageable pageable) {\n log.debug(\"REST request to get a page of Produtos\");\n\n//////////////////////////////////REQUER PRIVILEGIOS\n if (!PrivilegioService.podeVer(cargoRepository, ENTITY_NAME)) {\n log.error(\"TENTATIVA DE VISUALIZAR SEM PERMISSÃO BLOQUEADA! \" + ENTITY_NAME);\n return null;\n }\n\n//////////////////////////////////REQUER PRIVILEGIOS\n Page<Produto> page = produtoRepository.findAll(pageable);\n HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, \"/api/produtos\");\n return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);\n }", "List<CatalogoAprobadorDTO> buscarAprobador(int cveADM, String numEmpleado, Integer claveNivel, Integer centroCostoOP) throws SIATException;", "@GET\r\n public List<ProveedorDetailDTO> obtenerProveedores() {\r\n List<ProveedorDetailDTO> result = listEntityToDetailDTO(proveedorLogic.getProveedores());\r\n return result;\r\n }", "public static ArrayList<Approche> requestApprs(String aeroport) {\n Connection con = null;\n String icaoCode = aeroport.substring(0, 2);\n PreparedStatement pst = null;\n ResultSet rs = null;\n ArrayList<Approche> p = new ArrayList<>();\n try {\n con = ParserGlobal.createSql();\n pst = con.prepareStatement(\"SELECT balises, runwayIdentifiant from appr where aeroportIdentifiant like ? and icaoCode like ? order by typeApproche\");\n pst.setString(1, aeroport);\n pst.setString(2, icaoCode);\n rs = pst.executeQuery();\n\n while (rs.next()) {\n Array a = rs.getArray(1);\n String identifiant = rs.getString(2);\n String[][] val = (String[][]) a.getArray();\n ArrayList<LatitudeLongitude> l = new ArrayList<>(); // list des balises\n for (int i = 0; i < val.length; i++) {\n l.add(new LatitudeLongitude(val[i][0], val[i][1]));\n }\n p.add(new Approche(identifiant, l));\n\n }\n return p;\n } catch (SQLException ex) {\n Logger.getLogger(Approche.class.getName()).log(Level.SEVERE, null, ex);\n } finally {\n if (rs != null) {\n try {\n rs.close();\n } catch (SQLException ex) {\n Logger.getLogger(Approche.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n if (pst != null) {\n try {\n pst.close();\n } catch (SQLException ex) {\n Logger.getLogger(Approche.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n if (con != null) {\n try {\n con.close();\n } catch (SQLException ex) {\n Logger.getLogger(Approche.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }\n return p;\n }", "List<Especialidad> getEspecialidades();", "private ArrayList<ServiceModel> getServiceModelJSON(JSONObject obj) {\n ArrayList<ServiceModel> servicesModel = new ArrayList<>();\n\n try {\n JSONArray servicesArray = obj.getJSONArray(\"services\");\n int limit = servicesArray.length();\n\n for (int i = 0; i < limit; i++) {\n JSONObject service = servicesArray.getJSONObject(i);\n\n ServiceModel serviceModel = new ServiceModel();\n\n serviceModel.setId(service.getInt(\"ID_SERVICE\"));\n serviceModel.setName(Conexion.decode(service.getString(\"NAME_SERVICE\")));\n serviceModel.setReserved(service.getInt(\"RESERVED_SERVICE\"));\n serviceModel.setDescription(Conexion.decode(service.getString(\"DESCRIPTION_SERVICE\")));\n serviceModel.setImage(service.getString(\"IMAGE_SERVICE\"));\n serviceModel.setIdType(service.getInt(\"ID_TYPE_SERVICE\"));\n serviceModel.setNameType(Conexion.decode(service.getString(\"NAME_TYPE_SERVICE\")));\n serviceModel.setValueType(service.getInt(\"VALUE_TYPE_SERVICE\"));\n\n serviceModel.setServicePrice(serviceServicePrice.getServicePriceModelJSON(service, serviceModel.getId(), false));\n servicesModel.add(serviceModel);\n }\n\n } catch (JSONException e) {\n System.out.println(\"Error: Objeto no convertible, \" + e.toString());\n e.printStackTrace();\n }\n return servicesModel;\n }", "@Override\n public ArrayList<Propiedad> getPrecioAgente(double pMenor, double pMayor, String pId) throws SQLException {\n ArrayList<Propiedad> resultado = new ArrayList<Propiedad>();\n resultado = (ArrayList<Propiedad>) bdPropiedad.selectQuery(\"SELECT * FROM PROPIEDAD WHERE ID_AGENTE = '\" + pId + \"' AND \"\n + \"PRECIO >= \" + pMenor + \" AND PRECIO <= \" + pMayor);\n return resultado;\n }", "public List<Coche> listar(){\n RestTemplate restTemplate = new RestTemplate();\n \n //Hacemos una peticion GET a la url y decimos que nos parsee el json a la un array de CochesarrayCoches\n //El metodo getForEntity hace la peticion a la URL y tambien le decimos a que clase me tiene que \n //convertir el json resultante\n //Con el siguiente metedo hacemos una peticion get a \"http://localhost:8080/CochesarrayCoches/\"\n ResponseEntity<Coche[]> response = restTemplate.getForEntity(URL_COCHES, Coche[].class);\n \n //Lo que tiene el body es un array de CochesarrayCoches, porque el\n //ResponseEntity es un array de CochesarrayCoches\n Coche[] arrayCoches = response.getBody();\n \n //Convertimos el array de CochesarrayCoches a una lista de CochesarrayCoches\n List<Coche> lista = Arrays.asList(arrayCoches); \n \n return lista;\n }", "public List<EstructuraContratosDatDTO> obtenerConsultaProsperaLista() {\n\t\tList<EstructuraContratosDatDTO> consultaNominaLista = consultaProsperaService.listaEstructuraProspera();\n\t\treturn consultaNominaLista;\n\t}", "List<VoziloDto> sveVozila();", "Object getDados(long id);", "public static Object[] getArrayDeObjectosHDD(int codigo,String nombre,String fabricante,float precio, String stock, int capacidad,int rpm,String tipo){\r\n Object[] v = new Object[8];\r\n \r\n v[0] = codigo;\r\n v[1] = nombre;\r\n v[2] = fabricante;\r\n v[3] = precio;\r\n v[4] = stock;\r\n v[5] = capacidad;\r\n v[6] = rpm;\r\n v[7] = tipo;\r\n\r\n return v;\r\n }", "List<CarritoProductoResponseDTO> consultarCarritoCompras(String userName,TipoMoneda tipoMoneda);", "public List<Pregunta> getPreguntasSinResponder(int limit);", "@GetMapping\n\tpublic ResponseEntity<List<Plato>> listarPlatos(){\t\t\n\t\tList<Plato> platos = miServicioPlatos.listarPlatos();\n\t\t\n\t\t// No hay platos\n if(platos.size() <= 0){\n return ResponseEntity.noContent().build();\n } \n \n return ResponseEntity.ok(platos);\n\t}", "public interface PrecosService {\n\n @GET(\"/combustivelbarato/precos/master/precos.json\")\n List<Preco> getPrecos();\n}", "public static void ObtenerDatosGustoVerdura(Context context) {\n\n queue = Volley.newRequestQueue(context);\n\n String url = \"http://161.35.14.188/Persuhabit/GustoVerdura\";//establece ruta al servidor para obtener los datos\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n\n try {\n JSONArray jsonArray = response.getJSONArray(\"data\");//\n\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject jsonObject = jsonArray.getJSONObject(i);\n\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n queue.add(jsonObjectRequest);\n }", "@RequestMapping(value = \"/tiposdiscapacidad/\", \n\t method = RequestMethod.GET, \n\t headers=\"Accept=application/json\"\n\t ) \n\tpublic List<TipoDiscapacidad> getTipos(){\n\t\treturn tipoDiscapacidadRepository.findAll();\n\t}", "public static void ObtenerDatosRecompensas(Context context) {\n\n queue = Volley.newRequestQueue(context);\n\n\n String url = \"http://161.35.14.188/Persuhabit/recompensas\";//establece ruta al servidor para obtener los datos\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n\n try {\n JSONArray jsonArray = response.getJSONArray(\"data\");\n\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject jsonObject = jsonArray.getJSONObject(i);\n String descrip = jsonObject.getString(\"descrip\");\n System.out.println(descrip);\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n queue.add(jsonObjectRequest);\n }", "public static void ObtenerDatosGustoFrutas(Context context) {\n\n queue = Volley.newRequestQueue(context);\n\n String url = \"http://161.35.14.188/Persuhabit/GustoFrutas\";//establece ruta al servidor para obtener los datos\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n\n try {\n JSONArray jsonArray = response.getJSONArray(\"data\");//\n\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject jsonObject = jsonArray.getJSONObject(i);\n\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n queue.add(jsonObjectRequest);\n }", "public ArrayList<Pomodoro> getPomo(String userId) {\r\n PomoServer server = new PomoServer();\r\n String parameters = PomoServer.MODE_SELECT + \"&\" + \"userid=\" + userId;\r\n String url = PomoServer.DOMAIN_URL + PomoServer.SERVLET_POMO;\r\n String data = server.get(url, parameters);\r\n ArrayList<Pomodoro> list = new ArrayList<>();\r\n if (data.equals(\"0\")) {\r\n return list;\r\n }\r\n String[] pomos = data.split(\";\");\r\n for (String p : pomos) {\r\n String[] attributes = p.split(\"&\");\r\n String id = attributes[0];\r\n String tagId = attributes[1];\r\n String memo = attributes[2];\r\n String dailyId = attributes[3];\r\n String time = attributes[4];\r\n list.add(new Pomodoro(id, tagId, memo, dailyId, time, userId));\r\n }\r\n return list;\r\n }", "public String[] getComplementoPreguntas(String idPregunta){\n //Creamos el conector de bases de datos\n\n AdmiSQLiteOpenHelper admin = new AdmiSQLiteOpenHelper(this, \"administracion\", null, 1 );\n // Abre la base de datos en modo lectura y escritura\n SQLiteDatabase BasesDeDatos = admin.getWritableDatabase();\n Cursor consultaId= BasesDeDatos.rawQuery(\"SELECT complemento FROM t_complemento WHERE co_pregunta = \" + idPregunta, null);\n\n String[ ] sComplemento = new String[20];\n try {\n if (consultaId != null) {\n consultaId.moveToFirst();\n int indice = 0;\n\n do {\n //Asignamos el valor en nuestras variables para usarlos en lo que necesitemos\n sComplemento[indice] = consultaId.getString(consultaId.getColumnIndex(\"complemento\"));\n indice ++;\n\n } while ( consultaId.moveToNext() );\n\n\n }else{\n System.out.println( \" ------------- No hay datos ------------------\" );\n System.out.println();\n }\n\n } catch ( Exception e ) {\n System.err.println( e.getClass().getName() + \": \" + e.getMessage() );\n System.exit(0);\n }\n\n consultaId.close();\n BasesDeDatos.close();\n return sComplemento;\n }", "private static void cadastroProduto() {\n\n\t\tString nome = Entrada(\"PRODUTO\");\n\t\tdouble PrecoComprado = Double.parseDouble(Entrada(\"VALOR COMPRA\"));\n\t\tdouble precoVenda = Double.parseDouble(Entrada(\"VALOR VENDA\"));\n String informacaoProduto = Entrada(\"INFORMAÇÃO DO PRODUTO\");\n String informacaoTecnicas = Entrada(\"INFORMAÇÕES TÉCNICAS\");\n\n\t\tProduto produto = new Produto(nome, PrecoComprado, precoVenda, informacaoProduto,informacaoTecnicas);\n\n\t\tListaDProduto.add(produto);\n\n\t}" ]
[ "0.63127005", "0.62384623", "0.62003285", "0.6131753", "0.6127004", "0.61169606", "0.61075103", "0.6060355", "0.59652084", "0.59189713", "0.5844459", "0.58430016", "0.5828811", "0.58015746", "0.58002263", "0.5796713", "0.5792707", "0.578953", "0.57888913", "0.578157", "0.57794315", "0.5766984", "0.57669145", "0.57628036", "0.57627773", "0.57502145", "0.5749297", "0.57413495", "0.5730857", "0.5721322", "0.5715844", "0.5691925", "0.56901693", "0.56879246", "0.56835985", "0.5681429", "0.5677573", "0.56607825", "0.5643517", "0.5642092", "0.56415236", "0.56394863", "0.56290585", "0.5619878", "0.56118155", "0.56110984", "0.5610992", "0.5606638", "0.5603328", "0.55971396", "0.5588405", "0.55856043", "0.55835056", "0.55833644", "0.55794436", "0.5575649", "0.55716014", "0.5566044", "0.5560985", "0.55521977", "0.5538462", "0.5528201", "0.5506776", "0.5506676", "0.55054986", "0.55043006", "0.5496137", "0.54954803", "0.5489977", "0.5460475", "0.54590666", "0.5446737", "0.543992", "0.54398394", "0.5437414", "0.54359204", "0.54330796", "0.5433039", "0.5431056", "0.54305995", "0.5430531", "0.5426882", "0.5425441", "0.5422453", "0.54215217", "0.54214406", "0.5420643", "0.5417032", "0.5413877", "0.54068005", "0.54022366", "0.5398561", "0.5396034", "0.5387177", "0.5385857", "0.5385663", "0.5383932", "0.5383285", "0.5383092", "0.5381346" ]
0.64340436
0
Devolve um Produto vindo da API
public static Produto parserJsonProdutos(String response, Context context){ System.out.println("--> PARSER ADICIONAR: " + response); Produto auxProduto = null; try { JSONObject produto = new JSONObject(response); int id = produto.getInt("id"); int preco_unitario = produto.getInt("preco_unitario"); int id_tipoproduto = produto.getInt("id_tipo"); String designacao = produto.getString("designacao"); auxProduto = new Produto(id, preco_unitario, id_tipoproduto, designacao); } catch (JSONException e) { e.printStackTrace(); Toast.makeText(context, "Error: " + e.getMessage(), Toast.LENGTH_SHORT).show(); } return auxProduto; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GET(\"montaje/proyectos/ver/\")\n Call<List<clsProyecto>> getProyectos();", "@GetMapping(\"/produtos/{id}\")\n @Timed\n public ResponseEntity<Produto> getProduto(@PathVariable Long id) {\n log.debug(\"REST request to get Produto : {}\", id);\n Produto produto = produtoRepository.findOne(id);\n\n//////////////////////////////////REQUER PRIVILEGIOS\n if (!PrivilegioService.podeVer(cargoRepository, ENTITY_NAME)) {\n produto = null;\n log.error(\"TENTATIVA DE VISUALIZAR SEM PERMISSÃO BLOQUEADA! \" + ENTITY_NAME + \" : {}\", id);\n }\n//////////////////////////////////REQUER PRIVILEGIOS\n return ResponseUtil.wrapOrNotFound(Optional.ofNullable(produto));\n }", "public static void apagarProduto(){\n if(ListaDProduto.size() == 0){\n SaidaDados(\"Nehum produto cadastrado!!\");\n return;\n }\n \n String pesquisarNome = Entrada(\"Informe o nome do produto que deseja deletar: \");\n for(int i =0; i < ListaDProduto.size(); i++){\n \n Produto produtoProcurado = ListaDProduto.get(i);\n \n if(pesquisarNome.equalsIgnoreCase(produtoProcurado.getNome())){\n ListaDProduto.remove(i);\n SaidaDados(\"Produto deletado com sucesso!!\");\n }\n \n }\n \n }", "public void aplicarDescuento();", "private void devolverLivro() throws Exception {\n try {\n long DAY_IN_MS = 1000 * 60 * 60 * 24; // formatar data entrega\n int codigo = Console.scanInt(\"Informe o código da retirada do livro: \");\n retiradaDao = new RetiradaDaoBd();\n Retirada retirada = retiradaDao.procurarPorId(codigo);\n try {\n devolucaoNegocio.salvar(retirada);\n System.out.println(\"Devolucao cadastrado com sucesso!\");\n } catch (Exception ex) {\n UIUtil.mostrarErro(ex.getMessage());\n }\n\n System.out.println(\"Livro \" + retirada.getLivro().getNome() + \" devolvido por \" + retirada.getCliente().getNome());\n } catch (InputMismatchException e) {\n System.err.println(\"ERRO! O ISBN deve ser numérico!\");\n }\n }", "public void eliminarProyecto(int id) {\n\t\t\tRestTemplate plantilla = new RestTemplate();\n\t\t\tplantilla.delete(\"http://localhost:5000/proyectos/\" + id);\n\t\t}", "@Override\n\tpublic Response novo(String dadosEmJson) {\n\t\tProduto dadosNovoProduto = converterParaJava(dadosEmJson);\n\t\tif (dadosNovoProduto != null) {\n\t\t\t// convertido com sucesso.\n\t\t\t// pegar os dados para criar um novo Produto:\n\n\t\t\t// criar a Receita com os dados enviado para o novo Produto.\n\t\t\tReceita receita = new Receita(dadosNovoProduto.getReceita().getRendimento(),\n\t\t\t\t\tdadosNovoProduto.getReceita().getTempoPreparo());\n\t\t\t// pegar a lista de componentes que ira compor a receita do produto.\n\t\t\t// adiciona na lista da receita o componente e a qtd utilizada.\n\t\t\tfor (ItemReceita item : dadosNovoProduto.getReceita().getComponentes()) {\n\t\t\t\treceita.addComponente(item.getComponente(), item.getQtdUtilizada());\n\t\t\t}\n\t\t\t// criar um novo Produto com os dados enviado e com a receita pronta.\n\t\t\tProduto produto = new Produto(dadosNovoProduto.getDescricao(), dadosNovoProduto.getCategoria(),\n\t\t\t\t\tdadosNovoProduto.getSimbolo(), dadosNovoProduto.getPreco(), receita);\n\t\t\t// persistir no BD o novo Produto.\n\t\t\tif (getDao().salvar(produto)) {\n\t\t\t\t// novo produto foi criado e persistido no BD com sucesso.\n\t\t\t\tsetResposta(mensagemCriadoRecurso());\n\t\t\t} else {\n\t\t\t\t// os dados informado possui campos inválidos.\n\t\t\t\tsetResposta(mensagemDadosInvalidos());\n\t\t\t}\n\t\t} else {\n\t\t\t// aconteceu um erro com o servidor;\n\t\t\tsetResposta(mensagemErro());\n\t\t}\n\t\treturn getResposta();\n\t}", "public static void dodavanjePutnickogVozila() {\n\t\tString vrstaVozila = \"Putnicko Vozilo\";\n\t\tString regBr = UtillMethod.unosRegBroj();\n\t\tGorivo gorivo = UtillMethod.izabirGoriva();\n\t\tGorivo gorivo2 = UtillMethod.izabirGorivaOpet(gorivo);\n\t\tint brServisa = 1;\n\t\tdouble potrosnja100 = UtillMethod.unesiteDoublePotrosnja();\n\t\tSystem.out.println(\"Unesite broj km koje je vozilo preslo:\");\n\t\tdouble predjeno = UtillMethod.unesiteBroj();\n\t\tdouble preServisa = 10000;\n\t\tdouble cenaServisa = 8000;\n\t\tSystem.out.println(\"Unesite cenu vozila za jedan dan:\");\n\t\tdouble cenaDan = UtillMethod.unesiteBroj();\n\t\tSystem.out.println(\"Unesite broj sedista u vozilu:\");\n\t\tint brSedist = UtillMethod.unesiteInt();\n\t\tSystem.out.println(\"Unesite broj vrata vozila:\");\n\t\tint brVrata = UtillMethod.unesiteInt();\n\t\tboolean vozObrisano = false;\n\t\tArrayList<Gorivo> gorivaVozila = new ArrayList<Gorivo>();\n\t\tgorivaVozila.add(gorivo);\n\t\tif(gorivo2!=Main.nista) {\n\t\t\tgorivaVozila.add(gorivo2);\n\t\t}\n\t\tArrayList<Servis> servisiNadVozilom = new ArrayList<Servis>();\n\t\tPutnickoVozilo vozilo = new PutnickoVozilo(vrstaVozila, regBr, gorivaVozila, brServisa, potrosnja100, predjeno,\n\t\t\t\tpreServisa, cenaServisa, cenaDan, brSedist, brVrata, vozObrisano, servisiNadVozilom);\n\t\tUtillMethod.prviServis(vozilo, predjeno);\n\t\tMain.getVozilaAll().add(vozilo);\n\t\tSystem.out.println(\"Novo vozilo je uspesno dodato u sistem!\");\n\t\tSystem.out.println(\"---------------------------------------\");\n\t}", "@DELETE\n\t@Produces(MediaType.APPLICATION_JSON)\n\t@Path(\"eliminarPrestamo\")\n\tpublic String eliminarPrestamo(\n\t\t@QueryParam(\"idObjeto\")int idObj, \n\t\t@QueryParam(\"usuario\")String usuario) {\n\ttry {\n\t\t//objetoBL.eliminarObjeto(usuario, idObjeto);//Se llama el metodo desde objetoBL\n\t\tprestamoBL.eliminarPrestamo(idObj, usuario);\n\t}catch(ExceptionController e) {\n\t\tlog.error(\"Error al eliminar objeto\");\n\t\te.getMessage();\n\t}\n\tString json = new Gson().toJson(\"listo\");\n\treturn json;\n\t}", "ApiSubCtgrVO selectApiSubCtgr(ApiSubCtgrRequest.ApiSubCtgrDetilRequest apiSubCtgrDetilRequest);", "@DELETE\n\t@Path(\"/cliente/devolverAbono/{idCliente: \\\\d+}\")\n\t@Produces({ MediaType.APPLICATION_JSON })\n\t@Consumes(MediaType.APPLICATION_JSON)\n\tpublic Response devolverAbonamiento(@PathParam(\"idCliente\") Integer idCliente)\n\t{\n\t\tArrayList<MensajeDevolucion> mens = null;\n\t\tMaster mas = Master.darInstancia(getPath());\n\t\ttry \n\t\t{\n\t\t\tmens = mas.devolverAbonamiento(idCliente);\n\t\t} catch (Exception e) {\n\t\t\treturn Response.status(500).entity(doErrorMessage(e)).build();\n\t\t}\n\t\treturn Response.status(200).entity(mens).build();\n\t}", "@DeleteMapping(\"/produtos/{id}\")\n @Timed\n public ResponseEntity<Void> deleteProduto(@PathVariable Long id) {\n log.debug(\"REST request to delete Produto : {}\", id);\n\n//////////////////////////////////REQUER PRIVILEGIOS\n if (PrivilegioService.podeDeletar(cargoRepository, ENTITY_NAME)) {\n produtoRepository.delete(id);\n } else {\n log.error(\"TENTATIVA DE EXCUIR SEM PERMISSÃO BLOQUEADA! \" + ENTITY_NAME + \" : {}\", id);\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(ENTITY_NAME, \"privilegios insuficientes.\", \"Este usuario não possui privilegios sufuentes para deletar esta entidade.\")).body(null);\n }\n//////////////////////////////////REQUER PRIVILEGIOS\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "private void doNovo() {\n contato = new ContatoDTO();\n popularTela();\n }", "@DeleteMapping (\"/produto/{cod}\")\n public ResponseEntity<?> apagarProduto(@PathVariable int cod){\n servico.apagarProduto(cod);\n return ResponseEntity.ok(\"Removido com Sucesso\");\n }", "public WebService_Detalle_alquiler_factura() {\n }", "public String deletaProduto(String produtoId) {\n\t\treturn null;\n\t}", "public void desvincular() {\n\t\tList<Motorista> motoristas = new ArrayList<>();\n\t\tList<Veiculo> veiculos = new ArrayList<>();\n\t\ttry {\n\t\t\tveiculos = Deserializador.deserializar(\"conteudo/veiculos\", Veiculo.class);\n\t\t\tmotoristas = Deserializador.deserializar(\"conteudo/motoristas\", Motorista.class);\n\n\t\t\tScanner entrada = new Scanner(System.in);\n\t\t\tMotorista motorista = null;\n\t\t\tVeiculo veiculo = null;\n\t\t\tSystem.out.println(\"Digite o numero da CNH do motorista que deseja desvincular.\");\n\t\t\tint cnh = entrada.nextInt();\n\t\t\tif (motoristas != null) {\n\t\t\t\tif (veiculos != null) {\n\t\t\t\t\tfor (Motorista motor : motoristas) {\n\t\t\t\t\t\tif (cnh == motor.getNumero_Carteira()) {\n\t\t\t\t\t\t\tSystem.out.println(\"Motorista encontrado: \" + motor.getNome());\n\t\t\t\t\t\t\tmotorista = motor;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (motorista == null) {\n\t\t\t\t\t\tSystem.out.println(\"Motorista nao encontrado!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfor (Veiculo veic : veiculos) {\n\t\t\t\t\t\t\tif (veic.getPlaca().equals(motorista.getVeiculo().getPlaca())) {\n\t\t\t\t\t\t\t\tSystem.out.println(\"Veiculo encontrado.\");\n\t\t\t\t\t\t\t\tveiculo = veic;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (motorista.getVeiculo() != null) {\n\t\t\t\t\t\t\tveiculo.setMotorista(null);\n\t\t\t\t\t\t\tmotorista.setVeiculo(null);\n\n\t\t\t\t\t\t\tSystem.out.println(\"Motorista desvinculado com sucesso.\");\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tSystem.out.println(\"Motorista nao esta vinculado a nenhum veiculo.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"A lista de veiculos esta vazia.\");\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"A lista de motoristas esta vazia.\");\n\t\t\t}\n\n\t\t\tSerializador s = new Serializador();\n\t\t\ts.serializar(\"conteudo/motoristas\", motoristas);\n\t\t\ts.serializar(\"conteudo/veiculos\", veiculos);\n\t\t} catch (Exception ex) {\n\t\t\tSystem.err.println(\"Falha ao serializar ou deserializar! - \" + ex.toString());\n\t\t}\n\t}", "public CompraResponse idProduto(Long idProduto) {\n this.idProduto = idProduto;\n return this;\n }", "@Override\n\tpublic Propisi dodajDeo(String requestData) throws JAXBException {\n\n\t\tJSONObject json = new JSONObject(requestData);\n\n\t\tString tekstClana = \"\";\n\t\tString redniBroj = \"\";\n\t\tString tekstStava = \"\";\n\t\tString nazivGlave = \"\";\n\t\tString refPropisNaziv = \"\";\n\n\t\tString nazivDela = json.getString(\"nazivDeo\");\n\n\t\tString nazivClana = json.getString(\"nazivClana\");\n\t\tString opisClana = json.getString(\"opisClana\");\n\t\ttry {\n\t\t\ttekstClana = json.getString(\"tekstClana\");\n\n\t\t} catch (org.json.JSONException e) {\n\t\t\t// e.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\tredniBroj = json.getString(\"redniBrojStava\");\n\t\t\ttekstStava = json.getString(\"stavTekst\");\n\t\t} catch (org.json.JSONException e) {\n\t\t\t// e.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\tnazivGlave = json.getString(\"nazivGlave\");\n\t\t} catch (org.json.JSONException e) {\n\n\t\t}\n\t\t\n\t\t\n\n\t\tDeo deo = new Deo();\n\t\tGlava glava = new Glava();\n\t\tClan clan = new Clan();\n\t\tSadrzaj sadrzaj = new Sadrzaj();\n\t\tStav stav = new Stav();\n\t\tTekst tekst = new Tekst();\n\t\t\n\t\ttry {\n\t\t\trefPropisNaziv = json.getString(\"refernciranPropis\");\n\t\t} catch (JSONException e) {\n\t\t\t//e.printStackTrace();\n\t\t}\n\t\t//ako je true, znaci da refernciramo\n\t\tif(!refPropisNaziv.equals(\"\"))\n\t\t{\n\t\t\tJSONArray jsonArray2 = json.getJSONArray(\"splitovanTekstClan\");\n\t\t\tList<String> list2 = new ArrayList<String>();\n\t\t\tfor (int i=0; i<jsonArray2.length(); i++) {\n\t\t\t\ttekst.getText().add( jsonArray2.getString(i) );\n\t\t\t}\n\t\n\t\t\ttekst.setNazivPropisa(refPropisNaziv.replaceAll(\"\\\\s\", \"\")); \n\t\t\ttekst.setNazivClana(json.getString(\"nazivClanaRef\").replaceAll(\"\\\\s\", \"\"));\n\t\t\ttekst.setIDClana(BigInteger.valueOf(json.getLong(\"referenciraniClanovi\")));\n\t\t\ttekst.setIDPropisa(BigInteger.valueOf(json.getLong(\"propisId\")));\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttekst.getText().add(tekstClana);\n\t\t}\n\n\t\tif (!redniBroj.equals(\"\")) {\n\t\t\tstav.setRedniBroj(Long.parseLong(redniBroj));\n\t\t\tif(!refPropisNaziv.equals(\"\")){\n\t\t\t\tstav.setTekst(tekst.getText());\n\t\t\t\tstav.setNazivPropisa(refPropisNaziv.replaceAll(\"\\\\s\", \"\")); \n\t\t\t\tstav.setNazivClana(json.getString(\"nazivClanaRef\").replaceAll(\"\\\\s\", \"\"));\n\t\t\t\tstav.setIDClana(BigInteger.valueOf(json.getLong(\"referenciraniClanovi\")));\n\t\t\t\tstav.setIDPropisa(BigInteger.valueOf(json.getLong(\"propisId\")));\n\t\t\t}else{\n\t\t\t\tstav.getTekst().add(tekstStava);\n\t\t\t}\n\t\t\tsadrzaj.getStav().add(stav);\t\n\t\t}\n\t\tif (!tekstClana.equals(\"\")) {\n\t\t\tsadrzaj.getTekst().add(tekst);\n\t\t}\n\t\tif (!nazivGlave.equals(\"\")) {\n\t\t\tglava.getClan().add(clan);\n\t\t\tglava.setID(BigInteger.valueOf(getID()));\n\t\t\tglava.setNaziv(nazivGlave);\n\t\t\tdeo.getGlava().add(glava);\n\t\t}\n\n\t\tclan.setID(BigInteger.valueOf(getID()));\n\t\tclan.setNaziv(nazivClana);\n\t\tclan.setOpis(opisClana);\n\t\tclan.setSadrzaj(sadrzaj);\n\n\t\tif (nazivGlave.equals(\"\")) {\n\t\t\tdeo.getClan().add(clan);\n\t\t}\n\n\t\t// Unmarshalling generi�e objektni model na osnovu XML fajla\n\t\tPropisi propisi = (Propisi) unmarshall(new File(\"./data/xml/propisi.xml\"));\n\n\t\tdeo.setID(BigInteger.valueOf(getID()));\n\t\tdeo.setNaziv(nazivDela);\n\t\tpropisi.getPropisi().get(propisi.getPropisi().size() - 1).getDeo().add(deo);\n\n\t\treturn propisi;\n\t}", "public VotoRespuesta vota(Usuario user, Respuesta resp, boolean up) throws PrivilegioInsuficienteException;", "public CompraResponse descricaoProduto(String descricaoProduto) {\n this.descricaoProduto = descricaoProduto;\n return this;\n }", "@GetMapping(\n\t\t\tvalue=\"/bioskopi/ukloni/{id}\",\n\t\t\tproduces = MediaType.APPLICATION_JSON_VALUE)\n\tpublic ResponseEntity<BioskopDTO> ukloni(@PathVariable(name=\"id\") Long id){/*patvariable dovablja id od bioskopa (this.id iz jsa)*/\n\t\tBioskop b=this.bioskopService.findOne(id);\n\t\tif(b==null) {\n\t\t\treturn new ResponseEntity<>(HttpStatus.NOT_FOUND);\n\t\t}\n\t\t\n\t\tBioskopDTO bioskop=new BioskopDTO(b.getId(), b.getNaziv(), b.getAdresa(), b.getBrojCentrale(), b.getEMail());\n\t\t/*prolazi kroz projekcije sale i sve brise i na kraju obrise tu salu*/\n\t\tSet<Sala> sale=b.getSale();\n\t\tfor (Sala sala : sale) {\n\t\t\tList<Terminski_raspored> projekcije=sala.getProjekcije();\n\t\t\tfor (Terminski_raspored t : projekcije) {\n\t\t\t\tSet<Gledalac> gledaoci=t.getGledaoci_koji_su_rezervisali_film();\n\t\t\t\tfor (Gledalac g : gledaoci) {\n\t\t\t\t\tif(g.getRezervisani_filmovi().contains(t)) {\n\t\t\t\t\t\tg.getRezervisani_filmovi().remove(t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tSet<Raspored_filmova> rasporedi=t.getRasporedi();\n\t\t\t\tfor(Raspored_filmova r:rasporedi) {\n\t\t\t\t\tthis.raspored_filmovaService.delete(t.getId());\n\t\t\t\t}\n\t\t\t\t//this.terminski_rasporedService.delete(t.getId());\n\t\t\t}\n\t\t\tthis.salaservice.deleteById(sala.getId());\n\t\t}\n\t\tthis.bioskopService.delete(id); \n\t\t\n\t\t\n\t\treturn new ResponseEntity<>(bioskop,HttpStatus.OK);\n\t}", "@Override\n\tpublic void devolucao(Livros livro) {\n\t\t\n\t}", "public interface PrecosService {\n\n @GET(\"/combustivelbarato/precos/master/precos.json\")\n List<Preco> getPrecos();\n}", "static DettaglioCartellaAvvisoResponse getBPSDettaglioCartellaResponse( DettaglioCartellaAvvisoRequest request) throws Exception {\r\n\t\tDettaglioCartellaAvvisoResponse response;\r\n\t\tDettaglioCartellaAvvisoPortTypeProxy proxy = new DettaglioCartellaAvvisoPortTypeProxy( MessagesClass.getMessage(\"DETTAGLIO_CARTELLA_ESB_ENDPOINT\") );\r\n \tresponse = proxy.getDettaglioCartellaAvvisoPortType() .process(request);\r\n \t\r\n \tif (!response.getEsito().equals(BPS_DETTAGLIO_CARTELLA_ESITO_OK)) {\r\n\t\t\tthrow new Exception(\"Processo Dettaglio Cartella KO: \" + response.getDescrizioneEsito() );\r\n\t\t}\r\n \t\r\n\t\treturn response;\r\n\t}", "public Proyecto proyectoPorId(int id) {\n\t\t\tRestTemplate plantilla = new RestTemplate();\n\t\t\tProyecto proyecto =plantilla.getForObject(\"http://localhost:5000/proyectos/\" + id, Proyecto.class);\n\t\t\treturn proyecto;\n\t\t}", "public VotoPregunta vota(Usuario user, Pregunta pregunta, boolean up) throws PrivilegioInsuficienteException;", "@CommandDescription(name=\"retrieveProduto\", kind=CommandKind.Retrieve, requestPrimitive=\"retrieveProduto\", responsePrimitive=\"retrieveProdutoResponse\")\npublic interface RetrieveProduto extends MessageHandler {\n \n public Produto retrieveProduto(Produto.Id id);\n \n}", "private void removeProdutos() {\n Collection<IProduto> prods = this.controller.getProdutos();\n for(IProduto p : prods) System.out.println(\" -> \" + p.getCodigo() + \" \" + p.getNome());\n System.out.println(\"Insira o codigo do produto que pretende remover da lista de produtos?\");\n String codigo = Input.lerString();\n // Aqui devia se verificar se o produto existe mas nao sei fazer isso.\n this.controller.removeProdutoControl(codigo);\n }", "public void removeMotorista() {\n\t\tConector con = new Conector();\r\n\t\tString params[] = new String[2];\r\n\r\n\t\tparams[0] = \"op=8\";\r\n\t\tparams[1] = \"email=\" + usuario;\r\n\r\n\t\tcon.sendHTTP(params);\r\n\t}", "public int declassataPedina(int pezzo)\n {\n switch (pezzo)\n {\n case PEDINA_NERA: case DAMA_NERA: return PEDINA_NERA;\n case PEDINA_BIANCA: case DAMA_BIANCA: return PEDINA_BIANCA;\n }\n return VUOTA;\n }", "@Override\n protected ProdutoServicoImpl getservice() {\n return produtoService;\n }", "Reserva Obtener();", "public Produit getProduit(int theId);", "List<VoziloDto> sveVozila();", "@Path(\"{id}/produtos/{produtoId}/quantidade\") //Dizendo os parametro a serem recebidos na requisicao que vai vir pela uri\r\n\t@PUT //Digo que esse metodo deve ser acessado usando PUT (update)\r\n\tpublic Response alteraProduto( String conteudoRecebido, @PathParam (\"id\") long id, @PathParam(\"produtoId\") long produtoId ){ //Descrevo o tipo dos parametros recebidos\r\n\t\r\n\t\t//Busca o carrinho\r\n\t\tCarrinho carrinho = new CarrinhoDAO().busca(id);\r\n\t\t\r\n\t\t\r\n\t\t//Pegando o conteudo enviado na requisicao\r\n\t\tProduto produto = (Produto) new XStream().fromXML( conteudoRecebido );\r\n\t\t\r\n\t\t\r\n\t\t//Update do produto do Carrinho\r\n\t\tcarrinho.trocaQuantidade( produto );\r\n\r\n\t\t\r\n\t\t//Retorno o statusCode 200 ok\r\n\t\treturn Response.ok().build();\r\n\t\t\r\n\t\t\r\n\t}", "List<Videogioco> retriveByPiattaforma(String piattaforma);", "public Double deuda(Cliente c);", "@Override\r\n\tprotected String requestText() {\n\t\tProfitHistoryDetalleRequest profitHistoryDetalleRequest = new ProfitHistoryDetalleRequest();\r\n\t\tprofitHistoryDetalleRequest.setCodigoCliente(this.codigo);\r\n\t\tString request = JSONHelper.serializar(profitHistoryDetalleRequest);\r\n\t\treturn request;\r\n\t}", "private void grabarIndividuoPCO(final ProyectoCarreraOferta proyectoCarreraOferta) {\r\n /**\r\n * PERIODO ACADEMICO ONTOLOGÍA\r\n */\r\n OfertaAcademica ofertaAcademica = ofertaAcademicaService.find(proyectoCarreraOferta.getOfertaAcademicaId());\r\n PeriodoAcademico periodoAcademico = ofertaAcademica.getPeriodoAcademicoId();\r\n PeriodoAcademicoOntDTO periodoAcademicoOntDTO = new PeriodoAcademicoOntDTO(periodoAcademico.getId(), \"S/N\",\r\n cabeceraController.getUtilService().formatoFecha(periodoAcademico.getFechaInicio(), \"yyyy-MM-dd\"),\r\n cabeceraController.getUtilService().formatoFecha(periodoAcademico.getFechaFin(), \"yyyy-MM-dd\"));\r\n cabeceraController.getOntologyService().getPeriodoAcademicoOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getPeriodoAcademicoOntService().write(periodoAcademicoOntDTO);\r\n /**\r\n * OFERTA ACADEMICA ONTOLOGÍA\r\n */\r\n OfertaAcademicaOntDTO ofertaAcademicaOntDTO = new OfertaAcademicaOntDTO(ofertaAcademica.getId(), ofertaAcademica.getNombre(),\r\n cabeceraController.getUtilService().formatoFecha(ofertaAcademica.getFechaInicio(),\r\n \"yyyy-MM-dd\"), cabeceraController.getUtilService().formatoFecha(ofertaAcademica.getFechaFin(), \"yyyy-MM-dd\"),\r\n periodoAcademicoOntDTO);\r\n cabeceraController.getOntologyService().getOfertaAcademicoOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getOfertaAcademicoOntService().write(ofertaAcademicaOntDTO);\r\n\r\n /**\r\n * NIVEL ACADEMICO ONTOLOGIA\r\n */\r\n Carrera carrera = carreraService.find(proyectoCarreraOferta.getCarreraId());\r\n Nivel nivel = carrera.getNivelId();\r\n NivelAcademicoOntDTO nivelAcademicoOntDTO = new NivelAcademicoOntDTO(nivel.getId(), nivel.getNombre(),\r\n cabeceraController.getValueFromProperties(PropertiesFileEnum.URI, \"nivel_academico\"));\r\n cabeceraController.getOntologyService().getNivelAcademicoOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getNivelAcademicoOntService().write(nivelAcademicoOntDTO);\r\n /**\r\n * AREA ACADEMICA ONTOLOGIA\r\n */\r\n AreaAcademicaOntDTO areaAcademicaOntDTO = new AreaAcademicaOntDTO(carrera.getAreaId().getId(), \"UNIVERSIDAD NACIONAL DE LOJA\",\r\n carrera.getAreaId().getNombre(), carrera.getAreaId().getSigla(),\r\n cabeceraController.getValueFromProperties(PropertiesFileEnum.URI, \"area_academica\"));\r\n cabeceraController.getOntologyService().getAreaAcademicaOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getAreaAcademicaOntService().write(areaAcademicaOntDTO);\r\n /**\r\n * CARRERA ONTOLOGÍA\r\n */\r\n CarreraOntDTO carreraOntDTO = new CarreraOntDTO(carrera.getId(), carrera.getNombre(), carrera.getSigla(), nivelAcademicoOntDTO,\r\n areaAcademicaOntDTO);\r\n cabeceraController.getOntologyService().getCarreraOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getCarreraOntService().write(carreraOntDTO);\r\n /**\r\n * PROYECTO CARRERA OFERTA ONTOLOGY\r\n */\r\n \r\n ProyectoCarreraOfertaOntDTO proyectoCarreraOfertaOntDTO = new ProyectoCarreraOfertaOntDTO(proyectoCarreraOferta.getId(),\r\n ofertaAcademicaOntDTO, sessionProyecto.getProyectoOntDTO(), carreraOntDTO);\r\n cabeceraController.getOntologyService().getProyectoCarreraOfertaOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getProyectoCarreraOfertaOntService().write(proyectoCarreraOfertaOntDTO);\r\n }", "public static void proveraServisa() {\n\t\tSystem.out.println(\"Unesite redni broj vozila za koje racunate vreme sledeceg servisa:\");\n\t\tUtillMethod.izlistavanjeVozila();\n\t\tint redniBroj = UtillMethod.unesiteInt();\n\t\tif (redniBroj < Main.getVozilaAll().size()) {\n\t\t\tif (!Main.getVozilaAll().get(redniBroj).isVozObrisano()) {\n\t\t\t\tUtillMethod.proveraServisaVozila(Main.getVozilaAll().get(redniBroj));\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Ovo vozilo je obrisano i ne moze da se koristi!\");\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Uneli ste pogresan redni broj!\");\n\t\t}\n\t}", "public KlijentPovezanaOsobaRs procitajSvePovezaneOsobePOVIJEST(KlijentPovezanaOsobaVo value) {\r\n return null;\r\n }", "@Override\n\tpublic ResponseEntity<?> deletar(@Valid ProdutoImagem objeto,\n\t\tHttpServletRequest request) {\n\t\treturn null;\n\t}", "DetalleVenta buscarDetalleVentaPorId(Long id) throws Exception;", "Videogioco findVideogiocoById(int id);", "@Path(\"/productos\")\n @GET\n @Produces(MediaType.APPLICATION_JSON) //Por que una track si la aceptaba (ejemplo) pero un producto no?\n public String productos(){\n return test.getProductos().get(\"Leche\").toString();\n\n }", "@Override\n\tpublic void respuestaObj(WSInfomovilMethods metodo,\n\t\t\tWsInfomovilProcessStatus status, Object obj) {\n\n\t}", "public static void deletarProdutos(){\n if(ListaDProduto.isEmpty()){\n SaidaDados(\"Nenhum produto cadastrado\");\n return;\n } \n ListaDProduto.clear();\n SaidaDados(\"Todos produto deletado com sucesso\");\n \n \n }", "private native void destruirAplicacionNativa();", "public static void main(String[] args) throws AxisFault, RemoteException {\n\t\tServicioDenunciaStub oStub = new ServicioDenunciaStub();\n\t\t// AGREGA\n\t\tDenunciaVO oDenunciaVO = new DenunciaVO();\n\t\toDenunciaVO.setTipo(\"Robo\");\n\t\toDenunciaVO.setDenuncia(\"Tan robandoooo\");\n\t\toDenunciaVO.setCiudad(\"temuco\");\n\t\toDenunciaVO.setSector(\"Las Quilas\");\n\t\toDenunciaVO.setFecha_creacion(\"12/10/2014\");\n\t\toDenunciaVO.setFecha_modificacion(\"13/10/2014\");\n\t\toDenunciaVO.setUsuario_creador(\"Cachulo\");\n\t\toDenunciaVO.setUsuario_modificador(\"Admin\");\n\t\toDenunciaVO.setFecha_user_modifica(\"12/12/2014\");\n\t\toDenunciaVO.setDesactivar(0);\n\t\t\n\t\t//AgregarDenunciaResponse objResponse = oStub.agregarDenuncia();\n\t\tAgregarDenuncia oAgregarDenuncia = new AgregarDenuncia();\n\t\toAgregarDenuncia.setODenunciaVO(oDenunciaVO);\n\t\toAgregarDenuncia.setCiudad(\"temuco\");\n\t\t\n\t\tAgregarDenunciaResponse objResponse = oStub.agregarDenuncia(oAgregarDenuncia);\n\t\tSystem.out.println(objResponse.get_return());\n\t\t\n\t\t\n\t}", "@Override\n\t\t\tpublic void respuestaObj(WSInfomovilMethods metodo,\n\t\t\t\t\tWsInfomovilProcessStatus status, Object obj) {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\tpublic void excluir(Telefone vo) throws Exception {\n\t\t\r\n\t}", "private static void consultaProduto() throws Exception {\r\n boolean erro;\r\n int id;\r\n Produto p;\r\n Categoria c;\r\n System.out.println(\"\\t** Consultar produto **\\n\");\r\n do {\r\n erro = false;\r\n System.out.print(\"ID do produto a ser consultado: \");\r\n id = read.nextInt();\r\n if (id <= 0) {\r\n erro = true;\r\n System.out.println(\"ID Inválida! \");\r\n }\r\n System.out.println();\r\n } while (erro);\r\n p = arqProdutos.pesquisar(id - 1);\r\n if (p != null && p.getID() != -1) {\r\n c = arqCategorias.pesquisar(p.idCategoria - 1);\r\n System.out.println(\r\n \"Id: \" + p.getID()\r\n + \"\\nNome: \" + p.nomeProduto\r\n + \"\\nDescricao: \" + p.descricao\r\n + \"\\nPreco: \" + tf.format(p.preco)\r\n + \"\\nMarca: \" + p.marca\r\n + \"\\nOrigem: \" + p.origem\r\n );\r\n if (c != null) {\r\n System.out.println(\"Categoria: \" + c.nome);\r\n } else {\r\n System.out.println(\"Categoria: \" + p.idCategoria);\r\n }\r\n } else {\r\n System.out.println(\"Produto não encontrado!\");\r\n }\r\n }", "public VotoPregunta findVoto(Usuario user, Pregunta pregunta);", "ConsultaDto<ProdutorVO> obterByNome(String nome, Integer idInstituicao, int pagina, int tamanhoPagina) throws BancoobException;", "public interface IServicoPrivadoClienteSemPropostaAPI {\n\n public static final String PATH = \"ServicoPrivadoClienteSemProposta/\";\n\n\n @GET(PATH)\n Call<List<ServicoOfertaPrivada>> getAll(\n @Query(\"idUsuarioCliente\") String idUsuarioCliente\n );\n}", "public Produto atualizaProduto(Produto Produto) {\n\t\treturn null;\n\t}", "public void testDeletaProjeto() {\n String nome = \"proj3\";\n ProjetoDAO.deletaProjeto(nome);\n Projeto aux = ProjetoDAO.getProjetoByNome(nome);\n assertNull(aux);\n }", "public void almacenar( Proyecto proyecto) {\n\n }", "public void eliminar(Provincia provincia) throws BusinessErrorHelper;", "@Override\n\tpublic Propis dodajPropis(String requestData) throws DatatypeConfigurationException {\n\n\t\tJSONObject json = new JSONObject(requestData);\n\n\t\tString tekstClana = \"\";\n\t\tString redniBroj = \"\";\n\t\tString tekstStava = \"\";\n\t\tString nazivGlave = \"\";\n\t\tString refPropisNaziv = \"\";\n\n\t\tString propisNaziv = json.getString(\"nazivPropisa\");\n\t\tString nazivDela = json.getString(\"nazivDeo\");\n\n\t\tString nazivClana = json.getString(\"nazivClana\");\n\t\tString opisClana = json.getString(\"opisClana\");\n\t\ttry {\n\t\t\ttekstClana = json.getString(\"tekstClana\");\n\n\t\t} catch (org.json.JSONException e) {\n\t\t\t// e.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\tredniBroj = json.getString(\"redniBrojStava\");\n\t\t\ttekstStava = json.getString(\"stavTekst\");\n\t\t} catch (org.json.JSONException e) {\n\t\t\t// e.printStackTrace();\n\t\t}\n\t\ttry {\n\t\t\tnazivGlave = json.getString(\"nazivGlave\");\n\t\t} catch (org.json.JSONException e) {\n\n\t\t}\n\n\t\tPropis propis = new Propis();\n\t\tDeo deo = new Deo();\n\t\tGlava glava = new Glava();\n\t\tClan clan = new Clan();\n\t\tSadrzaj sadrzaj = new Sadrzaj();\n\t\tStav stav = new Stav();\n\t\tTekst tekst = new Tekst();\n\t\t\n\t\t\n\t\ttry {\n\t\t\trefPropisNaziv = json.getString(\"refernciranPropis\");\n\t\t} catch (JSONException e) {\n\t\t\t//e.printStackTrace();\n\t\t}\n\t\t//ako je true, znaci da refernciramo\n\t\tif(!refPropisNaziv.equals(\"\"))\n\t\t{\n\t\t\tJSONArray jsonArray2 = json.getJSONArray(\"splitovanTekstClan\");\n\t\t\tList<String> list2 = new ArrayList<String>();\n\t\t\tfor (int i=0; i<jsonArray2.length(); i++) {\n\t\t\t\ttekst.getText().add( jsonArray2.getString(i) );\n\t\t\t}\n\t\n\t\t\ttekst.setNazivPropisa(refPropisNaziv.replaceAll(\"\\\\s\", \"\")); \n\t\t\ttekst.setNazivClana(json.getString(\"nazivClanaRef\").replaceAll(\"\\\\s\", \"\"));\n\t\t\ttekst.setIDClana(BigInteger.valueOf(json.getLong(\"referenciraniClanovi\")));\n\t\t\ttekst.setIDPropisa(BigInteger.valueOf(json.getLong(\"propisId\")));\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttekst.getText().add(tekstClana);\n\t\t}\n\t\t\n\t\t\n\t\n\t\tif (!redniBroj.equals(\"\")) {\n\t\t\tstav.setRedniBroj(Long.parseLong(redniBroj));\n\t\t\tif(!refPropisNaziv.equals(\"\")){\n\t\t\t\tstav.setTekst(tekst.getText());\n\t\t\t\tstav.setNazivPropisa(refPropisNaziv.replaceAll(\"\\\\s\", \"\")); \n\t\t\t\tstav.setNazivClana(json.getString(\"nazivClanaRef\").replaceAll(\"\\\\s\", \"\"));\n\t\t\t\tstav.setIDClana(BigInteger.valueOf(json.getLong(\"referenciraniClanovi\")));\n\t\t\t\tstav.setIDPropisa(BigInteger.valueOf(json.getLong(\"propisId\")));\n\t\t\t}else{\n\t\t\t\tstav.getTekst().add(tekstStava);\n\t\t\t}\n\t\t\tsadrzaj.getStav().add(stav);\t\t\t\n\t\t}\n\t\tif (!tekstClana.equals(\"\") && redniBroj.equals(\"\")) {\n\t\t\tsadrzaj.getTekst().add(tekst);\n\t\t}\n\t\tif (!nazivGlave.equals(\"\")) {\n\t\t\tglava.getClan().add(clan);\n\t\t\tglava.setID(BigInteger.valueOf(getID()));\n\t\t\tglava.setNaziv(nazivGlave);\n\t\t\tdeo.getGlava().add(glava);\n\t\t}\n\n\t\tclan.setID(BigInteger.valueOf(getID()));\n\t\tclan.setNaziv(nazivClana);\n\t\tclan.setOpis(opisClana);\n\t\tclan.setSadrzaj(sadrzaj);\n\n\t\tif (nazivGlave.equals(\"\")) {\n\t\t\tdeo.getClan().add(clan);\n\t\t}\n\n\t\tdeo.setID(BigInteger.valueOf(getID()));\n\t\tdeo.setNaziv(nazivDela);\n\n\t\tpropis.setID(BigInteger.valueOf(getID()));\n\t\tpropis.setNaziv(propisNaziv);\n\t\tpropis.getDeo().add(deo);\n\t\tpropis.setStatus(\"PREDLOZEN\");\n\t\t\n\n\t\t\n\t\tGregorianCalendar c = new GregorianCalendar();\t\n\t\tc.setTime(new Date()); \n\t\t\n\t\tXMLGregorianCalendar date2 = DatatypeFactory.newInstance().newXMLGregorianCalendar(c);\n\t\tCalendar calendar = date2.toGregorianCalendar();\n\t\t\n\t\tpropis.setDatum(date2);\n\t\t\n\t\t// Postavljanje metapodatka koji predstavlja datum kriranja propisa\n\t\tPropis.DatumKreiranja datumKreiranjaPropisa = new Propis.DatumKreiranja();\n\t\tdatumKreiranjaPropisa.setProperty(datumKreiranjaPropisa.getProperty()); \t\t// Pošto neće samo da se izgeneriše\n\t\tdatumKreiranjaPropisa.setDatatype(datumKreiranjaPropisa.getDatatype());\t\t\t// Pošto neće samo da se izgeneriše\n\t\tdatumKreiranjaPropisa.setValue(date2);\n\t\tpropis.setDatumKreiranja(datumKreiranjaPropisa);\n\n\t\t// Postavljanje about atributa/resursa za metapodatke\n\t\t// propis.setAbout(\"http://www.parlament.gov.rs/rdf/resoruce/\"+propis.getID());\n\t\t\n\t\t// svaki novi propis ce imati svoje ime kao naziv xml fajla\n\t\tString docIdPre = propis.getNaziv().replaceAll(\"\\\\s\", \"\");\n\t\tpropis.setAbout(\"http://www.parlament.gov.rs/rdf/resoruce/\"+docIdPre);\n\t\t\n\t\treturn propis;\n\t}", "public void devolver() {\r\n \t\r\n \tif (raiz == null)\r\n \t\tSystem.out.println(\"No hay datos en la pila\");\r\n else\r\n \t System.out.println(\"Devolvemos el dato de la cima: \"+raiz.dato);\r\n }", "public ServidorRemoto(PartidaServidor partida) throws RemoteException {\n\t\t//RVA: aqui estaba la creacion de seguridad que ahra va en el lanzador\n\t\tthis.partida = partida;\n\t}", "public IProduto getCodProd();", "public void localizarEremoverProdutoCodigo(Prateleira prat){\r\n //instacia um auxiliar para procura\r\n Produto mockup = new Produto();\r\n int Codigo = Integer.parseInt(JOptionPane.showInputDialog(null,\"Forneca o codigo do produto a ser removido\" ));\r\n mockup.setCodigo(Codigo); \r\n \r\n //informa que caso encontre o produto remova o da arraylist\r\n boolean resultado = prat.getPrateleira().remove(mockup);\r\n if(resultado){\r\n JOptionPane.showMessageDialog(null, \"Produto de codigo :\" +Codigo+ \" Removido\");\r\n }\r\n else {\r\n JOptionPane.showMessageDialog(null, \"Produto de codigo :\" +Codigo+ \" não encontrado\");\r\n }\r\n }", "public void listarProvincia() {\n provincias = JPAFactoryDAO.getFactory().getProvinciaDAO().find();\n// for(int i=0;i<provincias.size();i++ ){\n// System.out.println(\"lista:\"+provincias.get(i).getNombreprovincia());\n// }\n }", "private static void VeureVendes (BaseDades bd) {\n ArrayList <Venda> llista = new ArrayList <Venda>();\n llista = bd.consultaVen(\"SELECT * FROM VENDES\");\n if (llista != null)\n for (int i = 0; i<llista.size(); i++) {\n Venda p = (Venda) llista.get(i);\n Producte prod = bd.consultarUnProducte(p.getIdproducte());\n System.out.println(\"ID Venda =>\"+p.getNumvenda()+\"* Producte: \"\n +prod.getDescripcio()+\"* Quantitat: \"+p.getQuantitat()\n +\"* Data: \"+p.getDatavenda());\n }\n }", "public void pagar(int precio){\r\n this.dinero -=precio;\r\n }", "@POST\r\n @GET\r\n @Path(\"/v1.0/produtos\")\r\n @Consumes({ WILDCARD })\r\n @Produces({ APPLICATION_ATOM_XML, APPLICATION_JSON + \"; charset=UTF-8\" })\r\n public Response listarProdutos() {\r\n\r\n log.debug(\"listarProdutos: {}\");\r\n\r\n try {\r\n\r\n List<Produto> produtos = produtoSC.listar();\r\n\r\n return respostaHTTP.construirResposta(produtos);\r\n\r\n } catch (Exception e) {\r\n\r\n return respostaHTTP.construirRespostaErro(e);\r\n }\r\n }", "public static void main(String[] args) {\n\t\tProduto objeto = new Produto(15,\"Caneta\",100,50);\n\t\t//objeto.setId(1);\n\t\t//objeto.setDescricao(\"NOTEBOOK\");\n\t\t//objeto.setValorCompra(100);\n\t\t//objeto.setValorVenda(2000);\n\t\tSystem.out.println(\"getVenda().................:\" + objeto.getVenda());\n\t\tSystem.out.println(\"getValorVista()............:\" + objeto.getValorVista());\n\t\tSystem.out.println(\"getValorVista(float).......:\" + objeto.getValorVista(10));\n\t\tobjeto.atualizaValor(10);\n\t\t\n\t}", "@Override\r\n\tpublic MensajeBean elimina(Tramite_presentan_info_impacto nuevo) {\n\t\treturn tramite.elimina(nuevo);\r\n\t}", "ConsultaDto<ProdutorVO> obterByNomeApelido(String nomeApelido, Integer idInstituicao, int pagina, int tamanhoPagina) throws BancoobException;", "@DELETE\n\t@Path(\"/cliente/devolverBoleta/{idCliente: \\\\d+}/{idBoleta: \\\\d+}\")\n\t@Produces({ MediaType.APPLICATION_JSON })\n\t@Consumes(MediaType.APPLICATION_JSON)\n\tpublic Response devolverBoleta(@PathParam(\"idCliente\") Integer idCliente,@PathParam(\"idBoleta\") Integer idBoleta)\n\t{\n\t\tMensajeDevolucion mens = new MensajeDevolucion(\"Ya llegaste aca ana\");\n\t\tMaster mas = Master.darInstancia(getPath());\n\t\ttry \n\t\t{\n\t\t\tmens = mas.devolverBoleta(idCliente, idBoleta);\n\t\t} catch (Exception e) {\n\t\t\treturn Response.status(500).entity(doErrorMessage(e)).build();\n\t\t}\n\t\treturn Response.status(200).entity(mens).build();\n\t}", "private static void removerProduto() throws Exception {\r\n int id;\r\n boolean erro, result;\r\n System.out.println(\"\\t** Remover produto **\\n\");\r\n System.out.print(\"ID do produto a ser removido: \");\r\n id = read.nextInt();\r\n if (indice_Produto_Cliente.lista(id).length != 0) {\r\n System.out.println(\"Esse produto não pode ser removido pois foi comprado por algum Cliente!\");\r\n } else {\r\n do {\r\n erro = false;\r\n System.out.println(\"\\nRemover produto?\");\r\n System.out.print(\"1 - SIM\\n2 - NÂO\\nR: \");\r\n switch (read.nextByte()) {\r\n case 1:\r\n result = arqProdutos.remover(id - 1);\r\n if (result) {\r\n System.out.println(\"Removido com sucesso!\");\r\n } else {\r\n System.out.println(\"Produto não encontrado!\");\r\n }\r\n break;\r\n case 2:\r\n System.out.println(\"\\nOperação Cancelada!\");\r\n break;\r\n default:\r\n System.out.println(\"\\nOpção Inválida!\\n\");\r\n erro = true;\r\n break;\r\n }\r\n } while (erro);\r\n }\r\n }", "public static void dodavanjeTeretnogVozila() {\n\t\tString vrstaVozila = \"Teretno Vozilo\";\n\t\tString regBr = UtillMethod.unosRegBroj();\n\t\tGorivo gorivo = UtillMethod.izabirGoriva();\n\t\tGorivo gorivo2 = UtillMethod.izabirGorivaOpet(gorivo);\n\t\tint brServisa = 1;\n\t\tdouble potrosnja = UtillMethod.unesiteDoublePotrosnja();\n\t\tSystem.out.println(\"Unesite broj km koje je vozilo preslo:\");\n\t\tdouble predjeno = UtillMethod.unesiteBroj();\n\t\tdouble preServisa = 20000;\n\t\tdouble cenaServisa = 10000;\n\t\tSystem.out.println(\"Unesite cenu vozila za jedan dan:\");\n\t\tdouble cenaDan = UtillMethod.unesiteBroj();\n\t\tSystem.out.println(\"Unesite broj sedista u vozilu:\");\n\t\tint brSedista = UtillMethod.unesiteInt();\n\t\tSystem.out.println(\"Unesite broj vrata vozila:\");\n\t\tint brVrata = UtillMethod.unesiteInt();\n\t\tboolean vozObrisano = false;\n\t\tArrayList<Gorivo> gorivaVozila = new ArrayList<Gorivo>();\n\t\tgorivaVozila.add(gorivo);\n\t\tif(gorivo2!=Main.nista) {\n\t\t\tgorivaVozila.add(gorivo2);\n\t\t}\n\t\tArrayList<Servis> servisiNadVozilom = new ArrayList<Servis>();\n\t\tSystem.out.println(\"Unesite maximalnu masu koje vozilo moze da prenosi u KG !!\");\n\t\tint maxMasauKg = UtillMethod.unesiteInt();\n\t\tSystem.out.println(\"Unesite maximalnu visinu u m:\");\n\t\tdouble visinauM = UtillMethod.unesiteBroj();\n\t\tTeretnaVozila vozilo = new TeretnaVozila(vrstaVozila, regBr, gorivaVozila, brServisa, potrosnja, predjeno, preServisa,\n\t\t\t\tcenaServisa, cenaDan, brSedista, brVrata, vozObrisano, servisiNadVozilom, maxMasauKg, visinauM);\n\t\tUtillMethod.prviServis(vozilo, predjeno);\n\t\tMain.getVozilaAll().add(vozilo);\n\t\tSystem.out.println(\"Novo vozilo je uspesno dodato u sistem!\");\n\t\tSystem.out.println(\"--------------------------------------\");\n\t}", "public ApiResponse<Void> deletePresenceSource(ApiRequest<Void> request) throws IOException {\n try {\n return pcapiClient.invoke(request, null);\n }\n catch (ApiException exception) {\n @SuppressWarnings(\"unchecked\")\n ApiResponse<Void> response = (ApiResponse<Void>)(ApiResponse<?>)exception;\n return response;\n }\n catch (Throwable exception) {\n if (pcapiClient.getShouldThrowErrors()) {\n if (exception instanceof IOException) {\n throw (IOException)exception;\n }\n throw new RuntimeException(exception);\n }\n @SuppressWarnings(\"unchecked\")\n ApiResponse<Void> response = (ApiResponse<Void>)(ApiResponse<?>)(new ApiException(exception));\n return response;\n }\n }", "public interface PromotionEndpoints {\n\n @GET(\"/promotions\")\n Call<ArrayList<GETPromotionResponse>> getPromotionsForRestaurant(\n @Query(\"restaurant_name\") String name, @Query(\"restaurant_address\") String address);\n\n @POST(\"/promotions\")\n Call<Void> createPromotion(@Body POSTPromotionRequest createPromotionRequest);\n\n @DELETE(\"/promotions\")\n Call<Void> deletePromotion(@Query(\"restaurant_name\") String name,\n @Query(\"restaurant_address\") String address,\n @Query(\"date\") String date,\n @Query(\"description\") String description);\n\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(\"http://youfood.ddns.net\")\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n\n PromotionEndpoints promotionEndpoints = retrofit.create(PromotionEndpoints.class);\n}", "public interface RuntService {\n @Headers({\n \"Accept: application/json\"\n })\n @GET(\"runt/co.com.runt.local.domain.persona/{id}/{placa}\")\n Call<List<RuntVO>> consultaRunt(@Path(\"id\") Integer numeroCedula, @Path(\"placa\") String placa);\n}", "@RequestMapping(value = \"/oeuvres/{id}\",\n method = RequestMethod.DELETE,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<Void> deleteOeuvre(@PathVariable Long id) {\n log.debug(\"REST request to delete Oeuvre : {}\", id);\n oeuvreRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(\"oeuvre\", id.toString())).build();\n }", "private static void crearPedidoGenerandoOPC() throws RemoteException {\n\n\t\tlong[] idVariedades = { 25, 29, 33 };\n\t\tint[] cantidades = { 6, 8, 11 };\n\t\tPedidoClienteDTO pedido = crearPedido(\"20362134596\", \"test 3\", idVariedades, cantidades);\n\n\t\tpedido = PedidoController.getInstance().crearPedido(pedido).toDTO();\n\t\t\n\t\tPedidoController.getInstance().cambiarEstadoPedidoCliente(pedido.getNroPedido(), EstadoPedidoCliente.ACEPTADO);\n\n\t}", "@RequestMapping(value=\"/{id}\", method=RequestMethod.DELETE)\n\tpublic ResponseEntity<Void> deletar(@PathVariable(\"id\") Long id){\n\t\tlivrosService.deletar(id);\n\t\treturn ResponseEntity.noContent().build();\n\t}", "public void enviarProyectos(Proyecto proyecto){\n\t\t\tRestTemplate plantilla = new RestTemplate();\n\t\t\tplantilla.postForObject(\"http://localhost:5000/proyectos\", proyecto, Proyecto.class);\n\t\t}", "public Produto() {}", "List<Videogioco> retriveByNome(String nome);", "@GET\n\t@Consumes(MediaType.APPLICATION_JSON)\n\t@Produces(MediaType.APPLICATION_JSON)\n\t@Path(\"/deletePartner/{user}/{token}\")\n\tpublic Response deletePartner(@QueryParam(\"buId\") int buId,@QueryParam(\"partyId\") int partyId, \n\t\t\t@PathParam(\"token\") String token,\n\t\t\t@PathParam(\"user\") String name\t\t\t\n\t\t\t) throws IOException {\n\t\tBaseResponse<Integer> br = new BaseResponse<>();\n\t\tlogger.info(br);\n\t\tbr.setResponseObject(partnerService.deletePartner(partyId,buId));\n\t\t//Response response=partnerService.addPartner(partner);\n\t\tResponse response = FiinfraResponseBuilder.getSuccessResponse(br, null);\n\t\t//System.out.println(\"Delete Partner=\"+response);\n\t\treturn response;\t\n\t}", "public interface ContaAPI {\n\n @GET(\"/conta/buscarConta/{usuario}\")\n Call <List<Conta>> buscarConta(@Path(\"usuario\") String usuario);\n\n @GET(\"/conta/buscarProduto/{usuario}/{produto}\")\n Call <Conta> buscarProduto(@Path(\"usuario\") String usuario, @Path(\"produto\") String produto);\n\n @GET(\"/conta/valorConta/{usuario}\")\n Call<Double> valorConta(@Path(\"usuario\") String usuario);\n\n @POST(\"/conta/salvar\")\n Call<Void> salvar(@Body Conta conta);\n\n @DELETE(\"/conta/delete/{usuario}/{produto}\")\n Call<Void> apagarProdutoConta(@Path(\"usuario\") String usuario, @Path(\"produto\") String produto);\n\n @DELETE(\"/conta/delete/{usuario}\")\n Call<Void> apagarConta(@Path(\"usuario\") String usuario);\n}", "public Produto consultarProduto(Produto produto) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n PreparedStatement stmt = null;\r\n ResultSet rs = null;\r\n Produto cerveja = null;\r\n String sql = \"SELECT TBL_CERVEJARIA.ID_CERVEJARIA, TBL_CERVEJARIA.CERVEJARIA, TBL_CERVEJARIA.PAIS, \"\r\n + \"TBL_CERVEJA.ID_CERVEJA, TBL_CERVEJA.ID_CERVEJARIA AS \\\"FK_CERVEJARIA\\\", \"\r\n + \"TBL_CERVEJA.ROTULO, TBL_CERVEJA.PRECO, TBL_CERVEJA.VOLUME, TBL_CERVEJA.TEOR, TBL_CERVEJA.COR, TBL_CERVEJA.TEMPERATURA, \"\r\n + \"TBL_CERVEJA.FAMILIA_E_ESTILO, TBL_CERVEJA.DESCRICAO, TBL_CERVEJA.SABOR, TBL_CERVEJA.IMAGEM_1, TBL_CERVEJA.IMAGEM_2, TBL_CERVEJA.IMAGEM_3 \"\r\n + \"FROM TBL_CERVEJARIA \"\r\n + \"INNER JOIN TBL_CERVEJA \"\r\n + \"ON TBL_CERVEJARIA.ID_CERVEJARIA = TBL_CERVEJA.ID_CERVEJARIA \"\r\n + \"WHERE ID_CERVEJA = ?\";\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.prepareStatement(sql);\r\n stmt.setInt(1, produto.getIdCerveja());\r\n rs = stmt.executeQuery();\r\n if (rs.next()) {\r\n cerveja = new Produto();\r\n cerveja.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n cerveja.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n cerveja.setPais(rs.getString(\"PAIS\"));\r\n cerveja.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n cerveja.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n cerveja.setRotulo(rs.getString(\"ROTULO\"));\r\n cerveja.setPreco(rs.getString(\"PRECO\"));\r\n cerveja.setVolume(rs.getString(\"VOLUME\"));\r\n cerveja.setTeor(rs.getString(\"TEOR\"));\r\n cerveja.setCor(rs.getString(\"COR\"));\r\n cerveja.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n cerveja.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n cerveja.setDescricao(rs.getString(\"DESCRICAO\"));\r\n cerveja.setSabor(rs.getString(\"SABOR\"));\r\n cerveja.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n cerveja.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n cerveja.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n } else {\r\n return cerveja;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return cerveja;\r\n }", "void agregarVotoPlayLIst(Voto voto) throws ExceptionDao;", "public List<NotaDeCredito> procesar();", "@RemoteServiceRelativePath(\"service\")\npublic interface DekorTradeService extends RemoteService {\n\n\tUserSer getUser(String user, String password)\n\t\t\tthrows IllegalArgumentException, SQLExceptionSer, LoginExceptionSer;\n\n\tvoid setPassword(String user, String password)\n\t\t\tthrows IllegalArgumentException, SQLExceptionSer;\n\n\tList<FelhasznaloSer> getFelhasznalo() throws IllegalArgumentException,\n\t\t\tSQLExceptionSer;\n\n\tFelhasznaloSer addFelhasznalo(FelhasznaloSer felhasznaloSer)\n\t\t\tthrows IllegalArgumentException, SQLExceptionSer;\n\n\tFelhasznaloSer updateFelhasznalo(FelhasznaloSer felhasznaloSer)\n\t\t\tthrows IllegalArgumentException, SQLExceptionSer;\n\n\tString setFelhasznaloJelszo(String rovidnev)\n\t\t\tthrows IllegalArgumentException, SQLExceptionSer;\n\n\tFelhasznaloSer removeFelhasznalo(FelhasznaloSer felhasznaloSer)\n\t\t\tthrows IllegalArgumentException, SQLExceptionSer;\n\n\tJogSer updateJog(String rovidnev, JogSer jogSer)\n\t\t\tthrows IllegalArgumentException, SQLExceptionSer;\n\n\tList<JogSer> getJog(String rovidnev) throws IllegalArgumentException,\n\t\t\tSQLExceptionSer;\n\n\tList<GyartoSer> getGyarto() throws IllegalArgumentException,\n\t\t\tSQLExceptionSer;\n\n\tGyartoSer addGyarto(GyartoSer szallitoSer) throws IllegalArgumentException,\n\t\t\tSQLExceptionSer;\n\n\tGyartoSer updateGyarto(GyartoSer szallitoSer)\n\t\t\tthrows IllegalArgumentException, SQLExceptionSer;\n\n\tGyartoSer removeGyarto(GyartoSer szallitoSer)\n\t\t\tthrows IllegalArgumentException, SQLExceptionSer;\n\n\tVevoSer addVevo(VevoSer vevoSer) throws IllegalArgumentException,\n\t\t\tSQLExceptionSer;\n\n\tVevoSer updateVevo(VevoSer vevoSer) throws IllegalArgumentException,\n\t\t\tSQLExceptionSer;\n\n\tString setVevoJelszo(String rovidnev) throws IllegalArgumentException,\n\t\t\tSQLExceptionSer;\n\n\tVevoSer removeVevo(VevoSer vevoSer) throws IllegalArgumentException,\n\t\t\tSQLExceptionSer;\n\n\tList<VevoSer> getVevo() throws Exception, SQLExceptionSer;\n\n\tList<CikkSer> getCikk(int page, String fotipus, String altipus,\n\t\t\tString cikkszam) throws IllegalArgumentException, SQLExceptionSer;\n\n\tCikkSer addCikk(CikkSer cikkSer) throws IllegalArgumentException,\n\t\t\tSQLExceptionSer;\n\n\tCikkSer updateCikk(CikkSer cikkSer) throws IllegalArgumentException,\n\t\t\tSQLExceptionSer;\n\n\tCikkSer removeCikk(CikkSer ctorzsSer) throws IllegalArgumentException,\n\t\t\tSQLExceptionSer;\n\n\tList<RendeltSer> getRendelt(String vevo) throws IllegalArgumentException,\n\t\t\tSQLExceptionSer;\n\n\tList<RendeltcikkSer> getRendeltcikk(String rovidnev, String rendeles)\n\t\t\tthrows IllegalArgumentException, SQLExceptionSer;\n\n\tSzinkronSer szinkron() throws IllegalArgumentException, SQLExceptionSer;\n\n\tString teljesszinkron() throws IllegalArgumentException, SQLExceptionSer;\n\n\tString initUploadFileStatus() throws IllegalArgumentException;\n\n\tUploadSer getUploadFileStatus() throws IllegalArgumentException;\n\n\tList<String> getKep(String cikkszam, String szinkod)\n\t\t\tthrows IllegalArgumentException, SQLExceptionSer;\n\n\tString removeKep(String cikkszam, String szinkod, String rorszam)\n\t\t\tthrows IllegalArgumentException, SQLExceptionSer;\n\n\tList<CikkfotipusSer> getCikkfotipus() throws IllegalArgumentException,\n\t\t\tSQLExceptionSer;\n\n\tCikkfotipusSer addCikkfotipus(CikkfotipusSer rcikkfotipusSe)\n\t\t\tthrows IllegalArgumentException, SQLExceptionSer;\n\n\tCikkfotipusSer updateCikkfotipus(CikkfotipusSer cikkfotipusSer)\n\t\t\tthrows IllegalArgumentException, SQLExceptionSer;\n\n\tList<CikkaltipusSer> getCikkaltipus(String fokod)\n\t\t\tthrows IllegalArgumentException, SQLExceptionSer;\n\n\tCikkaltipusSer addCikkaltipus(CikkaltipusSer cikktipusSer)\n\t\t\tthrows IllegalArgumentException, SQLExceptionSer;\n\n\tCikkaltipusSer updateCikkaltipus(CikkaltipusSer cikktipusSer)\n\t\t\tthrows IllegalArgumentException, SQLExceptionSer;\n\n\tCikkSelectsSer getCikkSelects() throws IllegalArgumentException,\n\t\t\tSQLExceptionSer;\n\n\tList<KosarSer> getKosarCikk(String elado, String vevo, String menu)\n\t\t\tthrows IllegalArgumentException, SQLExceptionSer;\n\n\tVevoKosarSer getVevoKosar(String elado, String menu)\n\t\t\tthrows IllegalArgumentException, SQLExceptionSer;\n\n\tString addKosar(String elado, String vevo, String menu, String cedula)\n\t\t\tthrows IllegalArgumentException, SQLExceptionSer;\n\n\tString removeKosar(String elado, String vevo, String menu, String cedula)\n\t\t\tthrows IllegalArgumentException, SQLExceptionSer;\n\n\tKosarSer addKosarCikk(KosarSer kosarSer) throws IllegalArgumentException,\n\t\t\tSQLExceptionSer;\n\n\tKosarSer removeKosarCikk(KosarSer kosarSer)\n\t\t\tthrows IllegalArgumentException, SQLExceptionSer;\n\n\tString importInternet(String elado, String vevo, String rendeles)\n\t\t\tthrows IllegalArgumentException, SQLExceptionSer;\n\n\tString createCedula(String elado, String vevo, String menu)\n\t\t\tthrows IllegalArgumentException, SQLExceptionSer;\n\n\tList<CedulaSer> getCedula(String vevo, String menu, String tipus)\n\t\t\tthrows IllegalArgumentException, SQLExceptionSer;\n\n\tList<CedulacikkSer> getCedulacikk(String cedula, String tipus)\n\t\t\tthrows IllegalArgumentException, SQLExceptionSer;\n\n\tString cedulaToKosar(String elado, String vevo, String menu, String tipus, String cedula)\n\t\t\tthrows IllegalArgumentException, SQLExceptionSer;\n\n\tString kosarToCedula(String elado, String vevo, String menu, String tipus, String ujtipus, String cedula,\n\t\t\tDouble befizet, Double befizeteur, Double befizetusd)\n\t\t\tthrows IllegalArgumentException, SQLExceptionSer;\n\n\tList<FizetesSer> getFizetes() throws IllegalArgumentException,\n\t\t\tSQLExceptionSer;\n\n\tZarasEgyenlegSer getElozoZaras() throws IllegalArgumentException,\n\t\t\tSQLExceptionSer;\n\n\tString createZaras(String penztaros, Double egyenleghuf, Double egyenlegeur,\n\t\t\tDouble egyenlegusd, Double kivethuf, Double kiveteur, Double kivetusd)\n\t\t\tthrows IllegalArgumentException, SQLExceptionSer;\n\n\tList<FizetesSer> getZarasFizetes(String zaras)\n\t\t\tthrows IllegalArgumentException, SQLExceptionSer;\n\n\tList<ZarasSer> getZaras() throws IllegalArgumentException, SQLExceptionSer;\n\n\tString createTorlesztes(String penztaros, String vevo, Double torleszthuf,\n\t\t\tDouble torleszteur, Double torlesztusd)\n\t\t\tthrows IllegalArgumentException, SQLExceptionSer;\n\n\tList<FizetesSer> getTorlesztesek() throws IllegalArgumentException,\n\t\t\tSQLExceptionSer;\n\n\tList<FizetesSer> getTorlesztes(String cedula)\n\t\t\tthrows IllegalArgumentException, SQLExceptionSer;\n\n\tList<FizetesSer> getHazi() throws IllegalArgumentException, SQLExceptionSer;\n\n\tFizetesSer addHazi(FizetesSer fizetesSer) throws IllegalArgumentException,\n\t\t\tSQLExceptionSer;\n\n\tList<RendeltcikkSer> getRendelesSzamolt(String status)\n\t\t\tthrows IllegalArgumentException, SQLExceptionSer;\n\n\tList<RendeltcikkSer> getRendeles(String status, String cikkszam,\n\t\t\tString szinkod) throws IllegalArgumentException, SQLExceptionSer;\n\n\tList<RendeltcikkSer> getMegrendelt(String status, String cikkszam,\n\t\t\tString szinkod) throws IllegalArgumentException, SQLExceptionSer;\n\n\tRendeltcikkSer updateRendeltcikk(RendeltcikkSer rendeltcikkSer)\n\t\t\tthrows IllegalArgumentException, SQLExceptionSer;\n\n\tRendeltcikkSer megrendeles(RendeltcikkSer rendeltcikkSer)\n\t\t\tthrows IllegalArgumentException, SQLExceptionSer;\n\n\tList<BeszallitottcikkSer> getBeszallitottcikk(String cikkszam,\n\t\t\tString szinkod) throws IllegalArgumentException, SQLExceptionSer;\n\n\tBeszallitottcikkSer addBeszallitottcikk(\n\t\t\tBeszallitottcikkSer beszallitottcikkSer)\n\t\t\tthrows IllegalArgumentException, SQLExceptionSer;\n\n\tList<RaktarSer> getRaktar(int page, String fotipus, String altipus,\n\t\t\tString cikkszam) throws IllegalArgumentException, SQLExceptionSer;\n\n\tRaktarSer updateRaktar(String rovancs,String userId,RaktarSer raktarSer) throws IllegalArgumentException,\n\t\t\tSQLExceptionSer;\n\n\tList<RendeltcikkSer> getRendeles(String vevo) throws IllegalArgumentException, SQLExceptionSer;\n\n\tList<EladasSer> getEladas(String cikkszam, String sznikod) throws IllegalArgumentException, SQLExceptionSer;\n\n\tRendeltcikkSer removeRendeles(RendeltcikkSer rendeltcikkSer) throws IllegalArgumentException, SQLExceptionSer;\n\n}", "public void pagarAluguel(int credor, int devedor, int valor, String NomePopriedade) {\n\n Jogador JogadorDevedor = listaJogadores.get(devedor);\n Jogador JogadorCredor = listaJogadores.get(credor);\n\n\n if (listaJogadores.get(devedor).getDinheiro() >= valor) {\n JogadorDevedor.retirarDinheiro(valor);\n JogadorCredor.addDinheiro(valor);\n\n } else {\n \n\n\n if(bankruptcy){\n\n }else{\n int DinheiroRestante = listaJogadores.get(devedor).getDinheiro();\n JogadorDevedor.retirarDinheiro(DinheiroRestante);\n JogadorCredor.addDinheiro(DinheiroRestante);\n }\n this.removePlayer(devedor);\n\n }\n\n\n }", "@DeleteMapping(\"/procesadors/{id}\")\n @Timed\n public ResponseEntity<Void> deleteProcesador(@PathVariable Long id) {\n log.debug(\"REST request to delete Procesador : {}\", id);\n procesadorRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }", "RespuestaRest<ParqueaderoEntidad> consultar(String id);", "private void datosVehiculo(boolean esta_en_revista) {\n\t\ttry{\n\t\t\t String Sjson= Utils.doHttpConnection(\"http://datos.labplc.mx/movilidad/vehiculos/\"+placa+\".json\");\n\t\t\t JSONObject json= (JSONObject) new JSONTokener(Sjson).nextValue();\n\t\t\t JSONObject json2 = json.getJSONObject(\"consulta\");\n\t\t\t JSONObject jsonResponse = new JSONObject(json2.toString());\n\t\t\t JSONObject sys = jsonResponse.getJSONObject(\"tenencias\");\n\t\t\t \n\t\t\t if(sys.getString(\"tieneadeudos\").toString().equals(\"0\")){\n\t\t\t \tautoBean.setDescripcion_tenencia(getResources().getString(R.string.sin_adeudo_tenencia));\n\t\t\t \tautoBean.setImagen_teencia(imagen_verde);\n\t\t\t }else{\n\t\t\t \tautoBean.setDescripcion_tenencia(getResources().getString(R.string.con_adeudo_tenencia));\n\t\t\t \tautoBean.setImagen_teencia(imagen_rojo);\n\t\t\t \tPUNTOS_APP-=PUNTOS_TENENCIA;\n\t\t\t }\n\t\t\t \n\t\t\t JSONArray cast = jsonResponse.getJSONArray(\"infracciones\");\n\t\t\t String situacion;\n\t\t\t boolean hasInfraccion=false;\n\t\t\t for (int i=0; i<cast.length(); i++) {\n\t\t\t \tJSONObject oneObject = cast.getJSONObject(i);\n\t\t\t\t\t\t try {\n\t\t\t\t\t\t\t situacion = (String) oneObject.getString(\"situacion\");\n\t\t\t\t\t\t\t if(!situacion.equals(\"Pagada\")){\n\t\t\t\t\t\t\t\t hasInfraccion=true;\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t } catch (JSONException e) { \n\t\t\t\t\t\t\t DatosLogBean.setDescripcion(Utils.getStackTrace(e));\n\t\t\t\t\t\t }\n\t\t\t }\n\t\t\t if(hasInfraccion){\n\t\t\t \t autoBean.setDescripcion_infracciones(getResources().getString(R.string.tiene_infraccion));\n\t\t\t\t \tautoBean.setImagen_infraccones(imagen_rojo);\n\t\t\t\t \tPUNTOS_APP-=PUNTOS_INFRACCIONES;\n\t\t\t }else{\n\t\t\t \t autoBean.setDescripcion_infracciones(getResources().getString(R.string.no_tiene_infraccion));\n\t\t\t\t autoBean.setImagen_infraccones(imagen_verde);\n\t\t\t }\n\t\t\t JSONArray cast2 = jsonResponse.getJSONArray(\"verificaciones\");\n\t\t\t if(cast2.length()==0){\n\t\t\t \t autoBean.setDescripcion_verificacion(getResources().getString(R.string.no_tiene_verificaciones));\n\t\t\t\t\t autoBean.setImagen_verificacion(imagen_rojo);\n\t\t\t\t\t PUNTOS_APP-=PUNTOS_VERIFICACION;\n\t\t\t }\n\t\t\t\t\t Date lm = new Date();\n\t\t\t\t\t String lasmod = new SimpleDateFormat(\"yyyy-MM-dd\").format(lm);\n\t\t\t\t\t SimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\t\t\tBoolean yaValide=true;\n\t\t\t\t for (int i=0; i<cast2.length(); i++) {\n\t\t\t\t \tJSONObject oneObject = cast2.getJSONObject(i);\n\t\t\t\t\t\t\t try {\n\t\t\t\t\t\t\t\t\tif(!esta_en_revista&&yaValide){\n\t\t\t\t\t\t\t\t\t\t autoBean.setMarca((String) oneObject.getString(\"marca\"));\n\t\t\t\t\t\t\t\t\t\t autoBean.setSubmarca((String) oneObject.getString(\"submarca\"));\n\t\t\t\t\t\t\t\t\t\t autoBean.setAnio((String) oneObject.getString(\"modelo\"));\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t autoBean.setDescripcion_revista(getResources().getString(R.string.sin_revista));\n\t\t\t\t\t\t\t\t\t\t autoBean.setImagen_revista(imagen_rojo);\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t Calendar calendar = Calendar.getInstance();\n\t\t\t\t\t\t\t\t\t\t int thisYear = calendar.get(Calendar.YEAR);\n\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t if(thisYear-Integer.parseInt(autoBean.getAnio())<=10){\n\t\t\t\t\t\t\t\t\t\t\t autoBean.setDescripcion_vehiculo(getResources().getString(R.string.carro_nuevo)+\" \"+getResources().getString(R.string.Anio)+\" \"+autoBean.getAnio());\n\t\t\t\t\t\t\t\t\t\t\t autoBean.setImagen_vehiculo(imagen_verde);\n\t\t\t\t\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t\t\t\t\t autoBean.setDescripcion_vehiculo(getResources().getString(R.string.carro_viejo)+\" \"+getResources().getString(R.string.Anio)+\" \"+autoBean.getAnio());\n\t\t\t\t\t\t\t\t\t\t\t autoBean.setImagen_vehiculo(imagen_rojo);\n\t\t\t\t\t\t\t\t\t\t\t PUNTOS_APP-=PUNTOS_ANIO_VEHICULO;\n\t\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t\t yaValide=false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t Date date1 = formatter.parse(lasmod);\n\t\t\t\t\t\t\t\t Date date2 = formatter.parse(oneObject.getString(\"vigencia\").toString());\n\t\t\t\t\t\t\t\t int comparison = date2.compareTo(date1);\n\t\t\t\t\t\t\t\t if((comparison==1||comparison==0)&&!oneObject.getString(\"resultado\").toString().equals(\"RECHAZO\")){\n\t\t\t\t\t\t\t\t\t autoBean.setDescripcion_verificacion(getResources().getString(R.string.tiene_verificaciones)+\" \"+oneObject.getString(\"resultado\").toString());\n\t\t\t\t\t\t\t\t\t autoBean.setImagen_verificacion(imagen_verde); \n\t\t\t\t\t\t\t\t\t hasVerificacion=true;\n\t\t\t\t\t\t\t\t\t break;\n\t\t\t\t\t\t\t\t }else{\n\t\t\t\t\t\t\t\t\t autoBean.setDescripcion_verificacion(getResources().getString(R.string.no_tiene_verificaciones));\n\t\t\t\t\t\t\t\t\t autoBean.setImagen_verificacion(imagen_rojo);\n\t\t\t\t\t\t\t\t\t hasVerificacion=false;\n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t } catch (JSONException e) { \n\t\t\t\t\t\t\t\t DatosLogBean.setDescripcion(Utils.getStackTrace(e));\n\t\t\t\t\t\t\t } catch (ParseException e) {\n\t\t\t\t\t\t\t\t DatosLogBean.setDescripcion(Utils.getStackTrace(e));\n\t\t\t\t\t\t\t}\n\t\t\t\t }\n\t\t\t\t if(!hasVerificacion){\n\t\t\t\t \t PUNTOS_APP-=PUNTOS_VERIFICACION;\n\t\t\t\t }\n\t\t\t \n\t\t\t}catch(JSONException e){\n\t\t\t\tDatosLogBean.setDescripcion(Utils.getStackTrace(e));\n\t\t\t}\n\t\t\n\t}", "public static void promedioBoletaCliente() {\r\n\t\tPailTap clienteBoleta = getDataTap(\"C:/Paula/masterset/data/9\");\r\n\t\tPailTap boletaProperty = getDataTap(\"C:/Paula/masterset/data/4\");\r\n\t\t\r\n\t\tSubquery promedio = new Subquery(\"?Cliente_id\", \"?Promedio\", \"?Dia\")\r\n\t\t\t\t.predicate(clienteBoleta, \"_\", \"?data\")\r\n\t\t\t\t.predicate(boletaProperty, \"_\", \"?data2\")\r\n\t\t\t\t.predicate(new ExtractClienteBoleta(), \"?data\").out(\"?Cliente_id\", \"?Boleta_id\", \"?Dia\")\r\n\t\t\t\t.predicate(new ExtractBoletaTotal(), \"?data2\").out(\"?Boleta_id\",\"?Total\")\r\n\t\t\t\t.predicate(new Avg(), \"?Total\").out(\"?Promedio\");\r\n\t\t\r\n\t\tSubquery tobatchview = new Subquery(\"?json\")\r\n\t\t\t\t.predicate(promedio, \"?Cliente\", \"?Promedio\", \"?Dia\")\r\n\t\t\t\t.predicate(new ToJSON(), \"?Cliente\", \"?Promedio\", \"?Dia\").out(\"?json\");\r\n\t\tApi.execute(new batchview(), tobatchview);\r\n\t\t//Api.execute(new StdoutTap(), promedio);\r\n\t}", "private void cargarFichaLepra_discapacidades() {\r\n\r\n\t\tMap<String, Object> parameters = new HashMap<String, Object>();\r\n\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\r\n\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\r\n\t\tparameters.put(\"nro_identificacion\", tbxNro_identificacion.getValue());\r\n\t\tparameters.put(\"fecha_actual\", new Date());\r\n\r\n\t\t// log.info(\"parameters\" + parameters);\r\n\t\tseguimiento_control_pqtService.setLimit(\"limit 25 offset 0\");\r\n\r\n\t\t// log.info(\"parameters>>>>\" + parameters);\r\n\t\tBoolean fecha_tratamiento = seguimiento_control_pqtService\r\n\t\t\t\t.existe_fecha_fin_tratamiento(parameters);\r\n\t\t// log.info(\"fecha_tratamiento>>>>\" + fecha_tratamiento);\r\n\r\n\t\tif (fecha_tratamiento) {\r\n\t\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\t\tparametros.put(\"nro_ingreso\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_ingreso());\r\n\t\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE,\r\n\t\t\t\t\tadmision_seleccionada);\r\n\t\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\tIRutas_historia.PAGINA_VALORACION_DISCAPACIDADES_LEPRA,\r\n\t\t\t\t\tIRutas_historia.LABEL_VALORACION_DISCAPACIDADES_LEPRA,\r\n\t\t\t\t\tparametros);\r\n\t\t}\r\n\t}", "public void realiserAcahatProduit() {\n\t\t\n\t}", "public VotoRespuesta findVoto(Usuario user, Respuesta respuesta);", "public void atenderPedidoDelCliente(PedidoIndividual pedido) throws QRocksException;", "public String obtemOponente(Integer idJogador) throws RemoteException;" ]
[ "0.5885306", "0.5789704", "0.5784693", "0.57568663", "0.56258786", "0.5580753", "0.5544523", "0.5525167", "0.55184513", "0.5506262", "0.54670566", "0.5450459", "0.54204714", "0.541448", "0.54138327", "0.53966916", "0.5366227", "0.5351148", "0.5343404", "0.53392076", "0.5338598", "0.5332288", "0.53321075", "0.5322931", "0.5312645", "0.53043187", "0.5282138", "0.5279416", "0.5275817", "0.52752125", "0.5274708", "0.5272881", "0.5271283", "0.52589655", "0.52515787", "0.52428883", "0.52281046", "0.5226752", "0.52254134", "0.5224065", "0.5222429", "0.52216804", "0.5205737", "0.5204998", "0.5196955", "0.51934767", "0.51898354", "0.51750726", "0.5173899", "0.5173443", "0.517318", "0.5171332", "0.51686746", "0.5166712", "0.51661384", "0.516522", "0.51450104", "0.5143957", "0.51400787", "0.5137555", "0.51369846", "0.5131837", "0.5120678", "0.5118633", "0.51106805", "0.5105124", "0.51026076", "0.5096159", "0.5080526", "0.50776076", "0.50771314", "0.50755286", "0.5074431", "0.50731975", "0.50712836", "0.5070686", "0.5067538", "0.50620717", "0.505997", "0.50471514", "0.50467974", "0.5042574", "0.5041267", "0.50392264", "0.50358236", "0.50319356", "0.5029677", "0.5028881", "0.5027884", "0.50225466", "0.5019294", "0.50171655", "0.50132424", "0.5012347", "0.5008214", "0.5002203", "0.50021726", "0.49955976", "0.49902883", "0.49899057" ]
0.49992242
97
base Object, relations Lists (1 objects)
public List<Choosecat> FindAll_Choosecat() { return ChoosecatService.FindAll("id", JPAOp.Asc); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Relations() {\n relations = new ArrayList();\n }", "public Set<Relation> getRelations();", "public String[] listRelations();", "@DISPID(1610940428) //= 0x6005000c. The runtime will prefer the VTID if present\n @VTID(34)\n Relations relations();", "@Override\n public Set<Edge<PhysicalObject>> getRelationBetweenObjects() {\n assert false : \"shouldn't call this method\";\n return null;\n }", "public abstract List<AbstractRelationshipTemplate> getIngoingRelations();", "public String[] getRelations() {\n/* 270 */ return getStringArray(\"relation\");\n/* */ }", "public interface PartOfRelation\r\n{\r\n\r\n\t/**\r\n\t * Sets author\r\n\t * \r\n\t * @param author\r\n\t */\r\n\tvoid setAuthor(String author);\r\n\r\n\r\n\t/**\r\n\t * @return Author\r\n\t */\r\n\tString getAuthor();\r\n\r\n\t/**\r\n\t * Sets class type, one typical value is '300'\r\n\t * \r\n\t * @param classType\r\n\t */\r\n\tvoid setClassType(String classType);\r\n\r\n\t/**\r\n\t * @return class type\r\n\t */\r\n\tString getClassType();\r\n\r\n\t/**\r\n\t * Sets object key, for material items this is the product ID.\r\n\t * \r\n\t * @param objectKey\r\n\t */\r\n\tvoid setObjectKey(String objectKey);\r\n\r\n\t/**\r\n\t * @return Object key.\r\n\t */\r\n\tString getObjectKey();\r\n\r\n\t/**\r\n\t * Sets object type, product or an abstract product representative\r\n\t * \r\n\t * @param objectType\r\n\t */\r\n\tvoid setObjectType(String objectType);\r\n\r\n\t/**\r\n\t * @return Object type\r\n\t */\r\n\tString getObjectType();\r\n\r\n\t/**\r\n\t * Sets position in the BOM\r\n\t * \r\n\t * @param posNr\r\n\t */\r\n\tvoid setPosNr(String posNr);\r\n\r\n\t/**\r\n\t * @return Position number\r\n\t */\r\n\tString getPosNr();\r\n\r\n\t/**\r\n\t * Sets parent instance ID\r\n\t * \r\n\t * @param parentInstId\r\n\t */\r\n\tvoid setParentInstId(String parentInstId);\r\n\r\n\t/**\r\n\t * @return Parent instance ID\r\n\t */\r\n\tString getParentInstId();\r\n\r\n\t/**\r\n\t * Sets child instance ID\r\n\t * \r\n\t * @param instId\r\n\t */\r\n\tvoid setInstId(String instId);\r\n\r\n\t/**\r\n\t * @return Child instance ID\r\n\t */\r\n\tString getInstId();\r\n}", "List<IViewRelation> getViewRelations();", "public default List<InheritanceRelation> inheritanceRelations() throws LookupException {\n return nonMemberInheritanceRelations();\n }", "public ReadOnlyIterator<Relation> getRelations();", "public Collection<UniqueID> getReferenceList() {\n return ObjectGraph.getReferenceList(this.id);\n }", "public ReadOnlyIterator<Relation> getAllRelations();", "public abstract List<Object> getAll();", "private void setUpRelations() {\n g[0].getAuthorities().add(a[0]);\n g[1].getAuthorities().add(a[0]);\n g[1].getAuthorities().add(a[1]);\n g[2].getAuthorities().add(a[2]);\n\n u[0].getGroups().add(g[0]);\n u[0].getOwnAuthorities().add(a[2]);\n u[1].getGroups().add(g[1]);\n u[1].getOwnAuthorities().add(a[2]);\n u[2].getOwnAuthorities().add(a[2]);\n u[2].getOwnAuthorities().add(a[3]);\n u[3].getGroups().add(g[1]);\n u[3].getGroups().add(g[2]);\n merge();\n }", "public interface HasRelation {\r\n\r\n\tpublic boolean addRelation(Relation relation);\r\n\tpublic boolean removeRelation(Relation relation);\r\n\tpublic List<Relation> getRelations();\r\n}", "Relations getGroupOfRelations();", "public Collection<Reference> getReferences();", "public List<MediaRelation> loadMediaRelations();", "public XIterable<ArticleX> relateds() {\n\t\tfinal IteratorList<ReadNode> relateds = node().refChildren(\"related\").iterator() ;\n\t\treturn XIterable.create(domain(), relateds.toList(), MapUtil.<String, String>newMap(), ArticleX.class) ;\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic List<T> getList() {\r\n\t\tgetEntityManager().flush();\r\n\t\treturn getEntityManager().createQuery(\r\n\t\t\t\t\"select OBJECT(o) from \" + getClassType().getSimpleName() + \" o order by o.id\")\r\n\t\t\t\t.getResultList();\r\n\t}", "public java.lang.Object[] getRelationsAsReference() {\n return relationsAsReference;\n }", "public ru.terralink.mvideo.sap.Relations getRelations()\n {\n if (! __relationsValid)\n {\n if( (__relationsFK != null))\n {\n __relations = ru.terralink.mvideo.sap.Relations.find(__relationsFK);\n }\n __relationsValid = true;\n }\n return __relations;\n }", "public org.LexGrid.relations.Relations[] getRelations() {\n return relations;\n }", "List<SoftObjectReference> getObjects();", "List<ObjectRelation> getObjectRelations(int otId) throws AccessDeniedException;", "public abstract List<AbstractRelationshipTemplate> getOutgoingRelations();", "abstract List<T> getReuslt();", "public ReadOnlyIterator<Relation> getAllIncomingRelations();", "public Set<Relationship> getRelations() {\n return this.relations;\n }", "private static void LessonClassObjects() {\n Person person1 = new Person();\n Person person2 = new Person();\n\n //Set title, firstname and lastname\n person1.setTitle(\"Mr.\");\n person1.setFirstName(\"Jordan\");\n person1.setLastName(\"Walker\");\n\n person2.setTitle(\"Mrs.\");\n person2.setFirstName(\"Kelsey\");\n person2.setLastName(\"Walker\");\n\n //Print out\n System.out.println(person1.getTitle()+ \" \" + person1.getFirstName() + \" \" + person1.getLastName());\n System.out.println(person2.getTitle()+ \" \" + person2.getFirstName() + \" \" + person2.getLastName());\n\n // Set super BaseBO class\n person1.setId(7);\n System.out.println(person1.getFirstName() + \" Id is: \" + person1.getId());\n }", "public List<BaseCriteria> getOredBaseCriteria() {\n List<com.onboard.domain.mapper.model.common.BaseCriteria> list = new ArrayList<com.onboard.domain.mapper.model.common.BaseCriteria>();\n list.addAll(oredCriteria);\n return list;\n }", "public HashMap<String, Relation> getRelations() {\n return relations;\n }", "public ReadOnlyIterator<Relation> getIncomingRelations();", "List<Navigation> getNavigationList();", "public Iterable<Relationship> getRelationships();", "public Collection<Relation> getAllRelations() {\n return Collections.unmodifiableCollection(relations.values());\n }", "@Override\r\n\tprotected void ResetBaseObject() {\r\n\t\tsuper.ResetBaseObject();\r\n\r\n\t\t// new Base Object\r\n\t\tbaseEntity = new Chooseval();\r\n\r\n\t\t// new other Objects and set them into Base object\r\n\r\n\t\t// refresh Lists\r\n\t\tbaseEntityList = ChoosevalService.FindAll(\"id\", JPAOp.Asc);\r\n\t}", "public List<BaseObject> getAllItems() {\n ArrayList<BaseObject> list = new ArrayList<BaseObject>(ufos);\n list.add(ship);\n list.addAll(bombs);\n list.addAll(rockets);\n return list;\n }", "public List<RelationMention> getAllRelations(RelationMentionFactory factory) {\n List<RelationMention> allRelations = new ArrayList<RelationMention>(relationMentions);\n allRelations.addAll(getAllUnrelatedRelations(factory));\n return allRelations;\n }", "public interface CollectionField extends RelationField {\n\n}", "@Override\n public Set<String> getRelations() {\n if (cachedRelations != null) {\n return cachedRelations;\n }\n cachedRelations = new LinkedHashSet<String>();\n for (EventNode node : nodes) {\n cachedRelations.addAll(node.getNodeRelations());\n }\n return cachedRelations;\n }", "public KoleksiRelationExample() {\r\n oredCriteria = new ArrayList<Criteria>();\r\n }", "@Override\r\n\tpublic List<OwnerVO> ownerList() {\n\t\treturn adao.OwnerList();\r\n\t}", "@Override\n\t\tpublic Iterable<Relationship> getRelationships() {\n\t\t\treturn null;\n\t\t}", "public abstract List<ResolvedReferenceType> getDirectAncestors();", "public String getList_Base();", "public Set<MindObject> getDirectSubComponents(){\n return new HashSet<>();\n }", "public ResultMap<BaseNode> listRelatives(QName type, Direction direction);", "@Override\n\tpublic List<PersonRelation> getPersonRelation(PersonRelation personRelation) {\n\t\treturn null;\n\t}", "List<? extends Link> getLinks();", "@Override\n\tpublic List<Follow> getlist(String hql, Object... obj) {\n\t\treturn util.queryHQL(hql, obj);\n\t}", "@Override\n\tpublic ArrayList<Parent> queryAll() {\n\t\treturn parentDao.queryAll();\n\t}", "@Override\n public Collection<? extends DBSEntityAssociation> getReferences(@NotNull DBRProgressMonitor monitor) throws DBException {\n return Collections.emptyList();\n }", "@Override\n public Collection<? extends DBSEntityAssociation> getReferences(@NotNull DBRProgressMonitor monitor) throws DBException {\n return Collections.emptyList();\n }", "public Set<RelationType> getRelationTypes();", "public List<Person> getPersonList(){\n return personList;\n }", "public Collection<GObject> getObjects();", "@Override\n\t\tpublic Iterable<RelationshipType> getRelationshipTypes() {\n\t\t\treturn null;\n\t\t}", "@Override\r\n\tpublic List getAllOtherList() {\n\t\tString HQL = \"\";\r\n\t\tHQL += \" from XzfyOtherSuggest x\";\r\n\t\tHQL += \" where 1 = 1 \";\t\r\n\t\treturn super.find(HQL);\r\n\t}", "@Override\n\tpublic List<PersonRelation> getPersonRelationByPerson(Person person) {\n\t\treturn null;\n\t}", "public interface RelationInfoDao extends BaseDao<RelationInfoDO> {\n\n HashMap<String,String> getDependents(String tableNames);\n\n List<HashMap<String,String>> getParentTable(String tableNames);\n\n List<HashMap<String,String>> getChlidTable(String s);\n}", "public ArrayList getObjsList() {\n return objList;\n }", "@Override\n\tpublic List<BookVO> list4() {\n\n\t\tList<BookVO> list4 =bookDAO.list4();\n\t\treturn list4;\n\t\t\n\t}", "public void addRelations(T model);", "@Override\r\n\tpublic List<ComVO> comList() {\n\t\treturn adao.ComList();\r\n\t}", "public ResultMap<BaseNode> listRelatives(QName type, Direction direction, Pagination pagination);", "private Collection<EaterRelation> getRelations(Eater ofUser) {\n Conjunction pendingFriend = Restrictions.conjunction();\n pendingFriend.add(Restrictions.eq(EaterRelation.TO_USER, ofUser));\n Disjunction inOr = Restrictions.disjunction();\n inOr.add(pendingFriend);\n inOr.add(Restrictions.eq(EaterRelation.FROM_USER, ofUser));\n List<EaterRelation> results = findByCriteria(inOr);\n return results;\n }", "public List<RealObject> getChildren();", "public interface Link<T> extends ITable<T>, List<T>, RandomAccess {\r\n /**\r\n * Set number of the linked objects \r\n * @param newSize new number of linked objects (if it is greater than original number, \r\n * than extra elements will be set to null)\r\n */\r\n public void setSize(int newSize);\r\n \r\n /**\r\n * Returns <tt>true</tt> if there are no related object\r\n *\r\n * @return <tt>true</tt> if there are no related object\r\n */\r\n boolean isEmpty();\r\n\r\n /**\r\n * Get related object by index\r\n * @param i index of the object in the relation\r\n * @return referenced object\r\n */\r\n public T get(int i);\r\n\r\n /**\r\n * Get related object by index without loading it.\r\n * Returned object can be used only to get it OID or to compare with other objects using\r\n * <code>equals</code> method\r\n * @param i index of the object in the relation\r\n * @return stub representing referenced object\r\n */\r\n public Object getRaw(int i);\r\n\r\n /**\r\n * Replace i-th element of the relation\r\n * @param i index in the relartion\r\n * @param obj object to be included in the relation \r\n * @return the element previously at the specified position.\r\n */\r\n public T set(int i, T obj);\r\n\r\n /**\r\n * Assign value to i-th element of the relation.\r\n * Unlike Link.set methos this method doesn't return previous value of the element\r\n * and so is faster if previous element value is not needed (it has not to be fetched from the database)\r\n * @param i index in the relartion\r\n * @param obj object to be included in the relation \r\n */\r\n public void setObject(int i, T obj);\r\n\r\n /**\r\n * Remove object with specified index from the relation\r\n * Unlike Link.remove methos this method doesn't return removed element and so is faster \r\n * if it is not needed (it has not to be fetched from the database)\r\n * @param i index in the relartion\r\n */\r\n public void removeObject(int i);\r\n\r\n /**\r\n * Insert new object in the relation\r\n * @param i insert poistion, should be in [0,size()]\r\n * @param obj object inserted in the relation\r\n */\r\n public void insert(int i, T obj);\r\n\r\n /**\r\n * Add all elements of the array to the relation\r\n * @param arr array of obects which should be added to the relation\r\n */\r\n public void addAll(T[] arr);\r\n \r\n /**\r\n * Add specified elements of the array to the relation\r\n * @param arr array of obects which should be added to the relation\r\n * @param from index of the first element in the array to be added to the relation\r\n * @param length number of elements in the array to be added in the relation\r\n */\r\n public void addAll(T[] arr, int from, int length);\r\n\r\n /**\r\n * Add all object members of the other relation to this relation\r\n * @param link another relation\r\n */\r\n public boolean addAll(Link<T> link);\r\n\r\n /**\r\n * Return array with relation members. Members are not loaded and \r\n * size of the array can be greater than actual number of members. \r\n * @return array of object with relation members used in implementation of Link class\r\n */\r\n public Object[] toRawArray(); \r\n\r\n /**\r\n * Get all relation members as array.\r\n * The runtime type of the returned array is that of the specified array. \r\n * If the index fits in the specified array, it is returned therein. \r\n * Otherwise, a new array is allocated with the runtime type of the \r\n * specified array and the size of this index.<p>\r\n *\r\n * If this index fits in the specified array with room to spare\r\n * (i.e., the array has more elements than this index), the element\r\n * in the array immediately following the end of the index is set to\r\n * <tt>null</tt>. This is useful in determining the length of this\r\n * index <i>only</i> if the caller knows that this index does\r\n * not contain any <tt>null</tt> elements.)<p>\r\n * @return array of object with relation members\r\n */\r\n public <T> T[] toArray(T[] arr);\r\n\r\n /**\r\n * Checks if relation contains specified object instance\r\n * @param obj specified object\r\n * @return <code>true</code> if object is present in the collection, <code>false</code> otherwise\r\n */\r\n public boolean containsObject(T obj);\r\n\r\n /**\r\n * Check if i-th element of Link is the same as specified obj\r\n * @param i element index\r\n * @param obj object to compare with\r\n * @return <code>true</code> if i-th element of Link reference the same object as \"obj\"\r\n */\r\n public boolean containsElement(int i, T obj);\r\n\r\n /**\r\n * Get index of the specified object instance in the relation. \r\n * This method use comparison by object identity (instead of equals() method) and\r\n * is significantly faster than List.indexOf() method\r\n * @param obj specified object instance\r\n * @return zero based index of the object or -1 if object is not in the relation\r\n */\r\n public int indexOfObject(Object obj);\r\n\r\n /**\r\n * Get index of the specified object instance in the relation\r\n * This method use comparison by object identity (instead of equals() method) and\r\n * is significantly faster than List.indexOf() method\r\n * @param obj specified object instance\r\n * @return zero based index of the object or -1 if object is not in the relation\r\n */\r\n public int lastIndexOfObject(Object obj);\r\n\r\n /**\r\n * Remove all members from the relation\r\n */\r\n public void clear();\r\n\r\n /**\r\n * Get iterator through link members\r\n * This iterator supports remove() method.\r\n * @return iterator through linked objects\r\n */\r\n public Iterator<T> iterator();\r\n\r\n /**\r\n * Replace all direct references to linked objects with stubs. \r\n * This method is needed tyo avoid memory exhaustion in case when \r\n * there is a large numebr of objectys in databasse, mutually\r\n * refefencing each other (each object can directly or indirectly \r\n * be accessed from other objects).\r\n */\r\n public void unpin();\r\n \r\n /**\r\n * Replace references to elements with direct references.\r\n * It will impove spped of manipulations with links, but it can cause\r\n * recursive loading in memory large number of objects and as a result - memory\r\n * overflow, because garbage collector will not be able to collect them\r\n */\r\n public void pin(); \r\n}", "Object getTolist();", "java.util.List<message.Figure.FigureData.FigureBase> \n getFigureListList();", "@Override\n public com.gensym.util.Sequence getRelationships() throws G2AccessException {\n java.lang.Object retnValue = getAttributeValue (SystemAttributeSymbols.RELATIONSHIPS_);\n return (com.gensym.util.Sequence)retnValue;\n }", "void readAssociations() {\n // proxy the collections for lazy loading\n Class c = getClass();\n for (Field f : c.getDeclaredFields()) {\n for (Annotation a : f.getAnnotations()) {\n if (a.annotationType().equals(HasMany.class)) {\n HasManyProxy proxyHandler = new HasManyProxy(this, f, (HasMany) a);\n associationProxies.add(proxyHandler);\n Classes.setFieldValue(this, f.getName(), Proxy.newProxyInstance(List.class.getClassLoader(),\n new Class[]{List.class}, proxyHandler));\n } else if (a.annotationType().equals(HasAndBelongsToMany.class)) {\n // TODO implement\n } else if (a.annotationType().equals(HasOne.class)) {\n // TODO implement\n } else if (a.annotationType().equals(BelongsTo.class)) {\n BelongsTo belongsTo = (BelongsTo) a;\n if (!(f.getGenericType() instanceof Class))\n throw new IllegalAnnotationException(\"@BelongsTo can only be applied to non-generic fields\");\n ActiveRecord ar = (ActiveRecord) Classes.newInstance(f.getGenericType());\n String fk = ActiveRecords.foriegnKey(f.getGenericType());\n if (!belongsTo.foreignKey().equals(\"\")) fk = belongsTo.foreignKey();\n System.out.println(\"foriegn key = \" + fk);\n Object fkValue = Classes.getFieldValue(this, fk);\n if (fkValue != null) {\n ar.read(fkValue);\n Classes.setFieldValue(this, f.getName(), ar);\n }\n }\n }\n }\n }", "protected <ELEMENT> List<ELEMENT> newReferrerList() { // overriding to import\r\n return new ArrayList<ELEMENT>();\r\n }", "@Override\r\n public BaseVO refer(BaseVO baseVO) {\n return null;\r\n }", "@SuppressWarnings(\"unchecked\")\r\n public List<DomainObject> getList() {\r\n Session session = getSession();\r\n try {\r\n session.flush();\r\n return session.createQuery(\"from \" + getPersistentClass().getName()).list();\r\n } catch (HibernateException e) {\r\n LOG.error(MODULE + \"Exception in getList() Method:\" + e, e);\r\n throw e;\r\n }\r\n }", "public void initRelations(ValueChangeEvent ev) {\r\n\t\ttry {\r\n\t\t\t// Limpia lista de relaciones\r\n\t\t\tobject.getRelcos().clear();\r\n\t\t\t// Obtiene valor del concepto seleccionado\r\n\t\t\tString cosccosak = ev.getNewValue().toString();\r\n\t\t\t// Obtiene valores de acuerdo al concepto\r\n\t\t\tList<Seprelco> relcos = seprelcoDao.findByConcept(cosccosak);\r\n\t\t\t// Recorre lista\r\n\t\t\tfor (Seprelco relco : relcos) {\r\n\t\t\t\t// Inicia nuevo registro de sedrelco\r\n\t\t\t\tSedrelco drelco = new Sedrelco();\r\n\t\t\t\t// Prepara objeto\r\n\t\t\t\tdrelco.prepareObject();\r\n\t\t\t\t// Concepto\r\n\t\t\t\tdrelco.setCosccosak(relco.getId().getCosccosak());\r\n\t\t\t\tdrelco.setRcocrcoak(relco.getId().getRcocrcoak());\r\n\t\t\t\t// Descripcion relacion\r\n\t\t\t\tdrelco.setRcodrcoaf(relco.getRcodrcoaf());\r\n\t\t\t\t// Adiciona objeto a la lista\r\n\t\t\t\tobject.getRelcos().add(drelco);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {/* Error */\r\n\t\t\t// Muestra mensaje\r\n\t\t\tthis.processErrorMessage(e.getMessage());\r\n\t\t\t// Log\r\n\t\t\tLogLogger.getInstance(this.getClass()).logger(\r\n\t\t\t\t\tExceptionUtils.getFullStackTrace(e), LogLogger.ERROR);\r\n\t\t}\r\n\t}", "Table getReferences();", "public boolean containsRelations();", "protected <ELEMENT> List<ELEMENT> newReferrerList() { // overriding to import\n return new ArrayList<ELEMENT>();\n }", "@Override\r\n\tpublic List<Person> findAll(){\n\t\tQuery query=em.createQuery(\"Select p from Person p\");\r\n\t\tList<Person> list = query.getResultList();\r\n\t\treturn list;\r\n\t}", "@Override\n\tpublic List<PersonRelation> getPersonRelationByrelatedPerson(\n\t\t\tPerson relatedPerson) {\n\t\treturn null;\n\t}", "public List<Ent> getChildList(){\n\t\tif(this.childList != null){\n\t\t\treturn Collections.unmodifiableList(this.childList);\n\t\t}else{\n\t\t\treturn new ArrayList<Ent>();\n\t\t}\n\t}", "@Override\n\tpublic List<BookVO> list1() {\n\t\tList<BookVO> list1 =bookDAO.list1();\n\t\treturn list1;\n\t}", "List<DomainRelationshipDTO> findAll();", "@Override\n\t\tpublic Iterable<Relationship> getRelationships(Direction dir) {\n\t\t\treturn null;\n\t\t}", "public String toStringPrologFormatListRelationship()\r\n\t{\n\t\t\r\n\t\tString output = \"[\";\r\n\r\n\t\tfor (Relationship Re : this.listRelationship)\r\n\t\t{\r\n\t\t\toutput += Re.toStringPrologFormat();\r\n\t\t\toutput += \",\";\r\n\t\t}\r\n\t\toutput = output.substring(0, output.length()-1);\r\n\t\toutput += \"]\";\r\n\t\treturn output;\t\r\n\t}", "@ModelEntity\n\tpublic static interface ModelObject {\n\n\t\tpublic static final String CHILDREN = \"children\";\n\t\tpublic static final String PARENT = \"parent\";\n\n\t\t@Getter(value = PARENT, inverse = CHILDREN)\n\t\tpublic ModelObject getParent();\n\n\t\t@Setter(PARENT)\n\t\tpublic void setParent(ModelObject parent);\n\n\t\t@Getter(value = CHILDREN, cardinality = Cardinality.LIST, inverse = PARENT)\n\t\tpublic List<ModelObject> getChildren();\n\n\t\t@Setter(CHILDREN)\n\t\tpublic void setChildren(List<ModelObject> children);\n\n\t\t@Adder(CHILDREN)\n\t\tpublic void addToChildren(ModelObject child);\n\n\t\t@Remover(CHILDREN)\n\t\tpublic void removeFromChildren(ModelObject child);\n\t}", "public List<People> getPeople();", "@GetMapping(\"/def-relations\")\n @Timed\n public List<DefRelation> getAllDefRelations() {\n log.debug(\"REST request to get all DefRelations\");\n return defRelationService.findAll();\n }", "public Set<Profile> getRelatives() {\n\t\tSet<Profile> parents = new HashSet<>();\n\t\tparents.add(_parent1);\n\t\tparents.add(_parent2);\n\t\treturn parents;\n\t}", "public default List<Type> getProperDirectSuperTypes() throws LookupException {\n\t\tList<Type> result = Lists.create();\n\t\tfor(InheritanceRelation element:inheritanceRelations()) {\n\t\t\tType type = element.superType();\n\t\t\tif (type!=null) {\n\t\t\t\tresult.add(type);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public void getEntities() {\n\t\t\r\n\t\tSystem.out.println();\r\n\t\t\r\n\t\tEntityA entityA = exampleDao.getOne(1);\r\n\t\tEntityB entityB3 = entityBDao.getOne(3);\r\n\t \tEntityB entityB2 = entityBDao.getOne(2);\r\n\t \tEntityB entityB1 = entityBDao.getOne(1);\r\n\r\n\t \t\r\n\r\n\t\tentityA.setEntityBList(Arrays.asList(entityB2,entityB3,entityB1));\r\n\r\n\t}", "@Override\n\tpublic List<MedioPago> getall() {\n\t\treturn (List<MedioPago>) iMedioPagoDao.findAll();\t\t\n\t}", "abstract void makeList();", "protected List getList() {\n/* 88 */ return (List)getCollection();\n/* */ }", "public Collection<BaseData> getBaseData() {\n\t\tQuery query = em.createQuery(\"from BaseData\");\n\t\treturn (List<BaseData>)query.getResultList();\n\t}", "boolean isOneToMany();", "@Override\n\tpublic ArrayList<Representation> getALL() {\n\t\treturn null;\n\t}", "public OwnerList()\n {\n ownerList = new ArrayList<>();\n }" ]
[ "0.6878032", "0.6675597", "0.65498644", "0.64164156", "0.6320341", "0.6164993", "0.61366487", "0.6122261", "0.60835445", "0.6081502", "0.6008996", "0.6006919", "0.59958583", "0.5984316", "0.59801906", "0.59326184", "0.591255", "0.59108716", "0.5908474", "0.58691263", "0.58550245", "0.58501875", "0.58477736", "0.58167934", "0.5795889", "0.57919616", "0.5760159", "0.573648", "0.56926024", "0.5664827", "0.56582683", "0.56446636", "0.5634915", "0.5625802", "0.562379", "0.5618197", "0.5618053", "0.5611381", "0.56006056", "0.5590352", "0.55728626", "0.55512834", "0.5540119", "0.55185354", "0.5516312", "0.5487416", "0.5481815", "0.54792315", "0.5472571", "0.5467696", "0.54615605", "0.5444868", "0.5424951", "0.5412479", "0.5412479", "0.5404354", "0.5401721", "0.53892887", "0.5387487", "0.53873664", "0.5383826", "0.53795934", "0.5377313", "0.53719056", "0.5362459", "0.5355418", "0.5353669", "0.53516036", "0.5339892", "0.5335866", "0.53338337", "0.53274375", "0.53246826", "0.5323808", "0.5316741", "0.5310721", "0.5307544", "0.5306707", "0.5294882", "0.5292339", "0.52886057", "0.52879405", "0.5286894", "0.5283799", "0.5280763", "0.52769935", "0.52758837", "0.52713543", "0.52583605", "0.52570814", "0.5256604", "0.52528584", "0.5246458", "0.52432865", "0.523149", "0.52314204", "0.5230477", "0.5228994", "0.5227811", "0.5223323", "0.52232283" ]
0.0
-1
base Object, relations Lists (1 objects)
@Override protected void ResetBaseObject() { super.ResetBaseObject(); // new Base Object baseEntity = new Chooseval(); // new other Objects and set them into Base object // refresh Lists baseEntityList = ChoosevalService.FindAll("id", JPAOp.Asc); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Relations() {\n relations = new ArrayList();\n }", "public Set<Relation> getRelations();", "public String[] listRelations();", "@DISPID(1610940428) //= 0x6005000c. The runtime will prefer the VTID if present\n @VTID(34)\n Relations relations();", "@Override\n public Set<Edge<PhysicalObject>> getRelationBetweenObjects() {\n assert false : \"shouldn't call this method\";\n return null;\n }", "public abstract List<AbstractRelationshipTemplate> getIngoingRelations();", "public String[] getRelations() {\n/* 270 */ return getStringArray(\"relation\");\n/* */ }", "public interface PartOfRelation\r\n{\r\n\r\n\t/**\r\n\t * Sets author\r\n\t * \r\n\t * @param author\r\n\t */\r\n\tvoid setAuthor(String author);\r\n\r\n\r\n\t/**\r\n\t * @return Author\r\n\t */\r\n\tString getAuthor();\r\n\r\n\t/**\r\n\t * Sets class type, one typical value is '300'\r\n\t * \r\n\t * @param classType\r\n\t */\r\n\tvoid setClassType(String classType);\r\n\r\n\t/**\r\n\t * @return class type\r\n\t */\r\n\tString getClassType();\r\n\r\n\t/**\r\n\t * Sets object key, for material items this is the product ID.\r\n\t * \r\n\t * @param objectKey\r\n\t */\r\n\tvoid setObjectKey(String objectKey);\r\n\r\n\t/**\r\n\t * @return Object key.\r\n\t */\r\n\tString getObjectKey();\r\n\r\n\t/**\r\n\t * Sets object type, product or an abstract product representative\r\n\t * \r\n\t * @param objectType\r\n\t */\r\n\tvoid setObjectType(String objectType);\r\n\r\n\t/**\r\n\t * @return Object type\r\n\t */\r\n\tString getObjectType();\r\n\r\n\t/**\r\n\t * Sets position in the BOM\r\n\t * \r\n\t * @param posNr\r\n\t */\r\n\tvoid setPosNr(String posNr);\r\n\r\n\t/**\r\n\t * @return Position number\r\n\t */\r\n\tString getPosNr();\r\n\r\n\t/**\r\n\t * Sets parent instance ID\r\n\t * \r\n\t * @param parentInstId\r\n\t */\r\n\tvoid setParentInstId(String parentInstId);\r\n\r\n\t/**\r\n\t * @return Parent instance ID\r\n\t */\r\n\tString getParentInstId();\r\n\r\n\t/**\r\n\t * Sets child instance ID\r\n\t * \r\n\t * @param instId\r\n\t */\r\n\tvoid setInstId(String instId);\r\n\r\n\t/**\r\n\t * @return Child instance ID\r\n\t */\r\n\tString getInstId();\r\n}", "List<IViewRelation> getViewRelations();", "public default List<InheritanceRelation> inheritanceRelations() throws LookupException {\n return nonMemberInheritanceRelations();\n }", "public ReadOnlyIterator<Relation> getRelations();", "public Collection<UniqueID> getReferenceList() {\n return ObjectGraph.getReferenceList(this.id);\n }", "public ReadOnlyIterator<Relation> getAllRelations();", "public abstract List<Object> getAll();", "private void setUpRelations() {\n g[0].getAuthorities().add(a[0]);\n g[1].getAuthorities().add(a[0]);\n g[1].getAuthorities().add(a[1]);\n g[2].getAuthorities().add(a[2]);\n\n u[0].getGroups().add(g[0]);\n u[0].getOwnAuthorities().add(a[2]);\n u[1].getGroups().add(g[1]);\n u[1].getOwnAuthorities().add(a[2]);\n u[2].getOwnAuthorities().add(a[2]);\n u[2].getOwnAuthorities().add(a[3]);\n u[3].getGroups().add(g[1]);\n u[3].getGroups().add(g[2]);\n merge();\n }", "public interface HasRelation {\r\n\r\n\tpublic boolean addRelation(Relation relation);\r\n\tpublic boolean removeRelation(Relation relation);\r\n\tpublic List<Relation> getRelations();\r\n}", "Relations getGroupOfRelations();", "public Collection<Reference> getReferences();", "public List<MediaRelation> loadMediaRelations();", "public XIterable<ArticleX> relateds() {\n\t\tfinal IteratorList<ReadNode> relateds = node().refChildren(\"related\").iterator() ;\n\t\treturn XIterable.create(domain(), relateds.toList(), MapUtil.<String, String>newMap(), ArticleX.class) ;\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic List<T> getList() {\r\n\t\tgetEntityManager().flush();\r\n\t\treturn getEntityManager().createQuery(\r\n\t\t\t\t\"select OBJECT(o) from \" + getClassType().getSimpleName() + \" o order by o.id\")\r\n\t\t\t\t.getResultList();\r\n\t}", "public java.lang.Object[] getRelationsAsReference() {\n return relationsAsReference;\n }", "public ru.terralink.mvideo.sap.Relations getRelations()\n {\n if (! __relationsValid)\n {\n if( (__relationsFK != null))\n {\n __relations = ru.terralink.mvideo.sap.Relations.find(__relationsFK);\n }\n __relationsValid = true;\n }\n return __relations;\n }", "public org.LexGrid.relations.Relations[] getRelations() {\n return relations;\n }", "List<SoftObjectReference> getObjects();", "List<ObjectRelation> getObjectRelations(int otId) throws AccessDeniedException;", "public abstract List<AbstractRelationshipTemplate> getOutgoingRelations();", "abstract List<T> getReuslt();", "public ReadOnlyIterator<Relation> getAllIncomingRelations();", "public Set<Relationship> getRelations() {\n return this.relations;\n }", "private static void LessonClassObjects() {\n Person person1 = new Person();\n Person person2 = new Person();\n\n //Set title, firstname and lastname\n person1.setTitle(\"Mr.\");\n person1.setFirstName(\"Jordan\");\n person1.setLastName(\"Walker\");\n\n person2.setTitle(\"Mrs.\");\n person2.setFirstName(\"Kelsey\");\n person2.setLastName(\"Walker\");\n\n //Print out\n System.out.println(person1.getTitle()+ \" \" + person1.getFirstName() + \" \" + person1.getLastName());\n System.out.println(person2.getTitle()+ \" \" + person2.getFirstName() + \" \" + person2.getLastName());\n\n // Set super BaseBO class\n person1.setId(7);\n System.out.println(person1.getFirstName() + \" Id is: \" + person1.getId());\n }", "public List<BaseCriteria> getOredBaseCriteria() {\n List<com.onboard.domain.mapper.model.common.BaseCriteria> list = new ArrayList<com.onboard.domain.mapper.model.common.BaseCriteria>();\n list.addAll(oredCriteria);\n return list;\n }", "public HashMap<String, Relation> getRelations() {\n return relations;\n }", "public ReadOnlyIterator<Relation> getIncomingRelations();", "List<Navigation> getNavigationList();", "public Iterable<Relationship> getRelationships();", "public Collection<Relation> getAllRelations() {\n return Collections.unmodifiableCollection(relations.values());\n }", "public List<BaseObject> getAllItems() {\n ArrayList<BaseObject> list = new ArrayList<BaseObject>(ufos);\n list.add(ship);\n list.addAll(bombs);\n list.addAll(rockets);\n return list;\n }", "public List<RelationMention> getAllRelations(RelationMentionFactory factory) {\n List<RelationMention> allRelations = new ArrayList<RelationMention>(relationMentions);\n allRelations.addAll(getAllUnrelatedRelations(factory));\n return allRelations;\n }", "public interface CollectionField extends RelationField {\n\n}", "@Override\n public Set<String> getRelations() {\n if (cachedRelations != null) {\n return cachedRelations;\n }\n cachedRelations = new LinkedHashSet<String>();\n for (EventNode node : nodes) {\n cachedRelations.addAll(node.getNodeRelations());\n }\n return cachedRelations;\n }", "public KoleksiRelationExample() {\r\n oredCriteria = new ArrayList<Criteria>();\r\n }", "@Override\r\n\tpublic List<OwnerVO> ownerList() {\n\t\treturn adao.OwnerList();\r\n\t}", "@Override\n\t\tpublic Iterable<Relationship> getRelationships() {\n\t\t\treturn null;\n\t\t}", "public abstract List<ResolvedReferenceType> getDirectAncestors();", "public String getList_Base();", "public Set<MindObject> getDirectSubComponents(){\n return new HashSet<>();\n }", "public ResultMap<BaseNode> listRelatives(QName type, Direction direction);", "@Override\n\tpublic List<PersonRelation> getPersonRelation(PersonRelation personRelation) {\n\t\treturn null;\n\t}", "List<? extends Link> getLinks();", "@Override\n\tpublic List<Follow> getlist(String hql, Object... obj) {\n\t\treturn util.queryHQL(hql, obj);\n\t}", "@Override\n\tpublic ArrayList<Parent> queryAll() {\n\t\treturn parentDao.queryAll();\n\t}", "@Override\n public Collection<? extends DBSEntityAssociation> getReferences(@NotNull DBRProgressMonitor monitor) throws DBException {\n return Collections.emptyList();\n }", "@Override\n public Collection<? extends DBSEntityAssociation> getReferences(@NotNull DBRProgressMonitor monitor) throws DBException {\n return Collections.emptyList();\n }", "public Set<RelationType> getRelationTypes();", "public List<Person> getPersonList(){\n return personList;\n }", "public Collection<GObject> getObjects();", "@Override\n\t\tpublic Iterable<RelationshipType> getRelationshipTypes() {\n\t\t\treturn null;\n\t\t}", "@Override\r\n\tpublic List getAllOtherList() {\n\t\tString HQL = \"\";\r\n\t\tHQL += \" from XzfyOtherSuggest x\";\r\n\t\tHQL += \" where 1 = 1 \";\t\r\n\t\treturn super.find(HQL);\r\n\t}", "@Override\n\tpublic List<PersonRelation> getPersonRelationByPerson(Person person) {\n\t\treturn null;\n\t}", "public interface RelationInfoDao extends BaseDao<RelationInfoDO> {\n\n HashMap<String,String> getDependents(String tableNames);\n\n List<HashMap<String,String>> getParentTable(String tableNames);\n\n List<HashMap<String,String>> getChlidTable(String s);\n}", "public ArrayList getObjsList() {\n return objList;\n }", "@Override\n\tpublic List<BookVO> list4() {\n\n\t\tList<BookVO> list4 =bookDAO.list4();\n\t\treturn list4;\n\t\t\n\t}", "public void addRelations(T model);", "@Override\r\n\tpublic List<ComVO> comList() {\n\t\treturn adao.ComList();\r\n\t}", "public ResultMap<BaseNode> listRelatives(QName type, Direction direction, Pagination pagination);", "private Collection<EaterRelation> getRelations(Eater ofUser) {\n Conjunction pendingFriend = Restrictions.conjunction();\n pendingFriend.add(Restrictions.eq(EaterRelation.TO_USER, ofUser));\n Disjunction inOr = Restrictions.disjunction();\n inOr.add(pendingFriend);\n inOr.add(Restrictions.eq(EaterRelation.FROM_USER, ofUser));\n List<EaterRelation> results = findByCriteria(inOr);\n return results;\n }", "public List<RealObject> getChildren();", "public interface Link<T> extends ITable<T>, List<T>, RandomAccess {\r\n /**\r\n * Set number of the linked objects \r\n * @param newSize new number of linked objects (if it is greater than original number, \r\n * than extra elements will be set to null)\r\n */\r\n public void setSize(int newSize);\r\n \r\n /**\r\n * Returns <tt>true</tt> if there are no related object\r\n *\r\n * @return <tt>true</tt> if there are no related object\r\n */\r\n boolean isEmpty();\r\n\r\n /**\r\n * Get related object by index\r\n * @param i index of the object in the relation\r\n * @return referenced object\r\n */\r\n public T get(int i);\r\n\r\n /**\r\n * Get related object by index without loading it.\r\n * Returned object can be used only to get it OID or to compare with other objects using\r\n * <code>equals</code> method\r\n * @param i index of the object in the relation\r\n * @return stub representing referenced object\r\n */\r\n public Object getRaw(int i);\r\n\r\n /**\r\n * Replace i-th element of the relation\r\n * @param i index in the relartion\r\n * @param obj object to be included in the relation \r\n * @return the element previously at the specified position.\r\n */\r\n public T set(int i, T obj);\r\n\r\n /**\r\n * Assign value to i-th element of the relation.\r\n * Unlike Link.set methos this method doesn't return previous value of the element\r\n * and so is faster if previous element value is not needed (it has not to be fetched from the database)\r\n * @param i index in the relartion\r\n * @param obj object to be included in the relation \r\n */\r\n public void setObject(int i, T obj);\r\n\r\n /**\r\n * Remove object with specified index from the relation\r\n * Unlike Link.remove methos this method doesn't return removed element and so is faster \r\n * if it is not needed (it has not to be fetched from the database)\r\n * @param i index in the relartion\r\n */\r\n public void removeObject(int i);\r\n\r\n /**\r\n * Insert new object in the relation\r\n * @param i insert poistion, should be in [0,size()]\r\n * @param obj object inserted in the relation\r\n */\r\n public void insert(int i, T obj);\r\n\r\n /**\r\n * Add all elements of the array to the relation\r\n * @param arr array of obects which should be added to the relation\r\n */\r\n public void addAll(T[] arr);\r\n \r\n /**\r\n * Add specified elements of the array to the relation\r\n * @param arr array of obects which should be added to the relation\r\n * @param from index of the first element in the array to be added to the relation\r\n * @param length number of elements in the array to be added in the relation\r\n */\r\n public void addAll(T[] arr, int from, int length);\r\n\r\n /**\r\n * Add all object members of the other relation to this relation\r\n * @param link another relation\r\n */\r\n public boolean addAll(Link<T> link);\r\n\r\n /**\r\n * Return array with relation members. Members are not loaded and \r\n * size of the array can be greater than actual number of members. \r\n * @return array of object with relation members used in implementation of Link class\r\n */\r\n public Object[] toRawArray(); \r\n\r\n /**\r\n * Get all relation members as array.\r\n * The runtime type of the returned array is that of the specified array. \r\n * If the index fits in the specified array, it is returned therein. \r\n * Otherwise, a new array is allocated with the runtime type of the \r\n * specified array and the size of this index.<p>\r\n *\r\n * If this index fits in the specified array with room to spare\r\n * (i.e., the array has more elements than this index), the element\r\n * in the array immediately following the end of the index is set to\r\n * <tt>null</tt>. This is useful in determining the length of this\r\n * index <i>only</i> if the caller knows that this index does\r\n * not contain any <tt>null</tt> elements.)<p>\r\n * @return array of object with relation members\r\n */\r\n public <T> T[] toArray(T[] arr);\r\n\r\n /**\r\n * Checks if relation contains specified object instance\r\n * @param obj specified object\r\n * @return <code>true</code> if object is present in the collection, <code>false</code> otherwise\r\n */\r\n public boolean containsObject(T obj);\r\n\r\n /**\r\n * Check if i-th element of Link is the same as specified obj\r\n * @param i element index\r\n * @param obj object to compare with\r\n * @return <code>true</code> if i-th element of Link reference the same object as \"obj\"\r\n */\r\n public boolean containsElement(int i, T obj);\r\n\r\n /**\r\n * Get index of the specified object instance in the relation. \r\n * This method use comparison by object identity (instead of equals() method) and\r\n * is significantly faster than List.indexOf() method\r\n * @param obj specified object instance\r\n * @return zero based index of the object or -1 if object is not in the relation\r\n */\r\n public int indexOfObject(Object obj);\r\n\r\n /**\r\n * Get index of the specified object instance in the relation\r\n * This method use comparison by object identity (instead of equals() method) and\r\n * is significantly faster than List.indexOf() method\r\n * @param obj specified object instance\r\n * @return zero based index of the object or -1 if object is not in the relation\r\n */\r\n public int lastIndexOfObject(Object obj);\r\n\r\n /**\r\n * Remove all members from the relation\r\n */\r\n public void clear();\r\n\r\n /**\r\n * Get iterator through link members\r\n * This iterator supports remove() method.\r\n * @return iterator through linked objects\r\n */\r\n public Iterator<T> iterator();\r\n\r\n /**\r\n * Replace all direct references to linked objects with stubs. \r\n * This method is needed tyo avoid memory exhaustion in case when \r\n * there is a large numebr of objectys in databasse, mutually\r\n * refefencing each other (each object can directly or indirectly \r\n * be accessed from other objects).\r\n */\r\n public void unpin();\r\n \r\n /**\r\n * Replace references to elements with direct references.\r\n * It will impove spped of manipulations with links, but it can cause\r\n * recursive loading in memory large number of objects and as a result - memory\r\n * overflow, because garbage collector will not be able to collect them\r\n */\r\n public void pin(); \r\n}", "Object getTolist();", "java.util.List<message.Figure.FigureData.FigureBase> \n getFigureListList();", "@Override\n public com.gensym.util.Sequence getRelationships() throws G2AccessException {\n java.lang.Object retnValue = getAttributeValue (SystemAttributeSymbols.RELATIONSHIPS_);\n return (com.gensym.util.Sequence)retnValue;\n }", "void readAssociations() {\n // proxy the collections for lazy loading\n Class c = getClass();\n for (Field f : c.getDeclaredFields()) {\n for (Annotation a : f.getAnnotations()) {\n if (a.annotationType().equals(HasMany.class)) {\n HasManyProxy proxyHandler = new HasManyProxy(this, f, (HasMany) a);\n associationProxies.add(proxyHandler);\n Classes.setFieldValue(this, f.getName(), Proxy.newProxyInstance(List.class.getClassLoader(),\n new Class[]{List.class}, proxyHandler));\n } else if (a.annotationType().equals(HasAndBelongsToMany.class)) {\n // TODO implement\n } else if (a.annotationType().equals(HasOne.class)) {\n // TODO implement\n } else if (a.annotationType().equals(BelongsTo.class)) {\n BelongsTo belongsTo = (BelongsTo) a;\n if (!(f.getGenericType() instanceof Class))\n throw new IllegalAnnotationException(\"@BelongsTo can only be applied to non-generic fields\");\n ActiveRecord ar = (ActiveRecord) Classes.newInstance(f.getGenericType());\n String fk = ActiveRecords.foriegnKey(f.getGenericType());\n if (!belongsTo.foreignKey().equals(\"\")) fk = belongsTo.foreignKey();\n System.out.println(\"foriegn key = \" + fk);\n Object fkValue = Classes.getFieldValue(this, fk);\n if (fkValue != null) {\n ar.read(fkValue);\n Classes.setFieldValue(this, f.getName(), ar);\n }\n }\n }\n }\n }", "protected <ELEMENT> List<ELEMENT> newReferrerList() { // overriding to import\r\n return new ArrayList<ELEMENT>();\r\n }", "@Override\r\n public BaseVO refer(BaseVO baseVO) {\n return null;\r\n }", "@SuppressWarnings(\"unchecked\")\r\n public List<DomainObject> getList() {\r\n Session session = getSession();\r\n try {\r\n session.flush();\r\n return session.createQuery(\"from \" + getPersistentClass().getName()).list();\r\n } catch (HibernateException e) {\r\n LOG.error(MODULE + \"Exception in getList() Method:\" + e, e);\r\n throw e;\r\n }\r\n }", "public void initRelations(ValueChangeEvent ev) {\r\n\t\ttry {\r\n\t\t\t// Limpia lista de relaciones\r\n\t\t\tobject.getRelcos().clear();\r\n\t\t\t// Obtiene valor del concepto seleccionado\r\n\t\t\tString cosccosak = ev.getNewValue().toString();\r\n\t\t\t// Obtiene valores de acuerdo al concepto\r\n\t\t\tList<Seprelco> relcos = seprelcoDao.findByConcept(cosccosak);\r\n\t\t\t// Recorre lista\r\n\t\t\tfor (Seprelco relco : relcos) {\r\n\t\t\t\t// Inicia nuevo registro de sedrelco\r\n\t\t\t\tSedrelco drelco = new Sedrelco();\r\n\t\t\t\t// Prepara objeto\r\n\t\t\t\tdrelco.prepareObject();\r\n\t\t\t\t// Concepto\r\n\t\t\t\tdrelco.setCosccosak(relco.getId().getCosccosak());\r\n\t\t\t\tdrelco.setRcocrcoak(relco.getId().getRcocrcoak());\r\n\t\t\t\t// Descripcion relacion\r\n\t\t\t\tdrelco.setRcodrcoaf(relco.getRcodrcoaf());\r\n\t\t\t\t// Adiciona objeto a la lista\r\n\t\t\t\tobject.getRelcos().add(drelco);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {/* Error */\r\n\t\t\t// Muestra mensaje\r\n\t\t\tthis.processErrorMessage(e.getMessage());\r\n\t\t\t// Log\r\n\t\t\tLogLogger.getInstance(this.getClass()).logger(\r\n\t\t\t\t\tExceptionUtils.getFullStackTrace(e), LogLogger.ERROR);\r\n\t\t}\r\n\t}", "Table getReferences();", "public boolean containsRelations();", "protected <ELEMENT> List<ELEMENT> newReferrerList() { // overriding to import\n return new ArrayList<ELEMENT>();\n }", "@Override\r\n\tpublic List<Person> findAll(){\n\t\tQuery query=em.createQuery(\"Select p from Person p\");\r\n\t\tList<Person> list = query.getResultList();\r\n\t\treturn list;\r\n\t}", "@Override\n\tpublic List<PersonRelation> getPersonRelationByrelatedPerson(\n\t\t\tPerson relatedPerson) {\n\t\treturn null;\n\t}", "public List<Ent> getChildList(){\n\t\tif(this.childList != null){\n\t\t\treturn Collections.unmodifiableList(this.childList);\n\t\t}else{\n\t\t\treturn new ArrayList<Ent>();\n\t\t}\n\t}", "@Override\n\tpublic List<BookVO> list1() {\n\t\tList<BookVO> list1 =bookDAO.list1();\n\t\treturn list1;\n\t}", "List<DomainRelationshipDTO> findAll();", "@Override\n\t\tpublic Iterable<Relationship> getRelationships(Direction dir) {\n\t\t\treturn null;\n\t\t}", "public String toStringPrologFormatListRelationship()\r\n\t{\n\t\t\r\n\t\tString output = \"[\";\r\n\r\n\t\tfor (Relationship Re : this.listRelationship)\r\n\t\t{\r\n\t\t\toutput += Re.toStringPrologFormat();\r\n\t\t\toutput += \",\";\r\n\t\t}\r\n\t\toutput = output.substring(0, output.length()-1);\r\n\t\toutput += \"]\";\r\n\t\treturn output;\t\r\n\t}", "@ModelEntity\n\tpublic static interface ModelObject {\n\n\t\tpublic static final String CHILDREN = \"children\";\n\t\tpublic static final String PARENT = \"parent\";\n\n\t\t@Getter(value = PARENT, inverse = CHILDREN)\n\t\tpublic ModelObject getParent();\n\n\t\t@Setter(PARENT)\n\t\tpublic void setParent(ModelObject parent);\n\n\t\t@Getter(value = CHILDREN, cardinality = Cardinality.LIST, inverse = PARENT)\n\t\tpublic List<ModelObject> getChildren();\n\n\t\t@Setter(CHILDREN)\n\t\tpublic void setChildren(List<ModelObject> children);\n\n\t\t@Adder(CHILDREN)\n\t\tpublic void addToChildren(ModelObject child);\n\n\t\t@Remover(CHILDREN)\n\t\tpublic void removeFromChildren(ModelObject child);\n\t}", "public List<People> getPeople();", "@GetMapping(\"/def-relations\")\n @Timed\n public List<DefRelation> getAllDefRelations() {\n log.debug(\"REST request to get all DefRelations\");\n return defRelationService.findAll();\n }", "public Set<Profile> getRelatives() {\n\t\tSet<Profile> parents = new HashSet<>();\n\t\tparents.add(_parent1);\n\t\tparents.add(_parent2);\n\t\treturn parents;\n\t}", "public default List<Type> getProperDirectSuperTypes() throws LookupException {\n\t\tList<Type> result = Lists.create();\n\t\tfor(InheritanceRelation element:inheritanceRelations()) {\n\t\t\tType type = element.superType();\n\t\t\tif (type!=null) {\n\t\t\t\tresult.add(type);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public void getEntities() {\n\t\t\r\n\t\tSystem.out.println();\r\n\t\t\r\n\t\tEntityA entityA = exampleDao.getOne(1);\r\n\t\tEntityB entityB3 = entityBDao.getOne(3);\r\n\t \tEntityB entityB2 = entityBDao.getOne(2);\r\n\t \tEntityB entityB1 = entityBDao.getOne(1);\r\n\r\n\t \t\r\n\r\n\t\tentityA.setEntityBList(Arrays.asList(entityB2,entityB3,entityB1));\r\n\r\n\t}", "@Override\n\tpublic List<MedioPago> getall() {\n\t\treturn (List<MedioPago>) iMedioPagoDao.findAll();\t\t\n\t}", "abstract void makeList();", "protected List getList() {\n/* 88 */ return (List)getCollection();\n/* */ }", "public Collection<BaseData> getBaseData() {\n\t\tQuery query = em.createQuery(\"from BaseData\");\n\t\treturn (List<BaseData>)query.getResultList();\n\t}", "boolean isOneToMany();", "@Override\n\tpublic ArrayList<Representation> getALL() {\n\t\treturn null;\n\t}", "public OwnerList()\n {\n ownerList = new ArrayList<>();\n }" ]
[ "0.6878032", "0.6675597", "0.65498644", "0.64164156", "0.6320341", "0.6164993", "0.61366487", "0.6122261", "0.60835445", "0.6081502", "0.6008996", "0.6006919", "0.59958583", "0.5984316", "0.59801906", "0.59326184", "0.591255", "0.59108716", "0.5908474", "0.58691263", "0.58550245", "0.58501875", "0.58477736", "0.58167934", "0.5795889", "0.57919616", "0.5760159", "0.573648", "0.56926024", "0.5664827", "0.56582683", "0.56446636", "0.5634915", "0.5625802", "0.562379", "0.5618197", "0.5618053", "0.56006056", "0.5590352", "0.55728626", "0.55512834", "0.5540119", "0.55185354", "0.5516312", "0.5487416", "0.5481815", "0.54792315", "0.5472571", "0.5467696", "0.54615605", "0.5444868", "0.5424951", "0.5412479", "0.5412479", "0.5404354", "0.5401721", "0.53892887", "0.5387487", "0.53873664", "0.5383826", "0.53795934", "0.5377313", "0.53719056", "0.5362459", "0.5355418", "0.5353669", "0.53516036", "0.5339892", "0.5335866", "0.53338337", "0.53274375", "0.53246826", "0.5323808", "0.5316741", "0.5310721", "0.5307544", "0.5306707", "0.5294882", "0.5292339", "0.52886057", "0.52879405", "0.5286894", "0.5283799", "0.5280763", "0.52769935", "0.52758837", "0.52713543", "0.52583605", "0.52570814", "0.5256604", "0.52528584", "0.5246458", "0.52432865", "0.523149", "0.52314204", "0.5230477", "0.5228994", "0.5227811", "0.5223323", "0.52232283" ]
0.5611381
37
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { view= inflater.inflate(R.layout.fragment_company_contactus, container, false); preferences=getActivity().getSharedPreferences("company_data",0); region=(TextView)view.findViewById(R.id.company_region); zone=(TextView)view.findViewById(R.id.company_zone); woreda=(TextView)view.findViewById(R.id.company_woreda); special_name=(TextView)view.findViewById(R.id.company_special_name); phone=(TextView)view.findViewById(R.id.company_phone); Retrofit retrofit=getUserAPIretrofit(); CompanyClient client=retrofit.create(CompanyClient.class); Call<List<ContactUs>> call=client.getCompanyContactUs(preferences.getString("id",null)); call.enqueue(new Callback<List<ContactUs>>() { @Override public void onResponse(Call<List<ContactUs>> call, Response<List<ContactUs>> response) { if (response.isSuccessful()){ String region_name="<font COLOR=\'#ffffff\'><b>" + "Region: " + "</b></font>" + "<font COLOR=\'#05B070\'>" +response.body().get(0).getRegion() + "</font>"; String zone_name="<font COLOR=\'#ffffff\'><b>" + "Zone: " + "</b></font>" + "<font COLOR=\'#05B070\'>" +response.body().get(0).getZone() + "</font>"; String woreda_name="<font COLOR=\'#ffffff\'><b>" + "Woreda: " + "</b></font>" + "<font COLOR=\'#05B070\'>" +response.body().get(0).getWoreda() + "</font>"; String special_names="<font COLOR=\'#ffffff\'><b>" + "Special name: " + "</b></font>" + "<font COLOR=\'#05B070\'>" +response.body().get(0).getSpecial_name()+ "</font>"; String phones="<font COLOR=\'#ffffff\'><b>" + "Phone Number: " + "</b></font>" + "<font COLOR=\'#05B070\'>" +response.body().get(0).getPhone()+ "</font>"; region.setText(Html.fromHtml(region_name)); zone.setText(Html.fromHtml(zone_name)); woreda.setText(Html.fromHtml(woreda_name)); special_name.setText(Html.fromHtml(special_names)); phone.setText(Html.fromHtml(phones)); } } @Override public void onFailure(Call<List<ContactUs>> call, Throwable t) { } }); return view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }" ]
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.6625158", "0.66195583", "0.66164845", "0.6608733", "0.6596594", "0.65928894", "0.6585293", "0.65842897", "0.65730995", "0.6571248", "0.6569152", "0.65689117", "0.656853", "0.6566686", "0.65652984", "0.6553419", "0.65525705", "0.65432084", "0.6542382", "0.65411425", "0.6538022", "0.65366334", "0.65355957", "0.6535043", "0.65329415", "0.65311074", "0.65310687", "0.6528645", "0.65277404", "0.6525902", "0.6524516", "0.6524048", "0.65232015", "0.65224624", "0.65185034", "0.65130377", "0.6512968", "0.65122765", "0.65116245", "0.65106046", "0.65103024", "0.6509013", "0.65088093", "0.6508651", "0.6508225", "0.6504662", "0.650149", "0.65011525", "0.6500686", "0.64974767", "0.64935696", "0.6492234", "0.6490034", "0.6487609", "0.6487216", "0.64872116", "0.6486594", "0.64861935", "0.6486018", "0.6484269", "0.648366", "0.6481476", "0.6481086", "0.6480985", "0.6480396", "0.64797544", "0.647696", "0.64758915", "0.6475649", "0.6474114", "0.6474004", "0.6470706", "0.6470275", "0.64702207", "0.6470039", "0.6467449", "0.646602", "0.6462256", "0.64617974", "0.6461681", "0.6461214" ]
0.0
-1
double latitude = location.getLatitude(); double longiTude = location.getLongitude(); String place = location.getAddrStr(); AttenceLimitInfo attenceLimitInfo = new AttenceLimitInfo(); attenceLimitInfo.setAntiTude((float) latitude); attenceLimitInfo.setLongiTude((float) longiTude); attenceLimitInfo.setDescription(place); getModel().startAttence(attenceLimitInfo, StorageUtil.getData(StorageUtil.KEY_USER, UserInfo.class) .getMobile(), TimeUtil.getLimitDateString(Calendar.getInstance(), 1, TimeUtil.YMD), TimeUtil.getPartOfTime(Calendar.getInstance() .getTime(), TimeUtil.PART_HMS ), type, (RxFragment) getView()); locationClient.stop();
@Override public void onReceiveLocation(BDLocation location) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showMyLocation() {\n\n LocationManager locationManager = (LocationManager) activity.getSystemService(LOCATION_SERVICE);\n\n String locationProvider = this.getEnabledLocationProvider();\n\n if (locationProvider == null) {\n return;\n }\n\n // Millisecond\n final long MIN_TIME_BW_UPDATES = 1000;\n // Met\n final float MIN_DISTANCE_CHANGE_FOR_UPDATES = 1;\n\n Location myLocation = null;\n try {\n // This code need permissions (Asked above ***)\n\n /* locationManager.requestLocationUpdates(\n locationProvider,\n MIN_TIME_BW_UPDATES,\n MIN_DISTANCE_CHANGE_FOR_UPDATES, (android.location.LocationListener) this); */\n\n\n // Getting Location.\n myLocation = locationManager\n .getLastKnownLocation(locationProvider);\n }\n // With Android API >= 23, need to catch SecurityException.\n catch (SecurityException e) {\n\n Log.e(\"ActivityTackeSegment\", \"Show My Location Error:\" + e.getMessage());\n e.printStackTrace();\n return;\n }\n\n if (myLocation != null) {\n\n// // Add a marker in Sydney and move the camera\n// LatLng sydney = new LatLng(-34, 151);\n// myMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n// myMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));\n// Toast.makeText(getActivity(),\"Je suis a Sydney\",Toast.LENGTH_SHORT);\n\n\n LatLng latLng = new LatLng(myLocation.getLatitude(), myLocation.getLongitude());\n // LatLng latLng = new LatLng(-34, 151);\n //myMap.addMarker(new MarkerOptions().position(latLng).title(\"Marker in Sydney\"));\n // myMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, 14));\n\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(latLng) // Sets the center of the map to location user\n .zoom(currentZoom) // Sets the zoom\n .bearing(0) // Sets the orientation of the camera to east\n .tilt(40) // Sets the tilt of the camera to 30 degrees\n .build(); // Creates a CameraPosition from the builder\n myMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\n\n /*\n // Add Marker to Map\n MarkerOptions option = new MarkerOptions();\n option.title(\"My Location\");\n option.snippet(\"....\");\n option.position(latLng);\n Marker currentMarker = myMap.addMarker(option);\n currentMarker.showInfoWindow();\n */\n } else {\n\n Log.i(\"ActivityTrackerFragment\", \"Location not found\");\n }\n\n }", "@Override\n public void onPermissionGranted(PermissionGrantedResponse response) {\n\n final ProgressDialog progressDialog = new ProgressDialog(InfoActivity.this);\n progressDialog.setMessage(\"Getting your location...\");\n progressDialog.show();\n SmartLocation.with(InfoActivity.this).location().oneFix().start(new OnLocationUpdatedListener() {\n @Override\n public void onLocationUpdated(Location location) {\n latitudeStr = String.valueOf(location.getLatitude());\n longitudeStr = String.valueOf(location.getLongitude());\n progressDialog.dismiss();\n Toast.makeText(InfoActivity.this, location.getLatitude() + \" \" + location.getLongitude(), Toast.LENGTH_SHORT).show();\n }\n });\n }", "private void startTrackingRoute(){\n if(ContextCompat.checkSelfPermission(this, ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED){\n //Starts up alert dialog for getting permission\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, REQUEST_LOC_PERMISSION);\n }\n else{\n //Start the location updater listener\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, MIN_DISTANCE, this);\n }\n }", "@Override\n public void onSuccess(Location location) {\n if (location != null) {\n Toast.makeText(PassengerLocationActivity.this,\"An Ambulance request had been made ! \",Toast.LENGTH_SHORT).show();\n requestAmbulance.put(\"username\", ParseUser.getCurrentUser().getUsername());\n ParseGeoPoint userLocation = new ParseGeoPoint(location.getLatitude(),location.getLongitude());\n requestAmbulance.put(\"passengerLocation\",userLocation);\n requestAmbulance.saveInBackground(new SaveCallback() {\n @Override\n public void done(ParseException e) {\n if (e == null){\n Toast.makeText(PassengerLocationActivity.this,\"An Ambulance is on the way ! \",Toast.LENGTH_SHORT).show();\n }\n else\n Toast.makeText(PassengerLocationActivity.this,\"Error occurred - could not save!\",Toast.LENGTH_SHORT).show();\n }\n });\n }\n else\n Toast.makeText(PassengerLocationActivity.this,\"Error occurred!Please try again\",Toast.LENGTH_SHORT).show();\n }", "public void startLocationUpdate() {\n if (locationCallback != null) {\n try {\n locationCallback = new LocationCallback() {//khoi tao dinh nghia (extent)\n\n @Override\n public void onLocationResult(LocationResult locationResult) {\n super.onLocationResult(locationResult);\n Log.d(TAG, \"onLocationResult: \");\n if (locationResult != null) {\n Log.d(TAG, \"onLocationResult: loaction!==null\");\n myLocation = locationResult.getLastLocation();\n showMarker();//de show hinh len\n }\n }\n };\n fusedLocationProviderClient.requestLocationUpdates(locationRequest, locationCallback, null);//dang ky voi he thong app lang nghe su thay doi cua location\n\n } catch (SecurityException e) {\n e.getMessage();\n\n }\n }\n }", "private void getDeviceLocation(){\n Log.d(TAG, \"getDeviceLocation: getting the device location\");\n\n mFusedLocationProviderClient= LocationServices.getFusedLocationProviderClient(this);\n\n try {\n if(mLocationPermissionsGranted){\nfinal Task location=mFusedLocationProviderClient.getLastLocation();\n location.addOnCompleteListener(new OnCompleteListener() {\n@Override\npublic void onComplete(@NonNull Task task) {\n if(task.isSuccessful()){\n Log.d(TAG, \"onComplete: found location\");\n Location currentLocation=(Location)task.getResult();\n moveCamera(new LatLng(currentLocation.getLatitude(),currentLocation.getLongitude()),\n /*this is wew i stopped*/ Deafult_ZOOM);\n\n\n\n /* LatLng latLng = new LatLng(currentLocation.getLatitude(),currentLocation.getLongitude());\n MarkerOptions options=new MarkerOptions().position(latLng).title(\"test\");\n mMap.addMarker(options);*/\n\n }else {\n Log.d(TAG, \"onComplete: current location is null\");\n Toast.makeText(selectLocation.this,\"unable to get current location \",Toast.LENGTH_SHORT).show();\n }\n }\n });\n }\n\n }catch (SecurityException e){\n Log.e(TAG, \"getDeviceLocation:SecurityException \"+e.getMessage() );\n }\n\n }", "public void onLocationChanged(Location location) {\n\n if (net_connection_check()) {\n\n String message = String.format(\n\n \"New Location \\n Longitude: %1$s \\n Latitude: %2$s\",\n\n location.getLongitude(), location.getLatitude());\n\n // *************************** GPS LOCATION ***************************\n\n\n driveruserid = User_id;\n driverlat = location.getLatitude();\n driverlong = location.getLongitude();\n\n\n Location driverLocation = new Location(\"user location\");\n driverLocation.setLatitude(driverlat);\n driverLocation.setLongitude(driverlong);\n\n aController.setDriverLocation(driverLocation);\n\n String drivercurrentaddress = lattoaddress(driverlat, driverlong);\n\n\n if (!checktripend && mGoogleMap != null) {\n // mGoogleMap.clear();\n\n\n }\n LatLng mark1 = new LatLng(driverlat, driverlong);\n\n if (logoutcheck) {\n//\t\t\tDriverdetails();\n }\n\n LatLng target = new LatLng(driverlat, driverlong);\n\n String check = fullbutton.getText().toString();\n if (acc.equals(\"yes\") || check.equals(\"End Trip\")) {\n if (check.equals(\"End Trip\")) {\n // mGoogleMap.clear();\n // mGoogleMap.setTrafficEnabled(true);\n }\n origin = new LatLng(driverlat, driverlong);\n /* try{\n String url = getDirectionsUrl(origin, dest);\n drawMarker(dest);\n DownloadTask downloadTask = new DownloadTask();\n //Start downloading json data from Google Directions API\n downloadTask.execute(url);\n }catch (Exception e){\n\n }*/\n\n// checkOffRouteAndRedrwaRoute(location);\n\n }\n\n checkOffRouteAndRedrwaRoute(location);\n if (location.hasBearing() && mGoogleMap != null) {\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(target) // Sets the center of the map to current location\n .zoom(16)\n .bearing(location.getBearing()) // Sets the orientation of the camera to east\n .tilt(0) // Sets the tilt of the camera to 0 degrees\n .build(); // Creates a CameraPosition from the builder\n mGoogleMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\n }\n }\n }", "public void onCreate(Bundle bundle) {\n int i2;\n int i3 = 0;\n super.onCreate(bundle);\n setContentView(R.layout.map_marker_click_dialog);\n a(this.c);\n this.d = (CirclrImageView) findViewById(R.id.friend_icon);\n this.e = (TextView) findViewById(R.id.friend_device_name);\n this.f = (TextView) findViewById(R.id.friend_update_time);\n this.j = (TextView) findViewById(R.id.friend_update_location);\n this.i = (TextView) findViewById(R.id.friend_location);\n this.g = (TextView) findViewById(R.id.friend_freq);\n this.h = (TextView) findViewById(R.id.friend_altitude);\n this.i.setTypeface(l.c);\n this.g.setTypeface(l.c);\n this.h.setTypeface(l.c);\n this.e.setText(this.b.getName());\n String g2 = ac.g(((long) this.b.getTime()) * 1000);\n this.f.setText(ad.a((int) R.string.update_location_time, g2));\n double longitudeDouble = this.b.getLongitudeDouble();\n double latitudeDouble = this.b.getLatitudeDouble();\n StringBuffer stringBuffer = new StringBuffer();\n stringBuffer.append(this.c.getString(R.string.location_is));\n if (longitudeDouble >= 0.0d) {\n stringBuffer.append(longitudeDouble + TraceFormat.STR_ERROR);\n } else {\n stringBuffer.append(Math.abs(longitudeDouble) + TraceFormat.STR_WARN);\n }\n stringBuffer.append(\" , \");\n if (latitudeDouble >= 0.0d) {\n stringBuffer.append(latitudeDouble + \"N\");\n } else {\n stringBuffer.append(Math.abs(latitudeDouble) + \"S\");\n }\n this.j.setText(stringBuffer.toString());\n float[] fArr = new float[1];\n double[] Y = w.Y();\n Location.distanceBetween(Y[0], Y[1], this.b.getLatitudeDouble(), this.b.getLongitudeDouble(), fArr);\n float f2 = fArr[0];\n final SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder();\n final AbsoluteSizeSpan absoluteSizeSpan = new AbsoluteSizeSpan(v.c(10.0f));\n DecimalFormat decimalFormat = new DecimalFormat(\"#.#\");\n if (f2 < 0.0f) {\n i2 = 0;\n } else if (f2 < 1000.0f) {\n spannableStringBuilder.append(String.valueOf(Math.round(f2)));\n spannableStringBuilder.append(\" m\");\n i3 = spannableStringBuilder.length() - 1;\n i2 = spannableStringBuilder.length();\n } else {\n spannableStringBuilder.append(String.valueOf(decimalFormat.format((double) (f2 / 1000.0f))));\n spannableStringBuilder.append(\" km\");\n i3 = spannableStringBuilder.length() - 2;\n i2 = spannableStringBuilder.length();\n }\n spannableStringBuilder.setSpan(absoluteSizeSpan, i3, i2, 33);\n this.i.setText(spannableStringBuilder);\n spannableStringBuilder.clear();\n spannableStringBuilder.append(v.c(this.b.getFreq()));\n spannableStringBuilder.append(\" MHz\");\n spannableStringBuilder.setSpan(absoluteSizeSpan, spannableStringBuilder.length() - 3, spannableStringBuilder.length(), 33);\n this.g.setText(spannableStringBuilder);\n spannableStringBuilder.clear();\n spannableStringBuilder.append(String.valueOf(this.b.getAltitude()));\n spannableStringBuilder.append(\" m\");\n spannableStringBuilder.setSpan(absoluteSizeSpan, spannableStringBuilder.length() - 1, spannableStringBuilder.length(), 33);\n this.h.setText(spannableStringBuilder);\n if (this.b.getAltitude() == 0) {\n a.a(this.b.getLatitudeDouble(), this.b.getLongitudeDouble(), (b) new com.ifengyu.intercom.a.b.a() {\n public void a(Call call, Exception exc, int i) {\n s.b(t.a, \"onError:\" + exc.getMessage());\n }\n\n public void a(Double d2, int i) {\n if (d2 != null) {\n s.b(t.a, d2.toString());\n spannableStringBuilder.clear();\n spannableStringBuilder.append(String.valueOf(d2.intValue()));\n spannableStringBuilder.append(\" m\");\n spannableStringBuilder.setSpan(absoluteSizeSpan, spannableStringBuilder.length() - 1, spannableStringBuilder.length(), 33);\n t.this.h.setText(spannableStringBuilder);\n }\n }\n });\n }\n if (this.b.getImgUrl() == null || this.b.getImgUrl().length() <= 0 || this.b.getImgUrl().equals(\"null\")) {\n this.d.setImageDrawable(ContextCompat.getDrawable(this.c, R.drawable.my_head_default));\n } else {\n ImageLoader.getInstance().displayImage(this.b.getImgUrl(), (ImageView) this.d);\n }\n }", "@Override\n\t protected void onResume() {\n\t \tsuper.onResume();\n\t \tmyLocationOverlay.enableMyLocation();\n\t \tIntent intentstazionetermini=new Intent(\"pdm.test.mappe\");\n\t \tintentstazionetermini.putExtra(\"overlay\", 1);\n\t \tmPendingstazionetermini=PendingIntent.getBroadcast(this, 1, intentstazionetermini, PendingIntent.FLAG_CANCEL_CURRENT);\n\t \tIntent intentpiazzadellarepubblica=new Intent(\"pdm.test.mappe\");\n\t \tintentpiazzadellarepubblica.putExtra(\"overlay\", 2);\n\t \tmPendingpiazzadellarepubblica=PendingIntent.getBroadcast(this, 2, intentpiazzadellarepubblica, PendingIntent.FLAG_CANCEL_CURRENT);\n\t \tIntent intentcolosseo=new Intent(\"pdm.test.mappe\");\n\t \tintentcolosseo.putExtra(\"overlay\", 3);\n\t \tmPendingcolosseo=PendingIntent.getBroadcast(this, 3, intentcolosseo, PendingIntent.FLAG_CANCEL_CURRENT);\n\t \tIntent intentcasadiromoloeremo=new Intent(\"pdm.test.mappe\");\n\t \tintentcasadiromoloeremo.putExtra(\"overlay\", 4);\n\t \tmPendingcasadiromoloeremo=PendingIntent.getBroadcast(this, 4, intentcasadiromoloeremo, PendingIntent.FLAG_CANCEL_CURRENT);\n\t \tlocationManager=(LocationManager)getSystemService(LOCATION_SERVICE);\n\t \tlocationManager.addProximityAlert(stazionetermini.getLatitudeE6()*0.000001, stazionetermini.getLongitudeE6()*0.000001, 400, -1, mPendingstazionetermini);\n\t \tlocationManager.addProximityAlert(piazzadellarepubblica.getLatitudeE6()*0.000001, piazzadellarepubblica.getLongitudeE6()*0.000001, 300, -1, mPendingpiazzadellarepubblica);\n\t \tlocationManager.addProximityAlert(colosseo.getLatitudeE6()*0.000001, colosseo.getLongitudeE6()*0.000001, 500, -1, mPendingcolosseo);\n\t \tlocationManager.addProximityAlert(casadiromoloeremo.getLatitudeE6()*0.000001, casadiromoloeremo.getLongitudeE6()*0.000001, 450, -1, mPendingcasadiromoloeremo);\n\t \tregisterReceiver(mProximityBroadcast, new IntentFilter(\"pdm.test.mappe\"));\n\t }", "@Override\r\n\tprotected void onResume() {\r\n\t\tsuper.onResume();\r\n\t\tlm.requestLocationUpdates(lm.GPS_PROVIDER, 500, 1, this);\r\n\t}", "private void markerForGeofence(LatLng latLng,int indexPos)\n {\n Log.e(\"TAGtag\", \"markerForGeofence(\" + latLng + \")\");\n String title = latLng.latitude + \", \" + latLng.longitude;\n Log.e(\"TAGtag\", \"\"+title);\n // Define marker options\n MarkerOptions markerOptions = new MarkerOptions()\n .position(latLng)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE))\n .title(title);\n if ( mMap!=null )\n {\n // Remove last geoFenceMarker\n if (GEO_FENCE_MARKER[indexPos] != null)\n {\n //geoFenceMarker.remove();\n }\n\n\n GEO_FENCE_MARKER[indexPos] = mMap.addMarker(markerOptions);\n //geoFenceMarker = mMap.addMarker(markerOptions);\n }\n startGeofence(indexPos);\n }", "public void setLocation(){\n //Check if user come from notification\n if (getIntent().hasExtra(EXTRA_PARAM_LAT) && getIntent().hasExtra(EXTRA_PARAM_LON)){\n Log.d(TAG, \"Proviene del servicio, lat: \" + getIntent().getExtras().getDouble(EXTRA_PARAM_LAT) + \" - lon: \" + getIntent().getExtras().getDouble(EXTRA_PARAM_LON));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(getIntent().getExtras().getDouble(EXTRA_PARAM_LAT), getIntent().getExtras().getDouble(EXTRA_PARAM_LON)), 18));\n NotificationManager mNM = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);\n mNM.cancel(1);\n } else{\n if (bestLocation!=null){\n Log.d(TAG, \"Posicion actual -> LAT: \"+ bestLocation.getLatitude() + \" LON: \" + bestLocation.getLongitude());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(bestLocation.getLatitude(), bestLocation.getLongitude()), 16));\n } else{\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(41.651981, -4.728561), 16));\n }\n }\n }", "private void fineLocationPermissionGranted() {\n UtilityService.addGeofences(this);\n UtilityService.requestLocation(this);\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(getActivity(),\n new String[]{\n Manifest.permission.ACCESS_FINE_LOCATION,\n Manifest.permission.ACCESS_COARSE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "private void addGeofence(GeofencingRequest request) {\n\n T.t(TripMapsActivity.this, \"addGeofence\");\n if (checkPermission())\n LocationServices.GeofencingApi.addGeofences(\n googleApiClient,\n request,\n createGeofencePendingIntent()\n ).setResultCallback(this);// check here\n }", "private void enableMyLocation(){\n System.out.print(\"get here\");\n if(ContextCompat.checkSelfPermission(this.getContext(), Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED){\n // Permission to access the location is missing.\n PermissionUtils.requestPermission(this.getActivity(),LOCATION_PERMISSION_REQUEST_CODE,\n Manifest.permission.ACCESS_FINE_LOCATION,true);\n }else if(googleMap!=null){\n // Access to the location has been granted to the app.\n googleMap.setMyLocationEnabled(true);\n }\n }", "@Override\n public void onLocationChanged(Location location) {\n Intent i = new Intent(\"location_update\");\n i.putExtra(\"coordinates\", location.getLongitude() + \" \" + location.getLatitude());\n home_loc = new FileCacher<>(getApplicationContext(), \"myloc.txt\");\n\n if (home_loc.hasCache()) {\n try {\n double lat1 = location.getLatitude();\n double long1 = location.getLongitude();\n String loc = home_loc.readCache();\n String[] coors1 = {Double.toString(long1), Double.toString(lat1)};\n if (loc != null) {\n Log.i(\"loc\", loc);\n coors1 = loc.split(\" \");\n }\n\n double lat2 = Double.parseDouble(coors1[1]);\n double long2 = Double.parseDouble(coors1[0]);\n double dist = distance(lat1, lat2, long1, long2);\n Log.i(\"dist\", Double.toString(dist));\n if (dist > thresh) {\n i.putExtra(\"exceed\", \"true\");\n } else {\n i.putExtra(\"exceed\", \"false\");\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n sendBroadcast(i);\n }", "@Override\n public void onLocationChanged(Location location) {\n latitude=String.valueOf(location.getLatitude());\n longitude= String.valueOf(location.getLongitude());\n\n System.out.println(\"asdfgh==\"+latitude);\n\n\n /* Geocoder geocoder;\n List<Address> addresses;\n geocoder = new Geocoder(SafetyActivity.this, Locale.getDefault());\n\n try {\n addresses = geocoder.getFromLocation(location.getLatitude(), location.getLongitude(), 1);\n String address = addresses.get(0).getAddressLine(0); // If any additional address line present than only, check with max available address lines by getMaxAddressLineIndex()\n String city = addresses.get(0).getLocality();\n String state = addresses.get(0).getAdminArea();\n String country = addresses.get(0).getCountryName();\n String postalCode = addresses.get(0).getPostalCode();\n String knownName = addresses.get(0).getFeatureName();\n\n System.out.println(\"addresses==\"+address);\n // Here 1 represent max location result to returned, by documents it recommended 1 to 5\n } catch (IOException e) {\n e.printStackTrace();\n }*/\n }", "@Override\n public void onLocationChanged(Location location) {\n double latitude = location.getLatitude();\n double longitude = location.getLongitude();\n LatLng meuLocal = new LatLng(latitude, longitude);\n\n if(markerLocalizacaoUsuario != null)\n markerLocalizacaoUsuario.remove();\n markerLocalizacaoUsuario = mapa.addMarker(new MarkerOptions()\n .position(meuLocal)\n .title(\"Você está aqui!\")\n .flat(true) //alinha ao norte o marcador, mesmo que gire o mapa\n .icon(bitmapDescriptorFromVector(MapaLocalActivity.this,R.drawable.marker_usuario_nav))\n //.icon(BitmapDescriptorFactory.fromResource(R.drawable.usuario))\n .anchor(0.5f, 0.5f));\n markerLocalizacaoUsuario.setTag(TipoLocal.MARKER_USER.getTipo());\n markerLocalizacaoUsuario.setRotation(location.getBearing());\n\n\n if (locUsuario == null) {\n getZoomAtual();\n mapa.animateCamera(CameraUpdateFactory.newLatLngZoom(meuLocal, getZoomAtual()), 500, null);\n }\n locUsuario = meuLocal;\n //Log.d(TAG, \"Changed: \"+ latitude +\" / \"+longitude + \" --> \"+location.getBearing());\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(ActivityLivetrackingRest.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "private void requestPermission(){\r\n ActivityCompat.requestPermissions(activity,new String[]{Manifest.permission.ACCESS_FINE_LOCATION},1);\r\n }", "@Override\n public void onMapReady( GoogleMap googleMap ) {\n map = googleMap;\n MapIsReady = true;\n contactServer = new ContactServer(getApplicationContext());\n contactServer.getHelp(latitude, longitude);\n\n LatLng IamHere = new LatLng(22.114720, 113.325730 );\n map.addMarker( new MarkerOptions().position( IamHere ).title( \"I am Here\" ).snippet\n ( \"and\" + \" snippet\" ).icon( BitmapDescriptorFactory.defaultMarker( BitmapDescriptorFactory\n .HUE_BLUE ) ) );\n map.moveCamera(CameraUpdateFactory.newLatLngZoom(IamHere, 15.0f));\n\n /* LatLng Provider = new LatLng(22.114720, 113.325840 );\n map.addMarker( new MarkerOptions().position( Provider ).title( \"ABC\" ).snippet\n ( \"and\" + \" snippet\" ).icon( BitmapDescriptorFactory.defaultMarker( BitmapDescriptorFactory\n .HUE_YELLOW ) ) );*/\n map.moveCamera(CameraUpdateFactory.newLatLngZoom(IamHere, 15.0f));\n\n\n map.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n @Override\n public boolean onMarkerClick(Marker marker) {\n //Toast.makeText(getApplicationContext(), \"Click\", Toast.LENGTH_SHORT).show();\n Log.d(TAG, \"Click Marker\");\n if (fragmentIsShowed == false) {\n\n Bundle bundle = new Bundle();\n bundle.putString(\"UserName\", mapHash.get(marker.getId()).getTitle());\n bundle.putDouble(\"Latitude\", mapHash.get(marker.getId()).getPosition().latitude);\n bundle.putDouble(\"Longitude\", mapHash.get(marker.getId()).getPosition().longitude);\n bundle.putString(\"UserId&PowerBankSpec\", mapHash.get(marker.getId()).getSnippet().toString());\n infoFragment.setArguments(bundle);\n\n fragmentManager = getFragmentManager();\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n fragmentTransaction.add(R.id.activity_home, infoFragment, \"first\");\n fragmentTransaction.commit();\n fragmentIsShowed = true;\n\n } else {\n fragmentManager = getFragmentManager();\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n fragmentTransaction.remove(infoFragment);\n fragmentTransaction.commit();\n fragmentIsShowed = false;\n }\n\n return true;\n }\n });\n\n }", "private void markerForGeofence(LatLng latLng)\n {\n Log.e(\"TAGtag\", \"markerForGeofence(\" + latLng + \")\");\n String title = latLng.latitude + \", \" + latLng.longitude;\n Log.e(\"TAGtag\", \"\"+title);\n // Define marker options\n MarkerOptions markerOptions = new MarkerOptions()\n .position(latLng)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN))\n .title(title);\n if ( mMap!=null )\n {\n // Remove last geoFenceMarker\n if (geoFenceMarker != null)\n {\n geoFenceMarker.remove();\n }\n\n\n geoFenceMarker = mMap.addMarker(markerOptions);\n //geoFenceMarker = mMap.addMarker(markerOptions);\n }\n\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(getActivity(),\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION );\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n Log.e(\"i m in Broadcast recive\", \"i m in Broadcast recive\");\n Double latitude = intent.getDoubleExtra(\"latitude\",0.0);\n Double longitude = intent.getDoubleExtra(\"longitude\",0.0);\n int pendingPoints = intent.getIntExtra(\"pendingPoints\",0);\n String timeStamp = intent.getStringExtra(\"lastUpdated\");\n boolean isBulkUpload = intent.getBooleanExtra(\"isBulkUpload\",false);\n\n\n textViewLastUpdatedTime.setText(\"Last Updated On: \"+timeStamp);\n textViewPointsCount.setText(\"Pending Points: \"+pendingPoints);\n if(getAddress(latitude,longitude).isEmpty()){\n textview_tracking_updates.setText(\"Updating Details: \\n\"+latitude+\" / \"+longitude );\n }else{\n textview_tracking_updates.setText(\"Updating Details: \\n\\nLast Updated Location is : \"+getAddress(latitude,longitude));\n }\n\n\n }", "private void checkLocationPermission() {\n if(ContextCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED){\n if (ActivityCompat.shouldShowRequestPermissionRationale(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION)) {\n new AlertDialog.Builder(getActivity())\n .setTitle(\"give permission\")\n .setMessage(\"give permission message\")\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(getActivity(), new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 1);\n }\n })\n .create()\n .show();\n }\n else{\n ActivityCompat.requestPermissions(getActivity(), new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 1);\n }\n }\n\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(getActivity(),\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "public static void sendEmergencyAssistanceAbnormalSpeed(Context context, @NonNull iEmergencyAssistanceAbnormalSpeed result) {\n final String Uid = objAccount.getCurrentUser().getUid();\n final objAccount currentAccount = objAccount.getAccountFromSQLite(context,Uid);\n\n final DatabaseReference mRef = FirebaseDatabase.getInstance()\n .getReference()\n .child(keyUtils.emergencyAssistanceList)\n .child(Uid)\n .push();\n\n //Get current location\n FusedLocationProviderClient mFusedLocationClient = LocationServices.getFusedLocationProviderClient(context);\n mFusedLocationClient.getLastLocation().addOnCompleteListener(new OnCompleteListener<Location>() {\n @Override\n public void onComplete(@NonNull Task<Location> task) {\n\n Location location = task.getResult();\n if (location != null) {\n ArrayList<String> listSeen = new ArrayList<>();\n listSeen.add(objAccount.getCurrentUser().getUid());\n\n ArrayList<String> listReceived = new ArrayList<>();\n listReceived.add(objAccount.getCurrentUser().getUid());\n\n String message = String.format(context.getResources().getString(R.string.We_find_driving_speed_unusually_low),\n currentAccount.getName(),\n currentAccount.getGender().toLowerCase().matches(keyUtils.MALE) ? context.getResources().getString(R.string.him) : context.getResources().getString(R.string.her));\n\n fb_emergencyAssistance emergencyAssistance = new fb_emergencyAssistance(location.getLatitude(),\n Uid,\n listReceived,\n listSeen,\n location.getLongitude(),\n message,\n keyUtils.TYPE_ABNORMAL_SPEED,\n Calendar.getInstance().getTimeInMillis());\n\n\n mRef.setValue(emergencyAssistance)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n result.onResult(true, \"Success\");\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n result.onResult(false, e.getMessage());\n }\n });\n }else\n result.onResult(false,\"Null location\");\n }\n });\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tlocationManager.requestLocationUpdates(provider, 400, 1, this);\n\t}", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tlocationManager.requestLocationUpdates(provider, 400, 1, this);\n\t}", "private void getDeviceLocation(){\n Log.d(TAG,\"get device location currently\");\n mFusedLocationProviderClient= LocationServices.getFusedLocationProviderClient(this);\n try{\n if(mLocationPermissionGranted){\n @SuppressLint(\"MissingPermission\") final Task location = mFusedLocationProviderClient.getLastLocation();\n location.addOnCompleteListener(new OnCompleteListener() {\n @Override\n public void onComplete(@NonNull Task task) {\n if(task.isSuccessful()){\n Log.d(TAG,\"onComplete: found Location\");\n mLastKnownLocation= (Location) task.getResult();\n moveCamera(new LatLng(mLastKnownLocation.getLatitude(),mLastKnownLocation.getLongitude()),DEFAULT_ZOOM);\n\n Geocoder geocoder;\n List<Address> addresses;\n geocoder = new Geocoder(MapsActivity.this, Locale.getDefault());\n\n try {\n addresses = geocoder.getFromLocation(mLastKnownLocation.getLatitude(), mLastKnownLocation.getLongitude(), 1); // Here 1 represent max location result to returned, by documents it recommended 1 to 5\n LatLng latLng = new LatLng(mLastKnownLocation.getLatitude(), mLastKnownLocation.getLongitude());\n\n address = addresses.get(0).getAddressLine(0); // If any additional address line present than only, check with max available address lines by getMaxAddressLineIndex()\n city = addresses.get(0).getLocality();\n state = addresses.get(0).getAdminArea();\n String country = addresses.get(0).getCountryName();\n postalCode = addresses.get(0).getPostalCode();\n String knownName = addresses.get(0).getFeatureName(); // Only\n MarkerOptions markerOptions = new MarkerOptions();\n markerOptions.position(latLng);\n markerOptions.title(address);\n mMap.clear();//Not sure\n mMap.addMarker(markerOptions);\n Marker here = mMap.addMarker(markerOptions.title(address + \", \" + city + \", \" + state + \", \" + country\n + \", \" + postalCode + \", \" + knownName));\n here.showInfoWindow();\n } catch (IOException e) {\n e.printStackTrace();\n } }else {\n Log.d(TAG, \"onComplete: current location is null\");\n Toast.makeText(MapsActivity.this, \"unable to get current location\",Toast.LENGTH_SHORT).show();\n getLocationPermission();\n }\n }\n });\n\n }\n }catch (SecurityException e){\n Log.e(TAG,\"getDeviceLocation: SecurityException: \" + e.getMessage() );\n }\n\n\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n getDataFromDatabase();\n\n // Add a marker in Sydney and move the camera\n //LatLng hellas = new LatLng(38.311449, 25.022821);\n // mMap.addMarker(new MarkerOptions().position(hellas).title(\"Marker in Aegean Sea\"));\n //mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(hellas,5));\n\n //Initalize MyLocation stuff\n mMap.setMyLocationEnabled(true);\n mMap.setOnMyLocationButtonClickListener(this);\n mMap.setOnMyLocationClickListener(this);\n\n //setMarkersOnMap();\n\n if(mLocationPermissionGranted){\n getDeviceLocation();\n }\n\n\n ic_plus.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n DEFAULT_ZOOM = 17f;\n getDeviceLocation();\n\n //double lat = currentLocation.getLatitude();\n //double lon = currentLocation.getLongitude();\n LatLng currlatlon = new LatLng(currentLocation.getLatitude()+0.0002,currentLocation.getLongitude()+0.0002);\n\n\n curraddmarker = mMap.addMarker(new MarkerOptions().position(currlatlon).draggable(true));\n currentMarkerLat=curraddmarker.getPosition().latitude;\n currentMarkerLon=curraddmarker.getPosition().longitude;\n hideUI();\n showConfirm();\n\n }\n });\n\n addMarker.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n\n showUI();\n addMarker.setVisibility(View.GONE);\n\n //double lat = curraddmarker.getPosition().latitude;\n //double lon = curraddmarker.getPosition().longitude;\n\n //Toast.makeText(AEDMapActivity.this, \"Lat:\"+currentMarkerLat+\" Lon:\"+currentMarkerLon, Toast.LENGTH_SHORT).show();\n Intent i =new Intent(AEDMapActivity.this, addMarkerActivity.class);\n i.putExtra(\"Lat\",curraddmarker.getPosition().latitude);\n i.putExtra(\"Lon\",curraddmarker.getPosition().longitude);\n startActivity(i);\n }\n });\n\n cancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n hideConfirm();\n showUI();\n curraddmarker.remove();\n\n getDeviceLocation();\n\n }\n });\n\n\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener()\n {\n @Override\n public void onMapClick(LatLng arg0)\n {\n if(menuUI){\n if(markerInfo){\n hideMarkerInfoIcon();\n return;\n }\n\n if(adminEkav || adminDimos){\n hideReportIcon();\n }\n\n menuUI = false;\n hideUI();\n\n\n }\n else{\n menuUI = true;\n showUI();\n if(adminEkav || adminDimos){\n showReportIcon();\n }\n }\n }\n });\n\n\n\n mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n @Override\n public boolean onMarkerClick(Marker marker) {\n\n showMarkerInfoIcon();\n\n Log.d(TAG,marker.getTag().toString());\n\n if(!markerMap.isEmpty()){\n for(int i=0; i<markerMap.size(); i++) {\n marker_id = (String) markerMap.get(i).get(\"Id\");\n //Log.d(TAG,id);\n if(marker_id.equals(marker.getTag().toString())){\n marker_name = (String) markerMap.get(i).get(\"Name\");\n marker_desc = (String) markerMap.get(i).get(\"Description\");\n marker_pic = (String) markerMap.get(i).get(\"ImageUrl\");\n marker_geo = (GeoPoint) markerMap.get(i).get(\"Geolocation\");\n\n Log.d(TAG,\"Marker Clicked!! - name: \"+marker_name+\" desc: \"+marker_desc+\" geo: \"+marker_geo+ \" imgurl: \"+marker_pic);\n\n ic_info.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent i =new Intent(AEDMapActivity.this, MarkerInfoActivity.class);\n i.putExtra(\"Id\",marker_id);\n i.putExtra(\"Name\",marker_name);\n i.putExtra(\"Description\",marker_desc);\n i.putExtra(\"Lat\",marker_geo.getLatitude());\n i.putExtra(\"Lon\",marker_geo.getLongitude());\n i.putExtra(\"imgUrl\",marker_pic);\n startActivity(i);\n }\n });\n\n break;\n }\n }\n }\n\n return false;\n }\n });\n\n mMap.setOnMarkerDragListener(new GoogleMap.OnMarkerDragListener() {\n\n\n @Override\n public void onMarkerDragStart(Marker marker) {\n\n }\n\n @Override\n public void onMarkerDrag(Marker marker) {\n\n }\n\n @Override\n public void onMarkerDragEnd(Marker marker) {\n currentMarkerLat=curraddmarker.getPosition().latitude;\n currentMarkerLon=curraddmarker.getPosition().longitude;\n }\n });\n\n }", "private void registerForGPS() {\n Log.d(NAMAZ_LOG_TAG, \"registerForGPS:\");\n Criteria criteria = new Criteria();\n criteria.setAccuracy(Criteria.ACCURACY_COARSE);\n criteria.setPowerRequirement(Criteria.POWER_LOW);\n criteria.setAltitudeRequired(false);\n criteria.setBearingRequired(false);\n criteria.setSpeedRequired(false);\n criteria.setCostAllowed(true);\n LocationManager locationManager = ((LocationManager) getSystemService(Context.LOCATION_SERVICE));\n String provider = locationManager.getBestProvider(criteria, true);\n\n if(!isLocationEnabled()) {\n showDialog(\"Location Access\", getResources().getString(R.string.location_enable), \"Enable Location\", \"Cancel\", 1);\n } else {\n ActivityCompat.requestPermissions(QiblaDirectionActivity.this,\n new String[]{Manifest.permission. ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }\n\n /* if (provider != null) {\n locationManager.requestLocationUpdates(provider, MIN_LOCATION_TIME,\n MIN_LOCATION_DISTANCE, qiblaManager);\n }\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,\n MIN_LOCATION_TIME, MIN_LOCATION_DISTANCE, qiblaManager);\n locationManager.requestLocationUpdates(\n LocationManager.NETWORK_PROVIDER, MIN_LOCATION_TIME,\n MIN_LOCATION_DISTANCE, qiblaManager);*/\n /*Location location = locationManager\n .getLastKnownLocation(LocationManager.GPS_PROVIDER);\n if (location == null) {\n location = ((LocationManager) getSystemService(Context.LOCATION_SERVICE))\n .getLastKnownLocation(LocationManager.GPS_PROVIDER);\n }*/\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n\n if (displayGpsStatus()) {\n\n Log.v(TAG, \"onClick\");\n\n\n locationListener = new MyLocationListener();\n\n if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED ) {\n locationMangaer.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, locationListener);\n\n }\n else{\n Toast.makeText(this,\"Kindly Provide Location Acces\",Toast.LENGTH_SHORT).show();\n }\n\n Log.v(TAG,latitudeUsers +\" , \"+longitudeUsers);\n\n } else {\n Toast.makeText(this,\"GPS not available!!\",Toast.LENGTH_SHORT).show();\n }\n\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(MapsActivity.this,\n new String[]{\n Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSION_REQ_LOC);\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(MainActivity.this,\n new String[]{Manifest.permission.ACCESS_COARSE_LOCATION,Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(AddressBook_add.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == 100) {\n if (resultCode != RESULT_OK)\n Toast.makeText(getContext(), \"GPS est déactivé\", Toast.LENGTH_LONG).show();\n else {\n if (ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED ||\n ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n setupmap();\n MapForm.setMyLocationEnabled(true);\n }\n }\n }\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(activity,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION );\n }", "private void requestFineLocationPermission() {\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, PERMISSION_REQ);\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(AdminMap.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "@Override\n public void onSuccess(Location location) {\n if (location != null) {\n\n MyLat = location.getLatitude();\n MyLong = location.getLongitude();\n\n Log.e(TAG, \"MyLat = \" + MyLat);\n Log.e(TAG, \"MyLong = \" + MyLong);\n\n\n LatLng latLng = (new LatLng(location.getLatitude(), location.getLongitude()));\n mMap.clear();\n\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, 17.0f));\n\n MarkerOptions markerOptions = new MarkerOptions();\n markerOptions.position(latLng);\n markerOptions.draggable(true);\n\n BitmapDescriptor markerIcon = vectorToBitmap(R.drawable.ic__fill_placeholder,\n ContextCompat.getColor(getApplicationContext(),\n R.color.rv_hader));\n\n markerOptions.icon(markerIcon);\n markerOptions.title(\"My Location\");\n if (session.getMobileNumber() != null) {\n markerOptions.snippet(session.getMobileNumber());\n }\n mMap.addMarker(markerOptions);\n\n String add = getAddress(location.getLatitude(), location.getLongitude());\n Log.e(getClass().getSimpleName(), \"getAddress : \" + add);\n currentAddress = add;\n if (add != null)\n tv_current_locName.setText(add);\n else\n tv_current_locName.setText(\"Not Find\");\n } else {\n Log.d(TAG, \"onComplete: current location is null\");\n TastyToast.makeText(getApplicationContext(), getString(R.string.unable_toget_current_location), TastyToast.LENGTH_LONG, TastyToast.ERROR);\n Intent mIntent = new Intent(getApplicationContext(), MetaDataList.class); // the activity that holds the fragment\n Bundle mBundle = new Bundle();\n\n mBundle.putSerializable(\"metaDataItem\", metaDataItem);\n mIntent.setAction(\"UpdateLatLong\");\n mIntent.putExtra(\"SelectedNameDetail\", mBundle);\n startActivity(mIntent);\n finish();\n }\n }", "void getlatlong(){\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n requestPermissions(new String[]{Manifest.permission.ACCESS_COARSE_LOCATION,Manifest.permission.ACCESS_FINE_LOCATION,Manifest.permission.INTERNET}\n ,10);\n }\n return;\n }\n // this code won't execute IF permissions are not allowed, because in the line above there is return statement.\n\n //noinspection MissingPermission\n locationManager.requestLocationUpdates(\"gps\", 0, 0, listener);\n\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(OwnerMapActivity.this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "public void focusMapOnUser()\n {\n if(mapFragment==null)\n {\n mapFragment = (SupportMapFragment)(getChildFragmentManager().findFragmentById(R.id.map));\n }\n map = mapFragment.getMap();\n\n\n MapsInitializer.initialize(getActivity());\n\n\n map.setMyLocationEnabled(true);\n LocationManager locationManager = (LocationManager)getActivity().getSystemService(Context.LOCATION_SERVICE);\n Criteria criteria = new Criteria();\n mlocation = locationManager.getLastKnownLocation(locationManager.getBestProvider(criteria, false));\n\n\n\n //set the location of the user\n\n if(mlocation != null)\n {\n //move the camera to the users location with a suitable zoom level\n map.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(mlocation.getLatitude(), mlocation.getLongitude()),13));\n CameraPosition cameraPosition = new CameraPosition.Builder().target(new LatLng(mlocation.getLatitude(), mlocation.getLongitude())).zoom(15).bearing(0).tilt(0).build();\n map.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\n }\n\n }", "@Override\n public void onClick(View view) {\n Intent myIntent = new Intent(MainActivity.this, ATM_Activity.class);\n myIntent.putExtra(\"Latitude\", latitude);\n myIntent.putExtra(\"Longitude\", longitude);\n startActivity(myIntent);\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(MainActivity.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION );\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(MainActivity.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "public void setAttendPoint(Integer attendPoint) {\n this.attendPoint = attendPoint;\n }", "public void enableLocationService(Context context, int timeWait, int minDist){\r\n\t\tlm = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE);\r\n\t\tlm.requestLocationUpdates(LocationManager.GPS_PROVIDER, timeWait, minDist, this);\r\n\t}", "private void displayGeofenceInfo(){\n TextView locationView = (TextView) view.findViewById(R.id.txt_geopoint_info);\n locationView.setVisibility(View.VISIBLE);\n MainActivity mainActivity = (MainActivity) getActivity();\n String displayString = getResources().getString(R.string.currently_in_geofences_for);\n boolean showString = false;\n if(mainActivity.getGeofenceMonitor().curGeofences == null){\n return;\n }\n for(int i = 0; i<mainActivity.getGeofenceMonitor().curGeofences.size(); i++){\n displayString += mainActivity.getGeofenceMonitor().curGeofences.get(i).getName() + \" \";\n showString = true;\n }\n if(showString) {\n locationView.setText(displayString);\n } else {\n locationView.setText(getResources().getString(R.string.no_items));\n }\n }", "@Override\n protected String doInBackground(String... params) {\n // get the string from params, which is an array\n // Accounts doc=new Accounts(date,fullname,image);\n\n\n runOnUiThread(new Runnable() {\n public void run() {\n\n try {\n List<Address> addressList = null;\n addressList = getAddress(location);\n Boolean flag = true;\n while (addressList.size() == 0) {\n location = location.substring(1);\n System.out.println(\"Searching \" + location);\n addressList = getAddress(location);\n if (location.length() < 5 && addressList == null) {\n\n flag = false;\n break;\n\n }\n\n }\n if (flag) {\n Address address = addressList.get(0);\n\n LatLng latLng = new LatLng(address.getLatitude(), address.getLongitude());\n progressDialog.dismiss();\n\n // markerx.remove();\n mMap.addMarker(new\n MarkerOptions().position(latLng).title(\"NGO\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, 12.0f));\n GoogleDirection.withServerKey(serverKey)\n .from(latLng)\n .to(mylatlang)\n .execute(new DirectionCallback() {\n @Override\n public void onDirectionSuccess(Direction direction, String rawBody) {\n // Do something here\n System.out.println(\"Result isss\" + direction.getStatus());\n String status = direction.getStatus();\n if (status.equals(RequestResult.OK)) {\n System.out.println(\"Result is ok\");\n try {\n route = direction.getRouteList().get(0);\n leg = route.getLegList().get(0);\n Info distanceInfo = leg.getDistance();\n Info durationInfo = leg.getDuration();\n String tmp1 = distanceInfo.getText();\n tmp1 = tmp1.substring(0, tmp1.length() - 3);\n String tmp2 = durationInfo.getText();\n\n\n } catch (Exception e) {\n System.out.println(\"Exiting:\" + e);\n }\n\n ArrayList<LatLng> directionPositionList = leg.getDirectionPoint();\n\n\n PolygonOptions rectOptions = new PolygonOptions();\n\n System.out.println(\"Lol size is\" + directionPositionList.size());\n for (int i = 0; i < directionPositionList.size(); i = i + 25) {\n\n try {\n LatLng first = directionPositionList.get(i);\n LatLng second = directionPositionList.get(i + 25);\n Polyline line1 = mMap.addPolyline(new PolylineOptions()\n .add(first, second)\n .width(5)\n .color(Color.RED));\n System.out.println(first + \",\" + second);\n } catch (Exception e) {\n\n }\n }\n }\n if (status.equals(RequestResult.NOT_FOUND)) {\n System.out.println(\"Result is not ok\");\n }\n\n\n }\n\n @Override\n public void onDirectionFailure(Throwable t) {\n // Do something here\n System.out.println(\"Direction failed\");\n }\n });\n\n\n } else {\n progressDialog.dismiss();\n\n }\n\n }\n catch(Exception e){}\n }\n });\n\n\n\n return \"SUCCESS\";\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(mapActivity.this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "private void checkLocationandAddToMap() {\n if (ActivityCompat.checkSelfPermission(getActivity(), android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getActivity(), android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n //Requesting the Location permission\n ActivityCompat.requestPermissions(getActivity(), new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION}, LOCATION_REQUEST_CODE);\n return;\n }\n\n locationManager = (LocationManager) getActivity().getSystemService(LOCATION_SERVICE);\n criteria = new Criteria();\n bestProvider = locationManager.getBestProvider(criteria, true);\n\n\n //Fetching the last known location using the Fus\n Location location = locationManager.getLastKnownLocation(bestProvider);\n\n\n if (location != null) {\n\n onLocationChanged(location);\n\n\n } else {\n //This is what you need:\n locationManager.requestLocationUpdates(bestProvider, 1000, 0, (LocationListener) getActivity());\n }\n\n\n }", "@Override\n public void onSuccess(Location location) {\n Log.e(\"onRequestPermissions\", \"Success\");\n if (location != null) {\n wayLatitude = location.getLatitude();\n wayLongitude = location.getLongitude();\n Log.e(\"getLocation\", String.valueOf(wayLongitude));\n }\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(MainActivity.this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "@Override\n public void onLocationResult(LocationResult locationResult) {\n super.onLocationResult(locationResult);\n Log.d(TAG, \"onLocationResult: \");\n if (locationResult != null) {\n Log.d(TAG, \"onLocationResult: loaction!==null\");\n myLocation = locationResult.getLastLocation();\n showMarker();//de show hinh len\n }\n }", "public void requestGeoFenceWithNewIntent() {\n try {\n geofenceService.createGeofenceList(getAddGeofenceRequest(), pendingIntent)\n .addOnCompleteListener(task -> {\n if (task.isSuccessful()) {\n Log.i(TAG, \"add geofence success!\");\n } else {\n Log.w(TAG, \"add geofence failed : \" + task.getException().getMessage());\n }\n });\n } catch (Exception e) {\n Log.d(TAG, \"requestGeoFenceWithNewIntent: \" + e.toString());\n }\n }", "private void detectUserLocation(){\n \ttimestamp = System.currentTimeMillis();\n \tmLocationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\n\t\tCriteria criteria = new Criteria();\n\t\tcriteria.setAccuracy(Criteria.ACCURACY_FINE);\n\t\tcriteria.setCostAllowed(false);\n\t\tcriteria.setAltitudeRequired(false);\n\t\tcriteria.setPowerRequirement(Criteria.POWER_MEDIUM);\n\t\tString providerName = mLocationManager.getBestProvider(criteria, true);\n\t\tLog.d(TAG,\"Provider selected based on given criteria: \"+providerName);\n\t\tif(providerName != null)\n\t\t\tmLocationManager.requestLocationUpdates(providerName, 10000, 10, this);\n\t\telse\n\t\t\tLog.w(TAG,\"No provider\");\n }", "protected void startLocationUpdates() {\n\n if (ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n /*if (shouldShowRequestPermissionRationale(\n Manifest.permission.ACCESS_FINE_LOCATION)) {\n showExplanationDialog(new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n requestPermissions(\n new String[]{ Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }\n });\n } else {\n requestPermissions(\n new String[]{ Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);\n }*/\n } else {\n if (mGoogleApiClient.isConnected()) {\n LocationServices.FusedLocationApi.requestLocationUpdates(\n mGoogleApiClient, mLocationRequest, this);\n mRequestingLocationUpdates = true;\n Fog.d(TAG, \"requestedLocationUpdates\");\n }\n }\n }", "private void getCurrentLocation() {\n progressBar.setVisibility(View.VISIBLE);\n LocationRequest locationRequest = new LocationRequest();\n locationRequest.setInterval(10000);\n locationRequest.setFastestInterval(3000);\n locationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n\n LocationServices.getFusedLocationProviderClient(IntroActivity.this).requestLocationUpdates(locationRequest, new LocationCallback() {\n @Override\n public void onLocationResult(LocationResult locationResult) {\n super.onLocationResult(locationResult);\n LocationServices.getFusedLocationProviderClient(IntroActivity.this).removeLocationUpdates(this);\n if (locationResult != null && locationResult.getLocations().size() > 0) {\n int latestLocationIndex = locationResult.getLocations().size() - 1;\n double LatOrg = locationResult.getLocations().get(latestLocationIndex).getLatitude();\n double LonOrg = locationResult.getLocations().get(latestLocationIndex).getLongitude();\n\n LatitudeTruePref = Double.toString(LatOrg);\n LongitudeTruePref = Double.toString(LonOrg);\n\n LocationReal = new LatLng(LatOrg, LonOrg);\n tvSkip.setText(String.format(\"Lat: %s\\nLon: %s\", LatitudeTruePref, LongitudeTruePref));\n //tvSkip.setText(String.format(\"Lat: %s\\nLon: %s\", LatOrg, LonOrg));\n }\n FalseLocationSignal = false;//*Desactivar FalseLocation para SharedPreferens*//\n TrueLocationSignal = true;\n progressBar.setVisibility(View.GONE);\n btnNext.setEnabled(true);\n }\n }, Looper.getMainLooper());\n\n }", "private void getLocationPermission(){\n if(ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED){\n locationAccess = true;\n } else {\n locationAccess = false;\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, REQUEST_LOCATION_PERMISSION);\n }\n }", "public void getLocationPermission() {\n if (!isPermissionGranted())\n // get the location permission from user\n // this will prompt user a dialog to give the location permission\n requestPermissionLauncher.launch(Manifest.permission.ACCESS_FINE_LOCATION);\n /*ActivityCompat.requestPermissions(activity,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);*/\n }", "public void onClick(View v){\n \t\ttry {\r\n \t\t\tEditText textLocation = (EditText)findViewById(R.id.edtLocation);\r\n \t\t\tmapLocation = textLocation.getText().toString();\r\n \t\t\t\r\n \t\t\tEditText textDetails = (EditText)findViewById(R.id.edtDetails);\r\n \t\t\tmapSnipper = textDetails.getText().toString();\r\n \t\t\t\r\n \t\t\t\r\n \t\t\tEditText floatLongitude = (EditText)findViewById(R.id.edtLong);\r\n \t\t\tlon = Float.valueOf(floatLongitude.getText().toString());\r\n \t\t\t\r\n \t\t\tEditText floatLatitude = (EditText)findViewById(R.id.edtLat);\r\n \t\t\tlat = Float.valueOf(floatLatitude.getText().toString());\r\n \t\t\t\r\n \t\t\t//Only Lon and Lat between -90 and 90 are allowed\r\n \t\t\tif (lat >=-90 && lat <=90 && lon >=-90 && lon <=90) {\r\n \t\t\tfinal GoogleMap mMap;\r\n \t\t\tmMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();\r\n \t\t\tmMap.addMarker(new MarkerOptions()\r\n \t\t\t .position(new LatLng(lat,lon))\r\n \t\t\t .title(mapLocation)\r\n \t\t\t .snippet(mapSnipper));\r\n \t\t\t}\r\n \t\t\telse\r\n \t\t\t{\r\n \t\t\t\tToast.makeText(getBaseContext(), \"Lonitude and Latitude can only be numbers bewteen -90 to 90 e.g 3.148\", Toast.LENGTH_LONG).show();\r\n \t\t\t}\r\n \t}\r\n \tcatch (Exception e)\r\n \t{\r\n \t\tToast.makeText(getBaseContext(), \"Lonitude and Latitude can only be numbers bewteen -90 to 90 e.g 3.148\", Toast.LENGTH_LONG).show();\r\n \t}\r\n \t}", "private void sendBroadcastToActivity(double Lat, double Lng) {\r\n Log.e(TAG, \"Sending info...\");\r\n // - Intent filter that will help to recognize it from the activity\r\n Intent intent = new Intent(ACTION_LOCATION_BROADCAST);\r\n intent.putExtra(EXTRA_LATITUDE, Lat);\r\n intent.putExtra(EXTRA_LONGITUDE, Lng);\r\n LocalBroadcastManager.getInstance(this).sendBroadcast(intent);\r\n }", "private void enableRequestLocationUpdate() {\n mLocationManager = (LocationManager) getSystemService(LOCATION_SERVICE);\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n mLocationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,\n 1000 * 10, 10, mLocationListener);\n mLocationManager.requestLocationUpdates(\n LocationManager.NETWORK_PROVIDER, 1000 * 10, 10,\n mLocationListener);\n }", "public void checkLocationPermission() {\n try {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n if (checkPermission(Manifest.permission.ACCESS_FINE_LOCATION, getActivity(), getActivity())) {\n if (checkPermission(Manifest.permission.ACCESS_COARSE_LOCATION, getActivity(), getActivity())) {\n gpsTracker.getLocation();\n } else {\n requestPermission(android.Manifest.permission.ACCESS_COARSE_LOCATION, PERMISSION_REQUEST_CODE_LOCATION, getActivity().getApplicationContext(),\n getActivity());\n }\n } else {\n requestPermission(android.Manifest.permission.ACCESS_FINE_LOCATION, PERMISSION_REQUEST_CODE_LOCATION, getActivity().getApplicationContext(),\n getActivity());\n }\n } else {\n gpsTracker.getLocation();\n }\n } catch (Exception e) {\n // logException(e, \"GpsMapManualFragment_checkLocationPermission()\");\n }\n\n\n }", "private void setupGeoAndRetailerService() {\n final GeoLocationUtil geoLocationUtil = new GeoLocationUtil();\n final GeoLocationUtil.LocationResult geoLocationResult = new GeoLocationUtil.LocationResult() {\n @Override\n public void gotLocation(final Location location) {\n new Thread()\n {\n public void run()\n {\n mCenterActivity.runOnUiThread(new Runnable()\n {\n public void run()\n {\n //Do your UI operations like dialog opening or Toast here\n if (location != null) {\n Constants.GEO_LATITUDE = String.valueOf(location.getLatitude());\n Constants.GEO_LONGITUDE = String.valueOf(location.getLongitude());\n setupServiceReceiver();\n mServiceIntent = new Intent(getActivity(), GettingRetailerListService.class);\n mServiceIntent.putExtra(\"gettingStatus\", true);\n mServiceIntent.putExtra(\"receiver\", mReceiverForRetailer);\n getActivity().startService(mServiceIntent);\n } else {\n// new Handler(Looper.getMainLooper()).post(new Runnable() {\n// @Override\n// public void run() {\n Toast.makeText(getActivity(), \"Geo service is not working\", Toast.LENGTH_SHORT).show();\n\n// }\n// });\n\n }\n }\n });\n }\n }.start();\n }\n };\n\n if (!geoLocationUtil.getLocation(getActivity(), geoLocationResult)) {\n Toast.makeText(getActivity(), \"Geo service is not working\", Toast.LENGTH_SHORT).show();\n }\n\n\n }", "@Override\r\n protected void onCreate(Bundle savedInstanceState) {\r\n super.onCreate(savedInstanceState);\r\n setContentView(R.layout.ac_main);\r\n mResultReveiver = new AddressResultReceiver(new Handler());\r\n mTextView = (TextView) findViewById(R.id.my_text);\r\n if (savedInstanceState != null) {\r\n mIsInResolution = savedInstanceState.getBoolean(KEY_IN_RESOLUTION, false);\r\n }\r\n mGoogleApiClient = new GoogleApiClient.Builder(this)\r\n .addApi(LocationServices.API)\r\n .addConnectionCallbacks(this)\r\n .addOnConnectionFailedListener(this)\r\n .build();\r\n mLocationRequest = LocationRequest.create();\r\n mLocationRequest.setInterval(5000);\r\n mLocationRequest.setFastestInterval(1000);\r\n\r\n }", "@Override\n public void onAdAvailable(Intent intent) {\n offerwallIntent = intent;\n Log.d(TAG, \"OW: Offers are available\");\n Toast.makeText(MainActivity.this, \"OW: Offers are available\", Toast.LENGTH_SHORT).show();\n showOW.setEnabled(true);\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(WeatherByGPS.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "public static void mapRestaurant(Context context,String locationName){\n Uri gmmIntentUri = Uri.parse(\"geo:0,0?q=\" + Uri.encode(locationName));\n //Uri gmmIntentUri = Uri.parse(\"geo:0,0?q=\"+\"40.782747,-73.984022(Eric)\");\n // Uri gmmIntentUri = Uri.parse(\"geo:0,0?q=-33.8666,151.1957(Google+Sydney)\");\n\n// Create an Intent from gmmIntentUri. Set the action to ACTION_VIEW\n Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);\n// Make the Intent explicit by setting the Google Maps package\n// Intent intent = mapIntent.setPackage(\"com.google.android.apps.maps\");\n//\n// if (intent==null){\n// if (AppConstant.DEBUG) Log.d(this.getClass().getSimpleName()+\">\",);\n// }\n// Attempt to start an activity that can handle the Intent\n // if (mapIntent.resolveActivity(getPackageManager()) != null) {\n\n PackageManager packageManager = context.getPackageManager();\n List activities = packageManager.queryIntentActivities(mapIntent,\n PackageManager.MATCH_DEFAULT_ONLY);\n boolean isIntentSafe = activities.size() > 0;\n if (AppConstant.DEBUG) Log.d(new Object() { }.getClass().getEnclosingClass()+\">\",\"Activities that can handle this:\"+activities.get(0).toString());\n if (AppConstant.DEBUG) Log.d(new Object() { }.getClass().getEnclosingClass()+\">\",\"Activities that can handle this:\"+activities.size());\n if (AppConstant.DEBUG) Log.d(new Object() { }.getClass().getEnclosingClass()+\">\",\"Can we handle this intent:\"+isIntentSafe);\n\n\n context.startActivity(mapIntent);\n // }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n Intent intent = getIntent();\n double lat = intent.getDoubleExtra(\"Lat\",10);\n double lon = intent.getDoubleExtra(\"Long\",10);\n\n Log.i(\"lat\", String.valueOf(lat));\n LatLng userLocation = new LatLng(lat ,lon);\n\n mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\n mMap.addMarker(new MarkerOptions().position(userLocation).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(userLocation));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(userLocation,15));\n\n LatLngBounds boundary = new LatLngBounds(new LatLng(lat, lon), new LatLng(lat , lon));\n builder1.setLatLngBounds(boundary);\n try {\n startActivityForResult(builder1.build(this),PLACE_PICKER_REQUEST);\n }catch (Exception e ){\n return ;\n }\n\n\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(SearchActivity.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n ActivityCompat.requestPermissions(MapsActivity.this,\n new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }", "private void startPlaceListActivity() {\n if (mLastLocation == null) {\n Toast.makeText(getContext(), getResources().getString(R.string.location_unavailable), Toast.LENGTH_SHORT).show();\n\n // after announcing user that their location is unknown, try getting their location again\n startLocationUpdate();\n\n } else {\n Intent intent = new Intent(getContext(), PlaceListActivity.class);\n intent.putExtra(PLACE_TYPE_KEY, mPlaceType);\n intent.putExtra(CURRENT_LOCATION_KEY, mLastLocation);\n startActivity(intent);\n }\n }", "private void requestLocationPermission() {\n if (ActivityCompat.shouldShowRequestPermissionRationale(this,\n Manifest.permission.ACCESS_FINE_LOCATION)) {\n\n new AlertDialog.Builder(this)\n .setTitle(\"Permission needed\")\n .setMessage(\"Location Permission is needed to show your current location on the map\")\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n ActivityCompat.requestPermissions(ScavengerHunt.this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 2);\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n Toast.makeText(ScavengerHunt.this, \"Location Permission is needed to update the map\", Toast.LENGTH_SHORT).show();\n }\n })\n .create()\n .show();\n\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 2);\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n mMap.setTrafficEnabled(true);\n mMap.getUiSettings().setZoomGesturesEnabled(true);\n mMap.getUiSettings().setZoomControlsEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n mMap.getUiSettings().setCompassEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n\n LocationManager manager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);\n Criteria mCriteria = new Criteria();\n String bestProvider = String.valueOf(manager.getBestProvider(mCriteria, true));\n\n Location mLocation = manager.getLastKnownLocation(bestProvider);\n\n checkLocationPermission();\n mMap.setMyLocationEnabled(true);\n\n final double currentLatitude = mLocation.getLatitude();\n final double currentLongitude = mLocation.getLongitude();\n LatLng loc1 = new LatLng(currentLatitude, currentLongitude);\n mMap.addMarker(new MarkerOptions().position(loc1).title(\"Your Current Location\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(currentLatitude, currentLongitude), 15));\n mMap.animateCamera(CameraUpdateFactory.zoomTo(15), 2000, null);\n\n Geocoder geocoder = new Geocoder(MapsActivity.this, Locale.getDefault());\n List<Address> addresses = null;\n try {\n addresses = geocoder.getFromLocation(currentLatitude, currentLongitude, 1);\n } catch (IOException e) {\n e.printStackTrace();\n }\n cityName = addresses.get(0).getAddressLine(0);\n\n GraphRequest request = GraphRequest.newGraphPathRequest(\n accessToken,\n \"/search\",\n new GraphRequest.Callback() {\n @Override\n public void onCompleted(GraphResponse response) {\n JSONObject eventsInCityObject = response.getJSONObject();\n RealmList<Event> cityEvents = new RealmList<Event>();\n\n\n try {\n JSONArray eventsInCityArray = eventsInCityObject.getJSONArray(\"data\");\n for (int i = 0; i < eventsInCityArray.length(); i++) {\n JSONObject eventJSON = eventsInCityArray.getJSONObject(i);\n JSONObject placeJSON = (JSONObject) eventJSON.get(\"place\");\n\n if (placeJSON.has(getString(R.string.getEventLocation))){\n JSONObject locJSON = (JSONObject) placeJSON.get(getString(R.string.getEventLocation));\n\n String city = locJSON.getString(getString(R.string.getEventCity));\n String country = locJSON.getString(getString(R.string.getEventCountry));\n Double lat = locJSON.getDouble(getString(R.string.getEventLat));\n Double lng = locJSON.getDouble(getString(R.string.getEventLng));\n\n EventLocation loc = getRealm().createObject(EventLocation.class, UUID.randomUUID().toString());\n loc.setCity(city);\n loc.setCountry(country);\n loc.setLat(lat);\n loc.setLng(lng);\n\n String placeName = placeJSON.getString(getString(R.string.getPlaceName));\n String placeID = placeJSON.getString(getString(R.string.getPlaceID));\n Place place = getRealm().createObject(Place.class, UUID.randomUUID().toString());\n place.setName(placeName);\n place.setId(placeID);\n place.setLoc(loc);\n\n Event event = getRealm().createObject(Event.class, UUID.randomUUID().toString());\n event.setDesc(eventJSON.getString(getString(R.string.getDescription)));\n event.setEndTime(eventJSON.getString(getString(R.string.getEndTime)));\n event.setName(eventJSON.getString(getString(R.string.getEventName)));\n event.setPlace(place);\n event.setStartTime(eventJSON.getString(getString(R.string.getStartTime)));\n event.setEventID(eventJSON.getString(getString(R.string.getEventID)));\n\n cityEvents.add(event);\n\n mMap.addMarker(new MarkerOptions().position(new LatLng(event.getPlace().getLoc().getLat(),\n event.getPlace().getLoc().getLng())).title(event.getName()));\n } else {\n String placeName = placeJSON.getString(getString(R.string.getPlaceName));\n Place place = getRealm().createObject(Place.class, UUID.randomUUID().toString());\n place.setName(placeName);\n\n\n Event event = getRealm().createObject(Event.class, UUID.randomUUID().toString());\n event.setDesc(eventJSON.getString(getString(R.string.getDescription)));\n event.setEndTime(eventJSON.getString(getString(R.string.getEndTime)));\n event.setName(eventJSON.getString(getString(R.string.getEventName)));\n event.setPlace(place);\n event.setStartTime(eventJSON.getString(getString(R.string.getStartTime)));\n event.setEventID(eventJSON.getString(getString(R.string.getEventID)));\n }\n }\n } catch (JSONException e){\n e.printStackTrace();\n }\n }\n });\n\n Bundle parameters = new Bundle();\n parameters.putString(getString(R.string.query), cityName);\n parameters.putString(getString(R.string.type), getString(R.string.event));\n request.setParameters(parameters);\n request.executeAsync();\n\n\n }", "public void getLoco(double lat, double lon){\n cords.setText(lat + \" \"+lon);\n\n // String dress = getCompleteAddressString(lat,lon);\n\n // latt = lat;\n // longg = lon;\n\n //Toast.makeText(getContext(), add, Toast.LENGTH_SHORT).show();\n\n //LocationAddress locationAddress = new LocationAddress();\n //locationAddress.getAddressFromLocation(38.898748, -77.037684\n // , getContext(), new GeocoderHandler());\n\n //String add = getAddressString(lat,lon);\n //Toast.makeText(getContext(), add, Toast.LENGTH_LONG);\n //info.setText(add);\n\n check.setVisibility(View.VISIBLE);\n\n\n\n\n\n\n\n }", "@Override\n public void onSuccess(Location location) {\n if (location != null) {\n currentLocation = new float[]{(float)location.getLatitude(),(float)location.getLongitude()};\n\n Task<String> timeTask = getExtraTime(p.latOfPerson,p.lonOfPerson);\n if(timeTask!=null){\n timeTask.addOnCompleteListener(new OnCompleteListener<String>() {\n @Override\n public void onComplete(@NonNull Task<String> task) {\n if(task.isSuccessful()){\n String[] s = task.getResult().split(\",\");\n extraTime.setText(\"\"+((-Integer.parseInt(s[1])+Integer.parseInt(s[0])+Integer.parseInt(s[3]))/60)+\" Minutes Extra\");\n }\n }\n });\n }\n }\n }", "private void showPlaceAutoComplete(int typeLocation) {\n REQUEST_CODE = typeLocation;\n\n // Filter hanya tmpat yg ada di Indonesia\n AutocompleteFilter typeFilter = new AutocompleteFilter.Builder().setCountry(\"ID\").build();\n try {\n // Intent untuk mengirim Implisit Intent\n Intent mIntent = new PlaceAutocomplete.IntentBuilder(PlaceAutocomplete.MODE_OVERLAY)\n .setFilter(typeFilter)\n .build(getActivity());\n // jalankan intent impilist\n startActivityForResult(mIntent, REQUEST_CODE);\n } catch (GooglePlayServicesRepairableException e) {\n e.printStackTrace(); // cetak error\n } catch (GooglePlayServicesNotAvailableException e) {\n e.printStackTrace(); // cetak error\n // Display Toast\n Toast.makeText(getContext(), \"Layanan Play Services Tidak Tersedia\", Toast.LENGTH_SHORT).show();\n }\n\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n Log.d(\"broadcast: longitude\", String.valueOf(intent.getExtras().get(\"longitude\")));\n Log.d(\"broadcast: latitude\", String.valueOf(intent.getExtras().get(\"latitude\")));\n\n longitude = (double) intent.getExtras().get(\"longitude\");\n latitude = (double) intent.getExtras().get(\"latitude\");\n\n Toast.makeText(EmergencyActivity.this, \"BC longitude : \" + String.valueOf(longitude) + \"latitude : \" + String.valueOf(latitude), Toast.LENGTH_SHORT).show();\n\n if (isEmergency) {\n isEmergency = false;\n try {\n sendEmergency(user_email);\n } catch (IOException e) {\n e.printStackTrace();\n }\n Intent i = new Intent(EmergencyActivity.this, GPS_Service.class);\n stopService(i);\n }\n }", "public void passAddress( ){\n\n Intent intent = new Intent(MapsActivity.this,ShoppingActivity.class);\n String address2=address;\n double latitude = mLastKnownLocation.getLatitude();\n double longitude = mLastKnownLocation.getLongitude();\n\n intent.putExtra(\"Address\", address2);\n intent.putExtra(\"Latitude\", latitude);\n intent.putExtra(\"Longitude\", longitude);\n startActivity(intent);\n }", "public void saveFenceInSqliteDB(String name, String address, String city, String province, Double lat, Double lng, String range, String number, String textSMS, int event) {\n boolean active = true; // default whan you add a geofence is active\n boolean match = false; // default whan you add a geofence is not in fence\n\n int id = Controller.insertFenceOnSQLiteDB(name, address, city, province, lat + \"\", lng + \"\", range, 1, number, textSMS, event);\n Fence f = new Fence(id, name, address, city, province, lat, lng, Float.parseFloat(range), active, match, number, textSMS, event);\n Controller.fences.add(f);\n Toast.makeText(this.getContext(), \"Added the fence: \" + f.getName() + \"!\", Toast.LENGTH_LONG).show();\n }", "private void askPermissionsAndShowMyLocation() {\n boolean isGPSEnabled = false;\n // flag for network status\n boolean isNetworkEnabled = false;\n // flag for GPS status\n boolean canGetLocation = false;\n LocationManager locationManager;\n\n locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);\n\n // getting GPS status\n isGPSEnabled = locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER);\n\n // getting network status\n isNetworkEnabled = locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER);\n if (Build.VERSION.SDK_INT >= 23) {\n // flag for GPS status\n if (!isGPSEnabled && !isNetworkEnabled) {\n// no network provider is enabled\n final Intent data = new Intent();\n data.putExtra(\"latitude\", latitude);\n data.putExtra(\"longitude\", longitude);\n\n setResult(Activity.RESULT_CANCELED, data);\n finish();\n } else {\n// if (accessCoarsePermission != PackageManager.PERMISSION_GRANTED\n// || accessFinePermission != PackageManager.PERMISSION_GRANTED)\n\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &&\n ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // The Permissions to ask user.\n String[] permissions = new String[]{Manifest.permission.ACCESS_COARSE_LOCATION,\n Manifest.permission.ACCESS_FINE_LOCATION};\n // Show a dialog asking the user to allow the above permissions.\n ActivityCompat.requestPermissions(this, permissions,\n REQUEST_ID_ACCESS_COURSE_FINE_LOCATION);\n\n return;\n }\n this.showMyLocation();\n }\n\n } else {\n if (!isGPSEnabled && !isNetworkEnabled) {\n// no network provider is enabled\n final Intent data = new Intent();\n data.putExtra(\"latitude\", latitude);\n data.putExtra(\"longitude\", longitude);\n\n setResult(Activity.RESULT_CANCELED, data);\n finish();\n } else {\n this.showMyLocation();\n }\n\n\n }\n // Show current location on Map.\n }", "protected void startLocationUpdates() {\n try {\n// LocationServices.FusedLocationApi.requestLocationUpdates(mGoogleApiClient, mLocationRequest, this);\n\n /* mLocationRequest = new LocationRequest();\n mLocationRequest.setInterval(6000); // two minute interval\n mLocationRequest.setFastestInterval(6000);//120000\n mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);*/\n /*if (ContextCompat.checkSelfPermission(this,\n android.Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mFusedLocationClient.requestLocationUpdates(mLocationRequest, mLocationCallback, Looper.myLooper());\n }*/\n if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n// LocationServices.FusedLocationApi.requestLocationUpdates(mGoogleApiClient, mLocationRequest, (LocationListener) this);\n LocationServices.getFusedLocationProviderClient(this).requestLocationUpdates(mLocationRequest, null);\n// requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, locationListener);\n// requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, locationListener);\n\n } catch (Exception e) {\n // TODO: handle exception\n e.printStackTrace();\n }\n }", "private void addGeofence(GeofencingRequest request) {\n Log.d(TAG, \"addGeofence\");\n if (checkPermission())\n LocationServices.GeofencingApi.addGeofences(\n googleApiClient,\n request,\n createGeofencePendingIntent()\n ).setResultCallback(this);\n }", "public void requestLocation() {\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED\n && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) !=\n PackageManager.PERMISSION_GRANTED) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n requestPermissions(new String[]{Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION,\n Manifest.permission.INTERNET}, 12);\n }\n return;\n }\n //this line updates location\n mMap.setMyLocationEnabled(true);\n providerClient.requestLocationUpdates(locationRequest, locationCallback, getMainLooper());\n }", "public void run()\n {\n if (location != null) {\n Constants.GEO_LATITUDE = String.valueOf(location.getLatitude());\n Constants.GEO_LONGITUDE = String.valueOf(location.getLongitude());\n setupServiceReceiver();\n mServiceIntent = new Intent(getActivity(), GettingRetailerListService.class);\n mServiceIntent.putExtra(\"gettingStatus\", true);\n mServiceIntent.putExtra(\"receiver\", mReceiverForRetailer);\n getActivity().startService(mServiceIntent);\n } else {\n// new Handler(Looper.getMainLooper()).post(new Runnable() {\n// @Override\n// public void run() {\n Toast.makeText(getActivity(), \"Geo service is not working\", Toast.LENGTH_SHORT).show();\n\n// }\n// });\n\n }\n }", "@Override\n public void onClick(View arg0) {\n gps = new GPSTracker(AddressBook_add.this);\n\n // check if GPS enabled\n if(gps.canGetLocation()){\n\n latitude = gps.getLatitude();\n longitude = gps.getLongitude();\n\n // \\n is for new line\n // Toast.makeText(getApplicationContext(), \"Your Location is - \\nLat: \" + latitude + \"\\nLong: \" + longitude, Toast.LENGTH_LONG).show();\n }else{\n // can't get location\n // GPS or Network is not enabled\n // Ask user to enable GPS/network in settings\n gps.showSettingsAlert();\n }\n\n latitude = gps.getLatitude();\n longitude = gps.getLongitude();\n \n \n \n\n\n List <Address> list = null;\n try {\n list = gc.getFromLocation(latitude,longitude,1);\n if(list!=null) {\n\n Address address = list.get(0);\n String locality = address.getLocality();\n String sublocality = address.getSubLocality();\n Log.d(\"locality\", locality+\" \"+sublocality);\n Intent i = new Intent(AddressBook_add.this, AddCompleteAddress.class);\n Bundle extras = new Bundle();\n extras.putString(LOCALITY, locality);\n extras.putString(SUBLOCALITY, sublocality);\n i.putExtras(extras);\n\n startActivity(i);\n }else{\n\n Toast.makeText(gps, \"Try Again.!!!\", Toast.LENGTH_SHORT).show();\n }\n\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n \n\n\n //Toast.makeText(getApplicationContext(),\"loca \" + locality + \"sublocal \" + sublocality , Toast.LENGTH_LONG).show();\n }", "public void startDrawing() {\n try {\n LocationRequest locationRequest = LocationRequest.create()\n .setInterval(10 * 1000)\n .setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n LocationServices.FusedLocationApi.requestLocationUpdates(mGoogleApiClient, locationRequest, this);\n isDrawing = true;\n } catch (SecurityException e) {\n Log.e(TAG, \"Failed to start location updates \" + e.getLocalizedMessage());\n }\n }", "@Override\n public void onAdAvailable(Intent intent) {\n interstitialIntent = intent;\n Log.d(TAG, \"IS: Offers are available\");\n Toast.makeText(MainActivity.this, \"IS: Offers are available\", Toast.LENGTH_SHORT).show();\n showOW.setEnabled(false);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n mMap.getUiSettings().setZoomControlsEnabled(true);\n googleMap.setPadding(0, 0, 0, 300);\n\n\n //if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION))\n\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n\n\n buildGoogleApiClient();\n\n mMap.setMyLocationEnabled(true);\n //mMap.getUiSettings().setZoomControlsEnabled(true);\n }\n\n mMap.setOnMapLongClickListener(new GoogleMap.OnMapLongClickListener() {\n @Override\n public void onMapLongClick(LatLng latLng) {\n\n if (marker != null) {\n marker.remove();\n }\n marker = mMap.addMarker(new MarkerOptions()\n .position(latLng)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE))\n .title(\"My Current Click\"));\n\n\n }\n });\n\n mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n @Override\n public boolean onMarkerClick(Marker marker) {\n\n mHeart.setVisibility(View.VISIBLE);\n manualEnter.setVisibility(View.VISIBLE);\n\n latitude = marker.getPosition().latitude;\n longitude = marker.getPosition().longitude;\n name = marker.getTitle();\n placeID = marker.getId();\n address = marker.getSnippet();\n\n time = DateFormat.getDateTimeInstance().format(new Date());\n //long miliTime = time.getTime\n\n\n\n //getMarkerInfo();\n\n //Toast.makeText(NearbyLocations.this, name, Toast.LENGTH_SHORT).show();\n return false;\n\n\n }\n });\n\n\n\n mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {\n\n @Override\n public View getInfoWindow(Marker arg0) {\n return null;\n }\n\n @Override\n public View getInfoContents(Marker marker) {\n\n LinearLayout info = new LinearLayout(NearbyLocations.this);\n info.setOrientation(LinearLayout.VERTICAL);\n\n TextView title = new TextView(NearbyLocations.this);\n title.setTextColor(Color.BLACK);\n title.setGravity(Gravity.CENTER);\n title.setTypeface(null, Typeface.BOLD);\n title.setText(marker.getTitle());\n\n TextView snippet = new TextView(NearbyLocations.this);\n snippet.setTextColor(Color.GRAY);\n snippet.setText(marker.getSnippet());\n\n info.addView(title);\n info.addView(snippet);\n\n return info;\n }\n });\n\n\n\n\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED){\n mMap.setMyLocationEnabled(true);\n }\n LatLng latLng = new LatLng(currentLocation.getLatitude(),currentLocation.getLongitude());\n MarkerOptions markerOptions = new MarkerOptions().position(latLng).title(\"You are Here\")\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.pin1));\n googleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng,16));\n if (CurrentMark!=null)\n CurrentMark.remove();\n CurrentMark=googleMap.addMarker(markerOptions);\n intial();\n\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n \tmRestAdapter = new RestAdapter.Builder().setEndpoint(\n \t\t\t\"http://crimedb.watchovermeapp.com:8080/crimereport/rs/data\")\n \t\t\t.build();\n \tLocation location = (Location) intent.getExtras().get(LocationClient.KEY_LOCATION_CHANGED);\n\t\tdouble latitude = location.getLatitude();\n\t\tdouble longitude = location.getLongitude();\n\n\t\tSharedPreferences sharedPref = context.getApplicationContext().getSharedPreferences(\"currentLocation\", Context.MODE_PRIVATE);\n\t\tlastNotifiedLocation = new LatLng(sharedPref.getFloat(\"latitute\", 0), sharedPref.getFloat(\"longitude\", 0));\n\t\t\n\t\tLatLng currentPosition = new LatLng(latitude, longitude);\n\t\tdouble distance = HaversineDistance.calculateDistance(lastNotifiedLocation, currentPosition);\n\t\tif( distance > 500){\n\t\t\tSharedPreferences.Editor editor = sharedPref.edit();\n\t\t\teditor.putFloat(\"latitute\", (float)latitude);\n\t\t\teditor.putFloat(\"longitude\", (float)longitude);\n\t\t\teditor.commit();\n\t \tconsumeSafetyRatingAPI(context, latitude, longitude);\n\t Log.d(\"Raymond\", \"More than 500\" + String.valueOf(location.getLatitude()).concat(\", \").concat(String.valueOf(location.getLongitude())));\n\t\t}\n }", "void requestPermissionAndPopulateDistance(){\n //Check and acquire COARSE location permissions, to calculate distance, if not already granted\n if(ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED){\n if(ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.ACCESS_COARSE_LOCATION)){\n // show rationale\n }else{\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_COARSE_LOCATION}, PERMISSION_CONS);\n }\n }else{\n //If the permission is already acquired, calculate the distance and update the view\n calculateAndPopulateDistance();\n }\n }", "protected void startBroadcastLocation() {\n AlarmManager manager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n int interval = 5000;\n\n manager.setInexactRepeating(AlarmManager.RTC_WAKEUP, System.currentTimeMillis(), interval, pendingIntent);\n Toast.makeText(this, \"Alarm Set\", Toast.LENGTH_SHORT).show();\n }", "@Override\n\t\t\tpublic void onInfoWindowClick(Marker arg0) {\n\t\t\t\tString id = arg0.getTitle();\n\t\t\t\t\n\t\t\t\tif(id.startsWith(\"Dis\") || id.startsWith(\"my\")){\n\t\t\t\t\tif(id.startsWith(\"Dis\")){\n\t\t\t\t\t\t AlertDialog dialog = new AlertDialog.Builder(MainActivity.this).setTitle(\"Warning\")\n\t\t\t\t\t .setMessage(\"Please select a right victim!!!\")\n\t\t\t\t\t .setNegativeButton(\"OK\", new DialogInterface.OnClickListener() {\n\t\t\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t\t\t \t // finish();\n\t\t\t\t }\n\t\t\t\t }).create();\n\t\t\t\t\t dialog.show();\n\t\t\t\t\t\t}\n\t\t\t\t\tif(id.startsWith(\"my\")){\n\t\t\t\t\t\tmyLocation = arg0.getPosition();\n\t\t\t\t AlertDialog dialog = new AlertDialog.Builder(MainActivity.this)\n\t\t\t\t .setMessage(\"Do you what to update your current location?\")\n\t\t\t\t .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n\t\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t\t \t setFlag = false;\n\t\t\t }\n\t\t\t })\n\t\t\t .setNegativeButton(\"Not now\", new DialogInterface.OnClickListener() {\n\t\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t\t \t \n\t\t\t }\n\t\t\t }).create();\n\t\t\t\t dialog.show();\n\t\t\t\t\t\t}\t\n\t\t\t\t}else{\n\t\t\t\t\tvicLocation = arg0.getPosition();\n\t\t\t\t\tfinal String PoVictim = readOneVictim(id);\n\t\t\t\t\tLog.d(\"victim infomtion:\",PoVictim);\n\t\t\t AlertDialog dialog = new AlertDialog.Builder(MainActivity.this)\n\t\t\t .setMessage(\"What do you want to do with this victim?\")\n\t\t\t .setNegativeButton(\"Edit/Delect Victim\", new DialogInterface.OnClickListener() {\n\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t \t EditVictim(PoVictim);\n\t\t }\n\t\t })\n\t\t .setPositiveButton(\"Find THIS Victim\", new DialogInterface.OnClickListener() {\n\t\t public void onClick(DialogInterface dialog, int id) {\n\t\t \t //String[] PoVIF = PoVictim.split(\",\");\n\t\t \t vicFlag = true;\n\t\t \t //LatLng vic = new LatLng(42.39398619218224,-72.52872716635466);\n\t\t \t if(vicLocation != null && myLocation != null){\n\t\t \t\t if(wayList != null){\n\t\t \t\t\t wayList.clear();\n\t\t \t\t }\n\t\t \t\t \n\t\t \t\t if(indoorFlag){ //when isindoor return true\n\t\t \t\t\t wayList = findOneVictim(myLocation, vicLocation);\n\t\t \t\t\t if(wayList != null){\n\t\t \t\t\t\t getPath();\n\t\t \t\t\t\t}\n\t\t \t\t }else{\n\t\t \t\t\t LatLng door = getNearestDoor(vicLocation);\n\t\t \t\t\t //get the first part outdoor path \n\t\t \t\t\t findDirections(myLocation.latitude,myLocation.longitude,door.latitude,door.longitude,GMapV2Direction.MODE_DRIVING );\n\t\t \t\t\t //wayList.addAll(findOneVictim(door, vicLocation));\n\t\t \t\t } \n\t\t \t }\n\t\t }\n\t\t }).create();\n\t\t\t dialog.show();\n\t\t\t\t}\t\n\t\t\t}", "private UserLocation getLocation() {\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n\n if (ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.ACCESS_FINE_LOCATION)) {\n Toast.makeText(this, \"The Location Permission is needed to show the weather \", Toast.LENGTH_SHORT).show();\n } else {\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n REQUEST_LOCATION_CODE_PERMISSION);\n }\n }\n\n } else {\n Log.d(TAG, \"getLocation: Permission Granted\");\n mFusedLocationClient.getLastLocation().addOnSuccessListener(new OnSuccessListener<Location>() {\n @Override\n public void onSuccess(Location location) {\n if (location != null) {\n msLocation = location;\n userLocation.setLat(location.getLatitude());\n userLocation.setLon(location.getLongitude());\n\n mLocationText.setText(getString(R.string.location_text\n , msLocation.getLatitude()\n , msLocation.getLongitude()\n , msLocation.getTime()));\n RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);\n params.addRule(RelativeLayout.CENTER_HORIZONTAL);\n mLocationText.setGravity(Gravity.CENTER_HORIZONTAL);\n mLocationText.setLayoutParams(params);\n mLocationText.setTextSize(24);\n\n } else {\n mLocationText.setText(R.string.no_location);\n }\n }\n });\n\n }\n return userLocation;\n }", "@Override\n public void onLocationResult(LocationResult locationResult) {\n if (locationResult == null) {\n Log.w(LOG_TAG, \"LocationCallback(): locationResult == null\");\n return;\n }\n\n Location lastLocation = locationResult.getLastLocation();\n\n double latitude = lastLocation.getLatitude();\n double longitude = lastLocation.getLongitude();\n double accuracy = lastLocation.getAccuracy();\n\n userLocation = new LatLng(latitude, longitude);\n Long currentTimestamp = System.currentTimeMillis();\n\n String gpsData = \"\\nlat:\" + latitude + \"\\nlong:\" + longitude + \"\\naccuracy: \" + accuracy + \"m\\ntimestamp: \" + currentTimestamp;\n Log.d(LOG_TAG, \"onLocationResult() called: \" + gpsData);\n\n if (!checkInsideZone()) { // Check current status, but don't update outsideZone yet!\n if (!outsideZone) {\n // Transition to outside zone state (countdown to automatic termination of shift) if not already outside\n leftZoneTimestamp = System.currentTimeMillis();\n outsideZone = true;\n Log.e(LOG_TAG, \"User has left the designated zone area.\");\n\n // Alert user visually and with vibration\n Snackbar snackbar = Snackbar.make(findViewById(android.R.id.content), \"Warning! You have left the zone. Return within 2 minutes.\", Snackbar.LENGTH_LONG);\n snackbar.show();\n\n // Something like this: - du - Du!\n long[] timings = new long[]{0, 200, 200, 200}; // ms\n int[] amplitudes = new int[] {0, 128, 0, 200}; // 0-255\n vibrator.vibrate(VibrationEffect.createWaveform(timings,amplitudes, -1));\n }\n\n if (currentTimestamp - leftZoneTimestamp > leftZoneMaximum) {\n Log.e(LOG_TAG, \"User has been outside of the designated zone area for too long. Terminating shift.\");\n Toast.makeText(getApplicationContext(), \"You left the zone for more than 2 minutes - session terminated.\", Toast.LENGTH_LONG).show();\n endShift();\n }\n } else if (outsideZone) { // Outside -> inside: i.e. user has re-entered zone, transition to safe state\n outsideZone = false;\n Log.e(LOG_TAG, \"User has re-entered the designated zone area.\");\n }\n\n // Log path of user\n sessionLogList.add(new SessionLog(currentTimestamp, userLocation, !outsideZone));\n }", "private void m14044a(C3372e c3372e, BDLocation bDLocation, SQLiteDatabase sQLiteDatabase) {\n if (bDLocation != null && bDLocation.getLocType() == 161) {\n if ((\"wf\".equals(bDLocation.getNetworkLocationType()) || bDLocation.getRadius() < 300.0f) && c3372e.f18275a != null) {\n int currentTimeMillis = (int) (System.currentTimeMillis() >> 28);\n System.currentTimeMillis();\n int i = 0;\n for (ScanResult scanResult : c3372e.f18275a) {\n if (scanResult.level != 0) {\n int i2 = i + 1;\n if (i2 <= 6) {\n ContentValues contentValues = new ContentValues();\n String encode2 = Jni.encode2(scanResult.BSSID.replace(Config.TRACE_TODAY_VISIT_SPLIT, \"\"));\n try {\n int i3;\n int i4;\n double d;\n Object obj;\n double d2;\n Cursor rawQuery = sQLiteDatabase.rawQuery(\"select * from wof where id = \\\"\" + encode2 + \"\\\";\", null);\n if (rawQuery == null || !rawQuery.moveToFirst()) {\n i3 = 0;\n i4 = 0;\n d = 0.0d;\n obj = null;\n d2 = 0.0d;\n } else {\n double d3 = rawQuery.getDouble(1) - 113.2349d;\n double d4 = rawQuery.getDouble(2) - 432.1238d;\n int i5 = rawQuery.getInt(4);\n i3 = rawQuery.getInt(5);\n i4 = i5;\n d = d3;\n double d5 = d4;\n obj = 1;\n d2 = d5;\n }\n if (rawQuery != null) {\n rawQuery.close();\n }\n if (obj == null) {\n contentValues.put(\"mktime\", Double.valueOf(bDLocation.getLongitude() + 113.2349d));\n contentValues.put(BaiduNaviParams.KEY_TIME, Double.valueOf(bDLocation.getLatitude() + 432.1238d));\n contentValues.put(\"bc\", Integer.valueOf(1));\n contentValues.put(\"cc\", Integer.valueOf(1));\n contentValues.put(\"ac\", Integer.valueOf(currentTimeMillis));\n contentValues.put(\"id\", encode2);\n sQLiteDatabase.insert(\"wof\", null, contentValues);\n } else if (i3 == 0) {\n i = i2;\n } else {\n float[] fArr = new float[1];\n Location.distanceBetween(d2, d, bDLocation.getLatitude(), bDLocation.getLongitude(), fArr);\n if (fArr[0] > 1500.0f) {\n int i6 = i3 + 1;\n if (i6 <= 10 || i6 <= i4 * 3) {\n contentValues.put(\"cc\", Integer.valueOf(i6));\n } else {\n contentValues.put(\"mktime\", Double.valueOf(bDLocation.getLongitude() + 113.2349d));\n contentValues.put(BaiduNaviParams.KEY_TIME, Double.valueOf(bDLocation.getLatitude() + 432.1238d));\n contentValues.put(\"bc\", Integer.valueOf(1));\n contentValues.put(\"cc\", Integer.valueOf(1));\n contentValues.put(\"ac\", Integer.valueOf(currentTimeMillis));\n }\n } else {\n d2 = ((d2 * ((double) i4)) + bDLocation.getLatitude()) / ((double) (i4 + 1));\n ContentValues contentValues2 = contentValues;\n contentValues2.put(\"mktime\", Double.valueOf((((d * ((double) i4)) + bDLocation.getLongitude()) / ((double) (i4 + 1))) + 113.2349d));\n contentValues.put(BaiduNaviParams.KEY_TIME, Double.valueOf(d2 + 432.1238d));\n contentValues.put(\"bc\", Integer.valueOf(i4 + 1));\n contentValues.put(\"ac\", Integer.valueOf(currentTimeMillis));\n }\n try {\n if (sQLiteDatabase.update(\"wof\", contentValues, \"id = \\\"\" + encode2 + \"\\\"\", null) <= 0) {\n }\n } catch (Exception e) {\n }\n }\n } catch (Exception e2) {\n }\n i = i2;\n } else {\n return;\n }\n }\n }\n }\n }\n }" ]
[ "0.5955083", "0.5721751", "0.5687462", "0.56720924", "0.56599134", "0.5637939", "0.55719656", "0.5566247", "0.5519831", "0.55021983", "0.54709715", "0.54619783", "0.54146355", "0.53954095", "0.5394107", "0.53831226", "0.53811496", "0.53806514", "0.5368724", "0.53635806", "0.5360938", "0.5348908", "0.53427076", "0.53405046", "0.53339493", "0.53335816", "0.53318787", "0.531843", "0.5318297", "0.5318297", "0.5316022", "0.5313955", "0.5296974", "0.5296169", "0.5293121", "0.5273585", "0.52721", "0.5270692", "0.5267646", "0.5262838", "0.5254104", "0.524448", "0.52438164", "0.5242791", "0.5235543", "0.5233504", "0.5220895", "0.5211884", "0.5205628", "0.52055043", "0.51992303", "0.51979154", "0.5193769", "0.5192862", "0.51927745", "0.518355", "0.51786125", "0.5175397", "0.5172574", "0.51627004", "0.5161467", "0.5160314", "0.51579654", "0.5153459", "0.51464134", "0.51419073", "0.51399064", "0.51275975", "0.51218396", "0.5120972", "0.511739", "0.5116697", "0.511455", "0.51135683", "0.5113185", "0.5111184", "0.5110132", "0.5106087", "0.509779", "0.50951207", "0.50867385", "0.507774", "0.5077652", "0.5074622", "0.50721735", "0.50704837", "0.5065747", "0.5064463", "0.50637853", "0.5058573", "0.505809", "0.505141", "0.50502807", "0.50382864", "0.5036755", "0.50353545", "0.5030189", "0.5027828", "0.50259274", "0.5016643", "0.5015226" ]
0.0
-1
/ We cannot realistically handle negation as that would require translating most if not all query logic into collectRequiredTables. Specifically CQConcept/Filters. Additionally, it would require collectRequiredEntities to be perfect, instead of being good enough, since excluding entities that _might_ not be included would exclude them from evaluation.
@Override public RequiredEntities collectRequiredEntities(QueryExecutionContext context) { return new RequiredEntities(context.getBucketManager().getEntities().keySet()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void preconditions(Object entity) throws Exception {\n }", "@Test\n\tpublic void testExcludeEligible() throws InterruptedException, ExecutionException,\n\t\t\tIOException, TimeoutException {\n\t\ttestExcludeEligible(null, null, null, Arrays.asList(1, 2));\n\t\ttestExcludeEligible(Boolean.TRUE, null, null, Arrays.asList(2));\n\t\ttestExcludeEligible(Boolean.FALSE, null, null, Arrays.asList(1, 2));\n\n\t\ttestExcludeEligible(null, Collections.<Integer>emptyList(), null,\n\t\t\t\tArrays.asList(1, 2));\n\t\ttestExcludeEligible(null, Arrays.asList(1), null, Arrays.asList(2));\n\t\ttestExcludeEligible(null, Arrays.asList(2), null, Arrays.asList(1));\n\t\ttestExcludeEligible(null, Arrays.asList(1, 2), null,\n\t\t\t\tCollections.<Integer>emptyList());\n\n\t\ttestExcludeEligible(null, Collections.<Integer>emptyList(),\n\t\t\t\tCollections.<Integer>emptyList(), Collections.<Integer>emptyList());\n\t\ttestExcludeEligible(null, Collections.<Integer>emptyList(), Arrays.asList(1),\n\t\t\t\tArrays.asList(1));\n\t\ttestExcludeEligible(null, Collections.<Integer>emptyList(), Arrays.asList(2),\n\t\t\t\tArrays.asList(2));\n\t\ttestExcludeEligible(null, Collections.<Integer>emptyList(), Arrays.asList(1, 2),\n\t\t\t\tArrays.asList(1, 2));\n\n\t\ttestExcludeEligible(null, Arrays.asList(1), Collections.<Integer>emptyList(),\n\t\t\t\tCollections.<Integer>emptyList());\n\t\ttestExcludeEligible(null, Arrays.asList(1), Arrays.asList(1),\n\t\t\t\tCollections.<Integer>emptyList());\n\t\ttestExcludeEligible(null, Arrays.asList(1), Arrays.asList(2), Arrays.asList(2));\n\t\ttestExcludeEligible(null, Arrays.asList(1), Arrays.asList(1, 2),\n\t\t\t\tArrays.asList(2));\n\n\t\ttestExcludeEligible(null, Arrays.asList(2), Collections.<Integer>emptyList(),\n\t\t\t\tCollections.<Integer>emptyList());\n\t\ttestExcludeEligible(null, Arrays.asList(2), Arrays.asList(1), Arrays.asList(1));\n\t\ttestExcludeEligible(null, Arrays.asList(2), Arrays.asList(2),\n\t\t\t\tCollections.<Integer>emptyList());\n\t\ttestExcludeEligible(null, Arrays.asList(2), Arrays.asList(1, 2),\n\t\t\t\tArrays.asList(1));\n\n\t\ttestExcludeEligible(null, Arrays.asList(1, 2), Collections.<Integer>emptyList(),\n\t\t\t\tCollections.<Integer>emptyList());\n\t\ttestExcludeEligible(null, Arrays.asList(1, 2), Arrays.asList(1),\n\t\t\t\tCollections.<Integer>emptyList());\n\t\ttestExcludeEligible(null, Arrays.asList(1, 2), Arrays.asList(2),\n\t\t\t\tCollections.<Integer>emptyList());\n\t\ttestExcludeEligible(null, Arrays.asList(1, 2), Arrays.asList(1, 2),\n\t\t\t\tCollections.<Integer>emptyList());\n\t}", "@Test\n\tpublic void basic_courses_without_students(){\n\t\t\n\t\tCriteriaBuilder criteriaBuilder = em.getCriteriaBuilder();\n\t\tCriteriaQuery<Course> criteriaQuery = criteriaBuilder.createQuery(Course.class);\n\t\t\n\t\t//2. Define root tables which are involved into query\n\t\tRoot<Course> courseRoot = criteriaQuery.from(Course.class);\t\t\n\n\t\t//3. Define predicate using criteria builder\n\t\tPredicate isEmptyStudentPredicate = criteriaBuilder.isEmpty(courseRoot.get(\"students\"));\n\t\t\n\t\t//4. Add predictes to the criteria query\n\t\tcriteriaQuery.where(isEmptyStudentPredicate);\n\t\t\n\t\t//5. Defined Typed Query\n\t\tTypedQuery<Course> query = em.createQuery(criteriaQuery.select(courseRoot));\n\t\t\n\t\tList<Course> resultList = query.getResultList();\n\t\t\n\t\tlogger.info(\"isEMPTY STUDENT COURSES ==> {}\", resultList);\n\t\t\t\n\t\t\n\t}", "@Override\n public boolean predicate2(Object dm, Designer dsgr) {\n if (!(Model.getFacade().isAClassifier(dm))) {\n return NO_PROBLEM;\n }\n if (!(Model.getFacade().isPrimaryObject(dm))) {\n return NO_PROBLEM;\n }\n\n // If the classifier does not have a name,\n // then no problem - the model is not finished anyhow.\n if ((Model.getFacade().getName(dm) == null)\n\t || (\"\".equals(Model.getFacade().getName(dm)))) {\n return NO_PROBLEM;\n\t}\n\n // Abstract elements do not necessarily require associations\n if (Model.getFacade().isAGeneralizableElement(dm)\n\t && Model.getFacade().isAbstract(dm)) {\n return NO_PROBLEM;\n }\n\n // Types can probably have associations, but we should not nag at them\n // not having any.\n // utility is a namespace collection - also not strictly required\n // to have associations.\n if (Model.getFacade().isType(dm)) {\n return NO_PROBLEM;\n }\n if (Model.getFacade().isUtility(dm)) {\n return NO_PROBLEM;\n }\n\n // See issue 1129: If the classifier has dependencies,\n // then mostly there is no problem. \n if (Model.getFacade().getClientDependencies(dm).size() > 0) {\n return NO_PROBLEM;\n }\n if (Model.getFacade().getSupplierDependencies(dm).size() > 0) {\n return NO_PROBLEM;\n }\n \n // special cases for use cases\n // Extending use cases and use case that are being included are\n // not required to have associations.\n if (Model.getFacade().isAUseCase(dm)) {\n Object usecase = dm;\n Collection includes = Model.getFacade().getIncludes(usecase);\n if (includes != null && includes.size() >= 1) {\n return NO_PROBLEM;\n }\n Collection extend = Model.getFacade().getExtends(usecase);\n if (extend != null && extend.size() >= 1) {\n return NO_PROBLEM;\n }\n }\n \n \n\n //TODO: different critic or special message for classes\n //that inherit all ops but define none of their own.\n\n if (findAssociation(dm, 0)) {\n return NO_PROBLEM;\n }\n return PROBLEM_FOUND;\n }", "@Test\n public void testSqlExistsNoForeignRestriction() {\n Query<Car> carsQuery = and(\n in(Car.FEATURES, \"sunroof\", \"convertible\"),\n existsIn(garages,\n Car.NAME,\n Garage.BRANDS_SERVICED\n )\n );\n\n Set<Car> results = asSet(cars.retrieve(carsQuery));\n\n assertEquals(\"should have 3 results\", 3, results.size());\n assertTrue(\"results should contain car1\", results.contains(car1));\n assertTrue(\"results should contain car4\", results.contains(car4));\n assertTrue(\"results should contain car5\", results.contains(car5));\n }", "@Override\r\n public Page<T> filter(U filter)\r\n {\r\n Class<T> T = returnedClass();\r\n CriteriaBuilder cb = getEm().getCriteriaBuilder();\r\n CriteriaQuery<T> criteriaQuery = cb.createQuery(T);\r\n CriteriaQuery<Long> criteriaQueryCount = cb.createQuery(Long.class);\r\n Root<T> entity = criteriaQuery.from(T);\r\n criteriaQueryCount.select(cb.count(entity));\r\n criteriaQuery.select(entity);\r\n \r\n // collect all filters relevant for affected entity\r\n List<Object> filters = new ArrayList<Object>();\r\n getPreFilters(filters, T, filter);\r\n \r\n filters.add(filter);\r\n List<Hint> hints = new ArrayList<Hint>();\r\n \r\n if (!filters.isEmpty()) {\r\n List<Predicate> filterPredicates = new ArrayList<Predicate>();\r\n for (Object queryCriteria : filters) {\r\n \r\n List<Predicate> orPredicates = new ArrayList<Predicate>();\r\n List<Predicate> andPredicates = new ArrayList<Predicate>();\r\n FilterContextImpl<T> filterContext = new FilterContextImpl<T>(entity, criteriaQuery, getEm(), queryCriteria);\r\n hints.addAll(filterContext.getHints());\r\n \r\n List<Field> fields = AbstractFilteringRepository.getInheritedPrivateFields(queryCriteria.getClass());\r\n for (Field field : fields) {\r\n // I want to skip static fields and fields which are cared of in different(specific way)\r\n if (!Modifier.isStatic(field.getModifiers()) && !ignoredFields.contains(field.getName())) {\r\n if (!field.isAccessible()) {\r\n field.setAccessible(true);\r\n }\r\n \r\n /**\r\n * Determine field path\r\n */\r\n // anottaion specified path has always highest priority, so is processed in the first place processing\r\n FieldPath fieldPathAnnotation = field.getAnnotation(FieldPath.class);\r\n Field f;\r\n if (fieldPathAnnotation != null && StringUtils.isNotBlank(fieldPathAnnotation.value())) {\r\n f = FieldUtils.getField(T, StringUtils.substringBefore(fieldPathAnnotation.value(), FieldPath.FIELD_PATH_SEPARATOR), true);\r\n } else {\r\n f = FieldUtils.getField(T, StringUtils.substringBefore(field.getName(), StructuredPathFactory.FILTER_PATH_SEPARATOR), true);\r\n }\r\n \r\n // tries to find CustmoProcessor annotation or some annotation metaannotated by custom processor\r\n CustomProcessor processor = field.getAnnotation(CustomProcessor.class);\r\n if (processor == null) {\r\n processor = getMetaAnnotation(CustomProcessor.class, field);\r\n }\r\n \r\n ProcessorContext<T> processorContext = filterContext.getProcessorContext(andPredicates, orPredicates, field);\r\n Object filterFieldValue = getFilterFieldValue(field, queryCriteria);\r\n if (processor == null && f != null) {\r\n processTypes(filterFieldValue, processorContext);\r\n // If field is not pressent in Entity, it needs special care\r\n } else {\r\n Class<CustomFieldProcessor<T, ?>> processorClass = null;\r\n if (processor != null) {\r\n processorClass = (Class<CustomFieldProcessor<T, ?>>) processor.value();\r\n processCustomFields(filterFieldValue, processorContext, processorClass);\r\n } else {\r\n if (!processCustomTypes(filterFieldValue, processorContext)) {\r\n if (shouldCheck(processorContext.getField())) {\r\n LOG.info(\"Field \\'\" + processorContext.getField().getName() + \"\\' from \"\r\n + processorContext.getField().getDeclaringClass().getSimpleName()\r\n + \" wasn't handled. \");\r\n throw new UnsupportedOperationException(\"Custom filter fields not supported in \"\r\n + processorContext.getField().getDeclaringClass().getSimpleName()\r\n + \", required field: \" + processorContext.getField().getName());\r\n } else {\r\n LOG.info(\"Field \\'\" + processorContext.getField().getName() + \"\\' from \"\r\n + processorContext.getField().getDeclaringClass().getSimpleName()\r\n + \" marked with @Unchecked annotation wasn't handled. \");\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n if (!andPredicates.isEmpty() || !orPredicates.isEmpty()) {\r\n Predicate filterPredicate = null;\r\n if (!andPredicates.isEmpty()) {\r\n Predicate andPredicate = cb.and(andPredicates.toArray(new Predicate[1]));\r\n filterPredicate = andPredicate;\r\n }\r\n if (!orPredicates.isEmpty()) {\r\n Predicate orPredicate = cb.or(orPredicates.toArray(new Predicate[1]));\r\n if (filterPredicate != null) {\r\n filterPredicate = cb.and(filterPredicate, orPredicate);\r\n } else {\r\n filterPredicate = orPredicate;\r\n }\r\n }\r\n filterPredicates.add(filterPredicate);\r\n }\r\n }\r\n if (!filterPredicates.isEmpty()) {\r\n Predicate finalPredicate = cb.and(filterPredicates.toArray(new Predicate[1]));\r\n criteriaQuery.where(finalPredicate);\r\n criteriaQueryCount.where(finalPredicate);\r\n }\r\n }\r\n \r\n \r\n TypedQuery<T> query = getEm().createQuery(criteriaQuery);\r\n TypedQuery<Long> queryCount = getEm().createQuery(criteriaQueryCount);\r\n if (filter != null && filter.getPageSize() > 0) {\r\n query = query.setFirstResult(filter.getOffset());\r\n query = query.setMaxResults(filter.getPageSize());\r\n }\r\n // add hints\r\n if (!hints.isEmpty()) {\r\n for (Hint hint : hints) {\r\n query.setHint(hint.getName(), hint.getValue());\r\n queryCount.setHint(hint.getName(), hint.getValue());\r\n }\r\n }\r\n \r\n \r\n PageImpl<T> result = new PageImpl<T>(query.getResultList(), filter, queryCount.getSingleResult().intValue());\r\n return result;\r\n }", "boolean getContainEntities();", "default List<Source> representativeTypicalityQuery(Set<Source> resultSet, Set<String> domain){\n return representativeTypicalityQuery(5/*optimization: 5 most typical are enough*/, resultSet, domain);\n }", "private void addEntityFiltering(Map params, List excludeProps, Object exampleEntity, int page) {\n\n\t\tparams.put(IReportDAO.FILTER, exampleEntity);\n\t\tparams.put(IReportDAO.EXCLUDE_PROP, excludeProps);\n\t\tparams.put(IReportDAO.PAGE, page);\n\t}", "boolean not_query(DiagnosticChain diagnostics, Map<Object, Object> context);", "@Override\n public boolean preconditionsSatisfied() {\n return true;\n }", "public interface EntityBasedFilterGenerator extends RuleListComponent {\r\n\r\n /**\r\n * Generates restriction base on supplied entity instance.\r\n * \r\n * @param entityInstReader\r\n * entity instance reader\r\n * @param rule\r\n * the process rule to use (optional)\r\n * @throws UnifyException\r\n * if an error occurs\r\n */\r\n Restriction generate(ValueStoreReader entityInstReader, String rule) throws UnifyException;\r\n}", "Query getUsedComponentList(final ResourceResolver resourceResolver, List<String> conditions,boolean excludeChildrenPages);", "@Override\n public boolean isAlwaysInjectiveInTheAbsenceOfNonInjectiveFunctionalTerms() {\n return false;\n }", "@Test\n\tvoid findAllUnknowFilteredCompany() {\n\t\tfinal TableItem<UserOrgVo> tableItem = resource.findAll(\"any\", null, null, newUriInfoAsc(\"id\"));\n\t\tAssertions.assertEquals(0, tableItem.getRecordsTotal());\n\t\tAssertions.assertEquals(0, tableItem.getRecordsFiltered());\n\t}", "@Test(enabled = false)\n\tpublic void shouldOnlyHaveEligibleMediaModels() {\n\t\tList<BirdModel> list = dao.findAll();\n\n\t\tfor (BirdModel model: list) {\n\t\t\tfor (MediaModel soundModel: model.getSounds()) {\n\t\t\t\tassertTrue(soundModel.isEligible(), String.format(\"Sound model %s isn't eligible\", soundModel.getId()));\n\t\t\t}\n\n\t\t\tfor (MediaModel photoModel: model.getPhotos()) {\n\t\t\t\tassertTrue(photoModel.isEligible(), String.format(\"Photo model %s isn't eligible\", photoModel.getId()));\n\t\t\t}\n\t\t}\n\t}", "protected boolean[] getEntityEagerPropertyFetches() {\n \t\treturn null;\n \t}", "@Test\n public void testSqlExistsWithForeignRestriction() {\n Query<Car> carsQuery = and(\n in(Car.FEATURES, \"sunroof\", \"convertible\"),\n existsIn(garages,\n Car.NAME,\n Garage.BRANDS_SERVICED,\n equal(Garage.LOCATION, \"Dublin\")\n )\n );\n\n Set<Car> results = asSet(cars.retrieve(carsQuery));\n\n assertEquals(\"should have 2 results\", 2, results.size());\n assertTrue(\"results should contain car1\", results.contains(car1));\n assertTrue(\"results should contain car4\", results.contains(car4));\n }", "com.microsoft.schemas.crm._2011.contracts.ArrayOfRequiredResource getRequiredResources();", "private List<String> returnEmptyRequiredFields(List<String> requiredFields, Object givenObject){\n return requiredFields.stream()\n .filter(x -> {\n try {\n return StringUtils.isEmpty((String) givenObject.getClass().getDeclaredField(x).get(givenObject));\n } catch (Exception e) {\n //Not going to try and scmOrganization for exceptions; if there is an exception we probably have greater issues than an empty/null field\n getLog().debug(String.format(\"Unable to ascertain if %s is null/empty\",x));\n return true;\n }\n })\n .collect(Collectors.toList());\n }", "@Test\n public void testSqlExistsMultiValuedNoForeignRestriction() {\n Query<Garage> garagesQuery = not(\n existsIn(cars,\n Garage.BRANDS_SERVICED,\n Car.NAME\n )\n );\n\n Set<Garage> results = asSet(garages.retrieve(garagesQuery));\n\n assertEquals(\"should have 1 result\", 1, results.size());\n assertTrue(\"results should contain garage6\", results.contains(garage6));\n }", "@Then(\"no results appear in the search list\")\n public void no_results_appear_in_the_search_list() {\n assert true;\n }", "@Test\n public void collectionTaskInTheWorkScopeOfCommittedWPDisabled() throws Exception {\n\n // Given a work package with Collection Required boolean set to TRUE\n final TaskKey lWorkPackage = createWorkPackage();\n\n schedule( lWorkPackage, false );\n\n SchedStaskTable lStaskTable = InjectorContainer.get().getInstance( SchedStaskDao.class )\n .findByPrimaryKey( lWorkPackage );\n\n // Then Collection Required param of work package set to FALSE\n assertFalse( lStaskTable.isCollectionRequiredBool() );\n }", "@Query\n\tpublic UinEntity findUnusedUin();", "public void executeQBEAdvancedCriteria() {\n Session session = getSession();\n Transaction transaction = session.beginTransaction();\n\n // SELECT p.id, p.description, p.name, p.price, p.supplier_id, p.version, p.DTYPE, s.id, s.name\n // FROM Product p\n Criteria productCriteria = session.createCriteria(Product.class);\n\n // INNER JOIN Supplier s\n // ON p.supplier_id = s.id\n Criteria supplierCriteria = productCriteria.createCriteria(\"supplier\");\n\n // WHERE (s.name = 'SuperCorp')\n Supplier supplier = new Supplier();\n supplier.setName(\"SuperCorp\");\n\n supplierCriteria.add(Example.create(supplier));\n\n // AND (p.name LIKE 'M%')\n Product product = new Product();\n product.setName(\"M%\");\n\n Example productExample = Example.create(product);\n\n // TODO: Why must the price column be excluded?\n productExample.excludeProperty(\"price\");\n productExample.enableLike();\n\n productCriteria.add(productExample);\n\n displayProductsList(productCriteria.list());\n transaction.commit();\n }", "private void validateRequiredDocuments(Noc noc, Object mdmsData) {\n\t\tMap<String, List<String>> masterData = mdmsValidator.getAttributeValues(mdmsData);\n\n\t\tif (!noc.getWorkflow().getAction().equalsIgnoreCase(NOCConstants.ACTION_REJECT) && !noc.getWorkflow().getAction().equalsIgnoreCase(NOCConstants.ACTION_VOID)) {\n\t\t\tList<Document> documents = noc.getDocuments();\n\t\t\tString filterExp = \"$.[?(@.applicationType=='\" + noc.getApplicationType() + \"' && @.nocType=='\" + noc.getNocType() + \"')].docTypes\";\n\t\t\tList<Object> docTypeMappings = JsonPath.read(masterData.get(NOCConstants.NOC_DOC_TYPE_MAPPING), filterExp);\n\t\t\tif (CollectionUtils.isEmpty(docTypeMappings)) {\n\t\t\t\tthrow new CustomException(\"MDMS_DATA_ERROR\", \"Unable to fetch noc document mapping\");\n\t\t\t}\n\t\t\t// fetch all document types for noc type\n\t\t\tList<String> docTypes = JsonPath.read(docTypeMappings, \"$..documentType\");\n\n\t\t\t// filter mandatory document list\n\t\t\tfilterExp = \"$..[?(@.required==true)].documentType\";\n\t\t\tList<String> requiredDocTypes = JsonPath.read(docTypeMappings, filterExp);\n\n\t\t\tfilterExp = \"$.[?(@.active==true)].code\";\n\t\t\tList<String> validDocumentTypes = JsonPath.read(masterData.get(NOCConstants.DOCUMENT_TYPE), filterExp);\n\n\t\t\tif (!CollectionUtils.isEmpty(documents)) {\n\t\t\t\tdocuments.forEach(document -> {\n\t\t\t\t\tif (StringUtils.isEmpty(document.getFileStoreId())) {\n\t\t\t\t\t\tthrow new CustomException(\"NOC_FILE_EMPTY\", \"Filestore id is empty\");\n\t\t\t\t\t}\n\t\t\t\t\tif (!validDocumentTypes.contains(document.getDocumentType())) {\n\t\t\t\t\t\tthrow new CustomException(\"NOC_UNKNOWN_DOCUMENTTYPE\", document.getDocumentType() + \" is Unkown\");\n\t\t\t\t\t}\n\t\t\t\t\tif (requiredDocTypes.size() > 0 && documents.size() < requiredDocTypes.size()) {\n\t\t\t\t\t\tthrow new CustomException(\"NOC_MANDATORY_DOCUMENTYPE_MISSING\", requiredDocTypes.size() + \" Documents are requied \");\n\t\t\t\t\t} else if (requiredDocTypes.size() > 0) {\n\t\t\t\t\t\tList<String> addedDocTypes = new ArrayList<String>();\n\n\t\t\t\t\t\tdocuments.forEach(doc -> {\n\t\t\t\t\t\t\tString docType = doc.getDocumentType();\n\t\t\t\t\t\t\tint lastIndex = docType.lastIndexOf(\".\");\n\t\t\t\t\t\t\tString documentNs = \"\";\n\t\t\t\t\t\t\tif (lastIndex > 1) {\n\t\t\t\t\t\t\t\tdocumentNs = docType.substring(0, lastIndex);\n\t\t\t\t\t\t\t} else if (lastIndex == 1) {\n\t\t\t\t\t\t\t\tthrow new CustomException(\"NOC_INVALID_DOCUMENTTYPE\", document.getDocumentType() + \" is invalid\");\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tdocumentNs = docType;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taddedDocTypes.add(documentNs);\n\t\t\t\t\t\t});\n\t\t\t\t\t\trequiredDocTypes.forEach(docType -> {\n\t\t\t\t\t\t\tif (!addedDocTypes.contains(docType)) {\n\t\t\t\t\t\t\t\tthrow new CustomException(\"NOC_MANDATORY_DOCUMENTYPE_MISSING\", \"Document Type \" + docType + \" is missing\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\taddedDocTypes.forEach(documentType -> {\n\t\t\t\t\t\t\tif (!docTypes.contains(documentType)) {\n\t\t\t\t\t\t\t\tthrow new CustomException(\"NOC_INVALID_DOCUMENTTYPE\", \"Document Type \" + documentType + \" is invalid for \" + noc.getNocType() + \" application\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else if (requiredDocTypes.size() > 0) {\n\t\t\t\tthrow new CustomException(\"NOC_MANDATORY_DOCUMENTYPE_MISSING\", \"Atleast \" + requiredDocTypes.size() + \" Documents are required \");\n\t\t\t}\n\t\t}\n\t}", "public void addBusinessFilterToAdvancedtablecompositionRequiredProperty(ViewerFilter filter);", "IEmfPredicate<R> getPredicateMandatory();", "boolean canSupportEntity(Entity a);", "@Override\n protected boolean shouldFetch(@Nullable Long articleCount) {\n return articleCount == null || articleCount == 0;\n }", "public boolean validateRequirement_NoAssociations(Requirement requirement, DiagnosticChain diagnostics, Map<Object, Object> context) {\n\t\treturn requirement.NoAssociations(diagnostics, context);\n\t}", "@Test\n public void findProductExcludingRelationships() {\n Product product = productRepository.findProductExcludingRelationships(3l);\n Assert.assertTrue(null != product);\n Assert.assertTrue(null != product.getProductId());\n LOGGER.debug(\" *** RESULT *** {}\", product.toString());\n //String json = Util.toJson(product);\n // Assert.assertTrue(null != json);\n //LOGGER.debug(\" *** RESULT *** {}\", json);\n }", "private void defaultCommonTableFieldShouldNotBeFound(String filter) throws Exception {\n restCommonTableFieldMockMvc\n .perform(get(ENTITY_API_URL + \"?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n\n // Check, that the count call also returns 0\n restCommonTableFieldMockMvc\n .perform(get(ENTITY_API_URL + \"/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(content().string(\"0\"));\n }", "@Override\n\tpublic Object[] advSearchCondition() {\n\t\treturn null;\n\t}", "boolean hasEntity();", "boolean hasEntity();", "public Collection<Requirement> getGenericRequirements();", "@Test\n\tpublic void shouldNotReturnResultFilteredByDocumentType()\n\t{\n\t\tlogin(USER_MARK_RIVERS_RUSTIC_HW_COM);\n\n\t\tfinal SearchPageData<B2BDocumentModel> result = pagedB2BDocumentDao.getAllPagedDocuments(\n\t\t\t\tcreatePageableData(0, 10, StringUtils.EMPTY), Collections.singletonList(AccountSummaryAddonUtils\n\t\t\t\t\t\t.createTypeCriteriaObject(UNKNOWN, StringUtils.EMPTY, FILTER_BY_DOCUMENT_TYPE)));\n\n\t\tTestCase.assertEquals(0, result.getResults().size());\n\t}", "private List<Entity> getLoadableEntities() { \n ArrayList<Entity> choices = new ArrayList<Entity>();\n // If current entity is null, nothing to do\n if (ce() == null) {\n return choices;\n }\n List<Entity> entities = clientgui.getClient().getGame()\n .getEntitiesVector();\n for (Entity other : entities) { \n if (other.isSelectableThisTurn() && ce().canLoad(other, false)) {\n choices.add(other);\n }\n }\n return choices;\n }", "QueryElement addNotEmpty(String collectionProperty);", "@Test\n\tvoid findAllFilteredNonExistingGroup() {\n\t\tinitSpringSecurityContext(\"fdaugan\");\n\t\tfinal TableItem<UserOrgVo> tableItem = resource.findAll(null, \"any\", null, newUriInfoAsc(\"id\"));\n\t\tAssertions.assertEquals(0, tableItem.getRecordsTotal());\n\t}", "boolean hasSharedCriterion();", "public boolean validateRequirement_NoGeneralizations(Requirement requirement, DiagnosticChain diagnostics, Map<Object, Object> context) {\n\t\treturn requirement.NoGeneralizations(diagnostics, context);\n\t}", "void calculateValidationRequirement() {\n this.elementRequiringJSR303Validation = Util.hasValidation(this.type);\n\n // Check for JSR 303 or @OnValidate annotations in default group\n if (Util.requiresDefaultValidation(this.type)) {\n this.requiresDefaultValidation = true;\n return;\n }\n\n // Check for any simple index uniqueness constraints\n if (!this.uniqueConstraintFields.isEmpty()) {\n this.requiresDefaultValidation = true;\n return;\n }\n\n // Check for any composite index uniqueness constraints\n if (!this.uniqueConstraintCompositeIndexes.isEmpty()) {\n this.requiresDefaultValidation = true;\n return;\n }\n }", "public List<Artist> getArtistsWhichHaveNoReleases();", "private List<String> generateN3Required(VitroRequest vreq) {\n \tList<String> n3Required = list(\n \t getPrefixesString() + \"\\n\" +\n \t \"?subject ?predicate ?conceptNode .\\n\"\n \t);\n \tList<String> inversePredicate = getInversePredicate(vreq);\n\t\t//Adding inverse predicate if it exists\n\t\tif(inversePredicate.size() > 0) {\n\t\t\tn3Required.add(\"?conceptNode <\" + inversePredicate.get(0) + \"> ?subject .\");\n\t\t}\n \treturn n3Required;\n }", "public boolean isRequired()\n {\n if(_attrDef.isIndexed() && _isSingleIndexedCriterion())\n {\n return true;\n }\n \n return _attrDef.isMandatory();\n }", "@Test\n\tpublic void shouldNotReturnResultForServicesEastFilteredByDocumentType()\n\t{\n\t\tlogin(USER_MARK_RIVERS_RUSTIC_HW_COM);\n\n\t\tfinal SearchPageData<B2BDocumentModel> result = pagedB2BDocumentDao.getPagedDocumentsForUnit(\"Services East\",\n\t\t\t\tcreatePageableData(0, 10, StringUtils.EMPTY), Collections.singletonList(AccountSummaryAddonUtils\n\t\t\t\t\t\t.createTypeCriteriaObject(UNKNOWN, StringUtils.EMPTY, FILTER_BY_DOCUMENT_TYPE)));\n\n\t\tTestCase.assertEquals(0, result.getResults().size());\n\t}", "boolean isSetRequiredResources();", "public interface IngredientRepository extends JpaRepository<Ingredient, Long> {\n\n @Query(\"SELECT i FROM Ingredients i WHERE NOT EXISTS (SELECT ic FROM IngredientCategories ic JOIN ic.ingredients ings WHERE i IN ings)\")\n Collection<? extends Ingredient> findRootIngredients();\n}", "public Vector<HibernateEntity> getEntitiesAllowedAsParent() {\n\t\tVector<HibernateEntity> result = new Vector<HibernateEntity>();\n\t\tfor (HibernateEntity entity : getHibernateModel().getEntities()) {\n\t\t\tif (entity != this && entity.getFather() == null) {\n\t\t\t\tresult.add(entity);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}", "boolean isPreFiltered();", "@Test\n public void testFactsPreProcessorHasUnmatchedEnabledListEntry() {\n DroolsRulesServiceFactoryFromFile reader = buildDefaultReader();\n\n EngineConfigDTO engine = new EngineConfigDTO();\n List<String> enabledPreProcessors = new ArrayList<>();\n enabledPreProcessors.add(\"MISSING_PREPROCESSOR\");\n engine.setEnabledPreProcessors(enabledPreProcessors);\n\n List<IFactsPreProcessor> preProcessors = reader.configurePreProcessors(engine, new ArrayList<String>());\n assertEquals(0, preProcessors.size());\n }", "public static Set<Concept> getPositiveResultConcepts() {\r\n \tMdrtbService service = Context.getService(MdrtbService.class);\r\n \t\r\n \t// create a list of all concepts that represent positive results\r\n \tSet<Concept> positiveResults = new HashSet<Concept>();\r\n \tpositiveResults.add(service.getConcept(MdrtbConcepts.STRONGLY_POSITIVE));\r\n \tpositiveResults.add(service.getConcept(MdrtbConcepts.MODERATELY_POSITIVE));\r\n \tpositiveResults.add(service.getConcept(MdrtbConcepts.WEAKLY_POSITIVE));\r\n \tpositiveResults.add(service.getConcept(MdrtbConcepts.POSITIVE));\r\n \tpositiveResults.add(service.getConcept(MdrtbConcepts.SCANTY));\r\n \t\r\n \treturn positiveResults;\r\n }", "@Override\n\tprotected void cutOffLazyCollections(Direction entity) {\n\t}", "public default boolean shouldHideEntity(){ return false; }", "private Collection<ProductAmountTO> removeUnavailableProducts(\n\t\t\tCollection<ProductAmountTO> requiredProductAmounts,\n\t\t\tHashtable<Store, Collection<StockItem>> storeStockItems) {\n\t\t\n\t\tCollection<ProductAmountTO> foundProductAmounts = new ArrayList<ProductAmountTO>();\n\t\t\n\t\tIterator<ProductAmountTO> requiredProductAmountsIterator = requiredProductAmounts.iterator();\n\t\twhile(requiredProductAmountsIterator.hasNext()) {\n\t\t\tProductAmountTO currentProductAmountTO = requiredProductAmountsIterator.next();\n\t\t\t\n\t\t\tIterator<Collection<StockItem>> storeStockItemCollectionsIterator = storeStockItems.values().iterator();\n\t\t\twhile(storeStockItemCollectionsIterator.hasNext()) { //iterate over stock of stores\n\t\t\t\tCollection<StockItem> currentStockItemCollection = storeStockItemCollectionsIterator.next();\n\t\t\t\t\n\t\t\t\tStockItem stockItem =\n\t\t\t\t\tsearchForProductOffered(currentStockItemCollection, currentProductAmountTO);\n\t\t\t\tif (stockItem != null && currentStockItemCollection.contains(stockItem)) {\n\t\t\t\t\tfoundProductAmounts.add(currentProductAmountTO);\n\t\t\t\t} else {\n\t\t\t\t\t//TODO: remove debug:\n//\t\t\t\t\tSystem.out.println(\"KK: NOT found\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//no need to search for the same product at other stores: found --> available\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn foundProductAmounts;\n\t}", "Collection<T> doFilter(RepositoryFilterContext context);", "@Test\n void should_not_call_rule_executor_when_empty_recs_generated() {\n when(recStatusParams.getMultipleAlgorithmResult()).thenReturn(multipleAlgorithmResult);\n\n //products are empty\n when(multipleAlgorithmResult.getRecProducts()).thenReturn(products);\n\n ruleIds.add(\"1\");\n when(activeBundle.getPlacementFilteringRuleIds()).thenReturn(ruleIds);\n\n filteringRulesHandler.handleTask(recInputParams, recStatusParams, activeBundle);\n\n verify(merchandisingRuleExecutor, never()).getFilteredRecommendations(products, ruleIds, Collections.emptyMap(), recCycleStatus);\n verify(recStatusParams, never()).setFilteringRulesResult(filteringRulesResult);\n }", "private void checkEntityAnnotation(MGraph g, UriRef entityAnnotation) {\n Iterator<Triple> relationIterator = g.filter(\n entityAnnotation, DC_RELATION, null);\n Iterator<Triple> requiresIterator = g.filter(\n entityAnnotation, DC_REQUIRES, null);\n Iterator<Triple> dcTypeCategory = g.filter(\n entityAnnotation, DC_TYPE, ENHANCER_CATEGORY);\n // check if the relation or an requires annotation set\n // also include the DC_TYPE ENHANCER_CATEGORY, because such entityEnhancements\n // do not need to have any values for DC_RELATION nor DC_REQUIRES\n assertTrue(relationIterator.hasNext() || requiresIterator.hasNext() || dcTypeCategory.hasNext());\n while (relationIterator.hasNext()) {\n // test if the referred annotations are text annotations\n UriRef referredTextAnnotation = (UriRef) relationIterator.next().getObject();\n assertTrue(g.filter(referredTextAnnotation, RDF_TYPE,\n ENHANCER_TEXTANNOTATION).hasNext());\n }\n\n // test if an entity is referred\n Iterator<Triple> entityReferenceIterator = g.filter(entityAnnotation,\n ENHANCER_ENTITY_REFERENCE, null);\n assertTrue(entityReferenceIterator.hasNext());\n // test if the reference is an URI\n assertTrue(entityReferenceIterator.next().getObject() instanceof UriRef);\n // test if there is only one entity referred\n //NOTE: The Zemanta Engine referrs several entities if they are marked as\n // owl:sameAs by Zemanta\n //assertFalse(entityReferenceIterator.hasNext());\n\n // finally test if the entity label is set\n Iterator<Triple> entityLabelIterator = g.filter(entityAnnotation,\n ENHANCER_ENTITY_LABEL, null);\n assertTrue(entityLabelIterator.hasNext());\n }", "@Test\n void testDeleteOnlyReportErrorsIfItAddsNewInformation() {\n\n Setup setup =\n new Setup.Builder()\n .trackedEntity(\"xK7H53f4Hc2\")\n .isNotValid()\n .enrollment(\"t1zaUjKgT3p\")\n .isNotValid()\n .relationship(\"Te3IC6TpnBB\", trackedEntity(\"xK7H53f4Hc2\"), enrollment(\"t1zaUjKgT3p\"))\n .isNotValid()\n .build();\n\n PersistablesFilter.Result persistable =\n filter(setup.bundle, setup.invalidEntities, TrackerImportStrategy.DELETE);\n\n assertAll(\n () -> assertIsEmpty(persistable.get(TrackedEntity.class)),\n () -> assertIsEmpty(persistable.get(Enrollment.class)),\n () -> assertIsEmpty(persistable.get(Relationship.class)),\n () -> assertIsEmpty(persistable.getErrors()));\n }", "public boolean validateStatementWithEntityArgument_CanStoreOnlyEntities(StatementWithEntityArgument statementWithEntityArgument, DiagnosticChain diagnostics, Map<Object, Object> context) {\n return\n validate\n (ActionsPackage.Literals.STATEMENT_WITH_ENTITY_ARGUMENT,\n statementWithEntityArgument,\n diagnostics,\n context,\n \"http://www.eclipse.org/emf/2002/Ecore/OCL\",\n \"CanStoreOnlyEntities\",\n STATEMENT_WITH_ENTITY_ARGUMENT__CAN_STORE_ONLY_ENTITIES__EEXPRESSION,\n Diagnostic.ERROR,\n DIAGNOSTIC_SOURCE,\n 0);\n }", "@Test\n\tpublic void testSearchBasedOnRequest4() {\n\t\tsearchBasedOnRequestSetup();\n\t\t\n\t\tList<Suggestion> sugg = dm.searchBasedOnRequest(\"Flavorful\", null, true);\n\t\tassertTrue(sugg.size() == 0);\n\t}", "@Test\n \tpublic void whereClauseForNodeInclusion() {\n \t\tnode23.addJoin(new Inclusion(node42));\n \t\tcheckWhereCondition(\n \t\t\t\tjoin(\"=\", \"_node23.text_ref\", \"_node42.text_ref\"),\n \t\t\t\tjoin(\"<=\", \"_node23.left\", \"_node42.left\"),\n \t\t\t\tjoin(\">=\", \"_node23.right\", \"_node42.right\")\n \t\t);\n \t}", "private boolean testNulls(Fact req, ArrayList<Fact> facts) {\n boolean isNull = req.valueIsNotNull();\n for (Fact fact: facts) if (fact.getName().equals(req.getName())) {\n return isNull;\n }\n return !isNull;\n }", "boolean getMissingResults();", "static Set<SchemaModelImpl> getMegaIncludedModels(\n SchemaModelImpl sModel, String soughtNs, ResolveSession session) {\n //\n// if (true) {\n// // For optimization tests only\n // Uncomment and run tests to check how often the mega-include is called. \n// throw new RuntimeException(\"MEGA INCLUDE\");\n// }\n //\n Schema mySchema = sModel.getSchema();\n if (mySchema == null) {\n return Collections.EMPTY_SET;\n }\n //\n // If the current model has empty target namespace, then it can be included anywhere\n // If the current model has not empty target namespace, then it can be included only\n // to models with the same target namespace.\n String myTargetNs = mySchema.getTargetNamespace();\n if (myTargetNs != null && !Util.equal(soughtNs, myTargetNs)) {\n return Collections.EMPTY_SET;\n }\n //\n // The graph is lazy initialized in session and can be reused during\n // the resolve session.\n BidirectionalGraph<SchemaModelImpl> graph = \n session.getInclusionGraph(sModel, soughtNs);\n //\n // Now there is forward and back inclusion graphs.\n if (graph.isEmpty()) {\n return Collections.EMPTY_SET;\n }\n //\n // Look for the roots of inclusion.\n // Root s the top schema model, which includes current schema recursively,\n // but isn't included anywhere itself.\n Set<SchemaModelImpl> inclusionRoots = graph.getRoots(sModel, false);\n //\n HashSet<SchemaModelImpl> result = new HashSet<SchemaModelImpl>();\n for (SchemaModelImpl root : inclusionRoots) {\n // The namespace of the inclusion root has to be exectly the same\n // as required.\n if (Util.equal(root.getSchema().getTargetNamespace(), soughtNs)) {\n MultivalueMap.Utils.populateAllSubItems(graph, root, sModel, result);\n }\n }\n //\n result.remove(sModel);\n //\n return result;\n }", "@Override\r\n\tpublic void satisfy() {\n\t\t\r\n\t}", "private Protos.Offer filterBadResources(Protos.Offer offer) {\n Collection<Protos.Resource> goodResources = new ArrayList<>();\n Collection<Protos.Resource> badResources = new ArrayList<>();\n for (Protos.Resource resource : offer.getResourcesList()) {\n if (ResourceUtils.isProcessable(resource, frameworkRolesWhitelist)) {\n goodResources.add(resource);\n } else {\n badResources.add(resource);\n }\n }\n if (badResources.isEmpty()) {\n // Common shortcut: All resources are good. Just return the original offer.\n return offer;\n }\n\n // Build a new offer which only contains the good resources. Log the bad resources.\n LOGGER.info(\n \"Filtered {} resources from offer {}:\",\n badResources.size(),\n offer.getId().getValue());\n for (Protos.Resource badResource : badResources) {\n LOGGER.info(\" {}\", TextFormat.shortDebugString(badResource));\n }\n return offer.toBuilder()\n .clearResources()\n .addAllResources(goodResources)\n .build();\n }", "@Test public void excludeWithoutInclude() throws Exception {\n Schema schema = new RepoBuilder()\n .add(\"service.proto\", \"\"\n + \"message MessageA {\\n\"\n + \" optional string b = 1;\\n\"\n + \" optional string c = 2;\\n\"\n + \"}\\n\")\n .schema();\n Schema pruned = schema.prune(new IdentifierSet.Builder()\n .exclude(\"MessageA#c\")\n .build());\n assertThat(((MessageType) pruned.getType(\"MessageA\")).field(\"b\")).isNotNull();\n assertThat(((MessageType) pruned.getType(\"MessageA\")).field(\"c\")).isNull();\n }", "public static void main (String[] args) {\n EntityQuery query = new EntityQuery();\n Harvestable res = new OaiPmhResource();\n query.setFilter(\"test\", res);\n query.setAcl(\"diku\");\n query.setStartsWith(\"cf\",\"name\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"a\"));\n query.setQuery(\"(usedBy=library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"x\"));\n\n query = new EntityQuery();\n query.setQuery(\"(usedBy=library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"b\"));\n query.setQuery(\"usedBy=*library\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"c\"));\n query.setQuery(\"(=library\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"d\"));\n query.setQuery(\"usedBy=\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"e\"));\n query.setQuery(\"(usedBy!=library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"f\"));\n query.setQuery(\"(usedBy==library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"g\"));\n query.setQuery(\"(usedBy===library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"h\"));\n }", "Page<HrDocumentRequest> getRejectedDocumentRequests(Pageable pageable);", "@Test\n public void testNotIsNullCriteria() throws Exception {\n String sql = \"Select a From db.g Where Not a IS NULL\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n verifyElementSymbol(selectNode, Select.SYMBOLS_REF_NAME, \"a\");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, \"db.g\");\n\n Node notCriteriaNode = verify(queryNode, Query.CRITERIA_REF_NAME, NotCriteria.ID);\n \n Node isNullCriteriaNode = verify(notCriteriaNode, NotCriteria.CRITERIA_REF_NAME, IsNullCriteria.ID);\n verifyElementSymbol(isNullCriteriaNode, IsNullCriteria.EXPRESSION_REF_NAME, \"a\");\n \n verifySql(\"SELECT a FROM db.g WHERE NOT (a IS NULL)\", fileNode);\n }", "@Override\n\tprotected Vector2f decide(final List<IPerceivable> _surroundingEntities) {\n\t\treturn null;// TODO\n\t}", "boolean isCriterionSpecified();", "@Test\n public void testBasicQuery() {\n final QueryCriteria qc = QueryCriteria.create();\n QueryGenerator generator = QueryGenerator.generator(FakeEntity.class, qc, \"a\");\n Assert.assertEquals(BAD_QUERY_GENERATED, \"\", generator.generate());\n Assert.assertEquals(BAD_QUERY_PARAMTERS, 0, generator.getParameterKeys().size());\n }", "static boolean requiresContainmentQuery(IComponent component, IContainer container, StatusHolder holder) {\r\n\t\tStatusBuilder builder = new StatusBuilder(ComponentSystemPlugin.getDefault());\r\n\t\tIAttributes attr = (IAttributes) component.getAdapter(IAttributes.class);\r\n\t\tif (attr == null) {\r\n\t\t\tif (holder != null) {\r\n\t\t\t\tString fmt = Messages.getString(\"Utilities.NoAttributesAdapterError\"); //$NON-NLS-1$\r\n\t\t\t\tObject params[] = {component.getId()};\r\n\t\t\t\tbuilder.add(IStatus.ERROR, fmt, params);\r\n\t\t\t\tholder.setStatus(builder.createStatus(\"\", null)); //$NON-NLS-1$\r\n\t\t\t}\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tboolean isNeverAddComponent = attr.getBooleanAttribute(CommonAttributes.NEVER_ADD_COMPONENT, false);\r\n\t\t\r\n\t\tif (isNeverAddComponent && (holder != null)) {\r\n\t\t\tString fmt = Messages.getString(\"Utilities.NeverAddError\"); //$NON-NLS-1$\r\n\t\t\tbuilder.add(IStatus.ERROR, fmt, null);\r\n\t\t}\r\n\r\n\t\tif (isNeverAddComponent && (holder != null)) {\r\n\t\t\tIComponentInstance containerInstance = (IComponentInstance) EcoreUtil\r\n\t\t\t.getRegisteredAdapter(container.getEObject(), IComponentInstance.class);\r\n\t\t\tObject params[] = { component.getFriendlyName(), containerInstance.getName() };\r\n\t\t\tholder.setStatus(builder.createMultiStatus(Messages.getString(\"Utilities.CantAddObjectError\"), params)); //$NON-NLS-1$\r\n\t\t}\r\n\t\treturn isNeverAddComponent;\r\n\t}", "public GoodsSkuCriteria() {\n oredCriteria = new ArrayList<Criteria>();\n }", "@Override\n\tpublic boolean queryReturnGoodsRequestEntityByCondition(String waybillNo) {\n\t\treturn false;\n\t}", "@Test\r\n\tpublic void testInstanceFiltering() {\n\t\t\r\n\t\tMetaModel lhsUnfiltered = this.metaModelFactory.getLHSMetaModel();\r\n\t\t\r\n\t\tassertTrue(\"Unfiltered LHS MetaModel has unexpected amount of classes\", lhsUnfiltered.getClasses().size() == 8);\r\n\t\tassertTrue(\"Unfiltered LHS MetaModel has unexpected amount of attributes\", lhsUnfiltered.getAttributes().size() == 7);\r\n\t\tassertTrue(\"Unfiltered LHS MetaModel has unexpected amount of references\", lhsUnfiltered.getReferences().size() == 16);\r\n\t\t\r\n\t\tMetaModel rhsUnfiltered = this.metaModelFactory.getRHSMetaModel();\r\n\t\tassertTrue(\"Unfiltered RHS MetaModel has unexpected amount of classes\", rhsUnfiltered.getClasses().size() == 7);\r\n\t\tassertTrue(\"Unfiltered RHS MetaModel has unexpected amount of attributes\", rhsUnfiltered.getAttributes().size() == 12);\r\n\t\tassertTrue(\"Unfiltered RHS MetaModel has unexpected amount of references\", rhsUnfiltered.getReferences().size() == 8);\r\n\t\t\r\n\t\tthis.metaModelFactory.addFilter(new InstanceFilter());\r\n\t\t\r\n\t\tMetaModel lhsFiltered = this.metaModelFactory.getLHSMetaModel();\r\n\t\t\r\n\t\t// Classes Model, Attribute, Entity\r\n\t\tassertTrue(\"Filtered LHS MetaModel has unexpected amount of classes\", lhsFiltered.getClasses().size() == 3);\r\n\t\tassertTrue(\"Filtered LHS MetaModel has unexpected amount of attributes\", lhsFiltered.getAttributes().size() == 2);\r\n\t\tassertTrue(\"Filtered LHS MetaModel has unexpected amount of references\", lhsFiltered.getReferences().size() == 3);\r\n\t\t\r\n\t\t\r\n\t\tMetaModel rhsFiltered = this.metaModelFactory.getRHSMetaModel();\r\n\t\t\r\n\t\tassertTrue(\"Filtered RHS MetaModel has unexpected amount of classes\", rhsFiltered.getClasses().size() == 3);\r\n\t\tassertTrue(\"Filtered RHS MetaModel has unexpected amount of attributes\", rhsFiltered.getAttributes().size() == 4);\r\n\t\tassertTrue(\"Filtered RHS MetaModel has unexpected amount of references\", rhsFiltered.getReferences().size() == 2);\r\n\t}", "@Generated\n @Selector(\"includesSubentities\")\n public native boolean includesSubentities();", "@Test\n @Transactional\n @Ignore\n public void testGetSupressedOutages() {\n Collection<OnmsOutage> outages = m_outageService.getSuppressedOutages();\n assertTrue(\"Collection should be emtpy \", outages.isEmpty());\n\n }", "private void trimEntities() {\n \t\tList<String> chainIds = getActiveEntities();\n \t\tif (chainIds.size() > 0) {\n \t\t\tfor (Iterator<Atom> iter = atomVector.iterator();iter.hasNext();) {\n \t\t\t\tAtom atom = iter.next();\n \t\t\t\tif (!chainIds.contains(atom.chain_id)) {\n \t\t\t\t\titer.remove();\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}", "protected CollectionIncomplete<Negotiation> getNegotiationsUnassociated(Map<String, String> negotiationFilters, Map<String, String> associatedValues, boolean rowCountOnly) {\n LOG.debug(\"ENTER getNegotiationsUnassociated rowCountOnly=\"+rowCountOnly);\n Map<String, String> values = transformMap(associatedValues, unassociatedTransform);\n\n CollectionIncomplete<Negotiation> result = new CollectionIncomplete<>(new ArrayList(0),0L);\n if (values == null) {\n return result;\n }\n\n Long negotiationTypeId = getNegotiationService().getNegotiationAssociationType(NegotiationAssociationType.NONE_ASSOCIATION).getId();\n String negotiationTypeIdFilter = negotiationFilters.get(NEGOTIATION_TYPE_ATTR);\n if ( StringUtils.isNotEmpty(negotiationTypeIdFilter) && !negotiationTypeId.equals( Long.parseLong(negotiationTypeIdFilter)) ) {\n LOG.debug(\"getNegotiationsLinkedToProposal: Skipping search as found different type filter=\"+negotiationTypeIdFilter);\n return result;\n }\n\n\n Criteria negotiationsUnassociatedCriteria = getCollectionCriteriaFromMap(new NegotiationUnassociatedDetail(), values);\n Criteria negotiationCrit = getCollectionCriteriaFromMap(new Negotiation(), negotiationFilters);\n ReportQueryByCriteria subQuery = QueryFactory.newReportQuery(NegotiationUnassociatedDetail.class, negotiationsUnassociatedCriteria);\n subQuery.setAttributes(new String[] {UNASSOCIATED_ID});\n\n negotiationCrit.addIn(ASSOCIATED_DOC_ID_ATTR, subQuery);\n negotiationCrit.addEqualTo(NEGOTIATION_TYPE_ATTR, negotiationTypeId);\n\n return executeSearch(negotiationCrit, rowCountOnly);\n }", "@Test\n public void checkValidEntity() {\n cleanEntity0();\n entity0 = EntityUtil.getSampleRole();\n final Set<ConstraintViolation<Object>> cv = PersistenceValidation.validate(entity0);\n assertTrue(cv.isEmpty());\n }", "public List<Predicate> usedNegativeBodyPredicates() {\n\t\tArrayList<Predicate> usedPredicates = new ArrayList<>(bodyAtomsNegative.size());\n\t\tfor (Atom basicAtom : bodyAtomsNegative) {\n\t\t\tusedPredicates.add(basicAtom.getPredicate());\n\t\t}\n\t\treturn usedPredicates;\n\t}", "@Test\n public void testContainsAll_Not_Contain() {\n\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(3);\n instance.add(2);\n instance.add(1);\n instance.add(4);\n\n Collection c = Arrays.asList(1, 2, 5);\n\n boolean expResult = false;\n boolean result = instance.containsAll(c);\n assertEquals(expResult, result);\n }", "private void handleEntitiesQuery(RoutingContext routingContext) {\n LOGGER.debug(\"Info:handleEntitiesQuery method started.;\");\n /* Handles HTTP request from client */\n JsonObject authInfo = (JsonObject) routingContext.data().get(\"authInfo\");\n LOGGER.debug(\"authInfo : \" + authInfo);\n HttpServerRequest request = routingContext.request();\n /* Handles HTTP response from server to client */\n HttpServerResponse response = routingContext.response();\n // get query paramaters\n MultiMap params = getQueryParams(routingContext, response).get();\n MultiMap headerParams = request.headers();\n // validate request parameters\n Future<Boolean> validationResult = validator.validate(params);\n validationResult.onComplete(validationHandler -> {\n if (validationHandler.succeeded()) {\n // parse query params\n NGSILDQueryParams ngsildquery = new NGSILDQueryParams(params);\n if (isTemporalParamsPresent(ngsildquery)) {\n ValidationException ex =\n new ValidationException(\"Temporal parameters are not allowed in entities query.\");\n ex.setParameterName(\"[timerel,time or endtime]\");\n routingContext.fail(ex);\n }\n // create json\n QueryMapper queryMapper = new QueryMapper();\n JsonObject json = queryMapper.toJson(ngsildquery, false);\n Future<List<String>> filtersFuture =\n catalogueService.getApplicableFilters(json.getJsonArray(\"id\").getString(0));\n /* HTTP request instance/host details */\n String instanceID = request.getHeader(HEADER_HOST);\n json.put(JSON_INSTANCEID, instanceID);\n LOGGER.debug(\"Info: IUDX query json;\" + json);\n /* HTTP request body as Json */\n JsonObject requestBody = new JsonObject();\n requestBody.put(\"ids\", json.getJsonArray(\"id\"));\n filtersFuture.onComplete(filtersHandler -> {\n if (filtersHandler.succeeded()) {\n json.put(\"applicableFilters\", filtersHandler.result());\n if (json.containsKey(IUDXQUERY_OPTIONS)\n && JSON_COUNT.equalsIgnoreCase(json.getString(IUDXQUERY_OPTIONS))) {\n executeCountQuery(json, response);\n } else {\n executeSearchQuery(json, response);\n }\n } else {\n LOGGER.error(\"catalogue item/group doesn't have filters.\");\n }\n });\n } else if (validationHandler.failed()) {\n LOGGER.error(\"Fail: Validation failed\");\n handleResponse(response, ResponseType.BadRequestData,\n validationHandler.cause().getMessage());\n }\n });\n }", "@Query(value = \"SELECT * \" +\n \"FROM suppliers as s\\n\" +\n \"inner JOIN parts p on s.id = p.supplier_id\\n\" +\n \"WHERE is_importer = false\\n\" +\n \"GROUP BY s.id;\",nativeQuery = true)\n List<Supplier> findAllThatDoNotImport();", "@Repository\npublic interface NonConformanceDetailsRepository extends JpaRepository<NonConformanceDetails, Long> {\n\n @Query(value = \"select distinct nonConformanceDetails from NonConformanceDetails nonConformanceDetails left join fetch nonConformanceDetails.products left join fetch nonConformanceDetails.routings\",\n countQuery = \"select count(distinct nonConformanceDetails) from NonConformanceDetails nonConformanceDetails\")\n Page<NonConformanceDetails> findAllWithEagerRelationships(Pageable pageable);\n\n @Query(\"select distinct nonConformanceDetails from NonConformanceDetails nonConformanceDetails left join fetch nonConformanceDetails.products left join fetch nonConformanceDetails.routings\")\n List<NonConformanceDetails> findAllWithEagerRelationships();\n\n @Query(\"select nonConformanceDetails from NonConformanceDetails nonConformanceDetails left join fetch nonConformanceDetails.products left join fetch nonConformanceDetails.routings where nonConformanceDetails.id =:id\")\n Optional<NonConformanceDetails> findOneWithEagerRelationships(@Param(\"id\") Long id);\n\n Optional<NonConformanceDetails> findOneByEmployeeAndStatus(Employee employee, Status status);\n\n List<NonConformanceDetails> findOneByEmployee(Employee currentEmployee);\n}", "default boolean renderRequired() {\n // if (!isPrimaryKey() && isRequired() && ) constraints.add(JdlUtils.validationRequired());\n return isRequired() && !(getName().equals(\"id\") && getType().equals(JdlFieldEnum.UUID));\n }", "private void loadCriteriaLeft() {\n for (Criteria criteria : criteriaList) {\n criteriaLeft.add(criteria.getKey());\n }\n }", "private void convertReqsInCriterions(){\n\t\tArrayList<Criterion> criteria = this.data.getCriteria();\n\t\t\n\t\tfor(Requirement req : this.data.getRequirements()){\n\t\t\tif(req.isCriterion()){\n\t\t\t\t//create new criterion\n\t\t\t\tCriterion crit = new Criterion();\n\t\t\t\tif(req.getQuantType() != null)\n\t\t\t\t\tcrit.setName(req.getQuantType().getValue());\n\t\t\t\telse if(req.getQualType() != null)\n\t\t\t\t\tcrit.setName(req.getQualType().getValue());\n\t\t\t\telse\n\t\t\t\t\t//this is a price requirement\n\t\t\t\t\tcrit.setName(\"price\");\n\t\t\t\t\n\t\t\t\tString[] msg = {crit.getName(), \"General\"};\n\t\t\t\tif(this.methodID == CloudAid.SAW){\n\t\t\t\t\tFloat weight = Float.parseFloat(CloudAid.askData(CloudAid.GET_WEIGHT, msg, null));\n\t\t\t\t\tcrit.setWeight(weight);\n\t\t\t\t}\n\t\t\t\t//get the criterion preference direction\n\t\t\t\tString res = CloudAid.askData(CloudAid.GET_PREFERENCE_DIRECTION, msg, null);\n\t\t\t\tif(res.equalsIgnoreCase(\"y\")){\n\t\t\t\t\tcrit.setPreferenceDirection(\"max\");\n\t\t\t\t}else if(res.equalsIgnoreCase(\"n\")){\n\t\t\t\t\tcrit.setPreferenceDirection(\"min\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcriteria.add(crit);\n\t\t\t}\n\t\t}\n\t\tthis.data.setCriteria(criteria);\n\t\t\n\t\t//convert each serpiceTemplate requirements\n\t\tfor(ServiceTemplate template : this.data.getServiceTemplates()){\n\t\t\tArrayList<Criterion> templateCriteria = template.getCriteria();\n\t\t\tfor(Requirement req: template.getRequirements()){\n\t\t\t\tif(req.isCriterion()){\n\t\t\t\t\t//create new criterion\n\t\t\t\t\tCriterion crit = new Criterion();\n\t\t\t\t\tif(req.getQuantType() != null)\n\t\t\t\t\t\tcrit.setName(req.getQuantType().getValue());\n\t\t\t\t\telse if(req.getQualType() != null)\n\t\t\t\t\t\tcrit.setName(req.getQualType().getValue());\n\t\t\t\t\telse\n\t\t\t\t\t\t//this is a price requirement\n\t\t\t\t\t\tcrit.setName(\"price\");\n\t\t\t\t\t\n\t\t\t\t\tString[] msg = {crit.getName(), template.getType()};\n\t\t\t\t\tif(this.methodID == CloudAid.SAW){\n\t\t\t\t\t\tFloat weight = Float.parseFloat(CloudAid.askData(CloudAid.GET_WEIGHT, msg, null));\n\t\t\t\t\t\tcrit.setWeight(weight);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//get the criterion preference direction\n\t\t\t\t\tString res = CloudAid.askData(CloudAid.GET_PREFERENCE_DIRECTION, msg, null);\n\t\t\t\t\tif(res.equalsIgnoreCase(\"y\")){\n\t\t\t\t\t\tcrit.setPreferenceDirection(\"max\");\n\t\t\t\t\t}else if(res.equalsIgnoreCase(\"n\")){\n\t\t\t\t\t\tcrit.setPreferenceDirection(\"min\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\ttemplateCriteria.add(crit);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttemplate.setCriteria(templateCriteria);\n\t\t}\n\t}", "@Override\n protected boolean accept(Field f) {\n\t\t return !Collection.class.isAssignableFrom(f.getType()) &&\n\t\t \t\t!List.class.isAssignableFrom(f.getType()) &&\n\t\t \t\t\t\t!BaseEntity.class.isAssignableFrom(f.getType())\n\t\t \t\t\t\t&& acceptToStringField(f);\n\t\t }", "@Programmatic\n public boolean loadSpecifications(\n final List<Class<?>> typesToLoad,\n final Class<?> typeToIgnore,\n final IntrospectionState upTo) {\n boolean anyLoadedAsNull = false;\n for (final Class<?> typeToLoad : typesToLoad) {\n if (typeToLoad != typeToIgnore) {\n final ObjectSpecification objectSpecification =\n internalLoadSpecification(typeToLoad, null, upTo);\n final boolean loadedAsNull = (objectSpecification == null);\n anyLoadedAsNull = loadedAsNull || anyLoadedAsNull;\n }\n }\n return anyLoadedAsNull;\n }", "boolean hasCustomerNegativeCriterion();", "public boolean tableRequired()\n {\n return true;\n }", "protected void checkScrollability() throws HibernateException {\n \t\t// Allows various loaders (ok mainly the QueryLoader :) to check\n \t\t// whether scrolling of their result set should be allowed.\n \t\t//\n \t\t// By default it is allowed.\n \t\treturn;\n \t}", "private boolean ignore(String entityId) {\n return entityId.contains(\"InstallManyBundlesTest\");\n }", "boolean hasUses();" ]
[ "0.54224944", "0.5293854", "0.5270529", "0.5256572", "0.5255789", "0.50956196", "0.49532595", "0.4953206", "0.49413955", "0.49193057", "0.48995122", "0.48426804", "0.48161986", "0.4807416", "0.47884455", "0.47650984", "0.47424424", "0.47396433", "0.47270975", "0.47041935", "0.46880814", "0.46719074", "0.46597773", "0.46569353", "0.46434042", "0.46382365", "0.46301702", "0.46043822", "0.4597471", "0.45911825", "0.45865285", "0.45794505", "0.45705697", "0.45683694", "0.45658946", "0.45658946", "0.45658827", "0.45626146", "0.45619664", "0.45613042", "0.45545837", "0.4540747", "0.4535204", "0.45180982", "0.45160285", "0.45139387", "0.45123583", "0.4511942", "0.45106113", "0.45094782", "0.45020658", "0.44979236", "0.44920188", "0.44902763", "0.44901806", "0.44821927", "0.4478607", "0.44777337", "0.44736663", "0.4473125", "0.44719186", "0.44706342", "0.44701374", "0.44691446", "0.44615245", "0.44595084", "0.44511172", "0.4449894", "0.44498315", "0.44469747", "0.44377565", "0.4436223", "0.44347876", "0.44317117", "0.44285023", "0.4426988", "0.4425729", "0.44200206", "0.44173867", "0.4416411", "0.44163233", "0.4410861", "0.44050875", "0.44041154", "0.44040358", "0.44021067", "0.4395403", "0.43892193", "0.438888", "0.43866366", "0.43863103", "0.4383666", "0.43792108", "0.43783605", "0.4366517", "0.4365721", "0.43642524", "0.4363864", "0.43637335", "0.4357737" ]
0.691058
0
store the new pattern by updating the broadcast state
@Override public void processBroadcastElement(SocketEvent event, Context ctx, Collector<KeyedDataPoint> out) throws Exception { BroadcastState<String, SocketEvent> bcState = ctx.getBroadcastState(amplificationDesc); // storing in MapState with null as VOID default value bcState.put(event.streamKey, event); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void addObservingPattern(String pattern, SessionState state)\n\t{\n//\t\t// get the observer and add the pattern\n//\t\tContentObservingCourier o = (ContentObservingCourier) state.getAttribute(STATE_OBSERVER);\n//\t\to.addResourcePattern(ContentHostingService.getReference(pattern));\n//\n//\t\t// add it back to state\n//\t\tstate.setAttribute(STATE_OBSERVER, o);\n\n\t}", "protected void setPattern(ExchangePattern pattern) {\n _pattern = pattern;\n }", "public void broadcastState() {\n StringBuilder sb = new StringBuilder();\n sb.append(MSG_STATE);\n\n if(mService.isTransmitterMode()) {\n sb.append(\" t \");\n }\n else {\n sb.append(\" r \");\n }\n\n sb.append(mService.getVADThreshold());\n sb.append(\" \");\n\n sb.append(mService.getNoiseTracker().getLastNoiseHeard() / 1000);\n\n try {\n sendChannelMessage(sb.toString());\n }\n catch(RemoteException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void forceStateBroadcast() {\n\t\tpeerDiscoveryService.sendStateMulticast();\n\t}", "public abstract void addBuffer(Array<Array<Boolean>> pattern);", "@Override\n public void onPatternCellAdded(List<Cell> pattern) {\n\n }", "private void sendActivityUpdated(boolean isDiscarded) {\n Intent i = new Intent(\"com.reconinstruments.SPORTS_ACTIVITY\");\n i.putExtra(\"status\",mStatus);\n i.putExtra(\"type\",mType);\n i.putExtra(\"isDiscarded\",isDiscarded);\n mRTS.sendBroadcast(i);\n }", "public abstract void replaceBuffer(Array<Array<Boolean>> pattern);", "public void drawPattern(){\n \t\tIntent intent = new Intent(this, LockPatternActivity.class);\n \t\tintent.putExtra(LockPatternActivity._Mode, LockPatternActivity.LPMode.CreatePattern);\n \t\tstartActivityForResult(intent, REQUEST_CREATE_PATTERN);\n \t}", "private void resetMBPattern()\n {\n codedBlockPattern = 0;\n }", "public void setBroadcast(boolean broadcast) {\r\n this.broadcast = broadcast;\r\n }", "private void sendNextBroadcast() {\n synchronized (this.mLock) {\n if (this.mBroadcastedInteractiveState == 0) {\n this.mPendingWakeUpBroadcast = false;\n this.mBroadcastedInteractiveState = 1;\n } else if (this.mBroadcastedInteractiveState == 1) {\n if (!(this.mPendingWakeUpBroadcast || this.mPendingGoToSleepBroadcast)) {\n if (this.mPendingInteractiveState != 2) {\n finishPendingBroadcastLocked();\n return;\n }\n }\n this.mPendingGoToSleepBroadcast = false;\n this.mBroadcastedInteractiveState = 2;\n } else {\n if (!(this.mPendingWakeUpBroadcast || this.mPendingGoToSleepBroadcast)) {\n if (this.mPendingInteractiveState != 1) {\n finishPendingBroadcastLocked();\n return;\n }\n }\n this.mPendingWakeUpBroadcast = false;\n this.mBroadcastedInteractiveState = 1;\n }\n this.mBroadcastStartTime = SystemClock.uptimeMillis();\n int powerState = this.mBroadcastedInteractiveState;\n }\n }", "public /* synthetic */ void lambda$didReceivedNotification$21(TLObject tLObject) {\n if (tLObject instanceof TLRPC$TL_wallPaper) {\n TLRPC$TL_wallPaper tLRPC$TL_wallPaper = (TLRPC$TL_wallPaper) tLObject;\n if (tLRPC$TL_wallPaper.pattern) {\n this.selectedPattern = tLRPC$TL_wallPaper;\n setCurrentImage(false);\n updateButtonState(false, false);\n this.patterns.add(0, this.selectedPattern);\n PatternsAdapter patternsAdapter2 = this.patternsAdapter;\n if (patternsAdapter2 != null) {\n patternsAdapter2.notifyDataSetChanged();\n }\n }\n }\n }", "public void updateDestination(){\r\n\t\tdestination.update_pc_arrivalFlows(flows);\r\n\t}", "public void setBroadcast(boolean broadcast) {\n this.broadcast = broadcast;\n }", "public void run() {\n\t\t\t\tInetAddress bAddr = AndyNet.getBroadcastIP(activity);\n\t\t\t\tLog.i(TAG, \"Broadcast Address: \" + bAddr.getHostAddress());\n\t\t\t\tif (bAddr != null) {\n\t\t\t\t\tAndyNet.startBroadcast(AndyMaster.getName(), 0, bAddr);\n\t\t\t\t}\n\n\t\t\t}", "public void broadcast() {\n for (int i = 1; i <= nbMessagesToBroadcast; i++) {\n Message broadcastMsg = new Message(pid, pid, i,false, null);\n lcb.broadcast(broadcastMsg);\n logs.add(String.format(\"b %d\\n\",i));\n }\n }", "public void update(List<ReasonerStatementPattern> patternList) {\n\t\tList<Statement> filteredReasonerStatements = reasoner\n\t\t\t\t.filterResults(patternList);\n\t\taddNewInferences(filteredReasonerStatements);\n\t\tremoveOldInferences(filterInferencesModel(patternList),\n\t\t\t\tfilteredReasonerStatements);\n\t\tlog.debug(\"Added: \" + addCount + \", Retracted: \" + retractCount);\n\t}", "public void treatment()\n {\n\t\tCommunicationManagerServer cms = CommunicationManagerServer.getInstance();\n\t\tDataServerToComm dataInterface = cms.getDataInterface();\n\t\t/** On récupère et stocke l'adresse IP du serveur\n\t\t */\n\t\tdataInterface.updateUserChanges(user);\n\n\t /** Création du message pour le broadcast des informations**/\n\t updatedAccountMsg message = new updatedAccountMsg(this.user);\n\t\tmessage.setPort(this.getPort());\n\t cms.broadcast(message);\n\t}", "public void setContents(Broadcast broadcast) {\r\n \t\tthis.actor = null;\r\n \t\tthis.broadcast = broadcast;\r\n \t\tthis.network = null;\r\n \t\tthis.serdes = null;\r\n \t}", "public void syncChannel() {\r\n\t\tarrChannels.clear(); // I want to make sure that there are no leftover data inside.\r\n\t\tfor(int i = 0; i < workChannels.size(); i++) {\r\n\t\t\tarrChannels.add(workChannels.get(i));\r\n\t\t}\r\n\t}", "private static void removeObservingPattern(String pattern, SessionState state)\n\t{\n//\t\t// get the observer and remove the pattern\n//\t\tContentObservingCourier o = (ContentObservingCourier) state.getAttribute(STATE_OBSERVER);\n//\t\to.removeResourcePattern(ContentHostingService.getReference(pattern));\n//\n//\t\t// add it back to state\n//\t\tstate.setAttribute(STATE_OBSERVER, o);\n\n\t}", "@Override\n public Drawable mutate() {\n return patternDrawable.mutate();\n }", "public void update(String state) {\n\t\tSystem.out.println(\"收到状态---\"+state);\n\t\tthis.state = state;\n\t}", "boolean changePattern(int newPattern){\n boolean change=false;\r\n\r\n if (fShapes.size() > 0) {\r\n Iterator iter = fShapes.iterator();\r\n\r\n while (iter.hasNext()) {\r\n TShape theShape = (TShape) iter.next();\r\n\r\n if (theShape.getSelected()) {\r\n theShape.setPattern(newPattern);\r\n change = true;\r\n }\r\n }\r\n }\r\n\r\n if (!change){\r\n TShape prototype=fPalette.getPrototype();\r\n\r\n if (prototype!=null)\r\n prototype.setPattern(newPattern);\r\n fPalette.repaint(); // no listeners for change in the palette\r\n }\r\n\r\n return\r\n change; // to drawing itself\r\n }", "public void notifyState() {\n\t\tList<T> alldata = new ArrayList<T>(this.dataMap.values());\t\r\n\t\t// call them with the current data\r\n\t\t// for each observer call them\r\n\t\tfor( ModelEvents<T> observer : this.ObserverList){\r\n\t\t\tobserver.dataState(alldata);\r\n\t\t}\r\n\r\n\t}", "protected void startBroadcastLocation() {\n AlarmManager manager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n int interval = 5000;\n\n manager.setInexactRepeating(AlarmManager.RTC_WAKEUP, System.currentTimeMillis(), interval, pendingIntent);\n Toast.makeText(this, \"Alarm Set\", Toast.LENGTH_SHORT).show();\n }", "private void updatePatterns(char guess) {\r\n \tfinal char UNDISPLAYED = '-';\r\n \tfor (int i = 0; i < this.activeWords.size(); i++) {\r\n \t\tString word = this.activeWords.get(i);\r\n \t\tfor (int j = 0; j < word.length(); j++) {\r\n \t\t\tif (word.charAt(j) == guess) {\r\n \t\t\t\tthis.patterns.get(i)[j] = guess;\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n }", "private void updateReceivedData(byte[] data) {\n }", "public void refreshDataPacket() {\n ByteBuf buffer = PacketUtils.writePacket(getFreshFullDataPacket());\n setFullDataPacket(buffer);\n }", "public void setPattern(String pattern) {\n\t\tthis.patterns.clear();\n\t\tthis.entries.clear();\n\t\taddPattern(pattern);\n\t}", "@Override\n public void run()\n {\n try\n {\n MulticastSocket multicastSocket = new MulticastSocket(55559);\n //My chosen multicast ip.\n String multicastIP = \"224.0.159.82\";\n multicastSocket.joinGroup(InetAddress.getByName(multicastIP));\n //Receiver on continuous loop.\n while (receiverOn)\n {\n //Check network flag.\n if (frame.getSelectPanel().network())\n {\n DatagramPacket receivePacket = new DatagramPacket(receiveData, receiveData.length);\n multicastSocket.receive(receivePacket);\n byte[] b = receivePacket.getData();\n System.out.println(\"Receive: \" + b.length);\n ByteArrayInputStream bis = new ByteArrayInputStream(b);\n ObjectInput in = new ObjectInputStream(bis);\n\n try\n {\n int[] data = (int[]) in.readObject();\n System.out.println(\"This: \" + frame.getId() + \"\\tFrom: \" + data[0]);\n //Exclude messages that originated at this peer.\n if (data[0] != frame.getId())\n {\n //Action based on int at data[1]\n switch (data[1])\n {\n case Draw.CLEAR:\n case Draw.DRAW:\n case Draw.TEXT:\n case Draw.CIRCLE:\n case Draw.IMAGE:\n frame.getDraw().put(data);\n break;\n case REQ_IP:\n int key = data[0];\n String ip = String.format(\"%d.%d.%d.%d\", data[2], data[3], data[4], data[5]);\n frame.getPeerCache().addPeer(new Triple<>(key, ip, data[6]));\n int size = frame.getPeerCache().getSize();\n frame.getPeerCount().setText(String.format(\"Peer count: %d\", size));\n int[] myIp = frame.getMyIp();\n size = frame.getActionCache().getSize();\n int[] ipAns = {frame.getId(), ANS_IP, myIp[0], myIp[1], myIp[2], myIp[3], size};\n frame.getBroadcaster().put(ipAns);\n break;\n case ANS_IP:\n /*\n * 0 = id\n * 1 = data type\n * 2,3,4,6 = IP\n */\n key = data[0];\n ip = String.format(\"%d.%d.%d.%d\", data[2], data[3], data[4], data[5]);\n frame.getPeerCache().addPeer(new Triple<>(key, ip, data[6]));\n frame.getPeerCount().setText(\n String.format(\"Peer count: %d\", frame.getPeerCache().getSize()));\n break;\n case LEAVE_NOTE:\n ip = String.format(\"%d.%d.%d.%d\", data[2], data[3], data[4], data[5]);\n frame.getPeerCache().removePeer(ip);\n frame.getPeerCount().setText(\n String.format(\"Peer count: %d\", frame.getPeerCache().getSize()));\n break;\n case REQ_HISTORY:\n /*\n * 0 = id\n * 1 = data type\n * 2 = tarID\n * 3,4,5,6 = IP\n */\n if (data[2] == frame.getId())\n {\n ip = String.format(\"%d.%d.%d.%d\", data[3], data[4], data[5], data[6]);\n System.out.println(\"History request from \" + ip);\n UdpClient historyClient = new UdpClient(ip, frame.getActionCache());\n Thread historyThread = new Thread(historyClient);\n historyThread.start();\n }\n break;\n case CLEAR_REQ:\n String reqTitle = String.format(\"Peer %d has requested a clear.\", data[1]);\n int dialogResult = JOptionPane.showConfirmDialog(frame, \"Would you like to clear?\",\n reqTitle,\n JOptionPane.YES_NO_OPTION);\n if (dialogResult == JOptionPane.YES_OPTION)\n {\n int[] clear = {frame.getId(), Draw.CLEAR};\n frame.getDraw().put(clear);\n frame.clearAll();\n }\n break;\n case IMAGE_REQ:\n System.out.print(\"IMAGE REQUEST: \");\n System.out.println(data[2] + \" vs \" + frame.getId());\n if (data[2] == frame.getId())\n {\n ip = String.format(\"%d.%d.%d.%d\", data[4], data[5], data[6], data[7]);\n System.out.println(\"Image request from \" + ip);\n BufferedImage image = frame.getImageCache().get(data[3], data[7]);\n\n TcpClient tcpClient = new TcpClient(ip, image);\n Thread tcpThread = new Thread(tcpClient);\n tcpThread.start();\n }\n break;\n default:\n //Rogue packet protection.\n System.out.println(\"Received invalid packet.\");\n System.out.println(Arrays.toString(data));\n }\n }\n } catch (ClassNotFoundException | IndexOutOfBoundsException e)\n {\n //Rogue packet protection.\n //Message given, loop continues.\n System.out.println(\"Exception: Received invalid packet.\");\n e.printStackTrace();\n }\n }\n }\n } catch (IOException | InterruptedException e)\n {\n System.err.println(\"Error in Receiver class.\");\n System.err.println(e.getMessage());\n e.printStackTrace();\n }\n }", "public void applyNewState() {\n this.setAlive(this.newState);\n }", "public final void save(final ByteBuffer buffer) {\r\n buffer.putInt(respawnRate);\r\n buffer.putShort((short) getId());\r\n buffer.putInt(getCount());\r\n buffer.putShort((short) (getLocation().getX() & 0xFFFF)).putShort((short) (getLocation().getY() & 0xFFFF))\r\n .put((byte) getLocation().getZ());\r\n }", "public void setPattern(Pattern pattern) {\n this.pattern = pattern;\n }", "@Override\n\tpublic void addNotify() {\n\t\tsuper.addNotify();\n\t\t// Buffer\n\t\tcreateBufferStrategy(2);\n\t\ts = getBufferStrategy();\n\t}", "public void handlePatternKey(KnightSubject source);", "public final void broadcast()\n\t{\n\t\ttopic.broadcast(originalMessage);\n\t}", "@Override\n\tpublic void update() {\n\t\tSystem.out.println(\"Observer Pattern on Room Reservation Notification: \");\n\t\tSystem.out.println(\"Your room is \" + reserve.getState()+\"\\n\");\n\t}", "public final byte[] getPattern() {\n return pattern;\n }", "private void mRelayStateSet(cKonst.eSerial newState) {\n nRelayState=newState;\n oBTServer.mStateSet( newState);\n }", "@Override\n public void update() {\n updateBuffs();\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n Log.e(\"i m in Broadcast recive\", \"i m in Broadcast recive\");\n Double latitude = intent.getDoubleExtra(\"latitude\",0.0);\n Double longitude = intent.getDoubleExtra(\"longitude\",0.0);\n int pendingPoints = intent.getIntExtra(\"pendingPoints\",0);\n String timeStamp = intent.getStringExtra(\"lastUpdated\");\n boolean isBulkUpload = intent.getBooleanExtra(\"isBulkUpload\",false);\n\n\n textViewLastUpdatedTime.setText(\"Last Updated On: \"+timeStamp);\n textViewPointsCount.setText(\"Pending Points: \"+pendingPoints);\n if(getAddress(latitude,longitude).isEmpty()){\n textview_tracking_updates.setText(\"Updating Details: \\n\"+latitude+\" / \"+longitude );\n }else{\n textview_tracking_updates.setText(\"Updating Details: \\n\\nLast Updated Location is : \"+getAddress(latitude,longitude));\n }\n\n\n }", "public static void modifyTopology()\r\n\t{\r\n\t\tSystem.out.println(\"===============STARTING TO MODIFY TOPOLOGY==============\");\r\n\t\tscan = new Scanner(System.in);\r\n\t\tSystem.out.print(\"Please enter Router that you want to Shutdown : \"); // Printing Instruction\r\n\t\t\r\n\t\tint delr = Integer.parseInt(scan.nextLine()); // Reading the router to be deleted\r\n\t\twhile (delr < 1 || delr > routers) {\r\n\t\t\tSystem.out.print(\"\\n The entered source router not present, Please enter Again : \");\r\n\t\t\tdelr = Integer.parseInt(scan.nextLine());\r\n\t\t}\r\n\t\tdelr = delr - 1;\r\n\t\t\r\n\t\tint[][] graph2 = new int[routers-1][routers-1];\r\n\t\tint p = 0;\r\n\t\tfor (int i = 0; i < routers; ++i) { // Loop for deleting router and shifting graphay\r\n\r\n\t\t\tif (i == delr)\r\n\t\t\t\tcontinue;\r\n\t\t\tint q = 0;\r\n\t\t\tfor (int j = 0; j < routers; ++j) // Control loop for shifting\r\n\t\t\t{\r\n\t\t\t\tif (j == delr)\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t\r\n\t\t\t\tgraph2[p][q] = graph[i][j]; // shifting row and column\r\n\t\t\t\t++q;\r\n\t\t\t}\r\n\t\t\t++p;\r\n\t\t}\r\n\t\t\r\n\t\trouters -= 1;\r\n\t\t\r\n\t\tSystem.out.println(\"============NEW TOPLOGY============\");\r\n\t\tfor (int row = 0; row < routers; row++) {\r\n\t\t\tfor (int col = 0; col < routers; col++) {\r\n\t\t\t\tLinkstateRouting.graph[row][col] = graph2[row][col];\r\n\t\t\t\tSystem.out.print(graph[row][col] + \"\\t\"); // Printing the new topology again\t\t\t\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t }\r\n\t\tSystem.out.println(\"Router \" + (delr + 1) + \" is Shutdown\");\r\n\t}", "@Override\n protected boolean onStateChange(int[] state) {\n if (patternDrawable == null) {\n return super.onStateChange(state);\n }\n\n boolean patternState = patternDrawable.setState(state);\n boolean superState;\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n superState = super.onStateChange(state);\n } else {\n applyTint();\n super.onStateChange(state);\n superState = isStateful();\n }\n\n return patternState | superState;\n }", "@Override\n\t\tpublic void run() {\n\t\t\tbyte[] buff = new byte[HFConfigration.macTMsgPacketSize];\n\t\t\twhile (isAppRunning) {\n\t\t\t\ttry {\n\t\t\t\t\tDatagramPacket recv = new DatagramPacket(buff, buff.length);\n//\t\t\t\t\trecv.setPort(HFConfigration.localUDPPort);\n\t\t\t\t\tlocalBeatSocket.receive(recv);\n\t\t\t\t\tbyte[] data = ByteTool.copyOfRange(buff, 0,\n\t\t\t\t\t\t\trecv.getLength());\n\t\t\t\t\tString ip = recv.getAddress().getHostAddress();\n\t\t\t\t\tdecode(data, ip); Log.d(\"HFModuleManager:\", \"ip:\" + ip);\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} catch (Exception e) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public void propagate(InstanceState state) {\n Value in = state.getPort(0);\n \n // Now compute the output. We've farmed this out to a helper method,\n // since the same logic is needed for the library's other components.\n Value out = nextGray(in);\n \n // Finally we propagate the output into the circuit. The first parameter\n // is 1 because in our list of ports (configured by invocation of\n // setPorts above) the output is at index 1. The second parameter is the\n // value we want to send on that port. And the last parameter is its\n // \"delay\" - the number of steps it will take for the output to update\n // after its input.\n state.setPort(1, out, out.getWidth() + 1);\n }", "private void broadcast() {\n for (int key : bootstrapMap.keySet()) {\n bootstrapMap.get(key).getBroadcastView().show(Colors.BLUE + gameService.getCurrentPlayer().getName() + Colors.NOCOLOR, lastAnswer);\n }\n gameService.upDateCurrentPlayer();\n }", "private void sendCurrentState() {\n\ttry {\n\t channel.sendObject(getState());\n\t} catch (IOException e) {\n\t Log.e(\"423-client\", e.toString());\n\t}\n }", "private void setupRSSIsNRBroadcastReceiver() {\n broadcastReceiverRSSI = new BroadcastReceiver() {\n @Override\n public void onReceive(Context context, Intent intent) {\n if (\"com.example.loravisual.RSSI_RECEIVED\".equals(intent.getAction())) {\n byte[] bytes = intent.getByteArrayExtra(\"com.example.loravisual.RSSISNR\");\n int rssi = LVUtil.makeByteUnsigned(bytes[1]);\n int bitErrors = LVUtil.makeByteUnsigned(bytes[3]);\n String rssiSnr = \"RSSI: -\" + rssi + \" SNR: \" + (bytes[2]);\n rssiSnrTextView.setText(rssiSnr);\n if (dbEntries == null) {\n dbEntries = new String[5];\n dbEntries[2] = \"-\" + rssi;\n dbEntries[3] = Byte.toString(bytes[2]);\n dbEntries[4] = Integer.toString(bitErrors);\n } else {\n dbEntries[2] = \"-\" + rssi;\n dbEntries[3] = Byte.toString(bytes[2]);\n dbEntries[4] = Integer.toString(bitErrors);\n databaseHandler.logReceivedTransmission(Integer.toString(experimentNumber), dbEntries);\n dbEntries = null;\n }\n }\n }\n };\n IntentFilter filter = new IntentFilter(\"com.example.loravisual.RSSI_RECEIVED\");\n registerReceiver(broadcastReceiverRSSI, filter);\n\n }", "private void receive() {\n\t\t\ttry{\n\t\t\t\twhile(true){\n\t\t\t\t\tsuper.store(generateSimulateData());\n\t\t\t\t\tSystem.out.println(\"模拟接收数据\");\n\t\t\t\t\tThread.sleep(10000);\n\t\t\t\t}\n\t\t\t}catch(Exception ex){\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t }", "public void presetPattern(){\n // clear all the cells\n for (int i = 0; i < game.grid.length; i++){\n for (int j = 0; j<game.grid[0].length; j++){\n game.grid[i][j] = false;\n }\n }\n \n // change specific cells to live\n for (int i = 7; i < 12; i++) {\n for (int j = 7; j < 12; j++) {\n game.grid[i][j] = true;\n }\n }\n \n // remove middle cell\n game.grid[9][9] = false;\n \n repaint();\n }", "private void updateStatePost() {\n\t\tif(!link.hasNextLine()) {\n\t\t\tcontroller.printError(\"Errore di Comunicazione\", \"La postazione \" + ip.getHostAddress() + \" non ha inviato il proprio stato.\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tString state = link.read();\n\t\t((Controller) controller).setStatePost(state, ip);\n\t}", "@Override\n public void onReceive(Context context, Intent intent) {\n updatePackageInfo();\n }", "public void reconnected() { }", "public void sendPreparedBroadcast() {\n Intent intent = new Intent(getString(R.string.broadcast_prepared));\n LocalBroadcastManager.getInstance(this).sendBroadcast(intent);\n }", "@Override\n public UpdateLogPatternResult updateLogPattern(UpdateLogPatternRequest request) {\n request = beforeClientExecution(request);\n return executeUpdateLogPattern(request);\n }", "private void updateStateOnce() {\n for(int i = 0; i < maskArray.length; i++) {\n for (int j = 0; j < maskArray[i].length; j++) {\n\n if (maskArray[i][j] == 1){\n stateArray[i][j] = stateGenerator.generateElementState();\n }\n\n }\n }\n }", "public void setPattern(boolean[][] p)\n {\n pattern = p;\n }", "public void updateScanFlag() {\n Date when = new Date(System.currentTimeMillis());\n\n try {\n Intent someIntent = new Intent(this, UpdateFlags.class); // intent to be launched\n\n // note this could be getActivity if you want to launch an activity\n PendingIntent pendingIntent = PendingIntent.getBroadcast(\n context,\n 0, // id, optional\n someIntent, // intent to launch\n PendingIntent.FLAG_CANCEL_CURRENT); // PendintIntent flag\n\n AlarmManager alarms = (AlarmManager) context.getSystemService(\n Context.ALARM_SERVICE);\n\n alarms.setRepeating(AlarmManager.RTC_WAKEUP,\n when.getTime(),\n AlarmManager.INTERVAL_FIFTEEN_MINUTES,\n pendingIntent);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Override\n public void run() {\n graphIn = new Handler(Looper.getMainLooper()) {\n\n public void handleMessage(Message msg) {\n switch (msg.what) {\n case handlerState2:\n received = Boolean.parseBoolean((String) msg.obj);\n break;\n case handlerState4:\n sampleTime = Integer.parseInt((String) msg.obj);\n break;\n case handlerState1:\n ppgWaveBuffer.addAll((ArrayList) msg.obj);\n bluetoothIn.obtainMessage(handlerState5, \"ACK\").sendToTarget();\n break;\n\n }\n }\n };\n\n for (; ; ) {\n\n if (!VerifyActivity.isActivityVisible()) {\n ppgWaveBuffer.clear();\n break;\n }\n if (received == true && ppgWaveBuffer.size() != 0) {\n\n runOnUiThread(new Runnable() {\n\n @Override\n public void run() {\n if (ppgWaveBuffer.size() != 0) {\n graph.update(ppgWaveBuffer);\n }\n }\n });\n try {\n Thread.sleep(sampleTime + compensatoryTime);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n safezoneListAdapter.updateSafezoneList(Safezone.getSafezonesOfDeviceGPS(macAddress));\n }", "public void actionPerformed(ActionEvent e) {\n rcvdp = new DatagramPacket(buf, buf.length);\n \n try {\n // receive the DP from the socket:\n RTPsocket.receive(rcvdp);\n \n // create an RTPpacket object from the DP\n RTPpacket rtp_packet = new RTPpacket(rcvdp.getData(), rcvdp.getLength());\n // System.out.println(rtp_packet.PayloadType);\n \n if (rtp_packet.getpayloadtype() == 26) { // rtp\n \n // update statistics\n receive++;\n lost += rtp_packet.getsequencenumber() - lastSequencenumber - 1;\n lastSequencenumber = rtp_packet.getsequencenumber();\n \n \n // add receveid package to ArrayList\n fec_packet.rcvdata(rtp_packet);\n \n } else if (rtp_packet.getpayloadtype() == 127 && fecEnabled) { // fec\n \n fec_packet.rcvfec(rtp_packet);\n }\n \n if (rtp_packet.gettimestamp() > timecounter) {\n printstatistik(rtp_packet.gettimestamp());\n lasttimestamp = rtp_packet.gettimestamp();\n timecounter +=1000;\n }\n \n \n } catch (InterruptedIOException iioe) {\n } catch (IOException ioe) {\n System.out.println(\"Exception caught: \" + ioe);\n }\n \n if(timecounter==20999){\n timer1.stop();\n }\n }", "public void broadcastMessage(String message) {\n for (WebSocket conn : reverseMap.keySet()) {\n conn.send(message);\n }\n }", "@Override\r\n public void onCreate() {\n intent = new Intent(BROADCAST_ACTION);\r\n startBTService();\r\n// try{\r\n// mConnectedThread.write(\"2\".getBytes());\r\n// }catch(Exception e){\r\n//\r\n// }\r\n }", "public void beginBroadcast() {\n updateNewsMessages();\n setDelay(getConfigUtil().getDelay());\n setNewsTask(initiateNewsTask(getNewsMessages().listIterator()));\n }", "private void broadcast(ArrayList<Integer> update){\n for (Player p : players.values()){\n p.sendModel(update);\n }\n }", "private void setReceiver() {\n broadcastReceiver = new BroadcastReceiver() {\n @Override\n public void onReceive(Context context, Intent intent) {\n Bundle bundle = intent.getExtras();\n update(bundle);\n }\n };\n IntentFilter filter = new IntentFilter();\n filter.addAction(RunningContract.progress);\n registerReceiver(broadcastReceiver, filter);\n }", "public Pattern(Collection<Delta> pattern)\n {\n assert(! pattern.isEmpty());\n\n _pattern = (Delta[]) pattern.toArray();\n _index = 0;\n }", "public Broadcast getBroadcast() {\r\n \t\treturn broadcast;\r\n \t}", "public void withdrawPath(AS peer, int dest) {\n this.incUpdateQueue.add(new BGPUpdate(dest, peer));\n }", "@Override\n\t\t\tpublic void onReceive(Context context, Intent intent) {\n\t\t\t\tnotifyNetworkStateChanged();\n\t\t\t}", "public void placePowerStation() {\n this.powerStation = true;\n\n }", "@Override\n\t\tpublic void run() {\n\t\t\tmHandler.postDelayed(mRecordChannelStatesRunnable, SLConstants.RECORDING_PERIOD_IN_MILLIS);\n\n\t\t\t// Create the states holder\n\t\t\tSLChannelStates mChannelStates = new SLChannelStates();\n\t\t\tmChannelStates.setTimestamp(System.currentTimeMillis());\n\n\t\t\t// Store each channel's state\n\t\t\tfor(int i=0; i < mChannelViews.size(); i++) {\n\t\t\t\tSeekBar seekBar = mChannelViews.get(i).getChannelSeekBar();\n\n\t\t\t\tSLChannelState cs = new SLChannelState();\n\t\t\t\tcs.setChannelNumber(i);\n\t\t\t\tcs.setOnOffState(true);\n\t\t\t\tcs.setVelocity(seekBar.getProgress());\n\n\t\t\t\tmChannelStates.getChannelStates().add(cs);\n\t\t\t}\n\n\t\t\tmChannelsStates.add(mChannelStates);\n\n\t\t}", "@Override\n public void onReceive(Context context, Intent intent) {\n String action = intent.getAction();\n if (MainService.ACTION_SYNFINSH_SPORTS.equals(action)) { // 同步 运动模式数据\n initdata();\n dismissLoadingDialog();\n Toast.makeText(getApplicationContext(), getString(R.string.data_refresh_success), Toast.LENGTH_LONG).show(); // 数据刷新成功\n }\n }", "public void update(){\n\t\tSystem.out.println(\"Return From Observer Pattern: \\n\" + theModel.getObserverState() \n\t\t+ \"\\n\");\n\t}", "private void mStateSet(cKonst.eSerial nNewState) {\n if (nState_Serial!=nNewState) {\n switch (nNewState) {\n case kBT_Disconnected:\n mMsgDebug(sRemoteDeviceName + \" Disconnected 1\");\n break;\n }\n bDoRedraw = true; //Something has changed redraw controls\n }\n nState_Serial=nNewState;\n }", "private void broadcastConnectionState(BluetoothDevice device, int newState, int prevState) {\n\n int delay = mAudioManager.setBluetoothA2dpDeviceConnectionState(device, newState);\n\n mWakeLock.acquire();\n mIntentBroadcastHandler.sendMessageDelayed(mIntentBroadcastHandler.obtainMessage(\n MSG_CONNECTION_STATE_CHANGED,\n prevState,\n newState,\n device),\n delay);\n }", "private void setupMsgBroadcastReceiver() {\n broadcastReceiverLoraMsg = new BroadcastReceiver() {\n @Override\n public void onReceive(Context context, Intent intent) {\n if (\"com.example.loravisual.MSG_RECEIVED\".equals(intent.getAction())) {\n byte[] bytes = intent.getByteArrayExtra(\"com.example.loravisual.MSG\");\n\n String totalNumber = Integer.toString(bytes[11] + (bytes[10] * multipliers[5])); // + correct total message number calculated from two ble transmitted bytes (#msg number in iteration = [11], (#iteration = [10])\n String msg = new String(bytes).substring(0, 10); // msg = header (ble transmitted from board as string\n\n if (colorToggle) {\n msgTextView.setTextColor(getResources().getColor(R.color.colorPrimaryDark, null));\n } else {\n msgTextView.setTextColor(getResources().getColor(R.color.white, null));\n }\n colorToggle = !colorToggle;\n msgTextView.setText(msg + \" (\" + totalNumber + \")\");\n\n if (dbEntries == null) {\n dbEntries = new String[5];\n dbEntries[0] = totalNumber;\n dbEntries[1] = msg;\n } else {\n dbEntries[0] = totalNumber;\n dbEntries[1] = msg;\n databaseHandler.logReceivedTransmission(Integer.toString(experimentNumber), dbEntries);\n dbEntries = null;\n }\n }\n }\n };\n IntentFilter filter = new IntentFilter(\"com.example.loravisual.MSG_RECEIVED\");\n registerReceiver(broadcastReceiverLoraMsg, filter);\n }", "public void mo34037a() {\n if (this.f30043c == 0) {\n this.f30042b.registerReceiver(this, new IntentFilter(\"android.net.conn.CONNECTIVITY_CHANGE\"));\n }\n this.f30043c++;\n }", "@Override\n public void onReceive(final Context context, Intent intent) {\n// PPApplicationStatic.logE(\"[IN_BROADCAST] DashClockBroadcastReceiver.onReceive\", \"xxx\");\n\n PhoneProfilesDashClockExtension dashClockExtension = PhoneProfilesDashClockExtension.getInstance();\n if (dashClockExtension != null) {\n dashClockExtension.updateExtension();\n }\n\n //final boolean refresh = (intent == null) || intent.getBooleanExtra(EXTRA_REFRESH, true);\n\n /*PPApplication.startHandlerThreadBroadcast();\n final Handler handler = new Handler(PPApplication.handlerThreadBroadcast.getLooper());\n handler.post(new Runnable() {\n @Override\n public void run() {\n PPApplicationStatic.logE(\"[IN_THREAD_HANDLER] PPApplication.startHandlerThread\", \"START run - from=DashClockBroadcastReceiver.onReceive\");\n\n PhoneProfilesDashClockExtension dashClockExtension = PhoneProfilesDashClockExtension.getInstance();\n if (dashClockExtension != null)\n {\n dashClockExtension.updateExtension();\n }\n }\n });*/\n\n }", "private void sendBroadcast(){\n if (temp != -1){\n Intent intent = new Intent(\"com.example.brdcst_rec.toast\");\n intent.putExtra(\"com.example.brdcst_rec.text\", temp);\n sendOrderedBroadcast(intent, null);\n }\n else{\n Toast.makeText(this, \"No Option Selected!\", Toast.LENGTH_SHORT).show();\n }\n }", "public void run()\n\t{\n\t\twhile (true)\n\t\t{\n\t\t\t// Get a broadcast\n\t\t\tString str = sc.nextLine();\n\t\t\t\n\t\t\t// Split the data into its elements\n\t\t\tString[] parts = str.split(\"\\0\");\n\t\t\t\n\t\t\t// Determine whether something new is playing, or nothing is playing\n\t\t\t// If nothing is playing ...\n\t\t\tif (parts[0].equals(\"nothinghere\"))\n\t\t\t{\n\t\t\t\t// ... package that as a NowPlayingEvent\n\t\t\t\tNowPlayingEvent ev = new NowPlayingEvent(null, null, null, null, colorParse(parts[1]), str);\n\t\t\t\t\n\t\t\t\t// ... keep track of it\n\t\t\t\tlastEvent = ev;\n\t\t\t\tlastWasClearEvent = true;\n\t\t\t\t\n\t\t\t\t// ... and notify all registered 'NowPlayingListener's\n\t\t\t\tfor (NowPlayingListener listener : listeners)\n\t\t\t\t\tlistener.nowPlayingSongCleared(ev);\n\t\t\t}\n\t\t\t// Otherwise, something new is playing ...\n\t\t\telse\n\t\t\t{\n\t\t\t\t// ... package that as a NowPlayingEvent\n\t\t\t\tNowPlayingEvent ev = new NowPlayingEvent(parts[0], parts[1], parts[2], parts[3], colorParse(parts[4]), str);\n\t\t\t\t\n\t\t\t\t// ... keep track of it\n\t\t\t\tlastEvent = ev;\n\t\t\t\tlastWasClearEvent = false;\n\t\t\t\t\n\t\t\t\t// ... and notify all registered 'NowPlayingListener's\n\t\t\t\tfor (NowPlayingListener listener : listeners)\n\t\t\t\t\tlistener.nowPlayingSongSet(ev);\n\t\t\t}\n\t\t}\n\t}", "public void setPattern (String pattern) {\n this.pattern = pattern;\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n\n\n Bundle bundle = intent.getExtras();\n Location nLocation = (Location) bundle.get(\"New location\");\n LatLng there = new LatLng(nLocation.getLatitude(), nLocation.getLongitude());\n mMap.addPolyline(new PolylineOptions().add(there).color(0));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(there));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(there.latitude, there.longitude), 12.0f));\n\n Log.v(TAG, \"RECEIVED A NEW LOCATION\");\n\n }", "@Override\n\tpublic void onReceive(Context ctx, Intent intnt) {\n\t\t\n\t\tif(!isInitialStickyBroadcast()) {\t\n\t\t\tinohoConnectionInfo currentInfo = getCurrentConnectionInfo();\n\t\t\t\n\t\t\tString conectionType = currentInfo.m_connectionType;\n\t\t\tString networkId = currentInfo.m_wifiNetworkID;\n\t\t\t\n\t\t\tboolean hasConnectionStateChanged = false;\n\t\t\tif(conectionType.isEmpty() || conectionType.equalsIgnoreCase(\"NONE\")) {\n\t\t\t\thasConnectionStateChanged = false;\n\t\t\t} else if(!conectionType.equals(m_prevConInfo.m_connectionType)) {\n\t\t\t\thasConnectionStateChanged = true;\n\t\t\t} else if(conectionType == \"WIFI\" && m_prevConInfo.m_connectionType == \"WIFI\") {\n\t\t\t\tif(!networkId.equals(\"<unknown ssid>\") && !networkId.equals(m_prevConInfo.m_wifiNetworkID)){\n\t\t\t\t\t//wifi network changed\n\t\t\t\t\thasConnectionStateChanged = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tm_prevConInfo.m_connectionType = currentInfo.m_connectionType;\n\t\t\tm_prevConInfo.m_wifiNetworkID = currentInfo.m_wifiNetworkID;\n\t\t\t\n\t\t\tif(hasConnectionStateChanged) {\n\t\t\t\tif(InohoApplication.isActivityVisible()){\n\t\t\t\t\tlaunchActivity();\n\t\t\t\t} else {//activity in background mark state to be refreshed on launch \n\t\t\t\t\tInohoApplication.setUINeedsRefresh(true);\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public void store(FloatBuffer buf){\n\t\tambient.store(buf);\n\t\tdiffuse.store(buf);\n\t\tspecular.store(buf);\n\t\tposition.store(buf);\n\t\tbuf.put(range);\n\t\tdirection.store(buf);\n\t\tbuf.put(spot);\n\t\tatt.store(buf);\n\t\tbuf.put(pad);\n\t}", "@Override\r\n\t\tpublic void onReceive(Context arg0, Intent intent) {\n\t\t\tString action=intent.getAction();\r\n\t\t\tif(action.equals(\"update_sportTime_calorie_distance\")){\r\n\t\t\t\tif(isOnTotalSteps){\r\n\t\t\t\t\ttvCalorie.setText(calorie2String(BleService.totalCalorie)+\"k cal\");\r\n\t\t\t\t\ttvSportTime.setText(time2String(BleService.totalSportTime));\r\n\t\t\t\t\ttvDistance.setText(BleService.totalDistance+\"m\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\ttvCalorie.setText(calorie2String(BleService.intervalCalorie)+\"k cal\");\r\n\t\t\t\t\ttvSportTime.setText(time2String(BleService.intervalSportTime));\r\n\t\t\t\t\ttvDistance.setText(BleService.intervalDistance+\"m\");\r\n\t\t\t\t}\r\n\t\t\t\tdb.execSQL(\"UPDATE sportData SET steps=? WHERE date=?\", new Object[]{BleService.totalSteps, dateString});\r\n\t\t\t\tlayoutChart.removeViewAt(0);\r\n\t\t\t\tlayoutChart.addView(getGraphicalView(), 0);\r\n\t\t\t}\r\n\t\t\tif(action.equals(\"update_steps\")){\r\n\t\t\t\ttvTotalSteps.setText(BleService.totalSteps+\"\");\r\n\t\t\t\ttvIntervalSteps.setText(BleService.intervalSteps+\"\");\r\n\t\t\t\tint currentCount=BleService.totalSteps*100/targetSteps;\r\n\t\t\t\tif(currentCount>100){\r\n\t\t\t\t\tpgTotalSteps.setCurrentCount(100);\r\n\t\t\t\t}else if(currentCount<0){\r\n\t\t\t\t\tpgTotalSteps.setCurrentCount(0);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tpgTotalSteps.setCurrentCount(currentCount);\r\n\t\t\t\t}\r\n\t\t\t\tfloat percent=BleService.totalSteps*100f/targetSteps;\r\n\t\t\t\tif(percent>100){\r\n\t\t\t\t\ttvComplete.setText(\"100%\");\r\n\t\t\t\t}else if(percent<0){\r\n\t\t\t\t\ttvComplete.setText(\"0%\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\ttvComplete.setText(percent2String(percent)+\"%\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}", "Observable<Boolean> storeShiftForUpdate(Shift shift);", "@Override\n protected void onSaveInstanceState(Bundle outState) {\n outState.putParcelable(INSTANCE_ALARM_ADDRESS_DATA, mMapDestination);\n outState.putInt(INSTANCE_ALARM_ID, mAlarmId);\n if(mAlarmRingtone != null)\n outState.putString(INSTANCE_ALARM_RINGTONE, mAlarmRingtone.toString());\n super.onSaveInstanceState(outState);\n }", "private void sliceSetPattern(int newColorChange) {\n ArrayList<Integer> newPattern = new ArrayList<>(slice);\n ArrayList<Boolean> isSelected = patternAdapter.getIsSelectedList();\n for (int ind = 0; ind < slice.size(); ind++) {\n if (isSelected.get(ind)) {\n // If this color is selected, then set this color\n newPattern.set(ind, newColorChange);\n }\n }\n\n // Save the new pattern\n patternSpecific = newPattern;\n\n // Set the new pattern to slice\n setSlice(newPattern);\n }", "public void setPattern(String pattern) {\r\n\t\tthis.pattern = pattern;\r\n\t}", "@Override\r\n\t\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\t\tNoteInJson[] pattern=gpt.getPattern();\r\n\t\t\t\t\t\t\t\t\t\t\tgotoLiveView(pattern,sound_cache);\r\n\t\t\t\t\t\t\t\t\t\t}", "private synchronized void update() {\n int numberOfPoints = buffer.get(0).size();\n if (numberOfPoints == 0) return;\n\n for (int i = 0; i < getNumberOfSeries(); i++) {\n final List<Double> bufferSeries = buffer.get(i);\n final List<Double> dataSeries = data.get(i);\n dataSeries.clear();\n dataSeries.addAll(bufferSeries);\n bufferSeries.clear();\n }\n\n //D.info(SineSignalGenerator.this, \"Update triggered, ready: \" + getNumberOfSeries() + \" series, each: \" + data[0].length + \" points\");\n bufferIdx = 0;\n\n // Don't want to create event, just \"ping\" listeners\n setDataReady(true);\n setDataReady(false);\n }", "public /* synthetic */ void lambda$new$1$KeyguardUpdateMonitor() {\n Intent registerReceiver;\n int defaultSubscriptionId = SubscriptionManager.getDefaultSubscriptionId();\n ServiceState serviceStateForSubscriber = ((TelephonyManager) this.mContext.getSystemService(TelephonyManager.class)).getServiceStateForSubscriber(defaultSubscriptionId);\n Handler handler = this.mHandler;\n handler.sendMessage(handler.obtainMessage(330, defaultSubscriptionId, 0, serviceStateForSubscriber));\n if (this.mBatteryStatus == null && (registerReceiver = this.mContext.registerReceiver(null, new IntentFilter(\"android.intent.action.BATTERY_CHANGED\"))) != null && this.mBatteryStatus == null) {\n this.mBroadcastReceiver.onReceive(this.mContext, registerReceiver);\n }\n }", "private void SendBroadcastLocation() {\n Intent locationBroadcast = new Intent();\n locationBroadcast.putExtra(Constants.INTENT_LOCATION, mCurrentLocation);\n locationBroadcast.putExtra(Constants.INTENT_LAST_UPDATED_TIME, mLastUpdateTime);\n Log.d(Constants.SENDING_BROADCAST, Constants.SENDING_BROADCAST);\n locationBroadcast.setAction(CUSTOM_INTENT);\n sendBroadcast(locationBroadcast);\n }", "public void store() {\r\n\t\tdata = busExt.get();\r\n\t}", "private void m6599P() {\n if (this.f5398R == null) {\n this.f5398R = new C1269Oa(this);\n registerReceiver(this.f5398R, new IntentFilter(\"android.vivo.bbklog.action.CHANGED\"));\n }\n }", "@Override\n public void storeSettings() {\n\n // Set the default value:\n Globals.prefs.put(JabRefPreferences.DEFAULT_BIBTEX_KEY_PATTERN, defaultPat.getText());\n Globals.prefs.putBoolean(JabRefPreferences.WARN_BEFORE_OVERWRITING_KEY, warnBeforeOverwriting.isSelected());\n Globals.prefs.putBoolean(JabRefPreferences.AVOID_OVERWRITING_KEY, dontOverwrite.isSelected());\n\n Globals.prefs.put(JabRefPreferences.KEY_PATTERN_REGEX, keyPatternRegex.getText());\n Globals.prefs.put(JabRefPreferences.KEY_PATTERN_REPLACEMENT, keyPatternReplacement.getText());\n Globals.prefs.putBoolean(JabRefPreferences.GENERATE_KEYS_AFTER_INSPECTION, autoGenerateOnImport.isSelected());\n Globals.prefs.putBoolean(JabRefPreferences.GENERATE_KEYS_BEFORE_SAVING, generateOnSave.isSelected());\n\n if (alwaysAddLetter.isSelected()) {\n Globals.prefs.putBoolean(JabRefPreferences.KEY_GEN_ALWAYS_ADD_LETTER, true);\n } else if (letterStartA.isSelected()) {\n Globals.prefs.putBoolean(JabRefPreferences.KEY_GEN_FIRST_LETTER_A, true);\n Globals.prefs.putBoolean(JabRefPreferences.KEY_GEN_ALWAYS_ADD_LETTER, false);\n }\n else {\n Globals.prefs.putBoolean(JabRefPreferences.KEY_GEN_FIRST_LETTER_A, false);\n Globals.prefs.putBoolean(JabRefPreferences.KEY_GEN_ALWAYS_ADD_LETTER, false);\n }\n\n // fetch entries from GUI\n GlobalBibtexKeyPattern keypatterns = getKeyPatternAsGlobalBibtexKeyPattern();\n // store new patterns globally\n prefs.putKeyPattern(keypatterns);\n }", "public void sendUpdatedState() {\n \t\tObjectOutputStream out = null;\n \t\ttry {\n \t\t\tfor (Socket socket : sockets) {\n \t\t\t\tout = new ObjectOutputStream(socket.getOutputStream());\n \t\t\t\tout.writeObject(gs);\n \t\t\t\tLog.d(\"network GaC\", \"State written into socket\");\n \t\t\t\tout.flush();\n \t\t\t}\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t}" ]
[ "0.5793395", "0.54497236", "0.5378101", "0.52751833", "0.52514815", "0.5237696", "0.5233814", "0.5165008", "0.5141906", "0.5049963", "0.5023568", "0.50063056", "0.49967688", "0.49960777", "0.4976151", "0.49739796", "0.49608764", "0.49343774", "0.49185237", "0.49138814", "0.49138358", "0.48688594", "0.48610014", "0.485085", "0.4846365", "0.4828275", "0.4815043", "0.48078892", "0.47803143", "0.47771516", "0.47725335", "0.4764967", "0.47592762", "0.47488397", "0.47433305", "0.47174233", "0.47151873", "0.4713335", "0.47094446", "0.4707259", "0.46853524", "0.46784052", "0.4676725", "0.46741456", "0.46713668", "0.46551692", "0.46429127", "0.46410656", "0.46309876", "0.46278197", "0.46197107", "0.46187022", "0.459627", "0.45944068", "0.45888886", "0.45882595", "0.45869938", "0.45859507", "0.4584944", "0.45807645", "0.45801798", "0.45666686", "0.45624596", "0.4562413", "0.45619112", "0.45483345", "0.45472586", "0.45460534", "0.4545346", "0.45421258", "0.4540765", "0.45382422", "0.4532725", "0.45290107", "0.4523551", "0.45187664", "0.4516858", "0.45165208", "0.45073444", "0.45038202", "0.4500022", "0.44952866", "0.44943085", "0.449425", "0.4492275", "0.44882137", "0.44879633", "0.44862872", "0.4484103", "0.44758713", "0.4475598", "0.44744885", "0.4470901", "0.44703093", "0.44688776", "0.44598213", "0.44589263", "0.4456536", "0.4451142", "0.4448788" ]
0.4613693
52
set adapter for plan fragment
private void refreshList() { ArrayAdapter<Plan> planAdapter = new PlanAdapter(); mListView.setAdapter(planAdapter); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setAdapter() {\n binding.RvwalletAmount.setLayoutManager(new GridLayoutManager(getActivity(), 2));\n binding.RvwalletAmount.setHasFixedSize(true);\n WalletAdapter kyCuploadAdapter = new WalletAdapter(getActivity(), getListWallet(), this);\n binding.RvwalletAmount.setAdapter(kyCuploadAdapter);\n }", "private void setAdapter(){\n ArrayList<Veranstaltung>ver = new ArrayList<>(studium.getLVS());\n recyclerView = findViewById(R.id.rc);\n LinearLayoutManager manager = new LinearLayoutManager(this);\n recyclerView.setLayoutManager(manager);\n recyclerView.setHasFixedSize(true);\n adapter = new StudiumDetailsRecylerAdapter(ver);\n recyclerView.setAdapter(adapter);\n }", "private void setUpAdapter(){\n customMovieAdapter= new CustomMovieAdapter(getActivity(),R.layout.list_movie_forecast,movieRowItemsList);\n gridView.setAdapter(customMovieAdapter);\n }", "private void InitializeAdapter() {\n arrayAdapter = new PlanListRVArrayAdapter(mPlanList);\n recyclerView.setAdapter(arrayAdapter);\n /* arrayAdapter.registerAdapterDataObserver(new RecyclerView.AdapterDataObserver() {\n @Override\n public void onChanged() {\n super.onChanged();\n //arrayAdapter.notifyDataSetChanged();\n }\n\n @Override\n public void onItemRangeChanged(int positionStart, int itemCount) {\n // arrayAdapter.notifyItemRangeChanged(positionStart,itemCount);\n }\n\n @Override\n public void onItemRangeInserted(int positionStart, int itemCount) {\n // arrayAdapter.notifyItemRangeRemoved(positionStart,itemCount);\n }\n\n @Override\n public void onItemRangeRemoved(int positionStart, int itemCount) {\n // arrayAdapter.notifyItemRangeRemoved(positionStart,itemCount);\n }\n\n @Override\n public void onItemRangeMoved(int fromPosition, int toPosition, int itemCount) {\n // arrayAdapter.notifyItemMoved(fromPosition,toPosition);\n // TODO itemcount가 1일 경우이므로 1보다 크면 제대로 동작하지 않는다.\n }\n });\n*/\n\n }", "public void setAdapter(String adapter) {\n this.adapter = adapter;\n }", "public void setAdapter(String adapter) {\n this.adapter = adapter;\n }", "public void setAdapter(Adapter adapter) {\n this.adapter = adapter;\n }", "private void setAdapter() {\n resultsRv.setLayoutManager(new LinearLayoutManager(getActivity()));\n resultsRv.setHasFixedSize(true);\n resultsRv.setItemAnimator(new DefaultItemAnimator());\n resultsRv.setAdapter(resultsListAdapter);\n }", "public void setAdapter() {\n\t\tactivityAdapter = new ActivitiesAdapter(getActivity(), List,\n\t\t\t\ttotalmintxt);\n\t\tSystem.out.println(\"listsize=\" + List.size());\n\t\tif (List.size() > 0) {\n\t\t\tint totalmin = 0, totalcal = 0;\n\t\t\tfor (int i = 0; i < List.size(); i++) {\n\t\t\t\ttotalmin += Integer.parseInt(List.get(i).get(\n\t\t\t\t\t\tBaseActivity.total_time_minutes));\n\t\t\t\ttotalcal += Integer.parseInt(List.get(i).get(\n\t\t\t\t\t\tBaseActivity.calories_burned));\n\n\t\t\t}\n\t\t\ttotalmintxt.setText(\"\" + totalmin + \" min\");// calories_burned\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// calories_burned\n\t\t\ttotalcaltxt.setText(\"\" + totalcal + \" cal\");\n\t\t\tactivityListView.setAdapter(activityAdapter);\n\n\t\t\tcom.fitmi.utils.Constants.totalcal = totalcal;\n\n\t\t\tHomeFragment tosetCalory = new HomeFragment();\n\t\t\tNotificationCaloryBurn callBack = (NotificationCaloryBurn) tosetCalory;\n\n\t\t\tcallBack.setTotalCaloryBurn(com.fitmi.utils.Constants.totalcal);\n\t\t} else {\n\n\t\t\ttotalcaltxt.setText(\"0 cal\");\n\t\t\tactivityListView.setAdapter(activityAdapter);\n\t\t}\n\n\t\tsetActivitySpinner();\n\t}", "void setAdapter(SqueezerItemAdapter<T> adapter);", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_plan, container, false);\n recyclerView = (RecyclerView) rootView.findViewById(R.id.rv_plan_list);\n //get plan data\n refresh();\n recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));\n return rootView;\n }", "public void setAdapter() {\n // Create Custom Adapter\n Resources res = getResources();\n adapter = null;\n adapter = new WebsearchListAdapter(this, CustomListViewValuesArr, res);\n list.setAdapter(adapter);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.fragment_plans, container, false);\n toolbar=view.findViewById(R.id.toolbar);\n\n recyclerView=view.findViewById(R.id.recyclerview);\n progressBar=view.findViewById(R.id.progressbar);\n\n// LinearLayoutManager layoutManager=new LinearLayoutManager(getContext());\n// recyclerView.setLayoutManager(layoutManager);\n//\n//\n//// plansList.add(new Plans(\"1\",\"365\",R.drawable.plan1,\"#6EA2FF\"));\n//// plansList.add(new Plans(\"1\",\"999\",R.drawable.plan1,\"#3FB444\"));\n//// plansList.add(new Plans(\"1\",\"1299\",R.drawable.plan1,\"#FF5A60\"));\n//// plansList.add(new Plans(\"1\",\"1999\",R.drawable.plan1,\"#E0AB00\"));\n//\n// PlanAdapter planAdapter=new PlanAdapter(plansList,getContext());\n// recyclerView.setAdapter(planAdapter);\n// planAdapter.notifyDataSetChanged();\n\n\n\n toolbar.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n getActivity().finish();\n }\n });\n\n getPlans();\n\n\n\n\n return view;\n }", "@Override\r\n\tpublic void setAdapter(ListAdapter adapter) {\n\t\tsuper.setAdapter(adapter);\r\n\t\tthis.adapter = (FlowListAdapter)adapter;\r\n\t}", "public void inicializarAdaptador()\n {\n //creamos el adaptador y le pasamos el arreglo de mascotas, en que activity estamos\n //y el numero es para saber en la clase MascotaAdaptador como mostrara los datos y si seran clicables o no\n MascotaAdaptador adaptador = new MascotaAdaptador(mascotas, getActivity(), 1);\n listamascotas.setAdapter(adaptador);\n //agregamos iconos a cada TabLayout\n }", "public void setAdapterFactory(AdapterFactory adapterFactory)\n {\n this.adapterFactory = adapterFactory;\n }", "private void setAdaptersForDataToShow() {\n LinearLayoutManager linearLayoutManager_SectionOfDays = new LinearLayoutManager(this);\n linearLayoutManager_SectionOfDays.setOrientation(LinearLayoutManager.HORIZONTAL);\n recyclerView_sectionOfDays.setLayoutManager(linearLayoutManager_SectionOfDays);\n recyclerView_sectionOfDays.setAdapter(new SectionOfDays_RecyclerViewAdapter(this, daysArray, this));\n\n /**\n * Vertical Recycler View showing List Of Trains\n */\n LinearLayoutManager linearLayoutManager_ListOfTrains = new LinearLayoutManager(this);\n linearLayoutManager_ListOfTrains.setOrientation(LinearLayoutManager.VERTICAL);\n recyclerView_listOfTrains.setLayoutManager(linearLayoutManager_ListOfTrains);\n setAdapter_ListOfTrains_Vertical_RecyclerView(0);\n }", "private void iniAdapter(List<Task> tasks) {\n presAdapter = new TaskAdapter(tasks, this, 1);\n// recyclerView.setAdapter(presAdapter);\n }", "public void setAdapter(ObjectAdapter adapter) {\n mAdapter = adapter;\n if (mRowsFragment != null) {\n mRowsFragment.setAdapter(adapter);\n }\n }", "private void setFragment() {\r\n dataModelArrayList.clear();\r\n fm = getSupportFragmentManager();\r\n mTaskFragment = (ViewPagerAsyncTask) fm.findFragmentByTag(TAG_TASK_FRAGMENT);\r\n\r\n // If the Fragment is non-null, then it is currently being\r\n // retained across a configuration change.\r\n if (mTaskFragment == null) {\r\n mTaskFragment = new ViewPagerAsyncTask();\r\n fm.beginTransaction().add(mTaskFragment, TAG_TASK_FRAGMENT).commit();\r\n }\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View view = inflater.inflate(R.layout.fragment_plan, container, false);\n Log.i(\"SJA\", \"okk fuckinng inn PlanFragment\");\n customActionBar();\n sharedPreferences = getActivity().getSharedPreferences(\"recap\", Context.MODE_PRIVATE);\n editor = sharedPreferences.edit();\n Fname = sharedPreferences.getString(\"fname\", \"\");\n Lname = sharedPreferences.getString(\"lname\", \"\");\n tarikh = sharedPreferences.getString(\"date\", \"\");\n first = Fname.charAt(0);\n type = sharedPreferences.getString(\"type\", \"\");\n goals = sharedPreferences.getString(\"goals\", \"\");\n textPreviewDate = (TextView) view.findViewById(R.id.tvForDate);\n\n tvPreviewGoals = (TextView) view.findViewById(R.id.textPreviewForGoals);\n tvPreviewGoalsLayout = (LinearLayout) view.findViewById(R.id.textPreviewForGoalsLayout);\n\n // tvDate = (TextView) view.findViewById(R.id.tvDate);\n planScrollView = view.findViewById(R.id.plan_scrollview);\n sessionTypeSpinner = (Spinner) view.findViewById(R.id.spinnerSessionType);\n goalSpinner = (Spinner) view.findViewById(R.id.spinnerGoals);\n userGoalSPinner = (Spinner) view.findViewById(R.id.spinnerUserGoal);\n adapter = new ArrayAdapter<String>(getActivity(), android.R.layout.simple_spinner_item, list);\n adapter2 = new ArrayAdapter<String>(getActivity(), android.R.layout.simple_spinner_item, list2);\n\n textPreviewForUserGoal = (TextView) view.findViewById(R.id.tvUserGoal);\n textPreviewForUserGoalLayout = (LinearLayout) view.findViewById(R.id.tvUserGoalLayout);\n\n showDatePicker();\n\n //populating second spinner\n list.add(\"Goal\");\n String[] GoalsArray = goals.split(\",\");\n items = new CharSequence[GoalsArray.length];\n for (int j = 0; j < GoalsArray.length; j++) {\n items[j] =GoalsArray[j];\n list.add(GoalsArray[j]);\n }\n\n //populating 3rd spinner\n list2.add(\"Goals\");\n String[] GoalsArray2 = goals.split(\",\");\n items = new CharSequence[GoalsArray2.length];\n for (int j = 0; j < GoalsArray2.length; j++) {\n items[j] =GoalsArray2[j];\n list2.add(GoalsArray2[j]);\n }\n\n\n return view;\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 }", "public void setAdapter(CustomAdapter adapter) {\n super.setAdapter(adapter);\n this.adapter = adapter;\n //remove the footer view\n this.removeFooterView(footer);\n }", "public void setMyPollAdapter(MyPollsCustomAdapter myPolladapter) {\n super.setAdapter(myPolladapter);\n this.myPolladapter = myPolladapter;\n //remove footer view\n this.removeFooterView(footer);\n }", "private void updateAdapterForViewPager() {\n\n// Stops the page loading animation when response is received successfully\n binding.shimmerFrameLayoutVP.stopShimmer();\n binding.shimmerFrameLayoutVP.setVisibility(View.GONE);\n\n if (vp_adapter == null) {\n vp_adapter = new MainActivityVP_Adapter(this, now_playing_movies, this);\n binding.homeViewPagerID.setAdapter(vp_adapter);\n vp_adapter.notifyDataSetChanged();\n } else if (movieNow_vm.getListLiveDataMovieNow().getValue() != null) {\n vp_adapter = new MainActivityVP_Adapter(this, movieNow_vm.getListLiveDataMovieNow().getValue(), this);\n binding.homeViewPagerID.setAdapter(vp_adapter);\n } else {\n vp_adapter.notifyDataSetChanged();\n }\n\n }", "private void setAdapter(List<MovieList> listMovies) {\n adapter = new CardAdapter(listMovies, this);\n //Adding adapter to recyclerview\n AlphaInAnimationAdapter alphaAdapter = new AlphaInAnimationAdapter(adapter);\n alphaAdapter.setFirstOnly(false);\n recyclerView.setAdapter(alphaAdapter);\n// recyclerView.setAdapter(adapter);\n }", "private void adaptView() {\n adapter = new ViewUserOrder_Adapter(ViewUserOrder.this, R.layout.order_element, listOrder);\n //adapter = new ViewUserOrder_Adapter(this, R.layout.order_element, userOrderList);\n gridView.setAdapter(adapter);\n //Toast.makeText(ViewUserOrder.this, \"Adapted data\", Toast.LENGTH_LONG).show();\n }", "public void cargarAdaptador(){\n gridLayoutManager = new GridLayoutManager(getContext(), 2);\n recyclerView.setLayoutManager(gridLayoutManager);\n adapterRecetas = new AdapterRecetas(getContext());\n recyclerView.setAdapter(adapterRecetas);\n }", "@Override\n public void setRecyclerViewAdapter() {\n recyclerView.setAdapter(favouritePageRecyclerViewAdapter);\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 setListAdapter(ListAdapter adapter) {\n\n\t\t}", "private void setAdapter() {\n AdapterSymptomList adapter = new AdapterSymptomList(allSymptomsList, ActivityRecordsListSymptoms.this);\n RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(ActivityRecordsListSymptoms.this);\n symptomRecyclerView.setLayoutManager(layoutManager);\n symptomRecyclerView.setItemAnimator(new DefaultItemAnimator());\n symptomRecyclerView.setAdapter(adapter);\n }", "private void initializeAdapter() {\n }", "public PlanFormulateListAdapter(List<PlanListBean> data, Context context, boolean isTask) {\n super(data);\n addItemType(PlanListBean.START, R.layout.cdqj_patrol_plan_my_start_item);\n addItemType(PlanListBean.OTHER, R.layout.cdqj_patrol_plan_my_other_item);\n this.context = context;\n this.isTask = isTask;\n }", "private void init() {\n\t\tpager = (MainViewPager) findViewById(R.id.main_pager);\n\t\tfrageManager = getSupportFragmentManager();\n\t\tfoot_group = (RadioGroup) findViewById(R.id.foot_group);\n\t\tadapter = new MyFragmentAdapter(frageManager, list);\n\t}", "public void setlv()\n\t{\n\t\tif(dng!= null)\n\t\t\tlv.setAdapter(dng.adapter);\n\t}", "private void setUpBookingAdapter() {\n// mBinding.swipeRefresh.setRefreshing(false);\n if (null == mRequestAdapter) {\n mRequestAdapter = new RequestAdapter(mThis, mRequestModelList, this);\n mBinding.requestRv.setAdapter(mRequestAdapter);\n } else {\n mRequestAdapter.setmBooking_itemModelList(mRequestModelList);\n mRequestAdapter.notifyDataSetChanged();\n }\n }", "private void createAdapter() {\n Query query = partituraDaoImpl.getOwnPartituras();\n FirestoreRecyclerOptions<Partitura> options = new FirestoreRecyclerOptions.Builder<Partitura>()\n //query and class in which the data is saved\n .setQuery(query, Partitura.class).setLifecycleOwner(this).build();\n if (adapter != null) adapter.stopListening();\n //Create adapter\n adapter = new PartituraAdapter(options, getContext());\n //assign the adapter\n rvPartituras.setAdapter(adapter);\n //we began to listen.\n adapter.startListening();\n // Move the scroll of the recyclerView to the beginning to see the new message\n adapter.getSnapshots().addChangeEventListener(new ChangeEventListener() {\n @Override\n public void onChildChanged(@NonNull ChangeEventType type, @NonNull\n DocumentSnapshot snapshot, int newIndex, int oldIndex) {\n rvPartituras.smoothScrollToPosition(0);\n }\n @Override\n public void onDataChanged() {\n }\n @Override\n public void onError(@NonNull FirebaseFirestoreException e) {\n }\n });\n }", "DeparturesRecyclerViewAdapter(Context context, String endpoint) {\n this.context = context;\n this.endpoint = endpoint;\n this.mInflater = LayoutInflater.from(context);\n }", "private void bindViewPager() {\n\t\tmAdapter = new FragmentPagerAdapter(getSupportFragmentManager()) {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic int getCount() {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\treturn 2;\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic Fragment getItem(int arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tswitch (arg0) {\r\n\t\t\t\tcase 0:\r\n\t\t\t\t\treturn new VideoInforFragment();\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\treturn new VideoReplayFragment();\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t};\r\n\t\tmViewPager.setAdapter(mAdapter);\r\n\t}", "public void setPlan(java.lang.String plan) {\n this.plan = plan;\n }", "public interface FragmentPresenter {\n void onViewCreated();\n void setBusId(String busId);\n void refreshClick();\n RecyclerView.Adapter getAdapter();\n}", "private void setRecyclerViewAdapter(List<Task> tasks){\n adapter = new DataAdapter(ViewTaskActivity.this, tasks);\n recyclerView.setAdapter(adapter);\n recyclerView.setLayoutManager(layoutManager);\n }", "public void setupAdapter() {\n recyclerAdapter = new PhotosAdapter(this);\n recyclerViewPhotos.setAdapter(recyclerAdapter);\n }", "private void buildAdapter(int fragmentType) {\n Log.d(TAG, \"buildAdapter type = \" + fragmentType);\r\n mAdapter = null;\r\n switch (fragmentType) {\r\n case TwitterConstant.TW_DATA_TYPE_TIMELINE:\r\n case TwitterConstant.TW_DATA_TYPE_TIMELINE_LINKS:\r\n case TwitterConstant.TW_DATA_TYPE_TWEETS:\r\n case TwitterConstant.TW_DATA_TYPE_FAVORITES:\r\n case TwitterConstant.TW_DATA_TYPE_MENTIONING_TWEETS:\r\n Log.d(TAG, \"build adapter TIMELINE\");\r\n mAdapter = new TwitterTimeLineFlipAdapter(getActivity(), mListTwStatuses);\r\n ((TwitterTimeLineFlipAdapter) mAdapter).setListener(this);\r\n break;\r\n default:\r\n break;\r\n }\r\n\r\n if (null != mAdapter) {\r\n mFlipView.setVisibility(View.GONE);\r\n mLinearProgressBar.setVisibility(View.VISIBLE);\r\n mLayoutEmpty.setVisibility(View.GONE);\r\n mFlipView.setAdapter(mAdapter);\r\n }\r\n }", "@Override\npublic void setObjectAdapter(ObjectAdapter adapter) {\n\t\n}", "private void showMyAdapt() {\n\t\tmyAdapt = new MyAdapt(this, persons);\n\t\tlistView.setAdapter(myAdapt);\n\t}", "@Override\n\t\tpublic void setAdapter(ListAdapter adapter) {\n\t\t\tif (null != mLvFooterLoadingFrame && !mAddedLvFooter) {\n\t\t\t\taddFooterView(mLvFooterLoadingFrame, null, false);\n\t\t\t\tmAddedLvFooter = true;\n\t\t\t}\n\n\t\t\tsuper.setAdapter(adapter);\n\t\t}", "public void initialzeAdapter() {\n // find grid view\n GridView gridView = (GridView) findViewById(R.id.gridView);\n\n // initialize and set adapter to grid view\n FriendsAdapter adapter = new FriendsAdapter(this, R.layout.grid_item, friends);\n gridView.setAdapter(adapter);\n }", "private void setupAdapterAndViewPager() {\n mFragmentAdapter = new MyPagerAdapter(getSupportFragmentManager());\n mViewPager.setAdapter(mFragmentAdapter);\n mViewPager.setOffscreenPageLimit(4);\n\n //Set up the Tablayout\n mTabLayout.setupWithViewPager(mViewPager);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_offer, container, false);\n\n mOfferViewPager = view.findViewById(R.id.offerViewPager);\n mImageView = view.findViewById(R.id.offerMainImage);\n mRTL = view.findViewById(R.id.offerRTL);\n mDb = FirebaseFirestore.getInstance();\n mList = new ArrayList<>();\n\n getData();\n\n Log.d(TAG, \"onCompleteMlist: \"+getmList().size());\n adapter = new OfferPagerAdapter(getFragmentManager(), 0, mList);\n Log.d(TAG, \"onCreateView: \"+mList.size());\n\n mOfferViewPager.setAdapter(adapter);\n mRTL.hasFixedSize();\n OfferRTLAdapter RTLadapter = new OfferRTLAdapter(mOfferViewPager);\n Log.d(TAG, \"onCreateView: position\"+ RTLadapter.getCurrentIndicatorPosition());\n Log.d(TAG, \"onCreateView: \"+mOfferViewPager.getCurrentItem());\n mRTL.setUpWithAdapter(RTLadapter);\n\n Log.d(TAG, \"onCreateView: \"+pos);\n mRTL.setIndicatorColor(Color.RED);\n Picasso.get().load(R.drawable.offer_main_pic).into(mImageView);\n return view;\n }", "private void loading(){\n mDbHelper = new DbHelper(getActivity());\n if(!(mDbHelper.getPlanCount() == 0)){\n plan_list.addAll(mDbHelper.getAllPlan());\n }\n refreshList();\n }", "public void configs() {\n adaptadorRecyclerView = new AdaptadorRecyclerView(new ArrayList<>(), this);//configuramos el adaptador; necesitamos implementar interfaz OnItemClickListener y sobreescribir sus metodos\n recyclerView.setLayoutManager(new LinearLayoutManager(this));//configuramos la recyclerView\n recyclerView.setAdapter(adaptadorRecyclerView);\n }", "private void initFragmentDebetableGoalNow() {\n\n // init the DB\n myDb = new DBAdapter(fragmentDebetableGoalNowContext);\n\n // init the prefs\n prefs = fragmentDebetableGoalNowContext.getSharedPreferences(ConstansClassMain.namePrefsMainNamePrefs, fragmentDebetableGoalNowContext.MODE_PRIVATE);\n prefsEditor = prefs.edit();\n\n //get date of debetable goals\n currentDateOfDebetableGoal = prefs.getLong(ConstansClassOurGoals.namePrefsCurrentDateOfDebetableGoals, System.currentTimeMillis());\n\n //get block id of debetable goals\n currentBlockIdOfDebetableGoals = prefs.getString(ConstansClassOurGoals.namePrefsCurrentBlockIdOfDebetableGoals, \"0\");\n\n // call getter-methode isCommentLimitationBorderSet in ActivityOurArrangement to get true-> sketch comments are limited, false-> sketch comments are not limited\n debetableCommentLimitationBorder = ((ActivityOurGoals)getActivity()).isCommentLimitationBorderSet(\"debetableGoals\");\n\n // new recyler view\n recyclerViewDebetableGoalsNow = viewFragmentDebetablGoalNow.findViewById(R.id.listOurGoalsDebetableGoalsNow);\n LinearLayoutManager linearLayoutManager = new LinearLayoutManager(fragmentDebetableGoalNowContext);\n recyclerViewDebetableGoalsNow.setLayoutManager(linearLayoutManager);\n recyclerViewDebetableGoalsNow.setHasFixedSize(true);\n }", "abstract public void setUpAdapter();", "public void setupAdaptedItemView() {\r\n ArrayList<Profile> requesterList = new ArrayList<>();\r\n requesterList.add(requester);\r\n setupAdaptedItemView(requesterList);\r\n }", "public void setAdapter(Adapter adapter) {\n\t\tif (mAdapter != null) mAdapter.unregisterDataSetObserver(mDataObserver);\n\t\tmAdapter = adapter;\n\t\tmAdapter.registerDataSetObserver(mDataObserver);\n\t}", "private void setAdapter() {\n adapter = new MessageAdapter(messages);\n RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext());\n recyclerView.setLayoutManager(mLayoutManager);\n recyclerView.setItemAnimator(new DefaultItemAnimator());\n recyclerView.setAdapter(adapter);\n }", "private void setupViewPager(ViewPager viewPager) {\n\n try {\n mFragmentList.clear();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n adapter.notifyDataSetChanged();\n\n mFragmentList.add(Constants.mMainActivity.productListPendingFragment);\n mFragmentTitleList.add(\"Pending\");\n\n mFragmentList.add(Constants.mMainActivity.productListApprovedFragment);\n mFragmentTitleList.add(\"Approved\");\n\n mFragmentList.add(Constants.mMainActivity.productListRejectedFragment);\n mFragmentTitleList.add(\"Rejected\");\n\n viewPager.setAdapter(adapter);\n }", "public PlanFormulateListAdapter(List<PlanListBean> data, Context context) {\n super(data);\n addItemType(PlanListBean.START, R.layout.cdqj_patrol_plan_my_start_item);\n addItemType(PlanListBean.OTHER, R.layout.cdqj_patrol_plan_my_other_item);\n this.context = context;\n }", "public void setPlan( Plan plan ) {\n getUser().setPlan( plan );\n }", "private void populateAdapter(){\n mAdapter = new MovieRecyclerAdapter(context, moviesList, this);\n mRecyclerView.setAdapter(mAdapter);\n }", "@Override\r\n\tpublic Object getItem(int position) {\n\t\treturn listPlan.get(position);\r\n\t}", "@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)\n private void setRemoteAdapter(Context context, @NonNull final RemoteViews views) {\n views.setRemoteAdapter(R.id.widget_list_view,\n new Intent(context, DetailWidgetRemoteViewsService.class));\n }", "private void initListView() {\n viewPager.setAdapter(adapter);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_tv_list, container, false);\n this.gridView = view.findViewById(R.id.tv_list);\n TVAdapter TVAdapter = new TVAdapter(getContext(), tvArrayList);\n this.gridView.setAdapter(TVAdapter);\n this.gridView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n TV tv = tvArrayList.get(i);\n Intent intent = new Intent(getContext(), TVDetailActivity.class);\n intent.putExtra(\"tv\", tv);\n getActivity().startActivity(intent);\n }\n });\n this.gridView.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int pos, long id) {\n //倒数第几行开始加载下一页\n int preRows = 2;\n if (pos > tvArrayList.size() - preRows * gridView.getNumColumns() && !isLoading && !isEnded) {\n loadMore();\n }\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> adapterView) {\n\n }\n });\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.fragment_network, container, false);\n tabAR=(TabLayout)view. findViewById(R.id.tablayoutAR);\n tab1AR=(TabItem)view. findViewById(R.id.tabitem1AR);\n tab2AR=(TabItem)view. findViewById(R.id.tabitem2AR);\n viewpgrARN=(ViewPager)view. findViewById(R.id.viewPagerARNB);\n pageAdapterARN = new PageAdapterNei(getFragmentManager(), tabAR.getTabCount());\n viewpgrARN.setAdapter(pageAdapterARN);\n tabAR.setOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {\n @Override\n public void onTabSelected(TabLayout.Tab tab) {\n\n viewpgrARN.setCurrentItem(tab.getPosition());\n if(tab.getPosition()==0||tab.getPosition()==1)\n {\n pageAdapterARN.notifyDataSetChanged();\n }\n }\n\n @Override\n public void onTabUnselected(TabLayout.Tab tab) {\n\n }\n\n @Override\n public void onTabReselected(TabLayout.Tab tab) {\n\n }\n });\n\n viewpgrARN.addOnPageChangeListener(new TabLayout.TabLayoutOnPageChangeListener(tabAR));\n\n\n return view;\n }", "public void ejecutarAdaptador(){\n gvResultados.setAdapter(new ImagenAdapter(this, listaMomentos));\n }", "public ButtonAdapter(Context context, List<planListDb> list) {\n\t\tinflater = LayoutInflater.from(context);\n\t\tmcontext = context;\n\t\tthis.list = list;\n\n\t}", "private void setRecyclerAdapter() {\n if (mRecyclerAdapter == null) {\n mRecyclerAdapter = new IssueResultsRecyclerAdapter(this, issueResult, mNation);\n mRecyclerView.setAdapter(mRecyclerAdapter);\n } else {\n ((IssueResultsRecyclerAdapter) mRecyclerAdapter).setContent(issueResult, mNation);\n }\n }", "@Override\n public void initViews() {\n adapter = new PaymentAdapter(context, MainActivity.os.getPayments());\n ((ListView)views.get(\"LIST_VIEW\")).setAdapter(adapter);\n (views.get(\"ADD_BUTTON\")).setOnClickListener(this);\n }", "@Override\n public void onBindViewHolder(MyViewHolder myViewHolder, int position) {\n PlanningObject planning = list.get(position);\n myViewHolder.bind(planning);\n }", "@Override\n\tpublic void setAdapter(ListAdapter adapter) {\n\t\tif (mIsFooterReady == false) {\n\t\t\tmIsFooterReady = true;\n\t\t\taddFooterView(mFooterView);\n\t\t}\n\t\tsuper.setAdapter(adapter);\n\t}", "public interface ICuponesFragmentView {\n\n public void generarLinearLayoutVertical();\n\n public CuponAdaptador crearAdaptador(List<Cupon> cupones);\n\n public void inicializarAdaptadorRV(CuponAdaptador adaptador);\n\n}", "public void setCampaignPollAdapter(ParticipateButtonCustomAdapter campaignPollAdapter) {\n super.setAdapter(campaignPollAdapter);\n this.campaignPollAdapter = campaignPollAdapter;\n //remove footer view\n this.removeFooterView(footer);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_lista_prestaciones_bm, container, false);\n rvPrestacionesBM = view.findViewById(R.id.rvPrestacionBM);\n rvPrestacionesBM.setLayoutManager(new LinearLayoutManager(getContext()));\n\n vm = ViewModelProvider.AndroidViewModelFactory.getInstance(getActivity().getApplication()).create(ListaPrestacionesViewModel.class);\n\n vm.getListaPrestaciones().observe(getViewLifecycleOwner(), new Observer<ArrayList<Prestacion>>() {\n @Override\n public void onChanged(final ArrayList<Prestacion> prestacions) {\n AdaptadorPrestacion adaptador = new AdaptadorPrestacion(prestacions, getContext());\n\n adaptador.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Prestacion prestacion = prestacions.get(rvPrestacionesBM.getChildAdapterPosition(v));\n Bundle bundle=new Bundle();\n bundle.putSerializable(\"prestacion\", prestacion);\n Navigation.findNavController(v).navigate(R.id.nav_prestacionMB, bundle);\n }\n });\n\n rvPrestacionesBM.setAdapter(adaptador);\n }\n });\n\n vm.cargarDatos();\n\n return view;\n }", "public CustomAdapter(List<Quiz> quizList) {// Now lets add stuff to the quiz.\n this.quizList = quizList;\n }", "private void setupViewPager(ViewPager viewPager, Bundle savedInstanceState) {\n adapter = new Adapter(getSupportFragmentManager());\n\n adapter.addFragment(new EventDescription(), \"Descrizione\");\n adapter.addFragment(new JoinersList(), \"Partecipanti\");\n adapter.addFragment(new Contacts(), \"Contatti\");\n viewPager.setAdapter(adapter);\n\n\n }", "private void Init(Context context){\n\n if(adapter == null){\n adapter = new ArrayAdapter<String>(context, android.R.layout.simple_list_item_1);\n }\n\n this.setAdapter(adapter);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView=inflater.inflate(R.layout.fragment_recommend, container, false);\n final ProgressBar pbRecommend= (ProgressBar) rootView.findViewById(R.id.pbRecommend);\n RecyclerView rvRecommend= (RecyclerView) rootView.findViewById(R.id.rvRecommend);\n final ItemAdapter itemAdapter=new ItemAdapter(getActivity(),new ArrayList<FourSquareItem>());\n\n rvRecommend.setLayoutManager(new LinearLayoutManager(getActivity(),LinearLayoutManager.HORIZONTAL,false));\n rvRecommend.setAdapter(itemAdapter);\n Bundle bundle=this.getArguments();\n String userll= bundle.getString(\"ll\");\n ApiService.getApi().getRecommendedVenues(BuildConfig.ClientID,BuildConfig.ClientSecret,userll).enqueue(new Callback<FourSquareJSON>() {\n @Override\n public void onResponse(Call<FourSquareJSON> call, Response<FourSquareJSON> response) {\n\n pbRecommend.setIndeterminate(false);\n pbRecommend.setVisibility(View.GONE);\n FourSquareJSON fJson=response.body();\n ArrayList<FourSquareItem>items=fJson.getResponse().getGroups().get(0).getItems();\n itemAdapter.updateItems(items);\n }\n\n @Override\n public void onFailure(Call<FourSquareJSON> call, Throwable t) {\n Toast.makeText(getActivity(),\"Error in fetching data\",Toast.LENGTH_SHORT).show();\n\n }\n });\n\n return rootView;\n }", "public DayPlanFragment() {\n\t}", "public void bind() {\n\t\tview.setAdapter(adapter);\n\t}", "@Override\n\tpublic void setAdapter(DmcAdapterIF adapter) {\n\t\t\n\t}", "public void setUserPollAdapter(UserPollCustomAdapter userPolladapter) {\n super.setAdapter(userPolladapter);\n this.userPolladapter = userPolladapter;\n //remove footer view\n this.removeFooterView(footer);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_prefil, container, false);\n\n //ADAPTER\n //---------------------------------------------------------------------------------\n mascotas = new ArrayList<Mascota>();\n mascotas.add(new Mascota(\"\",10,R.drawable.perro1));\n mascotas.add(new Mascota(\"\",9,R.drawable.perro1));\n mascotas.add(new Mascota(\"\",8,R.drawable.perro1));\n mascotas.add(new Mascota(\"\",7,R.drawable.perro1));\n mascotas.add(new Mascota(\"\",6,R.drawable.perro1));\n mascotas.add(new Mascota(\"\",5,R.drawable.perro1));\n mascotas.add(new Mascota(\"\", 4, R.drawable.perro1));\n mascotas.add(new Mascota(\"\",3,R.drawable.perro1));\n mascotas.add(new Mascota(\"\", 0, R.drawable.perro1));\n\n\n rvPerfil = (RecyclerView) v.findViewById(R.id.rv_perfil);\n rvPerfil.setHasFixedSize(true);\n final GridLayoutManager glm= new GridLayoutManager(getActivity(),3,GridLayoutManager.VERTICAL,false);\n rvPerfil.setLayoutManager(glm);\n RVAdapter adapter = new RVAdapter(mascotas);\n rvPerfil.setAdapter(adapter);\n\n\n //FIN ADAPTER\n //-------------------------------------------------------------------------------------\n\n return v;\n }", "private void init(View view) {\n\t\t\r\n\t\tFunSub = (CustemGallery)view.findViewById(R.id.FragMain_Pack);\r\n\t\t\r\n\t\tfragMain_Pack_CustemCalleryAdapter = new FragMain_Pack_CustemCalleryAdapter(getActivity());\r\n\t\t\r\n\t\tFunSub.setAdapter(fragMain_Pack_CustemCalleryAdapter);\r\n\t\t\r\n\t\t\r\n\t}", "protected void setAdapterClass(Class<?> adapterClass) {\n this.adapterClass = adapterClass;\n }", "public String getAdapter() {\n return adapter;\n }", "private void setAdapter() {\n\n\t\tathleteCheckInAdapter = new AthleteStickyHeaderCheckInAdapter(getActivity(), athleteAttendanceList);\n\n\t}", "@Override\n public void setAdapter(Adapter adapter) {\n Adapter previousAdapter = getAdapter();\n if (previousAdapter != null)\n previousAdapter.unregisterAdapterDataObserver(mEmptyAdapterDataObserver);\n\n // register observer for new adapter\n if (adapter != null)\n adapter.registerAdapterDataObserver(mEmptyAdapterDataObserver);\n\n // update adapter\n super.setAdapter(adapter);\n }", "private void setUpRecyclerView() {\n\n if (listOfPlants.size() == 0) {\n populatePlantList();\n }\n\n mRecyclerView.setHasFixedSize(true);\n mLayoutManager = new LinearLayoutManager(getContext());\n mAdapter = new RecyclerViewAdapter(listOfPlants, getActivity());\n mRecyclerView.setLayoutManager(mLayoutManager);\n mRecyclerView.setAdapter(mAdapter);\n }", "void setProductPlan(final ProductPlan productPlan);", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_survey); // calls layout activity_survey.xml\n viewPager=(ViewPager) findViewById(R.id.survey); // survey declared in activity_survey.xml\n FragmentManager fm = getSupportFragmentManager();\n viewPager.setAdapter(new MyAdapter(fm));\n }", "@Override\n\t\tprotected void onPostExecute(Void result) {\n\t\t\tsuper.onPostExecute(result);\n\t\t\tpDialog.dismiss();\n\t\t\tadapter = new CustomAdapter_Program(getActivity(), 0, objects);\n\t\t\tlv.setAdapter(adapter);\n\t\t}", "private void setRemoteAdapter(Context context, @NonNull final RemoteViews views,\n int appWidgetId) {\n Intent intent = new Intent(context, PopularShowsWidgetRemoteViewsService.class);\n intent.setData(Uri.fromParts(\"content\", String.valueOf(appWidgetId), null));\n views.setRemoteAdapter(R.id.widget_list, intent);\n }", "public void setPlans (List<DataSource.IntrospectionPlan> plans) {\n this.plans = plans;\n }", "public void setListView() {\n arr = inSet.toArray(new String[inSet.size()]);\n adapter = new ArrayAdapter(SetBlock.this, android.R.layout.simple_list_item_1, arr);\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n adapter.notifyDataSetChanged();\n listView.setAdapter(adapter);\n }\n });\n }", "public void initView() {\n ArrayAdapter<String> arrayAdapter=new ArrayAdapter<String>(getView().getContext(),android.R.layout.simple_list_item_1,tracks);\n list.setAdapter(arrayAdapter);\n }", "public void setAdapter(CampaignCommentsAdapter customCommentsadapter) {\n super.setAdapter(customCommentsadapter);\n this.commentsAdapter = customCommentsadapter;\n //remove the footer view\n this.removeFooterView(footer);\n }", "private void fillAdapter() {\n LoaderManager loaderManager = getSupportLoaderManager();\n Loader<String> recipesListLoader = loaderManager.getLoader(RECIPES_LIST_LOADER);\n if(recipesListLoader == null) {\n loaderManager.initLoader(RECIPES_LIST_LOADER, null, this);\n } else {\n loaderManager.restartLoader(RECIPES_LIST_LOADER, null, this);\n }\n }" ]
[ "0.7137445", "0.6760209", "0.6637252", "0.654916", "0.65426403", "0.6494325", "0.6442731", "0.64196295", "0.6389616", "0.6389119", "0.62232417", "0.61370265", "0.6077939", "0.6074383", "0.6029289", "0.6003296", "0.6000931", "0.5971038", "0.5962671", "0.59366876", "0.58866215", "0.5880383", "0.58719695", "0.5867211", "0.5863199", "0.5858031", "0.5852006", "0.5845", "0.58203727", "0.5819025", "0.58180094", "0.5809537", "0.58061", "0.5801957", "0.57819897", "0.5778909", "0.5769641", "0.5762007", "0.57520217", "0.5749784", "0.5743594", "0.5732752", "0.5718987", "0.5711479", "0.56897134", "0.56872463", "0.56851035", "0.56840324", "0.5682582", "0.566082", "0.56280196", "0.56248677", "0.5623931", "0.56228524", "0.5612056", "0.5608243", "0.5592924", "0.55791515", "0.55758727", "0.5574337", "0.55664384", "0.55592626", "0.5549479", "0.5538344", "0.55310124", "0.5527503", "0.5520549", "0.5512028", "0.55091643", "0.5508869", "0.5504341", "0.55041564", "0.55007684", "0.5496411", "0.54882854", "0.548215", "0.5480823", "0.5480239", "0.54762775", "0.5474562", "0.5474039", "0.5467401", "0.5464306", "0.54615015", "0.54596263", "0.5455278", "0.54413944", "0.54361194", "0.5424676", "0.5423014", "0.541912", "0.5418318", "0.5415937", "0.5407971", "0.54005057", "0.5395931", "0.53926945", "0.5392632", "0.53909767", "0.5389921" ]
0.61531526
11
load all data from database
private void loading(){ mDbHelper = new DbHelper(getActivity()); if(!(mDbHelper.getPlanCount() == 0)){ plan_list.addAll(mDbHelper.getAllPlan()); } refreshList(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void loadDataFromDatabase() {\n mSwipeRefreshLayout.setRefreshing(true);\n mPresenter.loadDataFromDatabase();\n }", "public void loadData() {\n\t\tbookingRequestList = bookingRequestDAO.getAllBookingRequests();\n\t\tcabDetailList = cabDAO.getAllCabs();\n\t}", "public abstract void loadFromDatabase();", "@Override\r\n\tpublic void loadData() {\r\n\t\t// Get Session\r\n\r\n\t\tSession ses = HibernateUtil.getSession();\r\n\r\n\t\tQuery query = ses.createQuery(\"FROM User\");\r\n\r\n\t\tList<User> list = null;\r\n\t\tSet<PhoneNumber> phone = null;\r\n\t\tlist = query.list();\r\n\t\tfor (User u : list) {\r\n\t\t\tSystem.out.println(\"Users are \" + u);\r\n\t\t\t// Getting phones for for a particular user Id\r\n\t\t\tphone = u.getPhone();\r\n\t\t\tfor (PhoneNumber ph : phone) {\r\n\t\t\t\tSystem.out.println(\"Phones \" + ph);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}", "private void loadData(){\n\t\t \n\t\t model.getDataVector().clear();\n\t\t ArrayList<Person> personList = DataBase.getInstance().getPersonList();\n\t\t for(Person person : personList){\n\t\t\t addRow(person.toBasicInfoStringArray());\n\t\t }\n\t\t \n\t }", "public void getDataFromFile() throws SQLException{\n \n //SQL database\n getGuestDate_DB();\n getHotelRoomData_DB();\n updateRoomChanges_DB();\n \n //this.displayAll();\n //this.displayAllRooms();\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 loadData()\n {\n }", "void loadData();", "void loadData();", "private static void initializeDatabase() {\n\t\tArrayList<String> data = DatabaseHandler.readDatabase(DATABASE_NAME);\n\t\tAbstractSerializer serializer = new CineplexSerializer();\n\t\trecords = serializer.deserialize(data);\n\t}", "public void loadFromDatabase(){\r\n /**\r\n * Open the file streams to the three files\r\n * Recover the state of data structures\r\n * Close the file streams\r\n */\r\n\r\n try{\r\n //Recover the state of unfinished set from unfinished.dat\r\n unfinishedFileInputStream = new FileInputStream(UNFINISHED_FILE_PATH);\r\n unfinishedSetInputStream = new ObjectInputStream(unfinishedFileInputStream);\r\n unfinished = (Set<Task>)unfinishedSetInputStream.readObject();\r\n unfinishedSetInputStream.close();\r\n unfinishedFileInputStream.close();\r\n\r\n //Recover the state of finished list from finished.dat\r\n finishedFileInputStream = new FileInputStream(FINISHED_FILE_PATH);\r\n finishedListInputStream = new ObjectInputStream(finishedFileInputStream);\r\n finished = (ArrayList<Task>)finishedListInputStream.readObject();\r\n finishedListInputStream.close();\r\n finishedFileInputStream.close();\r\n\r\n //Recover the state of activities list from activities.dat\r\n activitiesFileInputStream = new FileInputStream(ACTIVITIES_FILE_PATH);\r\n activitiesListInputStream = new ObjectInputStream(activitiesFileInputStream);\r\n activities = (ArrayList<Activity>)activitiesListInputStream.readObject();\r\n activitiesListInputStream.close();\r\n activitiesFileInputStream.close();\r\n\r\n generateWeeklySchedule();\r\n }\r\n catch(Exception e){\r\n System.out.println(e.getMessage());\r\n }\r\n }", "@EventListener(ApplicationReadyEvent.class)\n\tpublic void loadData() {\n\t\tList<AppUser> allUsers = appUserRepository.findAll();\n\t\tList<Customer> allCustomers = customerRepository.findAll();\n\t\tList<Part> allPArts = partRepository.findAll();\n\n\t\tif (allUsers.size() == 0 && allCustomers.size() == 0 && allPArts.size() == 0) {\n\t\t\tSystem.out.println(\"Pre-populating the database with test data\");\n\n\t\t\tResourceDatabasePopulator resourceDatabasePopulator = new ResourceDatabasePopulator(\n\t\t\t\tfalse,\n\t\t\t\tfalse,\n\t\t\t\t\"UTF-8\",\n\t\t\t\tnew ClassPathResource(\"data.sql\"));\n\t\t\tresourceDatabasePopulator.execute(dataSource);\n\t\t}\n\t\tSystem.out.println(\"Application successfully started!\");\n\t}", "protected abstract void loadData();", "private void loadData(){\n Dh.refresh();\n }", "public void refreshData(){ \n \t\tif(!mIsFirstRun){\n \t if(mDb == null) mDb = new Sqlite(this.getContext());\n \t if(!mDb.isOpen()) mDb.openRead();\n \t \n \t\t\tgetLoaderManager().restartLoader(0,null,this);\n \t\t}else mIsFirstRun = false;\n \t}", "private void getDataFromDB() {\n ArrayList<ArtworkData> artworkData = getArtworksFromDatabase();\n if (artworkData.size() <= 0) {\n // there is no data in local DB, error\n onErrorReceived();\n } else {\n sendArtworkData(artworkData);\n }\n }", "public void loadDataFromDB() {\n if(user == null) {\n return;\n }\n decodeImage(user.getProfilePic(), imageView);\n usernameTV.setText(user.getUserID());\n emailTV.setText(user.getEmail());\n followingTV.setText(Integer.toString(user.getFollowingList().size()));\n followerTV.setText(Integer.toString(user.getNumFollwers()));\n list.clear();\n for (int i = 0; i < user.getNotification().size(); i++) {\n list.add(user.getNotification().get(i).getString());\n }\n\n getUsers();\n }", "public void loadData () {\n // create an ObjectInputStream for the file we created before\n ObjectInputStream ois;\n try {\n ois = new ObjectInputStream(new FileInputStream(\"DB/Guest.ser\"));\n\n int noOfOrdRecords = ois.readInt();\n Guest.setMaxID(ois.readInt());\n System.out.println(\"GuestController: \" + noOfOrdRecords + \" Entries Loaded\");\n for (int i = 0; i < noOfOrdRecords; i++) {\n guestList.add((Guest) ois.readObject());\n //orderList.get(i).getTable().setAvailable(false);\n }\n } catch (IOException | ClassNotFoundException e1) {\n // TODO Auto-generated catch block\n e1.printStackTrace();\n }\n }", "private void cargarDeDB() {\n Query query = session.createQuery(\"SELECT p FROM Paquete p WHERE p.reparto is NULL\");\n data = FXCollections.observableArrayList();\n\n List<Paquete> paquetes = query.list();\n for (Paquete paquete : paquetes) {\n data.add(paquete);\n }\n\n cargarTablaConPaquetes();\n }", "public void loadAllUserData(){\n\n }", "private void FetchingData() {\n\t\t try { \n\t\t\t \n\t \tmyDbhelper.onCreateDataBase();\n\t \t \t\n\t \t\n\t \t} catch (IOException ioe) {\n\t \n\t \t\tthrow new Error(\"Unable to create database\");\n\t \n\t \t} \n\t \ttry {\n\t \n\t \t\tmyDbhelper.openDataBase();\n\t \t\tmydb = myDbhelper.getWritableDatabase();\n\t\t\tSystem.out.println(\"executed\");\n\t \t\n\t \t}catch(SQLException sqle){\n\t \n\t \t\tthrow sqle;\n\t \n\t \t}\n\t}", "private void getAllNewsFromDatabase() {\n new GetAllNewsAsyncTask(newsDao).execute(newsList);\n }", "public abstract void loadData();", "public abstract void loadData();", "public HTMLManager loadAllData() throws SQLException {\n\t\tHTMLManager hm = new HTMLManager();\n\t\tDataManager dm = new DataManager();\n\t\tdao.loadData(dm);\n\t\tArrayList<Product> productsList = dm.getProductList();\n\t\tfor(Product product : productsList) {\n\t\t\thm.addRowToOutputData(product);\n\t\t}\n\t\treturn hm;\n\t}", "public List<Result> loadResults() {\n List<Result> results = null;\n try {\n DataBaseBroker dbb = new DataBaseBroker();\n dbb.loadDriver();\n dbb.establishConnection();\n results = dbb.loadResults();\n dbb.commit();\n dbb.closeConnection();\n } catch (Exception ex) {\n Logger.getLogger(GameDBLogic.class.getName()).log(Level.SEVERE, null, ex);\n }\n return results;\n }", "void all_Data_retrieve() {\n\t\tStatement stm=null;\n\t\tResultSet rs=null;\n\t\ttry{\n\t\t\t//Retrieve tuples by executing SQL command\n\t\t stm=con.createStatement();\n\t String sql=\"select * from \"+tableName+\" order by id desc\";\n\t\t rs=stm.executeQuery(sql);\n\t\t DataGUI.model.setRowCount(0);\n\t\t //Add rows to table model\n\t\t while (rs.next()) {\n Vector<Object> newRow = new Vector<Object>();\n //Add cells to each row\n for (int i = 1; i <=colNum; i++) \n newRow.addElement(rs.getObject(i));\n DataGUI.model.addRow(newRow);\n }//end of while\n\t\t //Catch SQL exception\n }catch (SQLException e ) {\n \te.printStackTrace();\n\t } finally {\n\t \ttry{\n\t if (stm != null) stm.close(); \n\t }\n\t \tcatch (SQLException e ) {\n\t \t\te.printStackTrace();\n\t\t }\n\t }\n\t}", "public void loadQuestions() \n {\n try{\n ArrayList<QuestionPojo> questionList=QuestionDao.getQuestionByExamId(editExam.getExamId());\n for(QuestionPojo obj:questionList)\n {\n qstore.addQuestion(obj);\n }\n }\n catch(SQLException ex)\n {\n JOptionPane.showMessageDialog(null, \"Error while connecting to DB!\",\"Exception!\",JOptionPane.ERROR_MESSAGE);\n ex.printStackTrace();\n\n }\n }", "private void loadData(){\n try (BufferedReader br = new BufferedReader(new FileReader(this.fileName))) {\n String line;\n while((line=br.readLine())!=null){\n E e = createEntity(line);\n super.save(e);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void LoadingDatabaseGameLocation() {\n\n\t\tCursor cursor = helper.getDataAll(GamelocationTableName);\n\n\t\t// id_counter = cursor.getCount();\n\n\t\tGAME_LIST.clear();\n\n\t\twhile (cursor.moveToNext()) {\n\t\t\t// loading each element from database\n\t\t\tString ID = cursor.getString(ID_GAME_LCOATION_COLUMN);\n\t\t\tString Description = cursor\n\t\t\t\t\t.getString(DESCRIPTION_GAME_LCOATION_COLUMN);\n\t\t\tString isGameVisited = cursor.getString(GAME_IS_VISITED_COLUMN);\n\n\t\t\tGAME_LIST.add(new gameLocation(ID, Description,\n\t\t\t\t\tisUsed(isGameVisited)));\n\t\t\t\n\t\t\tLog.d(TAG, \"game ID : \"+ ID);\n\t\t\t\n\t\t} // travel to database result\n\n\t}", "private void loadData() {\n Log.d(LOG_TAG, \"loadData()\");\n /* If the device does not have an internet connection, then... */\n if (!NetworkUtils.hasInternetConnection(this)){\n showErrorMessage(true);\n return;\n }\n /* Make the View for the data visible and hide the error message */\n showDataView();\n\n /* Fetch the data from the web asynchronous using Retrofit */\n TMDBApi the_movie_database_api = new TMDBApi(new FetchDataTaskCompleteListener());\n /* Start the network transactions */\n the_movie_database_api.start(sortOrderCurrent);\n\n /* Display the loading indicator */\n displayLoadingIndicator(true);\n }", "public static void loadDB() throws Exception {\n\t\t// Remove previously loaded data\n\t\tcolToData.clear();\n\t\t// Load dictionary from disk\n\t\tloadDictionary();\n\t\t// Collect columns to load in parallel\n\t\tList<ColumnRef> colsToLoad = new ArrayList<ColumnRef>();\n\t\tfor (TableInfo table : CatalogManager.currentDB.nameToTable.values()) {\n\t\t\tString tableName = table.name;\n\t\t\tfor (ColumnInfo column : table.nameToCol.values()) {\n\t\t\t\tString columnName = column.name;\n\t\t\t\tcolsToLoad.add(new ColumnRef(tableName, columnName));\n\t\t\t}\n\t\t}\n\t\t// Load columns\n\t\tcolsToLoad.stream().parallel().forEach((colRef) -> {\n\t\t\ttry {\n\t\t\t\tSystem.out.println(\"Loading column \" + colRef.toString());\n\t\t\t\tloadColumn(colRef);\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.err.println(\"Error loading column \" + colRef.toString());\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t});\n\t\tSystem.out.println(\"Loaded database.\");\n\t}", "void populateData();", "private void LoadingDatabaseScores() {\n\n\t\tCursor cursor = helper.getDataAll(ScoretableName);\n\n\t\t// id_counter = cursor.getCount();\n\t\tSCORE_LIST = new ArrayList<gameModel>();\n\t\twhile (cursor.moveToNext()) {\n\t\t\t// loading each element from database\n\t\t\tString ID = cursor.getString(ID_MAXSCORE_COLUMN);\n\t\t\tString Score = cursor.getString(SCORE_MAXSCORE_COLUMN);\n\n\t\t\tSCORE_LIST.add(new gameModel(ID, Integer.parseInt(Score),\n\t\t\t\t\tThumbNailFactory.create().getThumbNail(ID)));\n\n\t\t} // travel to database result\n\n\t}", "public void loadList() {\n // Run the query.\n nodes = mDbNodeHelper.getNodeListData();\n }", "private void importData() {\n // if alarmAdapter null it's means data have not imported, yet or database is empty\n if (alarmAdapter == null) {\n // initialize database manager\n dataBaseManager = new DataBaseManager(this);\n // get Alarm ArrayList from database\n ArrayList<Alarm> arrayList = dataBaseManager.getAlarmList();\n // create Alarm adapter to display detail through RecyclerView\n alarmAdapter = new AlarmAdapter(arrayList, this);\n\n }\n }", "private void loadData() {\r\n\t\talert(\"Loading data ...\\n\");\r\n \r\n // ---- categories------\r\n my.addCategory(new Category(\"1\", \"VIP\"));\r\n my.addCategory(new Category(\"2\", \"Regular\"));\r\n my.addCategory(new Category(\"3\", \"Premium\"));\r\n my.addCategory(new Category(\"4\", \"Mierder\"));\r\n \r\n my.loadData();\r\n \r\n\t }", "private void loadData()\n\t{\n\t\tVector<String> columnNames = new Vector<String>();\n\t\tcolumnNames.add(\"Item Name\");\n\t\tcolumnNames.add(\"Item ID\");\n\t\tcolumnNames.add(\"Current Stock\");\n\t\tcolumnNames.add(\"Unit Price\");\n\t\tcolumnNames.add(\"Section\");\n\t\t\n\t\tVector<Vector<Object>> data= new Vector<Vector<Object>>();\n\t\t\n\t\tResultSet rs = null;\n\t\ttry \n\t\t{\n\t\t\tConnection con = Connector.DBcon();\n\t\t\tString query=\"select * from items natural join sections order by sections.s_name\";\n\t\t\tPreparedStatement pst = con.prepareStatement(query);\n\t\t\trs = pst.executeQuery();\n\t\t\t\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tVector<Object> vector = new Vector<Object>();\n\t\t for (int columnIndex = 1; columnIndex <= 9; columnIndex++)\n\t\t {\n\t\t \t\n\t\t \tvector.add(rs.getObject(1));\n\t\t \tvector.add(rs.getObject(2));\n\t\t vector.add(rs.getObject(3));\n\t\t vector.add(rs.getObject(4));\n\t\t vector.add(rs.getObject(6));\n\t\t \n\t\t }\n\t\t data.add(vector);\n\t\t\t}\n\t\t\t\n\t\t\t tableModel.setDataVector(data, columnNames);\n\t\t\t \n\t\t\t rs.close();\n\t\t\t pst.close();\n\t\t\t con.close();\n\t\t} \n\t\tcatch (Exception e) \n\t\t{\n\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t}\n\t\t\n\t\t\n\t}", "private void load() throws DAOSysException\t\t{\n\t\tif (_debug) System.out.println(\"AL:load()\");\n\t\tAnnualLeaseDAO dao = null;\n\t\ttry\t{\n\t\t\tdao = getDAO();\n\t\t\tsetModel((AnnualLeaseModel)dao.dbLoad(getPrimaryKey()));\n\n\t\t} catch (Exception ex)\t{\n\t\t\tthrow new DAOSysException(ex.getMessage());\n\t\t}\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}", "List<HistoryData> loadAllHistoryData();", "public void loadData() {\n String[] header = {\"Tên Cty\", \"Mã Cty\", \"Cty mẹ\", \"Giám đốc\", \"Logo\", \"Slogan\"};\n model = new DefaultTableModel(header, 0);\n List<Enterprise> list = new ArrayList<Enterprise>();\n list = enterpriseBN.getAllEnterprise();\n for (Enterprise bean : list) {\n Enterprise enterprise = enterpriseBN.getEnterpriseByID(bean.getEnterpriseParent()); // Lấy ra 1 Enterprise theo mã\n Person person1 = personBN.getPersonByID(bean.getDirector());\n Object[] rows = {bean.getEnterpriseName(), bean.getEnterpriseID(), enterprise, person1, bean.getPicture(), bean.getSlogan()};\n model.addRow(rows);\n }\n listEnterprisePanel.getTableListE().setModel(model);\n setupTable();\n }", "private static void load(List<Opinion> opinionList) {\n System.out.println(\"Loading...\");\n clearDB();\n opinionDAO.openConnection();\n if (opinionDAO.dbDropped) {\n opinionDAO.createTables();\n }\n opinionList.forEach(opinion -> opinionDAO.insertOpinion(opinion));\n System.out.println(opinionList.size() + \" opinions loaded to database.\");\n opinionDAO.closeConnection();\n }", "protected void loadData() {\n refreshview.setRefreshing(true);\n //小区ID\\t帐号\\t消息类型ID\\t开始时间\\t结束时间\n // ZganLoginService.toGetServerData(26, 0, 2, String.format(\"%s\\t%s\\t%s\\t%s\\t%d\", PreferenceUtil.getUserName(), msgtype, \"2015-01-01\", nowdate, pageindex), handler);\n //ZganCommunityService.toGetServerData(26, 0, 2, String.format(\"%s\\t%s\\t%s\\t%s\\t%d\", PreferenceUtil.getUserName(), msgtype, \"2015-01-01\", nowdate, pageindex), handler);\n ZganCommunityService.toGetServerData(40, String.format(\"%s\\t%s\\t%s\\t%s\", PreferenceUtil.getUserName(), funcPage.gettype_id(), String.format(\"@id=22,@page_id=%s,@page=%s\",funcPage.getpage_id(),pageindex), \"22\"), handler);\n }", "void db_all(Context context);", "public void load() {\n mapdb_ = DBMaker.newFileDB(new File(\"AllPoems.db\"))\n .closeOnJvmShutdown()\n .encryptionEnable(\"password\")\n .make();\n\n // open existing an collection (or create new)\n poemIndexToPoemMap_ = mapdb_.getTreeMap(\"Poems\");\n \n constructPoems();\n }", "@Override\n public LogbookEntry loadInBackground() {\n this.database = this.databaseSchemaHelper.getReadableDatabase();\n return SchemaQueries.getLogbook(this.database);\n }", "private void loadRecords() {\r\n\t\tpanContent.updateContent();\r\n\t}", "public void loadData ( ) {\n\t\tinvokeSafe ( \"loadData\" );\n\t}", "private void getAll(){\n if (!LOADED_ALL) {\n Message msg_getpersons = Message.obtain(getPersonsHandlerThread.getHandler());\n msg_getpersons.what = GetPersonsHandlerThread.TASK_GET_PERSONS;\n int table1 = TABLE_ALL;\n msg_getpersons.arg1 = table1;\n Log.d(TAG, \"DbOperationsRunnable: run(): preparing message msg_getperson with following attributes:\");\n Log.d(TAG, \"DbOperationsRunnable: run(): msg_getpersons.what = \" + msg_getpersons.what);\n Log.d(TAG, \"DbOperationsRunnable: run(): msg_getpersons.arg1 = \" + msg_getpersons.arg1);\n Log.d(TAG, \"DbOperationsRunnable: run(): sending message...\");\n msg_getpersons.sendToTarget();\n while (true) {\n if (DONE_TASK_GETPERSONS) {\n DONE_TASK_GETPERSONS = false;\n break;\n }\n }\n LOADED_ALL = true;\n } else {\n persons_list.clear();\n persons_list.addAll(all_list);\n }\n }", "private void loadLists() {\n loadSavedCourses();\n loadSavedSchedules();\n }", "private void loadData() {\n this.financeDataList = new ArrayList<>();\n }", "private void loadTable() {\n model.getDataVector().removeAllElements();\n model.fireTableDataChanged();\n try {\n String sql = \"select * from tb_mahasiswa\";\n Statement n = a.createStatement();\n ResultSet rs = n.executeQuery(sql);\n while (rs.next()) {\n Object[] o = new Object[6];\n o[0] = rs.getString(\"id_mahasiswa\");\n o[1] = rs.getString(\"nama\");\n o[2] = rs.getString(\"tempat\");\n o[3] = rs.getString(\"waktu\");\n o[4] = rs.getString(\"status\");\n model.addRow(o);\n }\n } catch (Exception e) {\n }\n }", "@Override\n\tpublic void loadData(){\n\t\tsuper.loadData();\n\t\topenProgressDialog();\n\t\tBmobQuery<Goods> query = new BmobQuery<Goods>();\n\t\tpageSize = 5;\n\t\tquery.setLimit(pageSize);\n\t\tquery.setSkip((pageNum - 1) * pageSize);\n\t\tif(point == 1){\n\t\t\tquery.addWhereEqualTo(\"type\", type);\n\t\t}else if(point == 2){\n\t\t\tquery.addWhereEqualTo(\"tradeName\", type);\n\t\t}\n\t\tquery.findObjects(this, new FindListener<Goods>() {\n\t\t\t@Override\n\t\t\tpublic void onSuccess(List<Goods> object){\n\t\t\t\t// TODO Auto-generated method st\n\t\t\t\tcloseProgressDialog();\n\t\t\t\tonRefreshComplete();\n\t\t\t\tlist.addAll(object);\n\t\t\t\tLog.v(\"AAA\", JSON.toJSONString(list));\n\t\t\t\tadapter.notifyDataSetChanged();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onError(int code,String msg){\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tToast.makeText(mContext, \"查询失败\", Toast.LENGTH_SHORT).show();\n\t\t\t\tcloseProgressDialog();\n\t\t\t}\n\t\t});\n\n\t}", "private void loadData(){\n updateDateTimeText();\n\n mLoadingDialog = DialogUtil.createLoadingDialog(getActivity(), getString(R.string.loading_dialog_in_progress));\n mLoadingDialog.show();\n // Call API to get the schedules\n mPresenter.loadAllExaminationSchedulesForSpecificDate(mMyDate.generateDateString(AppConstants.DATE_FORMAT_YYYY_MM_DD));\n }", "@PostConstruct\r\n public void init() {\r\n all.addAll(allFromDB());\r\n Collections.sort(all);\r\n }", "private void loadDatabase()\n\t{\n\t\ttry\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// Check to make sure the Bmod Database is there, if not, try \n\t\t\t\t// downloading from the website.\n\t\t\t\tif(!Files.exists(m_databaseFile))\n\t\t\t\t{\n\t\t\t\t\tFiles.createDirectories(m_databaseFile.getParent());\n\t\t\t\t\n\t\t\t\t\tbyte[] file = ExtensionPoints.readURLAsBytes(\"http://\" + Constants.API_HOST + HSQL_DATABASE_PATH);\n\t\t\t\t\tif(file.length != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tFiles.deleteIfExists(m_databaseFile);\n\t\t\t\t\t\tFiles.write(m_databaseFile, file, StandardOpenOption.CREATE, StandardOpenOption.WRITE);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// make sure we have the proper scriptformat.\n\t\t\t\tsetScriptFormatCorrectly();\n\t\t\t}catch(NullPointerException|IOException ex)\n\t\t\t{\n\t\t\t\tm_logger.error(\"Could not fetch database from web.\", ex);\n\t\t\t}\n\t\t\t\n\t\n\t\t\t\n\t\t\tClass.forName(\"org.hsqldb.jdbcDriver\");\n\t\t\n\t\t\t\n\t\t\tString db = ExtensionPoints.getBmodDirectory(\"database\").toUri().getPath();\n\t\t\tconnection = DriverManager.getConnection(\"jdbc:hsqldb:file:\" + db, \"sa\", \"\");\n\t\t\t\n\t\t\t// Setup Connection\n\t\t\tCSVRecordLoader ldr = new CSVRecordLoader();\n\t\t\n\t\t\t// Load all of the building independent plugins\n\t\t\tfor(Record<?> cp : ldr.getRecordPluginManagers())\n\t\t\t{\n\t\t\t\tm_logger.debug(\"Creating table: \" + cp.getTableName());\n\t\t\t\t// Create a new table\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tgetPreparedStatement(cp.getSQLTableDefn()).execute();\n\t\t\t\t} catch(SQLException ex)\n\t\t\t\t{\n\t\t\t\t\t// Table exists\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tm_logger.debug(\"Doing index:\" + cp.getIndexDefn());\n\t\t\t\t\tif(cp.getIndexDefn() != null)\n\t\t\t\t\t\tgetPreparedStatement(cp.getIndexDefn()).execute();\n\t\t\t\t}catch(SQLException ex)\n\t\t\t\t{\t// index exists\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t} catch (Exception ex)\n\t\t{\n\t\t\tex.printStackTrace();\n\t\t\tif(ex instanceof DatabaseIntegrityException)\n\t\t\t\tDatabase.handleCriticalError((DatabaseIntegrityException)ex);\n\t\t\telse\n\t\t\t\tDatabase.handleCriticalError(new DatabaseIntegrityException(ex));\n\t\t}\n\t\t\n\t}", "public SampletypeBean[] loadAll() throws SQLException \n {\n Connection c = null;\n PreparedStatement ps = null;\n try \n {\n c = getConnection();\n ps = c.prepareStatement(\"SELECT \" + ALL_FIELDS + \" FROM sampletype\",ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n return loadByPreparedStatement(ps);\n }\n finally\n {\n getManager().close(ps);\n freeConnection(c);\n }\n }", "public void reloadData() {\n\t\tinitializeStormData();\n\t\tsuper.reloadData();\n\t}", "private void LoadingDatabaseTotalScore() {\n\n\t\tCursor cursor = helper.getDataAll(TotalScoretableName);\n\n\t\twhile (cursor.moveToNext()) {\n\t\t\t// loading each element from database\n\t\t\tString ID = cursor.getString(ID_TOTAL_SCORE_COLUMN);\n\t\t\tString totalPoint = cursor.getString(POINT_TOTAL_SCORE_COLUMN);\n\t\t\t\n\t\t\ttotalScore = Integer.parseInt(totalPoint);\t\t\t\t\t// store total score from database to backup value\n\t\t\t\n\t\t} // travel to database result\n\n\t}", "public void setLoadData() {\n\t\tUserDao userDao = new UserDaoImp();\n\t\tList<User> users = userDao.findAll();\n\t\t\n\t\tMessageDao msgDao = new MessageDaoImp();\n\t\tList<Message> msgs = msgDao.findAll();\n\t\t\n\t\tString userName = \"\";\n\t\tString mensajes = \"\";\n\t\tfor (Message message : msgs) {\n\t\t\t\n\t\t\tfor (User user : users) {\n\t\t\t\tif (user.getId() == message.getUserId())\n\t\t\t\t\tuserName = user.getNombre();\n\t\t\t}\n\t\t\tmensajes += \" By \" + userName + \" - \" + message.getFecha() +\"\\n \"+ message.getMsg() + \"\\n\\n\\n\";\n\t\t}\n\t\ttxtPulls.setText(mensajes);\n\t}", "public RecipeDataBase(){\n //recipes = new ArrayList<>();\n loadDatabase();\n \n }", "public InstitutionBean[] loadAll() throws SQLException \n {\n Connection c = null;\n PreparedStatement ps = null;\n try \n {\n c = getConnection();\n ps = c.prepareStatement(\"SELECT \" + ALL_FIELDS + \" FROM institution\",ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n return loadByPreparedStatement(ps);\n }\n finally\n {\n getManager().close(ps);\n freeConnection(c);\n }\n }", "public Data() {\n initComponents();\n koneksi_db();\n tampil_data();\n }", "private void getdataFromDb() {\n\t\tdbAdapter.openDataBase();\n\n\t\tString query = \"select * from list_manager where isVis =1\";\n\t\tCursor cursor = dbAdapter.selectRecordsFromDB(query, null);\n\t\tarrayList.clear();\n\n\t\t// int mCount = cursor.getCount();\n\t\tif (cursor.moveToFirst()) {\n\t\t\tdo {\n\t\t\t\tListManagerModel listManagerModel = new ListManagerModel();\n\t\t\t\tlistManagerModel.setId(String.valueOf(cursor.getInt(0)));\n\t\t\t\tlistManagerModel.setName(cursor.getString(1));\n\t\t\t\tlistManagerModel.setIsVis(cursor.getString(2));\n\t\t\t\tlistManagerModel.setIsCheck(\"1\");\n\t\t\t\tarrayList.add(listManagerModel);\n\t\t\t} while (cursor.moveToNext());\n\t\t}\n\n\t\tdbAdapter.close();\n\n\t}", "private void readFromDb() {\n mMonthsList.clear();\n if(mDatabaseHandler.getMonthsList()!=null) {\n mMonthsList = mDatabaseHandler.getMonthsList();\n setMonthListAdapter(mMonthsList);\n }\n else\n LoggerUtility.makeShortToast(HomeActivity.this,getString(R.string.error_empty_database));\n }", "private void loadDays(){\n MyDBHandler db = new MyDBHandler(this);\n dayOfTheWeek.clear();\n dayOfTheWeek.addAll(db.getDaysOfTheWeek());\n }", "public int loadDatabase(){\n\n try {\n BufferedReader bufferedReader = new BufferedReader(new FileReader(databaseFileName));\n String line = bufferedReader.readLine();\n while (line != null) {\n HashMap<String,String> activityString = parseStatement(line);\n System.out.println(activityString);\n Activity activity = new Activity();\n activity.create(activityString);\n allActivities.add(activity);\n line = bufferedReader.readLine();\n\n }\n }\n catch(Exception e){\n System.out.println(e);\n return -1;\n }\n\n\n //TODO: write utility to load database, including loading csv hashes into activity classes. Activity class - > needs list of accepted attr?\n\n return 0;\n }", "public void initializeData() {\n _currentDataAll = _purityReportData.getAll();\n }", "private void loadData()\r\n\t{\r\n\t\taddProduct(\"Area\", \"Education\");\r\n\t\taddProduct(\"Area\", \"Environment\");\r\n\t\taddProduct(\"Area\", \"Health\");\r\n\r\n\t\taddProduct(\"Domain\", \"Documentation\");\r\n\t\taddProduct(\"Domain\", \"Project Activity\");\r\n\t\taddProduct(\"Domain\", \"Technology\");\r\n\r\n\t\taddProduct(\"City\", \"Bangalore\");\r\n\t\taddProduct(\"City\", \"Hyderabad\");\r\n\t\taddProduct(\"City\", \"Lucknow\");\r\n\r\n\t\taddProduct(\"Activity_Type\", \"Onsite\");\r\n\t\taddProduct(\"Activity_Type\", \"Offsite\");\r\n\r\n\t}", "private void loadPatient() {\n patient = PatientsDatabaseAccessObject.getInstance().getPatients();\n table.getItems().clear();\n for (int i = 0; i < patient.size(); ++i) {\n table.getItems().add(patient.get(i));\n }\n table.refresh();\n }", "public void populateFilmListFromDatabase() throws SQLException {\r\n ArrayList<Film> films = this.film_database_controller.getFilms();\r\n\r\n for(Film current_film : films){\r\n this.addFilm(current_film);\r\n }\r\n }", "private void loadDataFromDBJSON() {\n loadCriteriaList();\n loadCriteriaLeft();\n Button btnNextEnable = (Button) findViewById(R.id.btnNext);\n btnNextEnable.setEnabled(true);\n }", "private void tableLoad() {\n try{\n String sql=\"SELECT * FROM salary\";\n pst = conn.prepareStatement(sql);\n rs = pst.executeQuery();\n \n table1.setModel(DbUtils.resultSetToTableModel(rs));\n \n \n }\n catch(SQLException e){\n \n }\n }", "private void loadMasterData()\r\n\t{\r\n\t\tlistOfMasterStud.clear();\r\n\t\tString qu = \"SELECT * FROM MASTERSTUDENT\";\r\n\t\tResultSet resultM = databaseHandler.execQuery(qu);\r\n\t\ttry {\r\n\t\t\t// retrieve student information form database\r\n\t\t\twhile(resultM.next())\r\n\t\t\t{\r\n\t\t\t\tString studIDM = resultM.getString(\"studentNoM\");\r\n\t\t\t\tString studNameM = resultM.getString(\"nameM\");\r\n\t\t\t\tString studSurnameM = resultM.getString(\"surnameM\");\r\n\t\t\t\tString studSupervisorM = resultM.getString(\"supervisorM\");\r\n\t\t\t\tString studEmailM = resultM.getString(\"emailM\");\r\n\t\t\t\tString studCellphoneM = resultM.getString(\"cellphoneNoM\");\r\n\t\t\t\tString studStationM = resultM.getString(\"stationM\");\r\n\t\t\t\tString studCourseM = resultM.getString(\"courseM\");\r\n\r\n\t\t\t\tlistOfMasterStud.add(new StudentProperty(studIDM, studNameM, studSurnameM,\r\n\t\t\t\t\t\tstudSupervisorM, studEmailM, studCellphoneM, studStationM, studCourseM));\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tmasterStudTable.setItems(listOfMasterStud);\r\n\t}", "public void getDataFromDatabase(){\r\n\t \tArrayList<Object> row = HomeActivity.dbPrograms.getDetail(SelectedID);\r\n\t \t\r\n\t\t\t// store data to variables\r\n\t \tProgramID = Integer.parseInt(row.get(0).toString());\r\n\t \tWorkoutID = Integer.parseInt(row.get(1).toString());\r\n\t \tName = row.get(2).toString();\r\n\t \tSelectedDayID = Integer.parseInt(row.get(3).toString());\r\n\t \tImage = row.get(4).toString();\r\n\t \tTime = row.get(5).toString().trim();\r\n\t \tSteps = row.get(6).toString();\r\n\t \t\r\n\t }", "@Deferred\n @RequestAction\n @IgnorePostback\n public void loadData() {\n users = userRepository.findAll();\n }", "private void loadStateDatabase() {\n new Thread( new Runnable() {\n public void run() {\n try {\n loadStates();\n } catch ( final IOException e ) {\n throw new RuntimeException( e );\n }\n }\n }).start();\n }", "@Override\r\npublic List<Map<String, Object>> readAll() {\n\treturn detalle_pedidoDao.realAll();\r\n}", "@Override\n\tpublic D loadInBackground() {\n\t\tmData = createData();\n\t\treturn mData;\n\t}", "private void loadFromDB() throws SQLException {\n\t\tif (rev_page != -1)\n\t\t\treturn;\n\t\t\n\t\tPreparedStatement stmt = dbc.prepareStatement(\n\t\t\t\t\"SELECT rev_page, rev_text_id, rev_timestamp, rev_comment, user_name \" +\n\t\t\t\t\"FROM revision, users WHERE rev_id = ? AND rev_user = user_id\");\n\t\tstmt.setInt(1, rev_id);\n\t\tstmt.execute();\n\n\t\tResultSet rs = stmt.getResultSet();\n\t\tif (!rs.next()) {\n\t\t\t/*\n\t\t\t * Shouldn't happen?\n\t\t\t */\n\t\t\tstmt.close();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\trev_page = rs.getInt(1);\n\t\trev_text_id = rs.getInt(2);\n\t\trev_timestamp = rs.getTimestamp(3);\n\t\trev_comment = rs.getString(4);\n\t\trev_user_text = rs.getString(5);\n\t\tstmt.close();\n\t}", "public PreferenceBean[] loadAll() throws SQLException \n {\n Connection c = null;\n PreparedStatement ps = null;\n try \n {\n c = getConnection();\n ps = c.prepareStatement(\"SELECT \" + ALL_FIELDS + \" FROM preference\",ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);\n return loadByPreparedStatement(ps);\n }\n finally\n {\n getManager().close(ps);\n freeConnection(c);\n }\n }", "public void loadDataFromCovidDatabase(){\n\n String [] columns = {CovidOpener.COL_COUNTRY, CovidOpener.COL_COUNTRYCODE, CovidOpener.COL_PROVINCE, CovidOpener.COL_CITY, CovidOpener.COL_CASES, CovidOpener.COL_DATE, CovidOpener.COL_ID};\n\n Cursor results = cdb.query(false, CovidOpener.TABLE_NAME, columns, null, null, null, null, null, null);\n\n int countryColIndex = results.getColumnIndex(CovidOpener.COL_COUNTRY);\n int countryCodeColIndex = results.getColumnIndex(CovidOpener.COL_COUNTRYCODE);\n int provinceColIndex = results.getColumnIndex(CovidOpener.COL_PROVINCE);\n int cityColIndex = results.getColumnIndex(CovidOpener.COL_CITY);\n int casesColIndex = results.getColumnIndex(CovidOpener.COL_CASES);\n int dateColIndex = results.getColumnIndex(CovidOpener.COL_DATE);\n int idColIndex = results.getColumnIndex(CovidOpener.COL_ID);\n\n while(results.moveToNext()){\n country = results.getString(countryColIndex);\n countryCode = results.getString(countryCodeColIndex);\n province = results.getString(provinceColIndex);\n city = results.getString(cityColIndex);\n cases = results.getInt(casesColIndex);\n date = results.getString(dateColIndex);\n id = results.getLong(idColIndex);\n CovArray.add(new Covid(country, countryCode, province, city, cases, date, id));\n }\n printCursor(results);\n }", "private void fetchDataFromDatabase() {\n\n listOfPersons.clear();\n Cursor cursor = AppDatabase.getInstance(context).getPersonList();\n if (cursor != null && cursor.moveToFirst()) {\n do {\n String firstName = cursor.getString(cursor.getColumnIndex(\"firstName\"));\n String lastName = cursor.getString(cursor.getColumnIndex(\"lastName\"));\n String email = cursor.getString(cursor.getColumnIndex(\"email\"));\n String dob = cursor.getString(cursor.getColumnIndex(\"dobDate\"));\n String phoneNumber = cursor.getString(cursor.getColumnIndex(\"phoneNumber\"));\n String pictureUrl = cursor.getString(cursor.getColumnIndex(\"pictureMediumUrl\"));\n String pictureImageData = cursor.getString(cursor.getColumnIndex(\"pictureImageData\"));\n String fullName = firstName + \" \" + lastName;\n Bitmap imageBitmap = UtilFunctions.stringToBitmap(pictureImageData);\n\n PersonWrapper person = new PersonWrapper(fullName, email, dob, phoneNumber, pictureUrl, imageBitmap);\n listOfPersons.add(person);\n\n } while (cursor.moveToNext());\n }\n\n initView(listOfPersons);\n }", "Serializable retrieveAllData();", "private void refreshData() {\n try {\n setDataSource(statement.executeQuery(\"select * from \" + sourceTableName));\n } catch (SQLException e) {\n System.err.println(\"Can't execute statement\");\n e.printStackTrace();\n }\n }", "List<User> loadAll();", "void loadAll() {\n\t\tsynchronized (this) {\n\t\t\tif (isFullyLoaded) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfor (Entry<Integer, Supplier<ChunkMeta<?>>> generator : ChunkMetaFactory.getInstance()\n\t\t\t\t\t.getEmptyChunkFunctions()) {\n\t\t\t\tChunkMeta<?> chunk = generator.getValue().get();\n\t\t\t\tchunk.setChunkCoord(this);\n\t\t\t\tchunk.setPluginID(generator.getKey());\n\t\t\t\ttry {\n\t\t\t\t\tchunk.populate();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// need to catch everything here, otherwise we block the main thread forever\n\t\t\t\t\t// once it tries to read this\n\t\t\t\t\tCivModCorePlugin.getInstance().getLogger().log(Level.SEVERE, \n\t\t\t\t\t\t\t\"Failed to load chunk data\", e);\n\t\t\t\t}\n\t\t\t\taddChunkMeta(chunk);\n\t\t\t}\n\t\t\tisFullyLoaded = true;\n\t\t\tthis.notifyAll();\n\t\t}\n\t}", "public void load() {\n\t\tif (!dbNode.isLogined()) {\n\t\t\treturn;\n\t\t}\n\n\t\tString tablesFolderId = dbNode.getId()\n\t\t\t\t+ CubridTablesFolderLoader.TABLES_FULL_FOLDER_SUFFIX_ID;\n\t\tfinal ICubridNode tablesFolder = dbNode.getChild(tablesFolderId);\n\t\tif (null == tablesFolder) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (tablesFolder.getChildren().size() < 1) {\n\t\t\tfinal TreeViewer tv = getTreeView();\n\t\t\tDisplay.getDefault().syncExec(new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\ttv.expandToLevel(tablesFolder, 1);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "private void loadDataFromDatabase(){\n //get database connection\n DeezerOpener deezerOpener = new DeezerOpener(this);\n db = deezerOpener.getWritableDatabase();\n\n //define columns and create cursor\n String [] columns = {DeezerOpener.COL_ID, DeezerOpener.COL_ARTIST, DeezerOpener.COL_TITLE, DeezerOpener.COL_ALBUM, DeezerOpener.COL_DUR, DeezerOpener.COL_COVER};\n Cursor results = db.query( DeezerOpener.TABLE_NAME, columns, null, null, null, null, null);\n\n //get column indices\n int idColIndex = results.getColumnIndex(DeezerOpener.COL_ID);\n int artistColIndex = results.getColumnIndex(DeezerOpener.COL_ARTIST);\n int titleColIndex = results.getColumnIndex(DeezerOpener.COL_TITLE);\n int albumColIndex = results.getColumnIndex(DeezerOpener.COL_ALBUM);\n int durColIndex = results.getColumnIndex(DeezerOpener.COL_DUR);\n int coverColIndex = results.getColumnIndex(DeezerOpener.COL_COVER);\n\n //loop through the database obtaining data\n while(results.moveToNext()){\n long id = results.getLong(idColIndex);\n String artistDB = results.getString(artistColIndex);\n String titleDB = results.getString(titleColIndex);\n String albumDB = results.getString(albumColIndex);\n int durationDB = results.getInt(durColIndex);\n String coverURL_DB = results.getString(coverColIndex);\n\n //create the cover Bitmap\n Bitmap coverDB = getBitmapFromURL(coverURL_DB);\n\n //add to favourites list\n deezerFavList.add(new DeezerSong(titleDB, albumDB, artistDB, coverURL_DB, coverDB, durationDB, id));\n }\n }", "private void getDataFromSQLite() {\n // AsyncTask is used that SQLite operation not blocks the UI Thread.\n new AsyncTask<Void, Void, Void>() {\n @Override\n protected Void doInBackground(Void... params) {\n listUsers.clear();\n listUsers.addAll(databaseHelper.getAllUser());\n\n return null;\n }\n\n @Override\n protected void onPostExecute(Void aVoid) {\n super.onPostExecute(aVoid);\n usersRecyclerAdapter.notifyDataSetChanged();\n }\n }.execute();\n }", "@GetMapping(path=\"/load\")\n\tpublic @ResponseBody Iterable<Resource> loadAllUsers() {\n\t\t try {\n\t\t\tList<Resource> resources = DataLoader.loadData(DataUtils.SLA2017);\n\t\t\tresourceRepository.save(resources);\n\t\t\tList<Resource> resourcesFalabella = DataLoader.loadData(DataUtils.FALABELLA);\n\t\t\tresourceRepository.save(resourcesFalabella);\n\t\t\tList<Resource> resourcesSantiago = DataLoader.loadData(DataUtils.SANTIAGO2017);\n\t\t\tresourceRepository.save(resourcesSantiago);\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 return null;\n\t}", "@NonNull\n @MainThread\n protected abstract LiveData<ResultType> loadFromDb();", "public void loadData() {\n\t\tempsList.add(\"Pankaj\");\r\n\t\tempsList.add(\"Raj\");\r\n\t\tempsList.add(\"David\");\r\n\t\tempsList.add(\"Lisa\");\r\n\t}", "private void LoadingDatabasePoolLocation() {\n\n\t\tCursor cursor = helper.getDataAll(PooltableName);\n\n\t\t// id_counter = cursor.getCount();\n\n\t\tPOOL_LIST.clear();\n\n\t\twhile (cursor.moveToNext()) {\n\t\t\t// loading each element from database\n\t\t\tString ID = cursor.getString(ID_POOL_LCOATION_COLUMN);\n\t\t\tString Description = cursor\n\t\t\t\t\t.getString(DESCRIPTION_POOL_LCOATION_COLUMN);\n\t\t\tString isCouponUsed = cursor.getString(COUPON_IS_USED_COLUMN);\n\n\t\t\tPOOL_LIST.add(new poolLocation(ID, Description,\n\t\t\t\t\tisUsed(isCouponUsed), ThumbNailFactory.create()\n\t\t\t\t\t\t\t.getThumbNail(ID)));\n\n\t\t} // travel to database result\n\n\t}", "public void initLoadTable(){\n movies.clear();\n try {\n Connection conn = ConnectionFactory.getConnection();\n try (Statement stmt = conn.createStatement()) {\n String str=\"select title,director,prodYear,lent,lentCount,original,storageType,movieLength,mainCast,img from movies \";\n ResultSet rs= stmt.executeQuery(str);\n while(rs.next()){\n String title=rs.getString(\"title\");\n String director=rs.getString(\"director\");\n int prodYear=rs.getInt(\"prodYear\");\n boolean lent=rs.getBoolean(\"lent\"); \n int lentCount=rs.getInt(\"lentCount\");\n boolean original=rs.getBoolean(\"original\");\n String storageType=rs.getString(\"storageType\");\n int movieLength=rs.getInt(\"movieLength\");\n String mainCast=rs.getString(\"mainCast\");\n Blob blob = rs.getBlob(\"img\");\n InputStream inputStream = blob.getBinaryStream();\n OutputStream outputStream = new FileOutputStream(\"resources/\"+title+director+\".jpg\");\n int bytesRead = -1;\n byte[] buffer = new byte[1];\n while ((bytesRead = inputStream.read(buffer)) != -1) {\n outputStream.write(buffer, 0, bytesRead);\n }\n inputStream.close();\n outputStream.close();\n System.out.println(\"File saved\"); \n File image = new File(\"resources/\"+title+director+\".jpg\");\n \n movies.add(new Movie(title,director,prodYear,lent,lentCount,original,storageType,movieLength,mainCast,image));\n }\n rs.close();\n stmt.close(); \n }\n conn.close();\n } catch (Exception ex) {\n System.err.println(ex.toString());\n } \n \n fireTableDataChanged();\n }", "public List<Player> loadAll() throws SQLException {\n\t\tfinal Connection connection = _database.getConnection();\n\t\tfinal String sql = \"SELECT * FROM \" + table_name + \" ORDER BY id ASC \";\n\t\tfinal List<Player> searchResults = listQuery(connection.prepareStatement(sql));\n\n\t\treturn searchResults;\n\t}", "public void initFromDb() {\n // Get load list of symbols to query\n new AsyncTask<ContentResolver, Void, Void>() {\n @Override\n protected Void doInBackground(ContentResolver... params) {\n Cursor cursor = null;\n try {\n ContentResolver cr = params[0];\n int shownPositionBookmark = Utility.getShownPositionBookmark(cr);\n\n // Query db for data up to the list position bookmark;\n cursor = cr.query(\n StockEntry.CONTENT_URI,\n ListManipulator.STOCK_PROJECTION,\n StockProvider.LIST_POSITION_SELECTION,\n new String[]{Integer.toString(shownPositionBookmark)},\n StockProvider.ORDER_BY_LIST_POSITION_ASC_ID_DESC);\n\n // Extract StockChange data from cursor\n if (cursor != null) {\n int cursorCount = cursor.getCount();\n if (cursorCount > 0) {\n mListManipulator.setShownListCursor(cursor);\n mListManipulator.setLoadList(getLoadListFromDb(cr));\n mListManipulator.addToLoadListPositionBookmark(cursorCount);\n }\n }\n } finally {\n if (cursor != null) {\n cursor.close();\n }\n }\n return null;\n }\n\n @Override\n protected void onPostExecute(Void aVoid) {\n ListEventQueue.getInstance().post(new InitLoadFromDbFinishedEvent(\n MyApplication.getInstance().getSessionId()));\n }\n }.execute(getActivity().getContentResolver());\n }", "public void addAll() throws SQLException {\r\n DbHandler dbHandler = new DbHandler();\r\n\r\n ResultSet resultSet = dbHandler.getAll();\r\n while (resultSet.next()) {\r\n Photographer photographer = new Photographer();\r\n photographer.setId(resultSet.getString(1));\r\n System.out.println(photographer.getId());\r\n photographer.setName(resultSet.getString(2));\r\n System.out.println(photographer.getName());\r\n photographer.setSurname(resultSet.getString(3));\r\n System.out.println(photographer.getSurname());\r\n photographer.setStage(resultSet.getString(4));\r\n System.out.println(photographer.getStage());\r\n photographer.setPortfolio(resultSet.getString(5));\r\n System.out.println(photographer.getPortfolio());\r\n photographer.setLocation_(resultSet.getString(6));\r\n System.out.println(photographer.getLocation_());\r\n readersList.add(photographer);\r\n }\r\n }" ]
[ "0.7536474", "0.7319393", "0.72218907", "0.7210316", "0.7068121", "0.69916546", "0.6961671", "0.68366104", "0.6796208", "0.6796208", "0.67611563", "0.6751526", "0.6740732", "0.6736529", "0.6727243", "0.6713566", "0.6696749", "0.66888744", "0.66850525", "0.6672145", "0.664295", "0.6638705", "0.6617388", "0.6606902", "0.6606902", "0.660675", "0.6585462", "0.65718377", "0.6570293", "0.65209746", "0.6519338", "0.6504824", "0.64817995", "0.64718854", "0.6468576", "0.64365965", "0.6435744", "0.6416738", "0.6350848", "0.6341148", "0.63254833", "0.6302974", "0.62673765", "0.6266201", "0.62597173", "0.6253491", "0.62427676", "0.624204", "0.62253106", "0.6214307", "0.62126476", "0.6196604", "0.61950314", "0.6193146", "0.6188178", "0.6186524", "0.6177306", "0.6169119", "0.6168999", "0.6160082", "0.615794", "0.61472356", "0.613619", "0.6133235", "0.6130653", "0.61260164", "0.61250204", "0.61237186", "0.6122224", "0.61121154", "0.6105545", "0.6088672", "0.6085174", "0.60846674", "0.6082105", "0.60669243", "0.6060496", "0.60570997", "0.6055707", "0.60543865", "0.60536045", "0.6053043", "0.6037456", "0.60327846", "0.60322136", "0.60247797", "0.60217106", "0.6021443", "0.60108995", "0.60087013", "0.600812", "0.6007173", "0.6006553", "0.6005755", "0.59969866", "0.5990922", "0.5969346", "0.59585744", "0.5946811", "0.5940315" ]
0.6399013
38
when floating action button clicked
@Override public void onClick(View v) { if(v == mFab) { final Dialog adddialog = new Dialog(getActivity()); adddialog.setContentView(R.layout.add_plan_layout); adddialog.setCancelable(false); adddialog.show(); Button confirm = (Button) adddialog.findViewById(R.id.plan); Button cancel = (Button) adddialog.findViewById(R.id.no_thank); final EditText plan = (EditText) adddialog.findViewById(R.id.add_plan); mDbHelper = new DbHelper(getActivity()); //create plan function confirm.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Plan planList = new Plan(mDbHelper.getPlanCount(), String.valueOf(plan.getText())); // if(!taskExists(planList)) { mDbHelper.insertplan(planList); plan_list.add(planList); refreshList(); Toast.makeText(getActivity(), "Plan Created", Toast.LENGTH_SHORT).show(); adddialog.cancel(); } }); //cancel button function cancel.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { adddialog.cancel(); } }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void showFloatingButton() {\n floatingActionButton.show();\n }", "private void setupFloatingActionButtons() {\n final FloatingActionButton fabAddFollow = (FloatingActionButton) myView.findViewById(R.id.fabAddFollow);\n fabAddFollow.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Log.d(\"AAA\", \"SOMETHING\");\n getActivity().getFragmentManager().beginTransaction()\n .setCustomAnimations(R.animator.slide_in_left, R.animator.slide_out_left, R.animator.slide_in_right, R.animator.slide_out_right)\n .replace(R.id.content_frame, new addFollowFragment()).addToBackStack(\"follow_list\").commit();\n }\n });\n }", "private void setFloatingActionButtonListener() {\n floatingActionButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n View mView = getLayoutInflater().inflate(R.layout.add_trail_dialogbox, null);\n popUpDialogBox(mView, 1);\n }\n });\n }", "private void floatingActionButtonClicked(){\n Log.d(TAG, \"floating button onclick\");\n InsertCourseDialogFragment dialog = new InsertCourseDialogFragment();\n dialog.show(getSupportFragmentManager(), \"Insert Course\");\n }", "private void floatingMenu(){\n btn_main = findViewById(R.id.fab_main);\n btn_lang = findViewById(R.id.fab_language);\n btn_profil = findViewById(R.id.fab_profil);\n\n btn_lang.setTranslationY(translationY);\n btn_profil.setTranslationY(translationY);\n\n btn_lang.setAlpha(0f);\n btn_profil.setAlpha(0f);\n\n btn_main.setOnClickListener(this);\n btn_profil.setOnClickListener(this);\n btn_lang.setOnClickListener(this);\n }", "@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 }", "void onFadingViewClick();", "@OnClick(R.id.fab)\n protected void fabClicked() {\n showPostTweetDialog(null);\n }", "private void setFloatingButtonListener() {\n floatingActionButton.setOnClickListener(v -> {\n if (actualFragment instanceof MyPetsFragment) {\n hideShareAppButton();\n addPet();\n } else if (actualFragment instanceof CommunityFragment){\n createGroupDialog();\n } else if (actualFragment instanceof InfoGroupFragment){\n if (InfoGroupFragment.getGroup().isUserSubscriber(user)) {\n createForumDialog();\n } else {\n Toast toast = Toast.makeText(this, getString(R.string.should_be_subscribed), Toast.LENGTH_LONG);\n toast.show();\n }\n }\n\n });\n }", "public void setFloatingActionButton(View view) {\n fab = (FloatingActionMenu) view.findViewById(R.id.fab_rsd);\n fab.setOnMenuToggleListener(new FloatingActionMenu.OnMenuToggleListener() {\n @Override\n public void onMenuToggle(boolean b) {\n //Toast.makeText(getActivity(), \"Is menu opened? \" + (b ? \"true\" : \"false\"), Toast.LENGTH_SHORT).show();\n }\n });\n fab.showMenuButton(true);\n fab.setClosedOnTouchOutside(true);\n\n FloatingActionButton fab1 = (FloatingActionButton) view.findViewById(R.id.fab1_rsd);\n FloatingActionButton fab2 = (FloatingActionButton) view.findViewById(R.id.fab2_rsd);\n\n fab1.setOnClickListener(this);\n fab2.setOnClickListener(this);\n }", "public void initFloatButton(){\n\n if(mFloatButton == null){\n mFloatButton = (FloatingActionButton)findViewById\n (mHouseKeeper.getFloatingActionButtonId());\n mFloatButton.setOnClickListener(mHouseKeeper.getFABOnClickListener());\n }\n }", "private void expandFAB() {\n FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) fab1.getLayoutParams();\n layoutParams.rightMargin += (int) (fab1.getWidth() * 1.7);\n layoutParams.bottomMargin += (int) (fab1.getHeight() * 0.25);\n fab1.setLayoutParams(layoutParams);\n fab1.startAnimation(show_fab_1);\n fab1.setClickable(true);\n\n //Floating Action Button 2\n FrameLayout.LayoutParams layoutParams2 = (FrameLayout.LayoutParams) fab2.getLayoutParams();\n layoutParams2.rightMargin += (int) (fab2.getWidth() * 1.5);\n layoutParams2.bottomMargin += (int) (fab2.getHeight() * 1.5);\n fab2.setLayoutParams(layoutParams2);\n fab2.startAnimation(show_fab_2);\n fab2.setClickable(true);\n\n FrameLayout.LayoutParams layoutParams3 = (FrameLayout.LayoutParams) fab3.getLayoutParams();\n layoutParams3.rightMargin += (int) (fab3.getWidth() * 0.25);\n layoutParams3.bottomMargin += (int) (fab3.getHeight() * 1.7);\n fab3.setLayoutParams(layoutParams3);\n fab3.startAnimation(show_fab_3);\n fab3.setClickable(true);\n }", "private void showFABMenu(){\n isFABOpen=true;\n\n layoutFabProject.setVisibility(View.VISIBLE);\n layoutFabNote.setVisibility(View.VISIBLE);\n layoutFabTask.setVisibility(View.VISIBLE);\n\n layoutFabProject.animate().translationY(-getResources().getDimension(R.dimen.standard_55));\n layoutFabNote.animate().translationY(-getResources().getDimension(R.dimen.standard_100));\n layoutFabTask.animate().translationY(-getResources().getDimension(R.dimen.standard_145));\n }", "void clickFmFromMenu();", "private void initActionButton() {\n FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);\n fab.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n goToDetailScreen(0);\n\n }\n });\n }", "@OnClick(R.id.floating_button_go)\r\n public void floatingButtonClick(){\n if(imIn){\r\n floatingButton.setImageDrawable(getResources().getDrawable(R.drawable.baseline_check_circle_grey_48));\r\n UserHelper.updateLunchId(getCurrentUser().getUid(), \"\").addOnCompleteListener(new OnCompleteListener<Void>() {\r\n @Override\r\n public void onComplete(@NonNull Task<Void> task) {\r\n UserHelper.updateLunchName(getCurrentUser().getUid(), \"\");\r\n RestaurantHelper.deleteLuncherId(currentRest.getPlaceId(), getCurrentUser().getUid());\r\n }\r\n }).addOnFailureListener(this.onFailureListener());\r\n imIn = false;\r\n // - Update the lunching restaurant of current user and update his pending intent for notification with a valid Restaurant object\r\n mNotificationAlarm.updateLunchingRestaurant(null);\r\n\r\n } else {\r\n floatingButton.setImageDrawable(getResources().getDrawable(R.drawable.baseline_check_circle_green_48));\r\n UserHelper.updateLunchId(getCurrentUser().getUid(), currentRest.getPlaceId()).addOnCompleteListener(new OnCompleteListener<Void>() {\r\n @Override\r\n public void onComplete(@NonNull Task<Void> task) {\r\n UserHelper.updateLunchName(getCurrentUser().getUid(), currentRest.getName());\r\n RestaurantHelper.getRestaurantsCollection().get().addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {\r\n @Override\r\n public void onComplete(@NonNull Task<QuerySnapshot> task) {\r\n for(DocumentSnapshot docSnap : task.getResult()){\r\n RestaurantHelper.deleteLuncherId(docSnap.getId(), getCurrentUser().getUid());\r\n }\r\n RestaurantHelper.addLuncherId(currentRest.getPlaceId() , getCurrentUser().getUid());\r\n }\r\n });\r\n }\r\n }).addOnFailureListener(this.onFailureListener());\r\n imIn = true;\r\n // - Update the lunching restaurant of current user and update his pending intent for notification with a valid Restaurant object\r\n mNotificationAlarm.updateLunchingRestaurant(currentRest);\r\n }\r\n }", "public void clickOnFridge() {\n click(getElementFromList(containerFrigde, 0));\n }", "private void hideFAB() {\n FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) fab1.getLayoutParams();\n layoutParams.rightMargin -= (int) (fab1.getWidth() * 1.7);\n layoutParams.bottomMargin -= (int) (fab1.getHeight() * 0.25);\n fab1.setLayoutParams(layoutParams);\n fab1.startAnimation(hide_fab_1);\n fab1.setClickable(false);\n\n //Floating Action Button 2\n FrameLayout.LayoutParams layoutParams2 = (FrameLayout.LayoutParams) fab2.getLayoutParams();\n layoutParams2.rightMargin -= (int) (fab2.getWidth() * 1.5);\n layoutParams2.bottomMargin -= (int) (fab2.getHeight() * 1.5);\n fab2.setLayoutParams(layoutParams2);\n fab2.startAnimation(hide_fab_2);\n fab2.setClickable(false);\n\n //Floating Action Button 3\n FrameLayout.LayoutParams layoutParams3 = (FrameLayout.LayoutParams) fab3.getLayoutParams();\n layoutParams3.rightMargin -= (int) (fab3.getWidth() * 0.25);\n layoutParams3.bottomMargin -= (int) (fab3.getHeight() * 1.7);\n fab3.setLayoutParams(layoutParams3);\n fab3.startAnimation(hide_fab_3);\n fab3.setClickable(false);\n }", "private void floaterMouseClicked(java.awt.event.MouseEvent evt) {\n if (count == 0) {\n count = 1;\n last = System.currentTimeMillis();\n } else if (count == 1) {\n long news = System.currentTimeMillis();\n if (last - news < 1000) {\n lastbg = floater.getBackground();\n floater.setBackground(Color.lightGray);\n }\n }\n deskPane.setBackground(null);\n }", "@Override\n public void onClick(View view) {\n showPopupMenu(fab);\n }", "public void clickButton()\n {\n fieldChangeNotify( 0 );\n }", "private void manageFAB() {\n final ImageView audioTrack = new ImageView(this);\n audioTrack.setImageResource(R.drawable.audiotrack);\n\n mFloatingActionButton = new HMVFloatingActionButton.Builder(this).setPosition(HMVFloatingActionButton.POSITION_CENTER_CENTER).setContentView(audioTrack).build();\n\n final SubActionButton.Builder itemBuilder = new SubActionButton.Builder(this);\n\n //PAUSE\n final ImageView pause = new ImageView(this);\n pause.setImageResource(R.drawable.pause);\n final SubActionButton pauseButton = itemBuilder.setContentView(pause).build();\n pauseButton.setOnClickListener(buildPauseOnClickListener());\n\n //PLAY\n final ImageView play = new ImageView(this);\n play.setImageResource(R.drawable.play);\n final SubActionButton playButton = itemBuilder.setContentView(play).build();\n playButton.setOnClickListener(buildPlayOnClickListener());\n\n //REPEAT ONE\n final ImageView repeatOne = new ImageView(this);\n repeatOne.setImageResource(R.drawable.repeat_one);\n final SubActionButton repeatOneButton = itemBuilder.setContentView(repeatOne).build();\n repeatOneButton.setOnClickListener(buildRepeatOneOnClickListener());\n\n //HEARING\n final ImageView hearing = new ImageView(this);\n hearing.setImageResource(R.drawable.hearing);\n final SubActionButton hearingButton = itemBuilder.setContentView(hearing).build();\n hearingButton.setOnClickListener(buildHearingOnClickListener());\n\n //SHUFFLE\n final ImageView shuffle = new ImageView(this);\n shuffle.setImageResource(R.drawable.shuffle);\n final SubActionButton shuffleButton = itemBuilder.setContentView(shuffle).build();\n shuffleButton.setOnClickListener(buildShuffleOnClickListener());\n\n //SKIP NEXT\n final ImageView skipNext = new ImageView(this);\n skipNext.setImageResource(R.drawable.skip_next);\n final SubActionButton skipNextButton = itemBuilder.setContentView(skipNext).build();\n skipNextButton.setOnClickListener(buildSkipNextOnClickListener());\n\n //SKIP PREVIOUS\n final ImageView skipPrevious = new ImageView(this);\n skipPrevious.setImageResource(R.drawable.skip_previous);\n final SubActionButton skipPreviousButton = itemBuilder.setContentView(skipPrevious).build();\n skipPreviousButton.setOnClickListener(buildSkipPreviousOnClickListener());\n\n //STOP\n final ImageView stop = new ImageView(this);\n stop.setImageResource(R.drawable.stop);\n final SubActionButton stopButton = itemBuilder.setContentView(stop).build();\n stopButton.setOnClickListener(buildStopOnClickListener());\n\n //POWER\n final ImageView power = new ImageView(this);\n power.setImageResource(R.drawable.power);\n final SubActionButton powerButton = itemBuilder.setContentView(power).build();\n powerButton.setOnClickListener(buildPowerOnClickListener());\n\n //INFORMATION\n final ImageView information = new ImageView(this);\n information.setImageResource(R.drawable.information);\n final SubActionButton informationButton = itemBuilder.setContentView(information).build();\n informationButton.setOnClickListener(buildInformationOnClickListener());\n\n final FloatingActionMenu actionMenu = new FloatingActionMenu.Builder(this)\n .addSubActionView(informationButton)\n .addSubActionView(shuffleButton)\n .addSubActionView(playButton)\n .addSubActionView(stopButton)\n .addSubActionView(hearingButton)\n .addSubActionView(pauseButton)\n .addSubActionView(skipNextButton)\n .addSubActionView(skipPreviousButton)\n .addSubActionView(repeatOneButton)\n .addSubActionView(powerButton)\n .attachTo(mFloatingActionButton).setStartAngle(30).setEndAngle(330).build();\n\n }", "public void notifyFiamClick() {\n FiamListener fiamListener2 = this.fiamListener;\n if (fiamListener2 != null) {\n fiamListener2.onFiamClick();\n }\n }", "private void showFABMenu(){\n isFABOpen=true;\n rotateFabForward();\n fab1.show();\n labelFab1.setVisibility(View.VISIBLE);\n }", "@Override\n\t\tpublic void onClick(View arg0) {\n\t\t\tbuttonToLeft.setImageDrawable(getResources().getDrawable(R.drawable.toleft1));\n\t\t\tbuttonToRight.setImageDrawable(getResources().getDrawable(R.drawable.toright));\n\t\t\taction.removeAllViews();\n\t\t\taction.addView(first);\n//\t\t\tshowInf = (TextView)findViewById(R.id.InfTextView);\n// \t\tshowInf.setText(\"您输入的选项为:\"+s);\n\t\t}", "public void clickDetailViewButton() {\n\t\tfilePicker.stickyButton(locDetailBtn);\n\t}", "public void onClicked();", "@Override\n\t\tpublic void onClick(View arg0) {\n\t\t\tbuttonToLeft.setImageDrawable(getResources().getDrawable(R.drawable.toleft));\n\t\t\tbuttonToRight.setImageDrawable(getResources().getDrawable(R.drawable.toright1));\n\t\t\taction.removeAllViews();\n\t\t\taction.addView(second);\n//\t\t\tdraw.setDrawItem(list);\n\t\t\tdraw.setDrawView();\n\t\t\t\n//\t\t\tshowInf = (TextView)findViewById(R.id.InfTextView);\n// \t\tshowInf.setText(\"您输入的选项为:\"+s);\n\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tClickFN();\n\t\t\t}", "public void showTriggered();", "void onCheckedChanged(FloatingActionButton fabView, boolean isChecked);", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfireDetailEvent(new DetailEvent(this, 'H'));\r\n\t\t\t}", "private void showFab() {\n if (!isFabButtonShowing) {\n isFabButtonShowing = true;\n // Set the content view to 0% opacity but visible, so that it is visible\n // (but fully transparent) during the animation.\n fabCalculate.setAlpha(0f);\n fabCalculate.setVisibility(View.VISIBLE);\n\n // Animate the content view to 100% opacity, and clear any animation\n // listener set on the view.\n fabCalculate.animate()\n .alpha(1f)\n .setDuration(MainActivity.mShortAnimationDuration)\n .setListener(new AnimatorListenerAdapter() {\n @Override\n public void onAnimationEnd(Animator animation) {\n fabCalculate.show();\n }\n });\n }\n }", "@TargetApi(Build.VERSION_CODES.LOLLIPOP)\n @OnClick(R.id.fab) void openFab() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n newConnections.setVisibility(View.VISIBLE);\n newConnections.setTranslationY(0);\n\n final float fabRadius = fab.getWidth() / 2f;\n ViewAnimationUtils.createCircularReveal(newConnections,\n (int) (fab.getX() + fabRadius),\n (int) (fab.getY() + fabRadius),\n fabRadius,\n newConnections.getHeight() + newConnections.getWidth() / 2)\n .start();\n\n // we *could* put this into the layout so it gets revealed as well...\n UiUtil.animateStatusBarColor(\n getWindow(),\n R.color.primary_dark_material_dark,\n R.color.primary_dark_material_light\n );\n\n } else {\n newConnections.setAlpha(0);\n newConnections.setVisibility(View.VISIBLE);\n newConnections.animate().alpha(1);\n }\n }", "private void animarFloatingButton() {\r\n\r\n compartir.setScaleX(0);\r\n compartir.setScaleY(0);\r\n\r\n if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP) {\r\n final Interpolator interpolador = AnimationUtils.loadInterpolator(getBaseContext(),\r\n android.R.interpolator.fast_out_slow_in);\r\n\r\n compartir.animate()\r\n .scaleX(1)\r\n .scaleY(1)\r\n .setInterpolator(interpolador)\r\n .setDuration(600)\r\n .setStartDelay(1000)\r\n .setListener(new Animator.AnimatorListener() {\r\n @Override\r\n public void onAnimationStart(Animator animation) {\r\n\r\n }\r\n\r\n @Override\r\n public void onAnimationEnd(Animator animation) {\r\n\r\n }\r\n\r\n @Override\r\n public void onAnimationCancel(Animator animation) {\r\n\r\n }\r\n\r\n @Override\r\n public void onAnimationRepeat(Animator animation) {\r\n\r\n }\r\n });\r\n }\r\n }", "@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\tpartie.setDefausse(true);\n\t\t}", "@Override\n public void onClick(View v) {\n onViewClickListener.onFabClick(v);\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcd.show(jp, \"3\");\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif (isDetailed) {\n\t\t\t\t\tcloseDetail();\n\t\t\t\t} else {\n\t\t\t\t\tshowDetail();\n\t\t\t\t}\n\t\t\t}", "public static void hideFloatingButton() {\n floatingActionButton.hide();\n }", "public boolean isFloatingBoxActive()\n {\n return false;\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\ttoggle = 3;\r\n\t\t\t\ttoggle(toggle);\r\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tslideShow();\n\t\t\t\t\n\t\t\t}", "public void clickIconViewButton() {\n\t\tfilePicker.stickyButton(locIconBtn);\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tClickFineModulation();\n\t\t\t}", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\t\ttoggleFullSceen();\n\t\t\t}", "private void createFAB() {\r\n fab = findViewById(R.id.fabEditTask);\r\n fab.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View view) {\r\n goIntoEditMode();\r\n }\r\n });\r\n }", "private void deskPaneMouseMoved(java.awt.event.MouseEvent evt) {\n repaint();\n floater.setBounds(floater.getX(), floater.getY(), deskPane.getWidth(), floaterHeight);\n if (!floater.isVisible()) {\n floater.setVisible(evt.getY() < 10);\n } else {\n floater.setVisible(evt.getY() < floater.getHeight());\n }\n if (jToggleButton1.isSelected()) {\n floater.show();\n }\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif (e.getSource() == button1) {\n\t\t prefDisplay();\n\t\t }\n\t}", "public void click() {\n\t\tif(toggles) {\n\t\t\tvalue = (value == 0) ? 1 : 0;\t// flip toggle value\n\t\t}\n\t\tupdateStore();\n\t\tif(delegate != null) delegate.uiButtonClicked(this);\t// deprecated\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tcontroller.getAppointView().updateUI();\n\t\t\t\tcontroller.getAppointView().display(true);\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tMain.buscarAFondo();\n\t\t\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfireDetailEvent(new DetailEvent(this,'P'));\r\n\t\t\t}", "public void buttonClicked();", "public void clickonFullyAutomaticFrontLoad() {\n\t\t\n\t}", "private void toggleFab() {\n if (navItemIndex == 0)\n fab.show();\n else\n fab.hide();\n }", "private void toggleFab() {\n if (navItemIndex == 0)\n fab.show();\n else\n fab.hide();\n }", "private void toggleFab() {\n if (navItemIndex == 0)\n fab.show();\n else\n fab.hide();\n }", "void leftClickPressedOnDelivery();", "@Override\n public void onSaveFABClick() {\n getSupportFragmentManager().popBackStack();\n getSupportActionBar().show();\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tmQuickAction.show(v);\n\t\t\t\t\tcurPosition = position;\n\t\t\t\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n frame.setVisible(false);//when user clicks financial assistant button the visibility of the frame for the home screen will be set to false\n new FinancialAssistant();//displays the financial assistant page\n }", "public void buttonShowComplete(ActionEvent actionEvent) {\n }", "@Override\r\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\tif(estadoAdjuntar){\r\n\t\t\t\t\testadoAdjuntar = false;\r\n\t\t\t\t\tchatUI.getContenedorAdjuntar().setVisible(true);\r\n\t\t\t\t}else{\r\n\t\t\t\t\testadoAdjuntar = true;\r\n\t\t\t\t\tchatUI.getContenedorAdjuntar().setVisible(false);\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\n public void onClick(View theView) {\n if(frontSideShowing){\n setBackSide();\n }else{\n setFrontSide();\n }\n\n\n }", "@Override\n public boolean setUiBeforShow() {\n Log.e(\" ##IS_FAV\", isFavourite + \"\");\n\n if(isFavourite) {\n txtAddToFavorite.setTextColor(context.getResources().getColor(R.color.yellow));\n Drawable[] drawables = txtAddToFavorite.getCompoundDrawables();\n Drawable leftDrawable = drawables[0];\n\n leftDrawable.setColorFilter(new PorterDuffColorFilter(context.getResources().getColor(R.color.yellow), PorterDuff.Mode.MULTIPLY));\n txtAddToFavorite.setCompoundDrawables(leftDrawable, null, null, null);\n } else {\n txtAddToFavorite.setTextColor(context.getResources().getColor(R.color.white));\n\n Drawable[] drawables = txtAddToFavorite.getCompoundDrawables();\n Drawable leftDrawable = drawables[0];\n\n leftDrawable.setColorFilter(new PorterDuffColorFilter(context.getResources().getColor(R.color.white), PorterDuff.Mode.MULTIPLY));\n txtAddToFavorite.setCompoundDrawables(leftDrawable, null, null, null);\n }\n\n\n\n imgCancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dismiss();\n }\n });\n\n txtRename.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n _renameClick.onRenameOptionClick(pos, \"\");\n dismiss();\n }\n });\n\n txtAddToFavorite.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n _favoriteClick.onFavoriteOptionClick(pos);\n dismiss();\n }\n });\n\n txtAddToScene.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n _addToSceneClick.onAddToSceneOptionClick(pos);\n dismiss();\n }\n });\n\n txtAddToScheduler.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n _addSchedulerClick.onAddSchedulerOptionClick(pos);\n dismiss();\n }\n });\n\n return true;\n }", "public void showPerformedAction(int act);", "public void actionPerformed(ActionEvent e) {\n\t\t\t\ttoggle = 1;\r\n\t\t\t\ttoggle(toggle);\r\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\ttoggle = 2;\r\n\t\t\t\ttoggle(toggle);\r\n\t\t\t}", "private void setFAB(View view) {\n SpeedDialView speedDialView = view.findViewById(R.id.speedDial);\n speedDialView.setVisibility(View.VISIBLE);\n speedDialView.addActionItem(\n new SpeedDialActionItem.Builder(R.id.fab_email, R.drawable.ic_email_black_24dp)\n .setLabel(R.string.speed_dial_email)\n .create()\n );\n speedDialView.addActionItem(\n new SpeedDialActionItem.Builder(R.id.fab_linkedIn, R.drawable.ic_linkedin)\n .setLabel(R.string.speed_dial_linkedin)\n .create()\n );\n speedDialView.addActionItem(\n new SpeedDialActionItem.Builder(R.id.fab_gitHub, R.drawable.ic_github)\n .setLabel(R.string.speed_dial_github)\n .create()\n );\n\n //Set up FAB speed dial links\n speedDialView.setOnActionSelectedListener(new SpeedDialView.OnActionSelectedListener() {\n @Override\n public boolean onActionSelected(SpeedDialActionItem speedDialActionItem) {\n switch (speedDialActionItem.getId()) {\n case R.id.fab_email:\n composeEmail();\n return false; // true to keep the Speed Dial open\n case R.id.fab_linkedIn:\n openWebPage(\"https://www.linkedin.com/in/martinjthorne/\");\n return false;\n case R.id.fab_gitHub:\n openWebPage(\"https://github.com/Martin-Thorne\");\n return false;\n default:\n return false;\n }\n }\n });\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) { // ueberprueft das Event fuer den Button\r\n\t\t\t\tif (e.getSource() == alarm \r\n\t\t\t\t\t\t&& alarm.getText().equals(\"Alarm setzen\")) { // schaut ob der geklickte Button den gleichen Text hat wieder der Alarmbutton\r\n\t\t\t\t\tabfrageFenster(); // bei Uebereinstimmung wird Abfragefenster aufgerufen\r\n\t\t\t\t}\r\n\t\t\t}", "public abstract void executeActionButton();", "@Override\r\n\tprotected void doF7() {\n\t\t\r\n\t}", "public void onClick(View v) {\n\n switch (v.getId()) {\n case R.id.fab1_rsd:\n //aux = \"Fab 1 clicked\";\n Intent it_home_rmlCadastro = new Intent(getContext(), RMLCadastro.class);\n startActivity(it_home_rmlCadastro);\n break;\n case R.id.fab2_rsd:\n //aux = \"Fab 2 clicked\";\n Intent it_home_rsdCadastro = new Intent(getContext(), RSDCadastro.class);\n startActivity(it_home_rsdCadastro);\n break;\n }\n\n //Toast.makeText(getActivity(), aux, Toast.LENGTH_SHORT).show();\n }", "private void ViewActionPerformed(ActionEvent e) {\n\t}", "private void setFab(View view){\n fab = view.findViewById(R.id.fab_add_item);\n fab.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n getFragment(new AddShoppingListItemFragment());\n // make elements of ShoppingListFragment invisible\n fab.setVisibility(View.GONE);\n mRecyclerView.setVisibility(View.GONE);\n }\n });\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif(e.getSource() == f) {\r\n\t\t\t\t\ttext.setText(\"5\");\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\r\n public void onAction(String name, boolean isPressed, float tpf)\r\n {\n mainPanel.addTransition(new DirectTransition(panel1, panel2));\r\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tFragmentTransaction ft = fm.beginTransaction();\n\n\t\t\t\tFragment fragment = new adullact.publicrowdfunding.controller.project.details.CommentPopup();\n\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\tbundle.putString(\"idProject\", projetCurrent.getResourceId());\n\t\t\t\tfragment.setArguments(bundle);\n\t\t\t\tft.addToBackStack(null);\n\t\t\t\tft.setCustomAnimations(R.anim.popup_enter, R.anim.no_anim);\n\t\t\t\tft.add(R.id.big_font, fragment);\n\t\t\t\tft.commit();\n\t\t\n\t\t\t\tfilter.setVisibility(View.VISIBLE);\n\t\t\t\tAnimation fadeInAnimation = AnimationUtils.loadAnimation(context, R.anim.fade_enter);\n\t\t\t\tfilter.setAnimation(fadeInAnimation);\n\t\t\t\tfilter.animate();\n\t\t\t\t\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\r\n\t\t\t\tpopup.show(mainpanel , 660, 40);\r\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\tthis.setVisible(false);\r\n\t\t// TODO Auto-generated method stub\r\n\t\r\n\t\tif(e.getSource()==treeBtn){\r\n\t\t\tCTreeView treeView=(CTreeView)CTreeView.getInstanace();\r\n\t\t\ttreeView.setVisible(true);\r\n\t\t}\r\n\t\tif(e.getSource()==monthBtn){\r\n\t\t\tDMonth_CalendarView monthCalendar=(DMonth_CalendarView)DMonth_CalendarView.getInstanace();\r\n\t\t\tmonthCalendar.setVisible(true);\r\n\t\t}\r\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tpDashboard.setVisible(true);\r\n\t\t\t\tpHangHoa.setVisible(false);\r\n\t\t\t\tpLichLamViec.setVisible(false);\r\n\t\t\t\tpKhachHang.setVisible(false);\r\n\t\t\t}", "@Override\n public void onClick(View v) {\n\n FavActionUtility favActionUtility = new FavActionUtility(getActivity());\n\n try {\n switch (v.getId()) {\n case R.id.text_phone:\n favActionUtility.dial(mPhoneField.getText().toString());\n break;\n case R.id.text_address:\n favActionUtility.mapOf(mAddressField.getText().toString(), mCityField.getText().toString());\n break;\n case R.id.text_yelp:\n favActionUtility.yelpSite(mYelpField.getText().toString());\n break;\n }\n } catch (Exception e) {\n favActionUtility.showErrorMessageInDialog(e.getMessage());\n e.printStackTrace();\n }\n\n }", "boolean hasFloatButtonPermission(Context context);", "@Override\n public void onClick(View view) {\n if(!searchEnabled)\n {\n assert toolbar != null;\n toolbar.animate().alpha(0.0f).setDuration(600);\n toolbar.setVisibility(View.GONE);\n floatingSearchView.animate().alpha(1.0f);\n floatingSearchView.setVisibility(View.VISIBLE);\n fab.setImageDrawable(ContextCompat.getDrawable(MainActivity.this,R.drawable.ic_clear));\n fab.animate().rotation(180)\n .setDuration(600)\n .start();\n searchEnabled = true;\n }\n else\n {\n floatingSearchView.animate().alpha(0.0f).setDuration(600);\n floatingSearchView.setVisibility(View.GONE);\n assert toolbar != null;\n toolbar.animate().alpha(1.0f);\n toolbar.setVisibility(View.VISIBLE);\n fab.setImageDrawable(ContextCompat.getDrawable(MainActivity.this,R.drawable.ic_search));\n fab.animate().rotation(0).setDuration(600).start();\n searchEnabled = false;\n\n }\n\n }", "@Override\r\n\tprotected void doF5() {\n\t\t\r\n\t}", "public void act() \n {\n checkClicked();\n }", "@Override\n\tpublic boolean fling(float velocityX, float velocityY, int button) {\n\t\treturn false;\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tstartFades();\n\t\t\t}", "@Override\n public void onClick(View view) {\n if (view == imageView) {\n showFileChooser();\n }\n //if the clicked button is upload\n else if (view == btnPost) {\n uploadFile();\n\n }\n }", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\n\t\t\t\t\tmiddleCardLayout.show(centerPanel, \"2\");\n\t\t\t\t}", "public void buttonShowIncomplete(ActionEvent actionEvent) {\n }", "@Override\n\t\t\tpublic void onClick(View view) {\n\t\t\t\tLog.e(TAG, \"toggle onClick enter \");\n\t\t\t\tupdateSurface();\n\t\t\t}", "@Override\n public void onClick(View paramView) {\n\n popupWindows.showAtLocation(fragment_sharedfilesd_home_all_refreshlistview,\n Gravity.BOTTOM, 0, 0);\n backgroundAlpha(0.5f);\n }", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\n\t\t\t\t\tmiddleCardLayout.show(centerPanel, \"3\");\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tf.annuler();\r\n\t}", "public void actionPerformed(ActionEvent e) {\r\n if (identifier.intValue() == KeyEvent.VK_F1) {\r\n btnSearch.doClick();\r\n }\r\n else if (identifier.intValue() == KeyEvent.VK_F2) {\r\n btnRun.doClick();\r\n }\r\n else if (identifier.intValue() == KeyEvent.VK_F3) {\r\n btnFtp.doClick();\r\n }\r\n else if (identifier.intValue() == KeyEvent.VK_F12 ||\r\n identifier.intValue() == KeyEvent.VK_ESCAPE) {\r\n btnCancel.doClick();\r\n }\r\n }", "private void hookSingleClickAction() {\n\t\tthis.addSelectionChangedListener(new ISelectionChangedListener() {\n\t\t\tpublic void selectionChanged(SelectionChangedEvent event) {\n\t\t\t\tsingleClickAction.run();\n\t\t\t}\n\t\t});\n\t}", "@Override\r\n\tprotected void doF3() {\n\t\t\r\n\t}", "public void actionPerformed(ActionEvent arg0) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tborderSelected(dayNumber -1);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//show the event items in the box on the right\n\t\t\t\t\t\t\twriteEvents(dayNumber);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tchangeDateLabel(dayNumber);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//make these buttons available for use\n\t\t\t\t\t\t\tnextDay.setEnabled(true);\n\t\t\t\t\t\t\tprevDay.setEnabled(true);\n\t\t\t\t\t\t\tcreateButton.setEnabled(true);\n\t\t\t\t\t\t}", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tmiddleCardLayout.show(centerPanel, \"1\");\n\t\t\t\t}" ]
[ "0.69346684", "0.6842144", "0.68410736", "0.68232024", "0.6753614", "0.66614884", "0.66215587", "0.6498403", "0.6482909", "0.64398706", "0.63585347", "0.6339784", "0.6258757", "0.6249463", "0.62462676", "0.622086", "0.6193119", "0.6189394", "0.6142484", "0.6131375", "0.6092221", "0.6072076", "0.60637826", "0.60636264", "0.604178", "0.6024466", "0.598502", "0.59771335", "0.5975847", "0.59704566", "0.5949725", "0.5933235", "0.5928199", "0.590204", "0.59019256", "0.58921623", "0.5891673", "0.5891172", "0.58851105", "0.58844376", "0.58747375", "0.58724415", "0.58716863", "0.58698714", "0.58693385", "0.5865697", "0.58539855", "0.58503133", "0.5849154", "0.5835571", "0.5829045", "0.581673", "0.5814645", "0.5805898", "0.58023727", "0.5797129", "0.5797129", "0.5797129", "0.57877034", "0.5783315", "0.5779784", "0.577639", "0.5770726", "0.5768278", "0.57608885", "0.5740254", "0.5739508", "0.5730919", "0.57264555", "0.572194", "0.5721167", "0.5709868", "0.57024103", "0.5697859", "0.5697748", "0.5693789", "0.5693659", "0.56917435", "0.5691556", "0.5678709", "0.5676338", "0.5675162", "0.56741613", "0.56691504", "0.5668051", "0.56595904", "0.5653989", "0.5653588", "0.56522053", "0.56487334", "0.5639066", "0.56248397", "0.5618603", "0.5617334", "0.5613102", "0.5603785", "0.5598786", "0.55922467", "0.5590537", "0.5583767", "0.55835426" ]
0.0
-1
end of setPartner to Login Class
public SearchGUI(){ super("Search GUI"); setSize(600,500); setResizable(false); setLocationRelativeTo(null); setLayout(new BorderLayout()); setDefaultCloseOperation(EXIT_ON_CLOSE); panelPro = new JPanel(new GridBagLayout()); add(panelPro, BorderLayout.NORTH); grid = new GridBagConstraints(); grid.fill=GridBagConstraints.HORIZONTAL; grid.insets = new Insets(2,2,2,2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void login() {\n\t\t\r\n\t}", "protected void login() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void login() {\n\r\n\t}", "@Override\n\tprotected void login() {\n\t\tsuper.login();\n\t}", "@Override\n\tpublic void loginUser() {\n\t\t\n\t}", "public static void Login() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void MemberLogin() {\n\r\n\t}", "Login() { \n }", "public login() {\r\n\t\tsuper();\r\n\t}", "@Override\r\n\tprotected void onLoginSuccess() {\n\t\t\r\n\t}", "Login(String strLogin)\n {\n \tsetLogin(strLogin);\n }", "public Login() {\n initComponents();\n KiemTraKN();\n }", "@Override\n\tpublic void goToLogin() {\n\t\t\n\t}", "protected synchronized void login() {\n\t\tauthenticate();\n\t}", "public void LogIn() {\n\t\t\r\n\t}", "public Login() {\r\n\t\tinitialize();\r\n\t}", "private void loadLogin(){\n }", "@Override\n\tpublic void onLoginSuccess() {\n\t\t\n\t}", "private void login(String username,String password){\n\n }", "public abstract void onLogin();", "@Override\r\n\t\t\tpublic void onLogin(String username, String password) {\n\r\n\t\t\t}", "public Login() {\n\t\tsuper();\n\t}", "private ServicioLogin() {\n super();\n }", "private void login() {\n AnonimoTO dati = new AnonimoTO();\n String username = usernameText.getText();\n String password = passwordText.getText();\n\n if (isValidInput(username, password)) {\n dati.username = username;\n dati.password = password;\n\n ComplexRequest<AnonimoTO> request =\n new ComplexRequest<AnonimoTO>(\"login\", RequestType.SERVICE);\n request.addParameter(dati);\n\n SimpleResponse response =\n (SimpleResponse) fc.processRequest(request);\n\n if (!response.getResponse()) {\n if (ShowAlert.showMessage(\n \"Username o password non corretti\", AlertType.ERROR)) {\n usernameText.clear();\n passwordText.clear();\n }\n }\n }\n\n }", "public abstract User login(User data);", "private LogIn() {}", "public void login() {\n\n String username = usernameEditText.getText().toString();\n String password = passwordEditText.getText().toString();\n regPresenter.setHost(hostEditText.getText().toString());\n regPresenter.login(username, password);\n }", "@Override\n\tpublic void sendLogin() {\n\t\t// TODO Auto-generated method stub\n\t\ttry{\n\t\t\tString result = \"\";\n\t\t\tif (this.servType.equals(SERVICE_TYPE_SOAP)){\n\t\t\t\tresult = server.login();\n\t\t\t} else {\n\t\t\t\tWebResource loginService = service.path(URI_LOGIN);\n\t\t\t\tresult = loginService.accept(MediaType.TEXT_PLAIN).get(String.class);\n\t\t\t}\n\t\t\t//get the clientId\n\t\t\tclientId = Integer.parseInt(result);\n\t\t\t//set the status\n\t\t\tgui.setStatus(\"Successfully logged in! Obtained client ID: \"+clientId+\" from server!\");\n\t\t\t//immediately send the request for the list of items\n\t\t\tsendItemListRequest();\n\t\t} catch (ClientHandlerException ex){\n\t\t\t//exceptions for REST service\n\t\t\tex.printStackTrace();\n\t\t\tsetOKDialog(\"Error\", \"The RESTFul server is not responding!! Closing application...\");\n\t\t\tSystem.exit(0);\n\t\t} catch (WebServiceException ex){\n\t\t\t//exceptions for SOAP-RPC service\n\t\t\tex.printStackTrace();\n\t\t\tsetOKDialog(\"Error\", \"The SOAP-RPC server is not responding!! Closing application...\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "public abstract boolean login(String email, String passwaord) throws CouponSystemException;", "@Override\n public void manejarLogin() {\n loginPresenter.validarLogin(etxtEmail.getText().toString(),etxtPass.getText().toString());\n }", "@Override\r\n\tpublic void Login(DbInterface dbi) {\n\t\t\r\n\t}", "void loginDone();", "public login() {\n initComponents();\n \n \n }", "public Login() {\n inicializarUsuarios();\n }", "protected Response login() {\n return login(\"\");\n }", "@Override\n\tpublic void LoginProc(Parent root) {\n\t\tTextField idTxt = (TextField) root.lookup(\"#txtid\");\n\t\tTextField pwTxt = (TextField) root.lookup(\"#txtpw\");\n\t\tSystem.out.println(\"ID : \"+idTxt.getText()+\",PW : \"+pwTxt.getText()+\"가 입력되었습니다.\");\n\t}", "@Override \n public void commandLogin(String userName, String password)\n {\n }", "public void StartLogIn(){\n\t}", "private void userLogin(HttpServletRequest request, HttpServletResponse response) {\n\t\t\n\t}", "@Override\n\tpublic String login_request() {\n\t\treturn null;\n\t}", "private void loginSuccess(String uname) {\n }", "void successLogin();", "private void loggedInUser() {\n\t\t\n\t}", "public final void login() {\n Activity_ExtensionKt.hideSoftKeyboard(this);\n if (hasAllRequiredField()) {\n EditText editText = (EditText) _$_findCachedViewById(C2723R.C2726id.etUserName);\n Intrinsics.checkExpressionValueIsNotNull(editText, \"etUserName\");\n String obj = editText.getText().toString();\n if (obj != null) {\n this.username = StringsKt.trim((CharSequence) obj).toString();\n EditText editText2 = (EditText) _$_findCachedViewById(C2723R.C2726id.etPassword);\n Intrinsics.checkExpressionValueIsNotNull(editText2, \"etPassword\");\n String obj2 = editText2.getText().toString();\n if (obj2 != null) {\n this.password = StringsKt.trim((CharSequence) obj2).toString();\n LoginViewModel loginViewModel = this.viewModel;\n if (loginViewModel == null) {\n Intrinsics.throwUninitializedPropertyAccessException(\"viewModel\");\n }\n EditText editText3 = (EditText) _$_findCachedViewById(C2723R.C2726id.etUserName);\n Intrinsics.checkExpressionValueIsNotNull(editText3, \"etUserName\");\n String obj3 = editText3.getText().toString();\n EditText editText4 = (EditText) _$_findCachedViewById(C2723R.C2726id.etPassword);\n Intrinsics.checkExpressionValueIsNotNull(editText4, \"etPassword\");\n loginViewModel.login(obj3, editText4.getText().toString());\n return;\n }\n throw new TypeCastException(\"null cannot be cast to non-null type kotlin.CharSequence\");\n }\n throw new TypeCastException(\"null cannot be cast to non-null type kotlin.CharSequence\");\n }\n }", "private static void postLoginPage() {\n post(\"/login\", \"application/json\", (req, res) -> {\n HomerAccount loggedInAccount = homerAuth.login(req.body());\n if(loggedInAccount != null) {\n req.session().attribute(\"account\", loggedInAccount);\n res.redirect(\"/team\");\n } else {\n res.redirect(\"/login\");\n }\n return null;\n });\n }", "public void login() {\n presenter.login(username.getText().toString(), password.getText().toString());\n }", "Login.Req getLoginReq();", "public abstract void login(String userName, String password) throws RemoteException;", "private void action_login_utente(HttpServletRequest request, HttpServletResponse response) throws IOException{\n //recupero credenziali di login\n String email = SecurityLayer.addSlashes(request.getParameter(\"email\").toLowerCase());\n email = SecurityLayer.sanitizeHTMLOutput(email);\n String password = SecurityLayer.addSlashes(request.getParameter(\"password\"));\n password = SecurityLayer.sanitizeHTMLOutput(password);\n if(!email.isEmpty() && !password.isEmpty()){\n try {\n //recupero utente dal db\n Utente u = ((PollwebDataLayer)request.getAttribute(\"datalayer\")).getUtenteDAO().getUtenteByEmail(email);\n //controllo che l'utente esista\n if(u != null){\n //controllo i parametri\n if(u.getEmail().equalsIgnoreCase(email) && new BasicPasswordEncryptor().checkPassword(password, u.getPassword())){\n //se l'utente esiste ed è lui\n\n request.setAttribute(\"userName\", u.getNome());\n request.setAttribute(\"user_id\", u.getId());\n System.out.println(u.getId());\n\n SecurityLayer.createSession(request, u.getId());\n\n if (request.getParameter(\"referrer\") != null) {\n response.sendRedirect(request.getParameter(\"referrer\"));\n } else {\n response.sendRedirect(\"/home\");\n }\n }else{\n if(request.getAttribute(\"referrer\") != null){\n response.sendRedirect(\"/login?referrer=\" + URLEncoder.encode(((String)request.getAttribute(\"referrer\")), \"UTF-8\"));\n }else{\n request.setAttribute(\"error\", \"Credenziali errate\");\n response.sendRedirect(\"/login?error=100\");\n }\n }\n\n }else{\n\n if(request.getAttribute(\"referrer\") != null){\n response.sendRedirect(\"/login?referrer=\" + URLEncoder.encode(((String)request.getAttribute(\"referrer\")), \"UTF-8\"));\n }else{\n response.sendRedirect(\"/login&error=102\");\n }\n }\n }catch (DataException ex) {\n //TODO Handle Exception\n\n }\n } else {\n\n if(request.getAttribute(\"referrer\") != null){\n response.sendRedirect(\"/login?referrer=\" + URLEncoder.encode(((String)request.getAttribute(\"referrer\")), \"UTF-8\"));\n }else{\n response.sendRedirect(\"/login?error=101\");\n }\n }\n }", "private void login() {\n\t\t \tetUserName.addTextChangedListener(new TextWatcher() {\n\t\t public void afterTextChanged(Editable s) {\n\t\t Validation.hasText(etUserName);\n\t\t }\n\t\t public void beforeTextChanged(CharSequence s, int start, int count, int after){}\n\t\t public void onTextChanged(CharSequence s, int start, int before, int count){}\n\t\t });\n\t\t \t\n\t\t \t // TextWatcher would let us check validation error on the fly\n\t\t \tetPass.addTextChangedListener(new TextWatcher() {\n\t\t public void afterTextChanged(Editable s) {\n\t\t Validation.hasText(etPass);\n\t\t }\n\t\t public void beforeTextChanged(CharSequence s, int start, int count, int after){}\n\t\t public void onTextChanged(CharSequence s, int start, int before, int count){}\n\t\t });\n\t\t }", "public void login() {\n if (!areFull()) {\n return;\n }\n\n // Get the user login info\n loginInfo = getDBQuery(nameField.getText());\n if (loginInfo.equals(\"\")) {\n return;\n }\n\n // Get password and check if the entered password is true\n infoArray = loginInfo.split(\" \");\n String password = infoArray[1];\n if (!passField.getText().equals(password)) {\n errorLabel.setText(\"Wrong Password!\");\n return;\n }\n\n continueToNextPage();\n }", "@Override\n\tpublic void credite() {\n\t\t\n\t}", "Conseiller obtenirConseillerParLogin(String login);", "@Override\n public void login(String nome, String email, int senha) {\n if (getNome() == nome && this.getEmail() == email && this.getSenha() == senha){\n System.out.println(\"Login efetuado com sucesso\");\n } else {\n System.out.println(\"0 - Sair\");\n System.out.println(\"Saiu do usuario\");\n }\n\n }", "public boolean login(String X_Username, String X_Password){\n return true;\n //call the function to get_role;\n //return false;\n \n \n }", "@Override\n public void validateCredentials(ObjLogin objLogin, Context mContext) {\n if (loginView != null) {\n loginView.showProgress();\n loginInteractor.login(objLogin, this, mContext);\n }\n }", "@Override\n\tpublic void login() {\n\t\tAccountManager accountManager = AccountManager.get(context);\n\t\tAccount[] accounts = accountManager.getAccountsByType(GOOGLE_ACCOUNT_TYPE);\n\t\tif(accounts.length < 1) throw new NotAccountException(\"This device not has account yet\");\n\t\tfinal String userName = accounts[0].name;\n\t\tfinal String accountType = accounts[0].type;\n\t\tBundle options = new Bundle();\n\t\tif(comService.isOffLine()){\n\t\t\tsetCurrentUser(new User(userName, userName, accountType));\n\t\t\treturn;\n\t\t}\n\t\taccountManager.getAuthToken(accounts[0], AUTH_TOKEN_TYPE, options, (Activity)context, \n\t\t\t\tnew AccountManagerCallback<Bundle>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run(AccountManagerFuture<Bundle> future) {\n\t\t\t\t\t\tString token = \"\";\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tBundle result = future.getResult();\n\t\t\t\t\t\t\ttoken = result.getString(AccountManager.KEY_AUTHTOKEN);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tsetCurrentUser(new User(userName, userName, accountType, token));\n\t\t\t\t\t\t} catch (OperationCanceledException e) {\n\t\t\t\t\t\t\tandroid.os.Process.killProcess(android.os.Process.myPid());\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tandroid.os.Process.killProcess(android.os.Process.myPid());\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tLog.d(\"Login\", \"Token: \" + token);\n\t\t\t\t\t}\n\t\t\t\t}, new Handler(new Handler.Callback() {\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean handleMessage(Message msg) {\n\t\t\t\t\t\tLog.d(\"Login\", msg.toString());\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}));\n\t}", "@Override\n\t\tpublic void onCancelLogin() {\n\n\t\t}", "@Override\n\t\tpublic void onCancelLogin() {\n\n\t\t}", "void loginAttempt(String email, String password);", "protected boolean login() {\n\t\tString Id = id.getText();\n\t\tif (id.equals(\"\")){\n\t\t\tJOptionPane.showMessageDialog(null, \"请输入用户名!\",\"\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tUserVO user = bl.findUser(Id);\n\t\tif (user == null){\n\t\t\tJOptionPane.showMessageDialog(null, \"该用户不存在!\",\"\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (! user.getPassword().equals(String.valueOf(key.getPassword()))){\n\t\t\tSystem.out.println(user.getPassword());\n\t\t\tJOptionPane.showMessageDialog(null, \"密码错误!\",\"\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tsimpleLoginPanel.this.setVisible(false);\n\t\tUserblService user2 = new Userbl(Id);\n\t\tReceiptsblService bl = new Receiptsbl(user2);\n\t\tClient.frame.add(new simpleMainPanel(user2,bl));\n\t\tClient.frame.repaint();\n\t\t\n\t\treturn true;\n\t\t\n\t}", "@Override\n\tpublic void setLoginId(String arg0) {\n\t\t\n\t}", "private final static void onLogin(TextField username, PasswordField password)\n\t{\n\t\tif (ProfileManipulation.checkLogin(username.getText(), password.getText())) {\n\t\t\tif (ProfileManipulation.isVerfied(username.getText())) {\n\t\t\t\tProfileManipulation.updateLoginStatus(username.getText(), true);\n\n\t\t\t\t// Jetzt wird das Profil aufgerufen\n\t\t\t\tPartylize.setUsername(username.getText());\n\t\t\t\tPartylize.showMainScene();\n\t\t\t} else {\n\t\t\t\tPartylize.setUsername(username.getText());\n\t\t\t\tPartylize.showVerification();\n\t\t\t}\n\t\t}\n\t\t// Funktionsaufruf Datenbankanbindung -> Erstellen einer Session ID\n\t\t// Funktionsaufruf Profildaten in lokalen Speicher laden - WIP\n\t\telse {\n\t\t\tusername.setText(\"\");\n\t\t\tpassword.setText(\"\");\n\t\t}\n\t}", "public void doLogin() {\r\n\t\tif(this.getUserName()!=null && this.getPassword()!=null) {\r\n\t\t\tcdb=new Connectiondb();\r\n\t\t\tcon=cdb.createConnection();\r\n\t\t\ttry {\r\n\t\t\t\tps=con.prepareStatement(\"Select idUser,nom,prenom,userName,type,tel from t_user where userName=? and pass=? and status=?\");\r\n\t\t\t\tps.setString(1, this.getUserName());\r\n\t\t\t\tps.setString(2, this.getPassword());\r\n\t\t\t\tif(rs.next()) {\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"idUser\", rs.getInt(\"idUser\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"nom\", rs.getString(\"nom\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"prenom\", rs.getString(\"prenom\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"userName\", rs.getString(\"userName\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"type\", rs.getString(\"type\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"tel\", rs.getString(\"tel\"));\r\n\t\t\t\t\tFacesContext.getCurrentInstance().getExternalContext().redirect(\"view/welcome.xhtml\");\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\te.printStackTrace();\r\n\t\t\t\tnew Message().error(\"echec de connexion\");\r\n\t\t\t}finally {\r\n\t\t\t\tcdb.closeConnection(con);\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\tnew Message().warnig(\"Nom d'utilisateur ou mot de passe incorrecte\");\r\n\t\t}\r\n\t}", "@Override\n\tpublic ResultMessage login(String user_name, String password) throws RemoteException{\n\t\treturn null;\n\t}", "public login_1_argument() {\n }", "@Override\n\tpublic ActionResult login(PortalForm form, HttpServletRequest request) throws SQLException {\n\t\treturn null;\n\t}", "public void authenticate(LoginRequest loginRequest) {\n\n }", "public void loginAsUser() {\n vinyardApp.navigateToUrl(\"http://localhost:8080\");\n vinyardApp.fillUsername(\"user\");\n vinyardApp.fillPassord(\"123\");\n vinyardApp.clickSubmitButton();\n }", "public void testLogin() throws Exception {\n super.login();\n }", "public ControleurVueLogin() {\n\n\t}", "@Override\n\tpublic boolean login(MemberBean param) {\n\t\treturn false;\n\t}", "public LoginOra() {\n super(\"Oracle Login\");\n\n }", "public LoginJudge() {\n\t\tsuper();\n\t}", "@Override\n\t public String loginUser(String email, String password) {\n\t\t\tlog.info(\"email and pass are \"+email+\" \"+password);\n\t\t\twebuserid=loginmanager.isExist(email, password);\n\t\t\tif(webuserid>0)\n\t\t\t{\n\t\t\t//Ckech is it blocked\n\t\t\tif(! loginmanager.isBlocked(webuserid))\n\t\t\t{\n\t\t\t\t //Get all personal Ids and login the person\n\t\t\t\t \n\t\t\t\t peronalid=loginmanager.getPersonelIds(webuserid);\n\t\t\t\t \n\t\t\t\t //Store in personal bean class\n\t\t\t\t PersonalIds.setEmpid(1);\n\t\t\t\t PersonalIds.setCmpid(1);\n\t\t\t\t PersonalIds.setGrpid(1);\n\t\t\t\t message=error.sucess;\n\t\t\t\t //Lodge the login details in a lodgeevent table\n\t\t\t\n\t\t\t} \n\t\t\telse\n\t\t\t{\n\t\t\tmessage=error.blocked;\n\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\tmessage=error.noaccount;\n\t\t\t}\n\t\t\t\n\t\t\t\t \n\t\t\t\n\t\t\t\n\t\t\treturn message;\n\t }", "public void login () {\n\t\tGPPSignIn.sharedInstance().authenticate();\n\t}", "public void premutoLogin()\n\t{\n\t\tnew _FINITO_funzione_loginGUI();\n\t}", "public abstract boolean showLogin();", "private void loginFlow() {\n\t\tActiveUserModel userController = ActiveUserModel.getInstance();\n\n\t\tif (userController.isLoggedIn()) {\n\t\t\t// continue\n\t\t} else {\n\t\t\tIntent intent = new Intent(this, LoginActivity.class);\n\t\t\tstartActivityForResult(intent, LOGIN_ACTIVITY);\n\t\t}\n\t}", "public void LoginButton() {\n\t\t\r\n\t}", "public Login() {\n initComponents();\n hideregister ();\n }", "@Override\r\n public Boolean loginAdmin(LoginAccessVo vo) throws Exception {\n return null;\r\n }", "@Override\r\n public Boolean loginAdmin(LoginAccessVo vo) throws Exception {\n return null;\r\n }", "void login(String user, String password);", "public UserLoginhandle() {\n\t\tsuper();\n\t}", "private static void loginToAccount() {\n\n\t\tSystem.out.println(\"Please enter your userName : \");\n\t\tString userName=scan.nextLine();\n\n\t\tSystem.out.println(\"Please enter your Password : \");\n\t\tString password=scan.nextLine();\n\n\t\tif(userName.equals(userName)&& password.equals(password))\n\t\t\tSystem.out.println(\"Welcome to AnnyBank\");\n\n\t\ttransactions();\n\t}", "private void login(Conversation conversation) {\n\t\tJsonObject lJsonObjIn = (JsonObject) conversation.getRequestBodyAsJSON();\n\t\t\n\t\tString lGebruikersnaam = lJsonObjIn.getString(\"username\");\t\t\t\t\t\t// Uitlezen van opgestuurde inloggegevens... \n\t\tString lWachtwoord = lJsonObjIn.getString(\"password\");\n\t\tMap<String, String> loginInfo = informatieSysteem.loginDetails(lGebruikersnaam,lWachtwoord);\n\n\t\tif(loginInfo.isEmpty())\n\t\t{\n\t\t\t//LOGIN FAILED !\n\t\t\tconversation.sendJSONMessage(\"{\\\"rol\\\":\\\"undefined\\\"}\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tJsonObjectBuilder lJsonObjectBuilder = Json.createObjectBuilder();\n\t\t\tlJsonObjectBuilder.add(\"rol\", loginInfo.get(\"rol\"));\n\t\t\tlJsonObjectBuilder.add(\"voornaam\", loginInfo.get(\"voornaam\"));\n\t\t\tlJsonObjectBuilder.add(\"achternaam\", loginInfo.get(\"achternaam\"));\n\t\t\tlJsonObjectBuilder.add(\"identificatienummer\", loginInfo.get(\"identificatienummer\"));\t\t// en teruggekregen gebruikersrol als JSON-object...\n\t\t\tif(loginInfo.containsKey(\"group\")) lJsonObjectBuilder.add(\"group\", loginInfo.get(\"group\"));\n\t\t\tif(loginInfo.containsKey(\"klasnaam\")) lJsonObjectBuilder.add(\"klasnaam\", loginInfo.get(\"klasnaam\"));\n\t\t\tif(loginInfo.containsKey(\"klascode\")) lJsonObjectBuilder.add(\"klascode\", loginInfo.get(\"klascode\"));\n\t\t\tString lJsonOut = lJsonObjectBuilder.build().toString();\n\t\t\tconversation.sendJSONMessage(lJsonOut);\n\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t// terugsturen naar de Polymer-GUI!\n\t}", "private MsLogin(Builder builder) {\n super(builder);\n }", "private void signIn() {\n }", "public void logincredentials() {\n\t\tutil.entertext(prop.getValue(\"locators.text.uname\"), \"admin\");\n\t\tutil.entertext(prop.getValue(\"locators.text.password\"), \"Admin123\");\n\t\tutil.ClickElement(prop.getValue(\"locators.button.regdesk\"));\n\t\tutil.ClickElement(prop.getValue(\"locators.button.login\"));\n\t\tlogreport.info(\"logged into the application\");\n\n\t}", "public Login()\r\n\t{\r\n\t\tthis.name=name;\r\n\t\tthis.dob=dob;\r\n\t\tthis.nationality=nationality;\r\n\t\tthis.location=location;\r\n\t\tthis.phno=phno;\r\n\t\tthis.gender=gender;\r\n\t\tthis.jobtype=jobtype;\r\n\t\tthis.experience=experience;\r\n\t\tthis.salary=salary;\r\n\t\t\r\n\t\tthis.uname=uname;\r\n\t\tthis.password=password;\r\n\t\t\r\n\t\tthis.notification=notification;\r\n\t}", "private void loginAccount() {\n\t\taccountManager.loginAccount(etEmail.getText().toString(), etPassword.getText().toString());\n\n\t}", "public void setLogin(String strLogin)\n {\n \tstringLogin = strLogin;\n }", "public void loginByRetail(RetailLoginData retailLoginData){ // method for login by retail\n if (isSelectedPresent(By.name(\"auth[PHONE]\"))) {\n type(By.name(\"auth[PHONE]\"), retailLoginData.getRetailphone());\n } else if (isSelectedPresent(By.name(\"auth[EMAIL]\"))){\n type(By.name(\"auth[EMAIL]\"), retailLoginData.getRetailemail());\n }\n type(By.name(\"auth[PASSWORD]\"), retailLoginData.getRetailpassword());\n click(By.xpath(\"//form[@id='authForm']/div[3]/button\"));\n\n }", "public LiveData<SoclData> extLogin(Context mContext, String p, String at) {\n //we will load it asynchronously from server in this method\n loginRepo.extLogin(mContext,p, at);\n loginExt = loginRepo.getLoginExt();\n return loginExt;\n }", "void redirectToLogin();", "public static void LoginDirector() {\n SuperUI.clearScreen();\n int type = LoginScreen();\n\n try {\n\n Connection conn = ConnectToDatabase();\n if (type == 1) {\n SuperUI.clearScreen();\n Employee.EmployeeLogin();\n// if(employeePosition.equalsIgnoreCase(\"HR Manager\"))\n// {\n// type=4;\n// }\n } else if (type == 2) {\n Customer.CustomerLogin();\n }\n if (type == 3) {\n System.out.println(\"Goodbye\");\n System.exit(0);\n conn.close();\n }\n\n } catch (SQLException excpt) {\n System.out.println(excpt.getMessage());\n\n }\n\n }", "private final static void onLoginAdmin(TextField username, PasswordField password)\n\t{\n\t\tif(ProfileManipulation.findUsername(username.getText()) && !ProfileManipulation.checkLoginStatus(username.getText())){\n\t\t\tif (ProfileManipulation.isVerfied(username.getText())) {\n\t\t\t\tProfileManipulation.updateLoginStatus(username.getText(), true);\n\n\t\t\t\t// Jetzt wird das Profil aufgerufen\n\t\t\t\tPartylize.setUsername(username.getText());\n\n\t\t\t\tProfileManipulation.changePassword(password.getText());\n\n\t\t\t\tPartylize.showMainScene();\n\t\t\t} else {\n\t\t\t\tPartylize.setUsername(username.getText());\n\t\t\t\tPartylize.showVerification();\n\t\t\t}\n\t\t}\n\t\t// Funktionsaufruf Datenbankanbindung -> Erstellen einer Session ID\n\t\t// Funktionsaufruf Profildaten in lokalen Speicher laden - WIP\n\t\telse {\n\t\t\tusername.setText(\"\");\n\t\t\tpassword.setText(\"\");\n\t\t}\n\t}", "private Users buildLogin( ) {\n\t\t\r\n\t\t return LoginUtil.fillUserData(this.user, this);\r\n\t\t \r\n\t}", "@Override\n\tpublic User login(String user, String pass) {\n\t\treturn null;\n\t}", "@Override\n\tpublic boolean login(Map<String, Object> map) {\n\t\treturn false;\n\t}" ]
[ "0.7910276", "0.7847887", "0.7774163", "0.73611367", "0.72820413", "0.7164554", "0.71597064", "0.71521366", "0.70789015", "0.7012796", "0.6990202", "0.6964777", "0.6935698", "0.6922884", "0.68701303", "0.6856549", "0.6853633", "0.68276095", "0.67802495", "0.67800236", "0.677889", "0.6775536", "0.67496526", "0.67470986", "0.6717254", "0.6714203", "0.6691567", "0.6687964", "0.6679231", "0.6658325", "0.66418415", "0.663433", "0.6607643", "0.6604241", "0.6589787", "0.65455955", "0.6532721", "0.6510061", "0.65065336", "0.6505744", "0.6500089", "0.64987296", "0.6498128", "0.6491204", "0.64838517", "0.6475802", "0.6471543", "0.64561284", "0.6452579", "0.6451481", "0.6448725", "0.64463764", "0.64451534", "0.64436406", "0.6438304", "0.64352906", "0.64339703", "0.6408604", "0.6408604", "0.63992697", "0.6389329", "0.6386415", "0.63858956", "0.63845015", "0.63717204", "0.63700217", "0.6368309", "0.6360763", "0.6359333", "0.63523006", "0.6351519", "0.633817", "0.633696", "0.6334438", "0.63301593", "0.6326855", "0.6325498", "0.63249767", "0.6323009", "0.6320985", "0.6315614", "0.63151574", "0.63151574", "0.6306676", "0.630456", "0.6299375", "0.62974584", "0.6293074", "0.6291807", "0.629074", "0.6286607", "0.6281697", "0.6279959", "0.62778693", "0.6273647", "0.6270233", "0.6269255", "0.62679136", "0.62638503", "0.62581396", "0.6256055" ]
0.0
-1
TODO Autogenerated method stub
@Override public void deleteMsgById(int mid) { mp.deleteMsgById(mid); }
{ "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 deleteRes(int rid) { rmap.deleteRes(rid); }
{ "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 List<Sysmanager> findChecksys(Sysmanager sys) { return sm.checksys(sys); }
{ "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
move to the closing bracket
public static SignificanceHeuristic parse(XContentParser parser) throws IOException, QueryShardException { if (parser.nextToken().equals(XContentParser.Token.END_OBJECT) == false) { throw new ElasticsearchParseException( "failed to parse [percentage] significance heuristic. expected an empty object, " + "but got [{}] instead", parser.currentToken() ); } return new PercentageScore(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void endBracket()\n\t\t{\n\t\tcurrentParseTree.rightBound = characterIndex;\n\n\t\t// convert the list of children to an array\n\t\tcurrentParseTree.children = new ParseTree[currentParseTreeChildren.size()];\n\t\tfor (int i = 0; i < currentParseTreeChildren.size(); i++)\n\t\t\tcurrentParseTree.children[i] = (ParseTree)currentParseTreeChildren.get(i);\n\n\t\t// pop the stack\n\t\ttreeHistory.pop();\n\t\tchildHistory.pop();\n\n\t\tif (treeHistory.size() == 0)\n\t\t\treturn;\n\n\t\tParseTree subtree = currentParseTree;\n\n\t\t// reset the current fields\n\t\tcurrentParseTree = (ParseTree)treeHistory.peek();\n\t\tcurrentParseTreeChildren = (List)childHistory.peek();\n\n\t\t// add the child to the list\n\t\tcurrentParseTreeChildren.add(subtree);\n\t\t}", "@Override\n\tprotected void handleCloseBracket() {\n\t\tif (isInClearText()) {\n\t\t\tsaveToken();\n\t\t}\n\t}", "private void processBracket() {\r\n\t\tif (expression[currentIndex] == '(') {\r\n\t\t\ttoken = new Token(TokenType.OPEN_BRACKET, expression[currentIndex]);\r\n\t\t} else {\r\n\t\t\ttoken = new Token(TokenType.CLOSED_BRACKET, expression[currentIndex]);\r\n\t\t}\r\n\r\n\t\tcurrentIndex++;\r\n\t}", "private void movePositionToEndOfTag(String tag) throws ParseException {\n String closing = \"</\" + tag + \">\";\n position = html.indexOf(closing, position);\n if (position == -1) {\n throw new ParseException(\"Cannot skip tag because closing \" + tag + \" doesnt exist.\", position);\n }\n position += closing.length();\n }", "private void emptyBracket() {\n\n\t\twhile (!stack.peek().matches(\"[(]\")) {\n\t\t\tqueue.add(stack.pop());\n\t\t}\n\t\t// Remove opening bracket from the stack.\n\t\tstack.pop();\n\t}", "public void moveEnd(\n )\n {moveLast(); moveNext();}", "public void pop()\n {\n\tsetIndentLevel(indentLevel - 1);\n }", "public void quitMapDeclaration() {\n decreaseDepth();\n addLine(\"]);\");\n }", "private void goBack() throws IOException{\n\t\tif(\"\\n\".equals(currentChar)){\n\t\t\tline--;\n\t\t}\n\t\tpos--;\n\t\tsourceReader.reset();\n\t}", "@Override\n public void endVisit(CssIf x, Context ctx) {\n out.indentOut();\n out.printOpt(\"/* } */\");\n out.newlineOpt();\n }", "@Test\n\tpublic void testLookaheadBeyondEnd()\n\t{\n\t\tth.addError(1, 7, \"Unmatched '{'.\");\n\t\tth.addError(1, 7, \"Unrecoverable syntax error. (100% scanned).\");\n\t\tth.test(\"({ a: {\");\n\t}", "private boolean isBracketAhead() {\r\n\t\treturn expression[currentIndex] == '(' || expression[currentIndex] == ')';\r\n\t}", "void moveToEnd();", "public void jumpToMatchingBracket()\n {\n int caretOffset = sourceViewer.getSelectedRange().x;\n int matchOffset =\n findMatchingBracket(sourceViewer.getDocument(), caretOffset, true);\n \n if (matchOffset == -1) return;\n \n sourceViewer.revealRange(matchOffset + 1, 1);\n sourceViewer.setSelectedRange(matchOffset + 1, 0);\n }", "public void finish() {\n charScanner.pushBack(currentCharToken);\n }", "private void parseEndTag() {\n Token token;\n try {\n stack.pop();\n token = lexer.nextToken();\n if (token.getType() != TokenType.TAG_CLOSE) {\n throw new SmartScriptParserException(\"There is no close tag!\");\n }\n lexer.setState(LexerState.BASIC);\n } catch (EmptyStackException ex) {\n throw new SmartScriptParserException(\"There are too many \\\"END\\\" tags.\");\n }\n}", "protected void writeClosing ()\n {\n stream.println ('}');\n }", "public void outdent()\n {\n if ( indent > 0 )\n {\n indent -= 1;\n }\n }", "private boolean parseOpeningBracket() {\n if (index < end && source.charAt(index) == '[') {\n index++;\n return true;\n }\n return false;\n }", "private void pushBack() {\n\t\tbufferLocal.insertarEnCabeza(listaTokens.get(listaTokens.size()-1));\n\t}", "public void push()\n {\n\tsetIndentLevel(indentLevel + 1);\n }", "@Override\n\tprotected void handleOpenBracket() {\n\t\tif (isInClearText()) {\n\t\t\tsaveToken();\n\t\t}\n\t}", "public void back() throws JSONException {\n if(usePrevious || this.index <= 0) {\n throw new JSONException(\"Stepping back two steps is not supported\");\n }\n this.index -= 1;\n this.character -= 1;\n this.usePrevious = true;\n this.eof = false;\n }", "private static boolean wrongClosingScope(char top, char val) {\n return (top == '{' || top == '[' || top == '(') &&\n (val == '}' || val == ']' || val == ')');\n }", "public static String chopBraces(String s) {\n\t\tif(s.startsWith(STRSQBRACKETSTART) && s.endsWith(STRSQBRACKETEND))\n\t\t\treturn s.substring(1,s.length()-1);\n//\t\tboolean changed;\n//\t\tdo {\n//\t\t\tchanged=true;\n//\t\t\tif(s.startsWith(STRSQBRACKETSTART)) s=s.substring(1);\n//\t\t\telse if(s.startsWith(STRCURLYSTART)) s=s.substring(1);\n//\t\t\telse if(s.startsWith(STRLT)) s=s.substring(1);\n//\t\t\telse if(s.endsWith(STRSQBRACKETEND)) s=s.substring(0,s.length()-1);\n//\t\t\telse if(s.endsWith(STRCURLYEND)) s=s.substring(0,s.length()-1);\n//\t\t\telse if(s.endsWith(STRGT)) s=s.substring(0,s.length()-1);\n//\t\t\telse changed=false;\n//\t\t} while(changed);\n\t\t\n\t\treturn s;\n//\t\t\n//\t\tif(s==null || (s.indexOf('[')<0 && s.indexOf('{')<0)) return s;\n//\t\treturn s.substring(1,s.length()-1);\t\t\n\t}", "public void checkClosePara(){\n try{\n if(numbers.length() > 2){\n String charactercheck = Character.toString(numbers.charAt(numbers.length()-2));\n if(charactercheck.equals(\")\")){\n numbers.append(multiplySTR);\n }else{\n return;\n }\n }else{\n return;\n }\n }catch (Exception e){\n\n }\n\n }", "int endStatement(String theStr) {\r\n\t\tif (theStr.equals(\"\") || theStr.equals(\" \")) {\r\n\t\t\treturn 1;\r\n\t\t} else {\r\n\t\t\tchar last = theStr.charAt(theStr.length() - 1);\r\n\r\n\t\t\t// if statement that determines if statement has ended properly\r\n\t\t\tif (last == ';' || last == '{' || last == '}') {\r\n\t\t\t\tString d = Character.toString(last);\r\n\t\t\t\tisToken(d);\r\n\t\t\t\treturn 1;\r\n\t\t\t} else {\r\n\t\t\t\treturn 0;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "@Override\n\tprotected void handleCloseParenthesis() {\n\t\tif (isInClearText()) {\n\t\t\tsaveToken();\n\t\t}\n\t}", "public void closeElement() throws IOException {\r\n if (this.elements.size() <= 1) return;\r\n Element elt = popElement();\r\n this.depth--;\r\n // this is an empty element\r\n if (this.isNude) {\r\n writer.write('/');\r\n this.isNude = false;\r\n // the element contains text\r\n } else {\r\n if (elt.hasChildren) this.indent();\r\n this.writer.write('<');\r\n this.writer.write('/');\r\n int x = elt.qName.indexOf(' ');\r\n if (x < 0)\r\n this.writer.write(elt.qName);\r\n else\r\n this.writer.write(elt.qName.substring(0, x));\r\n }\r\n // restore previous mapping if necessary\r\n restorePrefixMapping(elt);\r\n this.writer.write('>');\r\n if (super.indent) this.writer.write('\\n');\r\n }", "void moveBack()\n\t{\n\t\tif (length != 0) \n\t\t{\n\t\t\tcursor = back; \n\t\t\tindex = length - 1; //cursor will be at the back\n\t\t\t\n\t\t}\n\t}", "public void moveToEnd() {\r\n\t\tcurr = tail;\r\n\t}", "private void tagClose() {\n if( tagOpen ) {\n out.println( \">\" ); \n tagOpen = false;\n }\n }", "private void skipBrackets(char openingChar, char closingChar) {\r\n int nestedLevel = 0;\r\n int length = sourceCode.length();\r\n char stringType = 0;\r\n do {\r\n char character = sourceCode.charAt(index);\r\n if (stringType != 0) {\r\n // Currently in string skipping mode.\r\n if (character == stringType) {\r\n // Exit string skipping mode.\r\n stringType = 0;\r\n } else if (character == '\\\\') {\r\n // Skip escaped character.\r\n ++index;\r\n }\r\n } else if (character == '/') {\r\n // Skip the comment if there is any.\r\n skipComment();\r\n // skipComment skips to the first character after the comment but\r\n // the index is already incremented by this loop, so decrement it\r\n // to compensate.\r\n --index;\r\n } else if (character == openingChar) {\r\n // Entering brackets.\r\n ++nestedLevel;\r\n } else if (character == closingChar) {\r\n // Exiting brackets.\r\n --nestedLevel;\r\n } else if (character == '\\'' || character == '\"') {\r\n // Enter string skipping mode.\r\n stringType = character;\r\n }\r\n // Keep going until the end of the string or if all brackets are matched.\r\n } while (++index < length && nestedLevel > 0);\r\n }", "@Override\r\n\tpublic void visit(RoundBracketExpression roundBracketExpression) {\n\r\n\t}", "private void tokenEnd() {\n zzStartRead = tokenStartIndex;\n }", "@Override\n\tpublic void backspace()\n\t{\n\t\tif (!isAtStart()) left.pop();\n\t}", "public int goPastParen(StringBuilder sb, int c)\n\t\t{\n\t\t\tboolean esc = false;\n\t\t\tint depth = 1;\n\t\t\tfor(c++; c < sb.length(); c++)\n\t\t\t{\n\t\t\t\tif(!esc)\n\t\t\t\t{\n\t\t\t\t\tif(sb.charAt(c) == '(')\n\t\t\t\t\t\tdepth++;\n\t\t\t\t\telse if(sb.charAt(c) == ')')\n\t\t\t\t\t{\n\t\t\t\t\t\tdepth--;\n\t\t\t\t\t\tif(depth == 0)\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telse if(sb.charAt(c) == '\\\\')\n\t\t\t\t\t\tesc = true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tesc = false;\n\t\t\t}\n\t\t\tif(depth == 0)\n\t\t\t\treturn c;\n\t\t\telse\n\t\t\t\tthrow new IllegalArgumentException(\"Unclosed parenthesis!\");\n\t\t}", "private void closeNodes(ArrayList<String> out, int last, int firstDiff)\n throws IOException {\n for (int i = last; i >= firstDiff; --i) {\n if (i == 0) {\n out.add(\"}\");\n break;\n }\n out.add(indent(i) + \"}\");\n }\n }", "private boolean isEndOfCode() {\n return currentIndex >= codeLength;\n }", "private void moveNextInternal() {\n int prev = skipWhitespace();\n\n // end of file reached\n if (position >= length) {\n tokenType = CifTokenType.END;\n return;\n }\n\n tokenStart = position;\n tokenEnd = position;\n isEscaped = false;\n char c = data.charAt(position);\n switch (c) {\n case '#':\n skipCommentLine();\n tokenType = CifTokenType.COMMENT;\n break;\n case '\"': case '\\'':\n if (c == '\\'' && isTripleQuoteAtPosition()) {\n eatTripleQuote();\n tokenType = CifTokenType.VALUE;\n break;\n }\n eatEscaped(c);\n tokenType = CifTokenType.VALUE;\n break;\n case ';': // possible multiline value\n // multiline value must start at the beginning of the line\n if (prev == '\\n' || prev == '\\r') {\n eatMultiline();\n } else {\n eatValue();\n }\n tokenType = CifTokenType.VALUE;\n break;\n default:\n if (isImportGet) {\n eatImportGet();\n } else {\n eatValue();\n }\n\n // escaped is always Value\n if (isEscaped) {\n tokenType = CifTokenType.VALUE;\n // _ always means column name, including _import.get\n } else if (data.charAt(tokenStart) == '_') {\n if (inSaveFrame && isImportGet()) {\n isImportGet = true;\n }\n tokenType = CifTokenType.COLUMN_NAME;\n // 5th char needs to be _ for data_ or loop_\n } else if (tokenEnd - tokenStart >= 5 && data.charAt(tokenStart + 4) == '_') {\n if (isData()) {\n tokenType = CifTokenType.DATA;\n } else if (isSave()) {\n tokenType = CifTokenType.SAVE;\n } else if (isLoop()) {\n tokenType = CifTokenType.LOOP;\n } else {\n tokenType = CifTokenType.VALUE;\n }\n // all other tests failed, we are at Value token.\n } else {\n tokenType = CifTokenType.VALUE;\n }\n }\n }", "private static final int skipBrackets(StringBuffer b) {\n\t\tint len1 = b.length()-1;\n\t\tint ini1 = 0;\n\t\tif (len1 <= 0) return(0);\n\t\twhile ((b.charAt(ini1) == '(') && (b.charAt(len1) == ')')) {\n\t\t\twhile (b.charAt(--len1) == ' ');\n\t\t\twhile (b.charAt(++ini1) == ' ');\n\t\t\tb.setLength(++len1);\n\t\t}\n\t\treturn(ini1);\n\t}", "public String getBracket()\r\n\t{\r\n\t\treturn _bracket;\r\n\t}", "private void compileReturnHelper() throws IOException {\n printToken(); // prints 'return'\n getNextToken();\n if (!Objects.equals(currentToken, SEMICOLON)) compileExpression();\n printToken();\n }", "public void moveFirst() {\n\t\tcurrentElement = 0;\n\t}", "private void newLinesAfter(Token<CppTokenId> previous, Token<CppTokenId> current){\n int start = ts.index();\n int lastNL = -1;\n int count = 0;\n whileLabel:\n while (ts.moveNext()) {\n switch (ts.token().id()) {\n case WHITESPACE:\n break;\n case NEW_LINE:\n lastNL = ts.index();\n count++;\n break;\n default:\n break whileLabel;\n }\n }\n ts.moveIndex(start);\n ts.moveNext();\n newLine(previous, current, codeStyle.getFormatNewlineBeforeBraceClass(),\n codeStyle.spaceBeforeClassDeclLeftBrace(), codeStyle.blankLinesAfterClassHeader()+1);\n if (count > 1) {\n ts.moveNext();\n while (ts.moveNext() && ts.index() <= lastNL) {\n ts.replaceCurrent(ts.token(), 0, 0, false);\n }\n ts.movePrevious();\n ts.movePrevious();\n }\n }", "private void parseElse(@NotNull ParserState state) {\n state.popEndUntil(m_types.C_IF).advance().mark(m_types.C_IF_THEN_SCOPE);\n }", "protected void indentMore() \r\n\t{\r\n\tindent += 3;\r\n\t}", "public void visitEnd()\n\t{\n\t}", "public void end(){\r\n\t\tmethodStack.pop();\r\n\t}", "public static void parse()\r\n {\r\n int initial;\r\n initial=expression();\r\n stateList.get(0).setNext1(initial);\r\n stateList.get(0).setNext2(initial);\r\n if(index<=expression.length()-1)\r\n {\r\n error();\r\n }\r\n else\r\n {\r\n state st=new state(state,\"END\",-1,-1);\r\n stateList.add(st);\r\n }\r\n }", "void moveNext() {\n moveNextInternal();\n while (tokenType == CifTokenType.COMMENT) {\n moveNextInternal();\n }\n }", "private void eatRangeEnd() {\n\n Token token = tokens.get(currentTokenPointer++);\n\n if (token.kind == TokenKind.ENDINCLUSIVE) {\n\n endInclusive = true;\n\n } else if (token.kind == TokenKind.ENDEXCLUSIVE) {\n\n endInclusive = false;\n\n } else {\n\n raiseParseProblem(\"expected a version end character ']' or ')' but found '\" + string(token) + \"' at position \" + token.start, token.start);\n\n }\n\n }", "void pop()\n\t\t{\n\t\t\tsp--;\n\t\t\tfor(int i = 0; i < sp; i++)\n\t\t\t\tXMLStream.print(\" \");\n\t\t\tif(sp < 0)\n\t\t\t\tDebug.e(\"RFO: XMLOut stack underflow.\");\n\t\t\tXMLStream.println(\"</\" + stack[sp] + \">\");\n\t\t}", "private void rightParen() {\n reduce();\n getDispenser().advance();\n if (getDispenser().tokenIsEOF()) setState(State.END);\n else if (getDispenser().tokenIsOperator()) setState(State.OPERATOR);\n else if (getDispenser().tokenIsRightParen()) setState(State.RIGHT_PAREN);\n else if (getDispenser().tokenIsLeftParen()) syntaxError(OP);\n else syntaxError(OP_OR_END);\n \n }", "private static int getClosingParenPosition(MethodInvocationTree tree, VisitorState state) {\n int startPosition = ASTHelpers.getStartPosition(tree);\n if (startPosition == Position.NOPOS) {\n return Position.NOPOS;\n }\n\n return Streams.findLast(\n ErrorProneTokens.getTokens(state.getSourceForNode(tree), state.context).stream()\n .filter(t -> t.kind() == RPAREN))\n .map(token -> startPosition + token.pos())\n .orElse(Position.NOPOS);\n }", "private void yypushback(int number) {\n if ( number > yylength() )\n yy_ScanError(YY_PUSHBACK_2BIG);\n\n yy_markedPos -= number;\n }", "private void yypushback(int number) {\n if ( number > yylength() )\n yy_ScanError(YY_PUSHBACK_2BIG);\n\n yy_markedPos -= number;\n }", "static void skipStatement() {\r\n // Add first identifier to the intermediate stack\r\n if(!token.equals(\"IF\")) {\r\n //stack.add(lexeme);\r\n //index++;\r\n\r\n // Add assignment operator to the intermediate stack\r\n lex();\r\n //stack.add(lexeme);\r\n //index++;\r\n\r\n lex();\r\n while (!token.equals(\"END\")) {\r\n\r\n if (lexeme.equals(\"(\")) {\r\n skipParen();\r\n } else if (token.equals(\"PLUS\") || token.equals(\"MINUS\") || token.equals(\"STAR\") || token.equals(\"DIVOP\") || token.equals(\"MOD\")) {\r\n //stack.add(index, lexeme);\r\n //index++;\r\n\r\n lex();\r\n if (lexeme.equals(\"(\")) {\r\n skipParen();\r\n } else {\r\n //index--;\r\n //stack.add(index, lexeme);\r\n //index++;\r\n //index++;\r\n }\r\n } else {\r\n //index--;\r\n //stack.add(index, lexeme);\r\n //index++;\r\n }\r\n\r\n lex();\r\n\r\n if (token.equals(\"END\"))\r\n break;\r\n\r\n if (token.equals(\"IDENTIFIER\")) {\r\n //index++;\r\n break;\r\n }\r\n\r\n if (token.equals(\"IF\")) {\r\n //index++;\r\n break;\r\n }\r\n }\r\n\r\n if (!token.equals(\"END\")) {\r\n translate();\r\n }\r\n }\r\n\r\n // IF STATEMENTS\r\n else {\r\n if(skipIF())\r\n translate();\r\n else\r\n skipStatement();\r\n }\r\n }", "private Token getTagElement() {\n skipBlankSpaces();\n char currChar = this.data[currentIndex];\n\n if (Character.isDigit(currChar) || (currChar == '-' && Character.isDigit(this.data[currentIndex + 1]))) {\n return getNextNumber();\n } else if (Character.isLetter(currChar)) {\n return getNextVariableName();\n } else if (currChar == '\\\"') {\n return getNextString();\n } else if (currChar == '@') {\n return getNextFunctionName();\n } else if (currChar == '$') {\n if (this.data[currentIndex + 1] == '}') {\n currentIndex += 2;\n this.state = LexerState.TEXT;\n return new Token(TokenType.CLOSE_TAG, \"$}\");\n } else {\n throw new LexerException(\"Expected }, but didn't find it.\");\n }\n } else {\n return getNextOperator();\n }\n }", "public static String endMethod() {\n\t\treturn \"\\t\\t\\t</mth>\" + \"\\n\";\n\t}", "public void goToNextTag(String tag) throws ParseException {\n // Get the text inside the column\n String open = \"<\" + tag;\n int pos = html.indexOf(open, position + 1);\n if (pos == -1) {\n throw new ParseException(\"Cannot skip tag because open \" + tag + \" doesnt exist.\", position);\n }\n position = pos;\n }", "@Override\n\tpublic void finishWithRight() {\n\t\tfinish();\n\t}", "private boolean isOutsideOfBracket(String expr, int pos) {\r\n int level = 0;\r\n \r\n for (int i = 0; i < expr.length(); i++) {\r\n char c = expr.charAt(i);\r\n \r\n if (c == BRACKET_OPEN) {\r\n level++;\r\n } else if (c == BRACKET_CLOSE) {\r\n level--;\r\n }\r\n \r\n if (i == pos) {\r\n return level == 0;\r\n }\r\n }\r\n \r\n return true;\r\n }", "@Override\n\tpublic void closeReader() throws IOException, BracketsParseException {\n\t\ttry {\n\t\t\treader.close();\n\t\t\tif (!marks.isEmpty())\n\t\t\t\tthrow new BracketsParseException(\"]\");\n\t\t} catch (java.io.IOException e) {\n\t\t\tthrow new IOException();\n\t\t}\n\t}", "@Override\r\n public void gotoMatchingBracket() {\r\n ISourceViewer sourceViewer = getSourceViewer();\r\n IDocument document = sourceViewer.getDocument();\r\n if (document == null)\r\n return;\r\n\r\n IRegion selection = getSignedSelection(sourceViewer);\r\n\r\n int selectionLength = Math.abs(selection.getLength());\r\n if (selectionLength > 1) {\r\n setStatusLineErrorMessage(\"No bracket selected\");\r\n sourceViewer.getTextWidget().getDisplay().beep();\r\n return;\r\n }\r\n\r\n // #26314\r\n int sourceCaretOffset = selection.getOffset() + selection.getLength();\r\n if (isSurroundedByBrackets(document, sourceCaretOffset))\r\n sourceCaretOffset -= selection.getLength();\r\n\r\n IRegion region = bracketMatcher.match(document, sourceCaretOffset);\r\n if (region == null) {\r\n setStatusLineErrorMessage(\"No matching bracket found\");\r\n sourceViewer.getTextWidget().getDisplay().beep();\r\n return;\r\n }\r\n\r\n int offset = region.getOffset();\r\n int length = region.getLength();\r\n\r\n if (length < 1)\r\n return;\r\n\r\n int anchor = bracketMatcher.getAnchor();\r\n // http://dev.eclipse.org/bugs/show_bug.cgi?id=34195\r\n int targetOffset = (ICharacterPairMatcher.RIGHT == anchor) ? offset + 1 : offset + length;\r\n\r\n boolean visible = false;\r\n if (sourceViewer instanceof ITextViewerExtension5) {\r\n ITextViewerExtension5 extension = (ITextViewerExtension5) sourceViewer;\r\n visible = (extension.modelOffset2WidgetOffset(targetOffset) > -1);\r\n } else {\r\n IRegion visibleRegion = sourceViewer.getVisibleRegion();\r\n // http://dev.eclipse.org/bugs/show_bug.cgi?id=34195\r\n visible = (targetOffset >= visibleRegion.getOffset()\r\n && targetOffset <= visibleRegion.getOffset() + visibleRegion.getLength());\r\n }\r\n\r\n if (!visible) {\r\n setStatusLineErrorMessage(\"Matching bracket is outside selected element\");\r\n sourceViewer.getTextWidget().getDisplay().beep();\r\n return;\r\n }\r\n\r\n if (selection.getLength() < 0)\r\n targetOffset -= selection.getLength();\r\n\r\n sourceViewer.setSelectedRange(targetOffset, selection.getLength());\r\n sourceViewer.revealRange(targetOffset, selection.getLength());\r\n }", "@Override\n\t\t\t\t\t\t\t\tpublic void onNext(final String s) {\n\t\t\t\t\t\t\t\t\tif (s.contains(\"}\") && outJSVar.charAt(outJSVar.length()-2) == ',') {\n\t\t\t\t\t\t\t\t\t\toutJSVar.deleteCharAt(outJSVar.length()-2);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\toutJSVar.append(s);\n\t\t\t\t\t\t\t\t\toutJSVar.append(\"\\n\");\n\t\t\t\t\t\t\t\t}", "public void closeEndTag() throws XMLStreamException {\n write(HtmlObject.HtmlMarkUp.CLOSE_BRACKER);\n }", "private String removeOuterBrackets(String expr) {\r\n int openPos = expr.indexOf(BRACKET_OPEN);\r\n if (openPos == -1) {\r\n throw new IllegalArgumentException(\"No opening bracket\");\r\n }\r\n \r\n int closePos = expr.lastIndexOf(BRACKET_CLOSE);\r\n if (closePos == -1) {\r\n throw new IllegalArgumentException(\"No closing bracket\");\r\n }\r\n \r\n String before = expr.substring(0, openPos);\r\n String middle = expr.substring(openPos + 1, closePos);\r\n String after = expr.substring(closePos + 1, expr.length());\r\n \r\n return before + middle + after;\r\n }", "public void nextLevelTogo() {\n if (this.myClearedLines % 2 == 0) {\n myLinesToGo = 2;\n } else {\n myLinesToGo = 1;\n }\n }", "int endStatement(String theStr){\n char last = theStr.charAt(theStr.length() - 1);\n // if statement that determines if statement has ended properly\n if(last == ';' || last == '{' || last == '(' || last == ')' || last =='}' ){\n return 1;\n }else {\n JOptionPane optionPane = new JOptionPane(\"The test program cannot be generated by the Demo function.\" +\n \" User is missing an end statement.\",\n JOptionPane.ERROR_MESSAGE);\n JDialog dialog = optionPane.createDialog(\"Failure\");\n dialog.setAlwaysOnTop(true);\n dialog.setVisible(true);\n return 0;\n }\n }", "private final String RemoveExtraBrackets(String expression) {\r\n String newExpression = expression;\r\n int openParanthesis = 0;\r\n int closeParanthesis = 0;\r\n if ((expression.startsWith(\"(\") && expression.endsWith(\")\"))) {\r\n for (int i = 0; (i \r\n < (expression.length() - 1)); i++) {\r\n String charExpression = expression.substring(i, 1);\r\n if (charExpression.equals(\"(\")) {\r\n openParanthesis++;\r\n }\r\n else if (charExpression.equals(\")\")) {\r\n closeParanthesis++;\r\n }\r\n \r\n }\r\n \r\n if (((openParanthesis - 1) \r\n == closeParanthesis)) {\r\n newExpression = expression.substring(1, (expression.length() - 2));\r\n }\r\n \r\n }\r\n \r\n return newExpression;\r\n }", "private void tagBracketPrinter(String tag, int printType, String... token) {\n String temp = Arrays.toString(token).substring(1, Arrays.toString(token).length() - 1);\n tabPrinter();\n if (printType == 0) {\n writer.println(\"<\" + tag + \">\");\n tabs++;\n } else if (printType == 1) {\n tabs--;\n writer.println(\"</\" + tag + \">\");\n } else if (printType == 2)\n\n writer.println(\"<\" + tag + \"> \" + temp + \" </\" + tag + \">\");\n\n }", "public JsonWriter endObject() {\n if (!context.map()) {\n throw new IllegalStateException(\"Unexpected end, not in object.\");\n }\n if (context.value()) {\n throw new IllegalStateException(\"Expected map value but got end.\");\n }\n writer.write('}');\n context = stack.pop();\n return this;\n }", "public void closeStartTag() throws XMLStreamException {\n flushNamespace();\n clearNeedsWritingNs();\n if (this.isEmpty) {\n write(\"/>\");\n this.isEmpty = false;\n return;\n }\n write(HtmlObject.HtmlMarkUp.CLOSE_BRACKER);\n }", "private Token matchEOF() throws SyntaxException {\n\t\tif (t.kind == EOF) {\n\t\t\treturn t;\n\t\t}\n\t\tString message = \"Expected EOL at \" + t.line + \":\" + t.pos_in_line;\n\t\tthrow new SyntaxException(t, message);\n\t}", "public void endElement() throws Exception;", "public Rule itBlock()\n \t{\n \t\treturn sequence(BRACKET_L, zeroOrMore(stmt()), BRACKET_R);\n \t}", "private String addEnd() {\n\t\t// NO PARAMETERS\n\t\tStringBuilder tag = new StringBuilder();\n\t\ttag.append(\"|End\");\n\t\treturn tag.toString();\n\t}", "@Override\n\tpublic void visitXindent(Xindent p) {\n\n\t}", "public void moveNext() {\n\t\tcurrentElement++;\n\t}", "private static boolean isSelfClosingTag(String line) {\n return brackets(line) && line.charAt(1) != '/' && line.charAt(line.length() - 2) == '/';\n }", "@Override\n\tprotected void endOfLine() {\n\t}", "public final void rule__Block__Group__2__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \t\r\n try {\r\n // InternalGo.g:7279:1: ( ( '}' ) )\r\n // InternalGo.g:7280:1: ( '}' )\r\n {\r\n // InternalGo.g:7280:1: ( '}' )\r\n // InternalGo.g:7281:2: '}'\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getBlockAccess().getRightCurlyBracketKeyword_2()); \r\n }\r\n match(input,58,FOLLOW_2); if (state.failed) return ;\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getBlockAccess().getRightCurlyBracketKeyword_2()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "protected Bracket() {\n _obj = null;\n _index = null;\n }", "public void Goto() {\n\t\t\n\t}", "private void endWord() {\n\t\tinWord = false;\n\t\tcontentsField.addEndChar(getContentPosition());\n\t\tcontentsField.addValue(currentElementText);\n\n\t\t// Reset element text for the next word.\n\t\tcurrentElementText = null;\n\t}", "private void TokenEndTag(Token token, TreeConstructor treeConstructor) {\n\t\tswitch (token.getValue()) {\r\n\t\tcase \"head\":\r\n\t\tcase \"body\":\r\n\t\tcase \"html\":\r\n\t\tcase \"br\":\r\n\t\t\tTokenAnythingElse(token, treeConstructor, true);\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tParserStacks.parseErrors\r\n\t\t\t\t\t.push(\"Unexpected end tag in BeforeHTML insertion mode\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "private void parseFunctionEnd() throws RetException {\n retVal=FS_TRUE;\n throw new RetException();\n }", "@Override\n\tpublic void visit(Parenthesis arg0) {\n\t\t\n\t}", "static boolean skipIF() {\n index++;\r\n lex();\r\n\r\n //Skip adding \"(\" to stack\r\n lex();\r\n\r\n while (!lexeme.equals(\")\")) {\r\n\r\n if (lexeme.equals(\"(\")) {\r\n skipParen();\r\n } else if (token.equals(\"PLUS\") || token.equals(\"MINUS\") || token.equals(\"STAR\") || token.equals(\"DIVOP\") || token.equals(\"MOD\") ||\r\n token.equals(\"GREATER_THAN\") || token.equals(\"LESS_THAN\") || token.equals(\"EQUALS\") || token.equals(\"LESS_OR_EQUAL\") ||\r\n token.equals(\"GRETER_OR_EQUAL\") || token.equals(\"NOT_EQUAL\")) {\r\n //stack.add(index, lexeme);\r\n //index++;\r\n\r\n lex();\r\n if (lexeme.equals(\"(\")) {\r\n skipParen();\r\n } else {\r\n //index--;\r\n //stack.add(index, lexeme);\r\n //index++;\r\n //index++;\r\n }\r\n } else {\r\n //index--;\r\n //stack.add(index, lexeme);\r\n //index++;\r\n }\r\n\r\n lex();\r\n\r\n if (token.equals(\"END\"))\r\n break;\r\n\r\n if (token.equals(\"IDENTIFIER\")) {\r\n //index++;\r\n break;\r\n }\r\n }\r\n\r\n //Skip the \")\"\r\n lex();\r\n\r\n return false;\r\n }", "private static void endDiagram(PrintWriter printFile) {\n\t\tprintFile.print(\"}\\n\");\n\t}", "void toEnd();", "@Override\n\tpublic void moveToEnd()\n\t{\n\t\twhile (!right.isEmpty())\n\t\t{\n\t\t\tleft.push(right.pop());\n\t\t}\n\n\t}", "public TokenStatement pop() {\r\n\t\tif (this.size == 0) {\r\n\t\t\tthrow new EmptyStackException();\r\n\t\t}\r\n\t\tfinal TokenStatement obj = this.elementData[this.size - 1];\r\n\t\tthis.elementData[--this.size] = null;\r\n\t\treturn obj;\r\n\t}", "private void back(){\r\n \r\n assert iMessage!=null;\r\n assert iIndex>=0;\r\n assert iIndex<=iMessage.length();\r\n\r\n if (iIndex==0) return;//if at start of message\r\n --iIndex;//move back one character\r\n \r\n }", "public void endParsing();", "private void insertJumpAtEndOfCondition(){\n\t\tCode.loadConst(0);\n\t\tCode.put(Code.jcc + Code.eq);\n\t\t\n\t\t// save current pc and store it as jmp address\n\t\tjmpNotThen.push(Code.pc);\n\t\tCode.put2(0);\n\t\t\n\t}", "@InnerAccess void visitEnd ()\n\t{\n\t\tclassWriter.visitEnd();\n\t}", "public void gotoEndOfLine()\r\n\t{\r\n\t\twhile (thisc != '\\n') {\r\n\t\t\tif (thisc == EOF) return;\r\n\t\t\tnextC();\r\n\t\t}\r\n\t}", "public void insertAtEnd(Employee e) {\n\t}", "public void moveTo(Token token){\n int index = currentToken;\n Token current;\n while((current = nextToken()) != null){\n if(current.identifier.equals(token.identifier)){\n currentToken = index+1;\n return;\n }\n ++index;\n }\n }" ]
[ "0.6570012", "0.63505715", "0.6304025", "0.6270288", "0.613854", "0.61185557", "0.60528815", "0.59150475", "0.58634114", "0.5768577", "0.5745754", "0.5715565", "0.57120353", "0.567354", "0.566562", "0.5647465", "0.5644028", "0.56014454", "0.55311066", "0.5518889", "0.5516531", "0.55118036", "0.5494545", "0.5479142", "0.54640627", "0.5459705", "0.54594254", "0.5452832", "0.544419", "0.54408824", "0.5438951", "0.54354554", "0.54107016", "0.54039186", "0.5401738", "0.53868455", "0.5346995", "0.533089", "0.5321415", "0.5318752", "0.5270763", "0.5267432", "0.52658", "0.52649915", "0.5258569", "0.52437115", "0.521627", "0.5205291", "0.51962674", "0.51750535", "0.51648057", "0.51549095", "0.51440173", "0.51266813", "0.51244354", "0.51181513", "0.51181513", "0.51175696", "0.5115826", "0.51125604", "0.51027334", "0.50724167", "0.50683844", "0.5064653", "0.50634724", "0.5057406", "0.5054544", "0.504819", "0.5043527", "0.50411147", "0.5024199", "0.50220007", "0.5020552", "0.5013633", "0.501221", "0.50100845", "0.5000291", "0.49996024", "0.49985152", "0.49900413", "0.49832729", "0.4982644", "0.4981672", "0.49767786", "0.49750763", "0.49704233", "0.4968659", "0.49672827", "0.49672392", "0.4965618", "0.49623275", "0.49614525", "0.49579808", "0.49579003", "0.4954155", "0.49476978", "0.49469343", "0.4946146", "0.49446416", "0.49331638", "0.49262682" ]
0.0
-1
Indicates the significance of a term in a sample by determining what percentage of all occurrences of a term are found in the sample.
@Override public double getScore(long subsetFreq, long subsetSize, long supersetFreq, long supersetSize) { checkFrequencyValidity(subsetFreq, subsetSize, supersetFreq, supersetSize, "PercentageScore"); if (supersetFreq == 0) { // avoid a divide by zero issue return 0; } return (double) subsetFreq / (double) supersetFreq; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected float score(BasicStats stats, float termFreq, float docLength) {\n double s = 0.75;\n\n long N = stats.getNumberOfDocuments();\n long df = stats.getDocFreq();\n float cwd = termFreq;\n float cwq = 1; //assume that the query term frequency is always one\n float n = docLength;\n float navg = stats.getAvgFieldLength();\n\n double p1 = (1+Math.log(1+Math.log(cwd)))/(1-s+s*n/navg);\n float ans = (float) (p1 * cwq * Math.log((N+1)/df));\n\n return ans;\n }", "@Override\n protected float score(BasicStats stats, float termFreq, float docLength) {\n float k1 = (float)1.2;\n float k2 = 750;\n float b = (float)0.75;\n float N = stats.getNumberOfDocuments();\n float df = stats.getDocFreq();\n float qtermFreq = 1;\n float score = (float)Math.log((N - df + 0.5)/df+0.5);\n score*=((k1+1)*termFreq)/(k1*(1-b+b*(docLength/stats.getAvgFieldLength()))+termFreq);\n score*=((k2+1)*qtermFreq)/(k2+qtermFreq);\n return score; }", "public float computeTermScore(int term, int dl, int tf, GlobalStats stats);", "private Float weightTermUniqeness(String term) throws IOException{\n\t\tFloat result = null;\n\t\t\n\t\tLong docCnt\t\t= this.elasticClient.getDocCount();\n\t\tLong termDocCnt = this.elasticClient.getDocCount(term);\n\t\t\n\t\tresult = ((Long)(docCnt / termDocCnt)).floatValue();\n\t\t\n\t\treturn result;\n\t}", "@Test\n public void testSignificance() {\n assertMetrics(\"significance:1\", \"a\",\"a\");\n assertMetrics(\"significance:0\", \"a\",\"x\");\n assertMetrics(\"significance:0.3333\",\"a a a\",\"a\");\n assertMetrics(\"significance:1\", \"a\",\"a a a\");\n assertMetrics(\"significance:1\", \"a b c\",\"a b c\");\n assertMetrics(\"significance:1\", \"a b c\",\"x x a b x a x c x x a b x c c x\");\n\n assertMetrics(\"significance:0.3333\",\"a b c\",\"a\");\n assertMetrics(\"significance:0.6667\",\"a b c\",\"a b\");\n\n assertMetrics(\"significance:1\", \"a b c%0.2\",\"a b c\"); // Best\n assertMetrics(\"significance:0.75\",\"a b c%0.2\",\"b c\"); // Middle\n assertMetrics(\"significance:0.5\", \"a b c%0.2\",\"a b\"); // Worst\n\n assertMetrics(\"significance:1\",\"a%0.3 b c%0.2\",\"a b c\"); // Best too\n\n assertMetrics(\"significance:1\", \"a b c%0.05\",\"a b c\"); // Best\n assertMetrics(\"significance:0.6\",\"a b c%0.05\",\"b c\"); // Worse\n assertMetrics(\"significance:0.4\",\"a b c%0.05\",\"b\"); // Worse\n assertMetrics(\"significance:0.2\",\"a b c%0.05\",\"c\"); // Worst\n assertMetrics(\"significance:0.8\",\"a b c%0.05\",\"a b\"); // Middle\n\n assertMetrics(\"significance:1\", \"a b c%0\",\"a b c\"); // Best\n assertMetrics(\"significance:0.5\",\"a b c%0\",\"b c\"); // Worst\n assertMetrics(\"significance:1\", \"a b c%0\",\"a b\"); // As good as best\n assertMetrics(\"significance:0\", \"a b c%0\",\"c\"); // No contribution\n\n assertMetrics(\"significance:0\",\"a%0 b%0\",\"a b\");\n assertMetrics(\"significance:0\",\"a%0 b%0\",\"\");\n\n // The query also has other terms having a total significance of 0.3\n // so we add a significance parameter which is the sum of the significances of this query terms + 0.3\n assertMetrics(\"significance:0.25\", \"a\",\"a\",0.4f);\n assertMetrics(\"significance:0\", \"y\",\"a\",0.4f);\n assertMetrics(\"significance:0.1667\",\"a a a\",\"a\",0.6f);\n assertMetrics(\"significance:0.25\", \"a\",\"a a a\",0.4f);\n assertMetrics(\"significance:0.5\", \"a b c\",\"a b c\",0.6f);\n assertMetrics(\"significance:0.5\", \"a b c\",\"x x a b x a x c x x a b x c c x\",0.6f);\n\n assertMetrics(\"significance:0.1667\",\"a b c\",\"a\",0.6f);\n assertMetrics(\"significance:0.3333\",\"a b c\",\"a b\",0.6f);\n\n assertMetrics(\"significance:0.5714\",\"a b c%0.2\",\"a b c\",0.7f); // Best\n assertMetrics(\"significance:0.4286\",\"a b c%0.2\",\"b c\",0.7f); // Middle\n assertMetrics(\"significance:0.2857\",\"a b c%0.2\",\"a b\",0.7f); // Worst\n\n assertMetrics(\"significance:0.6667\",\"a%0.3 b c%0.2\",\"a b c\",0.9f); // Better than best\n\n assertMetrics(\"significance:0.4545\",\"a b c%0.05\",\"a b c\",0.55f); // Best\n assertMetrics(\"significance:0.2727\",\"a b c%0.05\",\"b c\",0.55f); // Worse\n assertMetrics(\"significance:0.1818\",\"a b c%0.05\",\"b\",0.55f); // Worse\n assertMetrics(\"significance:0.0909\",\"a b c%0.05\",\"c\",0.55f); // Worst\n assertMetrics(\"significance:0.3636\",\"a b c%0.05\",\"a b\",0.55f); // Middle\n\n assertMetrics(\"significance:0.4\",\"a b c%0\",\"a b c\",0.5f); // Best\n assertMetrics(\"significance:0.2\",\"a b c%0\",\"b c\",0.5f); // Worst\n assertMetrics(\"significance:0.4\",\"a b c%0\",\"a b\",0.5f); // As good as best\n assertMetrics(\"significance:0\", \"a b c%0\",\"c\",0.5f); // No contribution\n\n assertMetrics(\"significance:0\",\"a%0 b%0\",\"a b\",0.3f);\n assertMetrics(\"significance:0\",\"a%0 b%0\",\"\",0.3f);\n }", "@Override\n public int getTermFrequency(String term) {\n return 0;\n }", "abstract public int docFreq(Term t) throws IOException;", "float getConfidence();", "@Override\n public double score(Document document) {\n Set<String> allDocTerms = documentsTerms.termsExtractedFromDocument(document).allTerms();\n\n //keeping only the query terms that are in the document\n Collection<String> relevantTerms = new LinkedHashSet<>(query);\n relevantTerms.retainAll(allDocTerms);\n\n //compute score using a sum formula on each query term\n int docLength = termsOccurences.get(document).totalNumberOfOccurences();\n double score = 0.0;\n for (String term : relevantTerms) {\n double termIDF = idf.weight(term);\n double termTF = tf.weight(term, document);\n\n score += termIDF * (termTF * (k1 + 1)) / (termTF + k1 * (1 - b + b * (docLength / averageDocLength)));\n }\n\n return score;\n }", "private double idf(String term) {\n return 1 + Math.log(this.numberOfDocuments / (double) termToDocumentsContainingTerm.get(term).size());\n }", "String getConfidence();", "public float getConfidence();", "@Override\r\n\t\t\tpublic long getDocumentFrequency(String term) {\n\t\t\t\treturn 0;\r\n\t\t\t}", "float getSpecialProb();", "private double getTermOccurrence(String term, ClassificationClass classificationClass) {\n int termOccurrence = 0;\n\n for (Document document : documents) {\n if (document.getClassificationClasses().contains(classificationClass)) {\n if (document.getFeatures().containsKey(term)) {\n termOccurrence += document.getFeatures().get(term);\n }\n }\n }\n\n return termOccurrence;\n }", "int getLikelihoodValue();", "java.lang.String getFrequency();", "public double findProb(Attribute attr) {\r\n\t\tif(!attrName.equals(attr.getName())){\r\n\t\t\treturn 0.0;\r\n\t\t}\r\n\t\tif(valInstances.size() == 0) {\r\n\t\t\t//debugPrint.print(\"There are no values for this attribute name...this should not happen, just saying\");\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tdouble occurenceCount = 0;\r\n\t\tfor(Attribute curAttr: valInstances) {\r\n\t\t\tif(curAttr.getVal().equals(attr.getVal())) {\r\n\t\t\t\toccurenceCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (double)occurenceCount / (double) valInstances.size();\r\n\t}", "public abstract float getProbability(String singleToken);", "@Override\n public int getDocumentFrequencyByTerm(String term) {\n return 0;\n }", "private double calcProbability(int index) {\n\t\treturn (double) fitnesses[index] / sumOfFitnesses();\n\t}", "public Double getTotalAnomalyPercentage();", "public static float calculatePercentOfWordsFoundInText(String text, List<String> words) {\n int totalWords = words.size();\n List<String> wordsFound = new ArrayList<>();\n for (String w : words) {\n Pattern searchPattern = Pattern.compile(\".*\\\\b\" + w.toLowerCase() + \"\\\\b.*\");\n if (searchPattern.matcher(text).matches()) {\n wordsFound.add(w);\n }\n }\n return (float) (wordsFound.size() * 100 / totalWords);\n }", "public double mean(){\n return StdStats.mean(percentage);\n }", "public double tf(String wordToLookFor, HashMap<String, ArrayList<Integer>> tokensHM, Document doc) {\n if (tokensHM.containsKey(wordToLookFor)) {\n double count = 0;\n String[] words = doc.generateWordList(doc.getDocument());\n if(tokensHM.get(wordToLookFor).contains(doc.getIndex())) {\n for (String word : words) {\n if (word.equals(wordToLookFor)) {\n count++;\n }\n }\n }\n return count/words.length;\n }\n else {\n return 0;\n }\n }", "public abstract float getProbability(String[] tokens);", "java.lang.String getPercentage();", "@Override\n protected double getTFDocument(BasicStats stats, float termFreq, float docLength) {\n return ((k1 + 1) * termFreq / (k1 * (1 - b +\n b * docLength / stats.getAvgFieldLength()) + termFreq));\n }", "public double getSignificance() throws MathException {\n return 2d * (1.0 - distribution.cumulativeProbability(\n Math.abs(getSlope()) / getSlopeStdErr()));\n }", "public float getTFIDF(Index index, String word) {\n long docCount = index.getDocuments().stream().filter(document -> document.hasWord(word)).count();\n return (float) getWordOccurrence(word) * (float) Math.log((float) index.getDocuments().size() / (float) docCount);\n }", "public float evaluate(PhraseInfo p) {\n int numChords = p.gen.prog.get(p.gen.progIndex).size();\n int tn = Math.min(phraseLen, (int)Math.round(targetNotes * ((numChords + 1) / 3.0))); // not directly proportional.\n // scores: 50, 49, 46, 41, 34, 25 etc.\n int score = Math.max(0, 50 - (int)Math.round(Math.pow(Math.abs(p.noteCount - tn), 2)));\n return (float)Math.min(1.0f, score/50.0f);\n }", "public float computePhraseScore(int dl, int tf, GlobalStats stats);", "float getFrequency();", "private double fillPercent() {\n\t\tdouble percent = 0;\n\t\t\n\t\tfor (LinkedList<WordCode<K, V>> ll : myBuckets) {\n\t\t\tif (ll.size() != 0) percent++;\n\t\t}\n\t\treturn (percent / myBuckets.size()) * 100;\n\t}", "public double confidenceHi() \n {\n double mean = mean();\n double stddev = stddev();\n return mean + 1.96 * stddev / Math.sqrt(count);\n }", "public ComputeTermFrequencies() { super(); }", "public double mean() {\n return StdStats.mean(fraction);\n }", "int getPercentageHeated();", "public double getHonesty(){\n\t\treturn (this.pct_honest);\n\t}", "public double[] score(String word, short tag, int loc, boolean noSmoothing,\n\t\t\tboolean isSignature, double priorProb);", "@Override\n\tpublic double weightOf(String term) {\n\t\tif(term != null){\n\t\t\tfor(int i = 0; i < data.getRawList().size(); i++){\n\t\t\t\tif(term.equals(data.getRawList().get(i).getWord())){\n\t\t\t\t\treturn data.getRawList().get(i).getWeight();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn 0.0;\n\t}", "public double getProb(String word) {\n double numWords = wordMap.get(\"TOTAL_WORDS\");\n return wordMap.getOrDefault(word, 0.0)/numWords;\n }", "private static void updateHitrate(String s) {\n long _missCountSum = getCounterResult(\"missCount\");\n long _opCountSum = getCounterResult(\"opCount\");\n if (_opCountSum == 0L) {\n return;\n }\n double _hitRate = 100.0 - _missCountSum * 100.0 / _opCountSum;\n System.err.println(Thread.currentThread() + \" \" + s + \", opSum=\" + _opCountSum + \", missSum=\" + _missCountSum + \", hitRate=\" + _hitRate);\n setResult(\"hitrate\", _hitRate, \"percent\", AggregationPolicy.AVG);\n }", "static void returnTfIdfResults() {\n\t\tSet<String> specificWords = findKeywords();\n\n\t\t// for every phrase\n\t\tfor (String word : specificWords) {\n\t\t\t// get the total number of documents\n\t\t\tdouble totalSize = size;\n\n\t\t\t// get the collection of documents containing that word\n\t\t\tCollection<File> containingWordSet = invertedMap.getValues(word);\n\n\t\t\t// makes a new one if null (for ease of code)\n\t\t\tif (containingWordSet == null) {\n\t\t\t\tcontainingWordSet = new HashSet<File>();\n\t\t\t}\n\n\t\t\t// the number containing the word\n\t\t\tdouble numContainingWord = containingWordSet.size();\n\n\t\t\t// get the idf (log(total/(1 + |# contain word|)\n\t\t\t// it is normalize with 1 to prevent division by 0\n\t\t\tdouble idf = Math.log(totalSize / (1 + numContainingWord));\n\n\t\t\t// System.out.println(\"------------------\");\n\t\t\t// System.out.println(word + \" totalSize \" + totalSize);\n\t\t\t// System.out.println(word + \" numContainingWord \" +\n\t\t\t// numContainingWord);\n\t\t\t// System.out.println(word + \" idf \" + idf);\n\t\t\t// System.out.println(\"------------------\");\n\n\t\t\t// set the wordscore to 0\n\t\t\tdouble wordScore = 0;\n\n\t\t\t// for all of the files with the word\n\t\t\tfor (File file : containingWordSet) {\n\t\t\t\tString fileName = file.getName();\n\n\t\t\t\t// get the phrase count for this document\n\t\t\t\tInteger phraseCount = phraseCountMap.get(fileName);\n\t\t\t\tdouble numPhrases = phraseCount.doubleValue();\n\n\t\t\t\t// get the word frequency map for this page\n\t\t\t\tHashMap<String, Integer> docFreqMap = wordFreqMap.get(fileName);\n\t\t\t\tInteger freq = docFreqMap.get(word);\n\n\t\t\t\t// otherwise, get the tf\n\t\t\t\tdouble tf;\n\t\t\t\tif (freq == null) {\n\t\t\t\t\t// if it's not present, it's 0\n\t\t\t\t\ttf = 0;\n\t\t\t\t} else {\n\t\t\t\t\t// otherwise, it's the value\n\t\t\t\t\ttf = freq / numPhrases;\n\t\t\t\t\t// System.out.println(tf);\n\t\t\t\t}\n\n\t\t\t\t// multiply for this score\n\t\t\t\tdouble score = tf * idf;\n\n\t\t\t\t// add it to the page score\n\t\t\t\twordScore += score;\n\t\t\t}\n\n\t\t\t// make a node with the sum of tf-idf for all relevant phrases and\n\t\t\t// add to pq\n\t\t\tWordNode w = new WordNode(word, wordScore);\n\t\t\tpq.add(w);\n\t\t}\n\t}", "public abstract double samplingFrequency();", "public String getConfidenceString() {\n final DecimalFormat format = new DecimalFormat(\"0.000\");\n return !Double.isNaN(confidence) ? format.format(MathUtil.coerce(0, 1, getConfidence()) * 100.0f) + \"%\" : \"N/A\";\n }", "@FloatRange(from = 0.0, to = 1.0)\n public float getConfidenceScore(@EntityType String entity) {\n return mEntityConfidence.getConfidenceScore(entity);\n }", "private double habitStrength(Double spFrequency, double totalFrequency) {\n\t\treturn totalFrequency ==0 ? 1:spFrequency/totalFrequency;\n\t}", "@Override\n public int getTermFrequencyByDocument(String term, String url) {\n return 0;\n }", "public double confidenceValue(String tweet, String subj, String pred,\n\t\t\tString obj, String prep) {\n\n\t\tdouble confidence = 0;\n\t\t\n\t\t/*Assigning Confidence based on rules*/\n\t\tif (containsCaseInsensitive(subj, SubR1)\n\t\t\t\t&& (pred.equalsIgnoreCase(\"think\") || pred\n\t\t\t\t\t\t.equalsIgnoreCase(\"thinks\"))) {\n\t\t\tconfidence = 100;\n\t\t} else if (containsCaseInsensitive(subj, SubR1)\n\t\t\t\t&& containsCaseInsensitive(pred, PredR1)\n\t\t\t\t&& containsCaseInsensitive(obj, ObjR1) && prep.equals(\" \")) {\n\t\t\tconfidence = 0.9;\n\t\t} else if (containsCaseInsensitive(subj, SubR1)\n\t\t\t\t&& containsCaseInsensitive(pred, PredR1)\n\t\t\t\t&& containsCaseInsensitive(prep, PrepR1)) {\n\t\t\tconfidence = 0.8;\n\t\t} else if (containsCaseInsensitive(subj, SubR1)\n\t\t\t\t&& containsCaseInsensitive(prep, PrepR1)) {\n\t\t\tconfidence = 0.8;\n\t\t} else if (containsCaseInsensitive(subj, SubR1)\n\t\t\t\t&& containsCaseInsensitive(pred, PredR3) && obj.equals(\" \")\n\t\t\t\t&& prep.equals(\" \")) {\n\t\t\tconfidence = 0.8;\n\t\t} else if (containsCaseInsensitive(subj, SubIRR)\n\t\t\t\t&& containsCaseInsensitive(pred, PredR1)\n\t\t\t\t&& containsCaseInsensitive(obj, ObjR1) && prep.equals(\" \")) {\n\t\t\tconfidence = 0.2;\n\t\t} else if (!containsCaseInsensitive(subj, SubIRR)\n\t\t\t\t&& containsCaseInsensitive(pred, PredR1)\n\t\t\t\t&& containsCaseInsensitive(prep, PrepR1)) {\n\t\t\tconfidence = 0.7;\n\t\t} else if (subj.equals(\" \") && containsCaseInsensitive(pred, PredR1)\n\t\t\t\t&& containsCaseInsensitive(obj, ObjR1)) {\n\t\t\tconfidence = 0.6;\n\t\t} else if (containsCaseInsensitive(subj, SubR1)\n\t\t\t\t&& containsCaseInsensitive(pred, PredR1) && obj.equals(\" \")\n\t\t\t\t&& prep.equals(\" \")) {\n\t\t\tconfidence = 0.2;\n\t\t} else if (containsCaseInsensitive(subj, SubR2)\n\t\t\t\t&& containsCaseInsensitive(pred, PredR2)\n\t\t\t\t&& containsCaseInsensitive(obj, ObjR2)) {\n\t\t\tconfidence = 0.9;\n\t\t} else if (containsCaseInsensitive(subj, SubR2)\n\t\t\t\t&& containsCaseInsensitive(pred, PredR2)) {\n\t\t\tconfidence = 0.8;\n\t\t} else if (containsCaseInsensitive(subj, SubR2) && pred.equals(\" \")\n\t\t\t\t&& obj.equals(\" \")) {\n\t\t\tconfidence = 0.6;\n\t\t} else if (subj.equals(\"food\") && containsCaseInsensitive(pred, PredR3)) {\n\t\t\tconfidence = 0.6;\n\t\t} else if (!containsCaseInsensitive(subj, SubIRR)\n\t\t\t\t&& pred.equalsIgnoreCase(\"gave\")\n\t\t\t\t&& containsCaseInsensitive(obj, ObjR1)) {\n\t\t\tconfidence = 0.6;\n\t\t}\n\t\treturn confidence;\n\t}", "public double getSigProp(){\n\t\tdouble s=0, n=0;\n\t\tfor(ControlledExperiment rep : replicates){\n\t\t\ts+=rep.getSigCount();\n\t\t\tn+=rep.getNoiseCount();\n\t\t}return(s/(s+n));\n\t}", "private double evaluateFaultCovFitness(String phenotype) {\n int faults = 38; // Again, should be injected\n boolean[] faultsHit = new boolean[faults];\n for (int i = 0; i < faults; i++)\n faultsHit[i] = false;\n for (int i = 0; i < phenotype.length(); i++) {\n if (phenotype.charAt(i) == '1') {\n// mark the faults found by the test\n for (int j = 0; j < faults; j++) {\n if (faultMatrix[i][j] == 1)\n faultsHit[j] = true;\n }\n }\n }\n// total collection of faults found\n int count = 0;\n for (int i = 0; i < faults; i++) {\n if (faultsHit[i])\n count++;\n }\n return count;\n }", "public double getPercentageSensitivity() {\n return percentageSensitivity;\n }", "static double probabilityValue(String str, String findStr) {\n\t\tdouble val = count(str, findStr) / count(str, str.substring(str.length() - 1));\n\t\treturn val;\n\t}", "public double probability(double x){\n\t\tdouble firstTerm = 1.0 / Math.sqrt(2 * Math.PI * variance);\n\t\tdouble secondTerm = Math.exp( -(Math.pow((x-mean),2.0)) / (2 * variance) );\n\t\treturn firstTerm * secondTerm;\n\t}", "protected abstract double relevantScore(Tweet tweet);", "public void testGetPercentToSample()\n {\n this.testSetPercentToSample();\n }", "public int getDocFreq(Term t){\n\t\tint freq = 0;\r\n\t\tfor (Map.Entry<String, IndexedDoc> set : index.entrySet()){\r\n\t\t\tif (set.getValue().containsTerm(t)){\r\n\t\t\t\tfreq++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn freq;\r\n\t}", "public int getAvgSpec() {\n return totalSpec/totalMatches;\n }", "public double sampleVarianceOfMean() {\n\t\treturn sampleVariance() * getWeight();\n\t}", "public void calculateTermWeights() {\n\t\tfor (String termString : terms.keySet()) {\n\t\t\tTerm t = terms.get(termString);\n\t\t\tMap<Integer, TermDoc> posting = t.getPostings();\n\n\t\t\t// Iterate through the docs in which the selected term is found.\n\t\t\tfor (Integer docId : posting.keySet()) {\n\n\t\t\t\tTermDoc td = posting.get(docId);\n\t\t\t\tDocument doc = this.getDocument(docId);\n\n\t\t\t\tfinal double a = 0.4;\n\t\t\t\tdouble ntf = a + (1 - a) * (double) td.getFreq() / (double) doc.getMaxTermFreq();\n\t\t\t\tdouble idf = Math.log((double) documents.size() / (1 + (double) t.getDocFreq()));\n\t\t\t\tdoc.addWeight(termString, ntf * idf);\n\t\t\t}\n\t\t}\n\n\t\tfor (Document doc : documents.values())\n\t\t\tdoc.setEuclideanDistance();\n\t}", "@Override\r\n\t\tpublic int calculAnomaly(int total, int freq) {\n\t\t\treturn (int) Math.round(Math.log((double)total/(double)freq));\r\n\r\n\r\n\t\t}", "@Test\n public void chiSquaredTest1() {\n long[] occs = new long[26];\n occs[0] = 43;\n occs[1] = 453;\n occs[2] = 42;\n occs[3] = 4;\n occs[4] = 1;\n occs[5] = 0;\n occs[6] = 27;\n occs[7] = 29;\n occs[8] = 301;\n occs[9] = 107;\n occs[10] = 79;\n occs[11] = 201;\n occs[12] = 3;\n occs[13] = 5;\n occs[14] = 82;\n occs[15] = 36;\n occs[16] = 47;\n occs[17] = 90;\n occs[18] = 68;\n occs[19] = 45;\n occs[20] = 9;\n occs[21] = 23;\n occs[22] = 42;\n occs[23] = 421;\n occs[24] = 26;\n occs[25] = 2;\n int textLen = 2186;\n assertEquals(64388.4292706625, this.ic.chiSquared(occs,\n this.freq.getExpectedLetterFrequencies(), textLen), 0.01);\n\n }", "public double getHitsPercentual()\n\t{\n\t\t//Convert int to double values\n\t\tdouble doubleHits = hits;\n\t\tdouble doubleTotalProcessedStops = totalProcessedStops;\n\t\t\n\t\t//Hits percentual obtained by Jsprit algorithm\n\t\treturn Math.round(100 * (doubleHits / doubleTotalProcessedStops));\n\t}", "public double getLikePercentMath() {\n return likePercentMath;\n }", "@Test\n public void chiSquaredTest2() {\n long[] occs = new long[26];\n occs[0] = 195;\n occs[1] = 51;\n occs[2] = 96;\n occs[3] = 51;\n occs[4] = 305;\n occs[5] = 72;\n occs[6] = 32;\n occs[7] = 130;\n occs[8] = 194;\n occs[9] = 1;\n occs[10] = 4;\n occs[11] = 119;\n occs[12] = 64;\n occs[13] = 183;\n occs[14] = 236;\n occs[15] = 72;\n occs[16] = 8;\n occs[17] = 130;\n occs[18] = 159;\n occs[19] = 269;\n occs[20] = 62;\n occs[21] = 24;\n occs[22] = 40;\n occs[23] = 8;\n occs[24] = 48;\n occs[25] = 3;\n int textLen = 2556;\n\n assertEquals(136.9908235901, this.ic.chiSquared(occs,\n this.freq.getExpectedLetterFrequencies(), textLen), 0.01);\n }", "double ComputeFT_F1Score(individual st){\n\t\tdouble sum = 0, ft;\n\t\tint i;\n\t\tdouble[] tm;\n\t\t\n\t\tint tp, tn, fp, fn;\n\n\t\tdouble precision, recall;\n\t\ttp=0;\n\t\ttn=0;\n\t\tfp=0;\n\t\tfn=0;\n\t\t\n\t\ttm=ComputeTest(st.chrom);\n\t\tfor(i = 0; i < NUMFITTEST; i++) {\n\t\t\tft = PVAL(tm[i]);\n\t\t\t\n//\t\t\tSystem.out.println(\"TM[i]:\"+ft);\n\t\t\tif(ft<0) {\t\t\t\t\n\t\t\t\tif(fittest[i].y<=0) {\n\t\t\t\t\ttn++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tfn++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif(fittest[i].y<=0) {\n\t\t\t\t\tfp++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttp++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\t\n//\t\t\t\n\t\t}\t\n//\t\t\n//\t\tSystem.out.println(\"TP:\"+tp);\n//\t\tSystem.out.println(\"FP:\"+fp);\n//\t\tSystem.out.println(\"FN:\"+fn);\n//\t\tSystem.out.println(\"TN:\"+tn);\n\t\tprecision=tp/(tp+fp);\n\t\trecall=tp/(tp+fn);\n\t\tsum=2*precision*recall/(precision+recall);\n\t\treturn sum;\n\t}", "public double sampleVariance() {\n/* 262 */ Preconditions.checkState((this.count > 1L));\n/* 263 */ if (Double.isNaN(this.sumOfSquaresOfDeltas)) {\n/* 264 */ return Double.NaN;\n/* */ }\n/* 266 */ return DoubleUtils.ensureNonNegative(this.sumOfSquaresOfDeltas) / (this.count - 1L);\n/* */ }", "boolean hasPercentage();", "public static double termPercentage(final int aantalTermijnen, final double percentage)\n\t{\n\t\tdouble p = 1 + percentage * EEN_PERCENT;\n\t\tdouble m = 1 / (double) aantalTermijnen;\n\t\treturn (Math.pow(p, m) - 1d) * HON_PERCENT;\n\t}", "Float getFedAnimalsPercentage();", "public double confidenceHi() {\n return mean() + ((1.96 * stddev()) / Math.sqrt(trials));\n }", "long countByExample(XPsDigest95thPercentileByAvgUsExample example);", "double redPercentage();", "public abstract double score(double tf, double docLength);", "int DF(String term) {\n for (int i = 0; i < count1; i++) {\n if (economydocument[i].contains(term)) {\n df++;\n }\n }\n for (int i = 0; i < count2; i++) {\n if (educationdocument[i].contains(term)) {\n df++;\n }\n }\n for (int i = 0; i < count3; i++) {\n if (sportdocument[i].contains(term)) {\n df++;\n }\n }\n for (int i = 0; i < count4; i++) {\n if (culturedocument[i].contains(term)) {\n df++;\n }\n }\n for (int i = 0; i < count5; i++) {\n if (accedentdocument[i].contains(term)) {\n df++;\n }\n }\n for (int i = 0; i < count6; i++) {\n if (environmntaldocument[i].contains(term)) {\n df++;\n }\n }\n for (int i = 0; i < count7; i++) {\n if (foreign_affairdocument[i].contains(term)) {\n df++;\n }\n }\n for (int i = 0; i < count8; i++) {\n if (law_justicedocument[i].contains(term)) {\n df++;\n }\n }\n for (int i = 0; i < count9; i++) {\n if (agriculture[i].contains(term)) {\n df++;\n }\n }\n for (int i = 0; i < count10; i++) {\n if (politicsdocument[i].contains(term)) {\n df++;\n }\n }\n for (int i = 0; i < count12; i++) {\n if (science_technologydocument[i].contains(term)) {\n df++;\n }\n }\n for (int i = 0; i < count13; i++) {\n if (healthdocument[i].contains(term)) {\n df++;\n }\n }\n for (int i = 0; i < count14; i++) {\n if (army[i].contains(term)) {\n df++;\n }\n }\n return df;\n }", "public double confidenceHi() {\n\t\t return mean() + ((CONFIDENCE_NUM * stddev()) / Math.sqrt(trials));\n\t }", "private double weight(){\n return ((double) (m_PositiveCount + m_NegativeCount)) / ((double) m_PositiveCount);\n }", "public abstract double score(\n\t\tdouble tf,\n\t\tdouble docLength,\n\t\tdouble n_t,\n\t\tdouble F_t,\n\t\tdouble keyFrequency);", "private float calculateTip( float amount, int percent, int totalPeople ) {\n\t\tfloat result = (float) ((amount * (percent / 100.0 )) / totalPeople);\n\t\treturn result;\n\t}", "public void countTerm() throws IOException {\n\n long countBody = reader.getSumDocFreq(\"body\");\n long countTitle = reader.getSumDocFreq(\"title\");\n\n System.out.println(\"Body: \" + countBody);\n System.out.println(\"Title: \" + countTitle);\n System.out.println(\"Total count Terms: \" + (countTitle + countBody));\n\n }", "public int getTermTotal(){\n\t\tint total = 0;\r\n\t\tfor (Map.Entry<String, IndexedDoc> set : index.entrySet()){\r\n\t\t\ttotal += set.getValue().getTotalTerms();\r\n\t\t}\r\n\t\treturn total;\r\n\t}", "public void calculateCommission(){\r\n commission = (sales) * 0.15;\r\n //A sales Person makes 15% commission on sales\r\n }", "private void percent()\n\t{\n\t\tDouble percent;\t\t//holds the right value percentage of the left value\n\t\tString newText = \"\";//Holds the updated text \n\t\tif(calc.getLeftValue ( ) != 0.0 && Fun != null)\n\t\t{\n\t\t\tsetRightValue();\n\t\t\tpercent = calc.getRightValue() * 0.01 * calc.getLeftValue();\n\t\t\tleftValue = calc.getLeftValue();\n\t\t\tnewText += leftValue;\n\t\t\tswitch (Fun)\n\t\t\t{\n\t\t\t\tcase ADD:\n\t\t\t\t\tnewText += \" + \";\n\t\t\t\t\tbreak;\n\t\t\t\tcase SUBTRACT:\n\t\t\t\t\tnewText += \" - \";\n\t\t\t\t\tbreak;\n\t\t\t\tcase DIVIDE:\n\t\t\t\t\tnewText += \" / \";\n\t\t\t\t\tbreak;\n\t\t\t\tcase MULTIPLY:\n\t\t\t\t\tnewText += \" * \";\n\t\t\t\t\tbreak;\n\t\t\t}//end switch\n\t\t\t\n\t\t\tnewText += \" \" + percent;\n\t\t\tentry.setText(newText);\n\t\t\t\n\t\t}//end if\n\t\t\n\t}", "public double confidenceHi(){\n return (this.average + (this.confidence_constant * this.std)/Math.sqrt((double) this.num_trials));\n }", "public double confidenceHi(){\n return mean() + ((1.96 * stddev()) / Math.sqrt(numberOfTrials));\n }", "public double getLikePercentEng() {\n return likePercentEng;\n }", "protected double compute(int sample) {\n\t\tdouble v = Math.sin((double) sample * 2.0 * Math.PI * (double) frequency\n\t\t\t\t/ (double) AudioSequence.SAMPLES_PER_SECOND);\n\t\treturn v;\n\t}", "public double mean() {\n return StdStats.mean(perThreshold);\n }", "private double p_l(Label label) {\n\t\t// TODO : Implement\n\t\t// Calculate the probability for the label. No smoothing here.\n\t\t// Just the number of label counts divided by the number of documents.\n\t\tint total = docCount.get(Label.POSITIVE)+docCount.get(Label.NEGATIVE);\n\t\t\n\t\t\n\t\tif(label.equals(Label.POSITIVE))\n\t\t\treturn ((double)(docCount.get(Label.POSITIVE)))/((double)(total));\n\t\telse\n\t\t\treturn ((double)(docCount.get(Label.NEGATIVE)))/((double)(total));\n\t}", "@Override\n public int accion() {\n return this.alcance*2/3*3;\n }", "private static double meanVal(double[] arrayOfSamples){\n\t\tdouble total = 0;\n\t\t for (double i :arrayOfSamples){\n\t\t \ttotal += i;\n\t\t }\n\t return total/arrayOfSamples.length;\n\t}", "private double rsd(Population pop) {\n double[] s = std(pop);\n double [] m = mean(pop);\n Individual ind = pop.getIndividual(0);\n double v = 0.0;\n for (int i = 0; i < s.length; i++) {\n if( m[i] != 0)\n v += s[i] /ind.getDimension();\n }\n return (100 * v) / s.length;\n }", "private double getScore(String source, String target) {\n return sourceTargetCounts.getCount(source, target) / (sourceWordCounts.get(source) * targetWordCounts.get(target));\n }", "public double calculateFirstOccurrence(Token token, FileData file) {\n\t\t\n\t\treturn 1 - ((double) token.getBeginIndex() / file.getQttyTerms());\n\t}", "public void analyze(ArrayList<String> words) throws IOException\n {\n int[] letterOccurences = new int[regularAlphabet.length];\n double[] percentOccurence = new double[letterOccurences.length];\n int numberOfLetters = 0;\n \n //Loops to calculate number of occurences per letter.\n for(int wordCount = 0; wordCount<words.size(); wordCount++)\n {\n for(int letterCount = 0; letterCount<words.get(wordCount).length(); letterCount++)\n {\n for(int alphabetCharacter = 0; alphabetCharacter<regularAlphabet.length; alphabetCharacter++)\n {\n if(regularAlphabet[alphabetCharacter].equalsIgnoreCase(words.get(wordCount).substring(letterCount, letterCount+1)))\n {\n letterOccurences[alphabetCharacter]++;\n numberOfLetters++;\n }\n }\n }\n }\n \n //Loop to calculate percent occurences of letters.\n for(int index = 0; index<percentOccurence.length; index++)\n {\n percentOccurence[index] = (letterOccurences[index]/(double)numberOfLetters)*100;\n }\n \n PrintWriter outFile = new PrintWriter (new File(\"ciphertextfreq.txt\"));\n outFile.println(\"-------------------------------------------\");\n System.out.println(\"-------------------------------------------\");\n outFile.printf(\"|%6s | %12s | %11s|\",\"Letter\",\"Frequency\",\"Percent\");\n outFile.println();\n outFile.println(\"-------------------------------------------\");\n System.out.printf(\"|%6s | %12s | %11s|\\n\",\"Letter\",\"Frequency\",\"Percent\");\n System.out.println(\"-------------------------------------------\");\n for(int printIndex = 0; printIndex<regularAlphabet.length; printIndex++)\n {\n outFile.printf(\"|\\\"%S\\\" | %10d | %10.1f%s|\",regularAlphabet[printIndex],letterOccurences[printIndex],percentOccurence[printIndex],\"%\");\n System.out.printf(\"|\\\"%S\\\" | %10d | %10.1f%s|\\n\",regularAlphabet[printIndex],letterOccurences[printIndex],percentOccurence[printIndex],\"%\");\n outFile.println();\n outFile.println(\"-------------------------------------------\");\n System.out.println(\"-------------------------------------------\");\n }\n outFile.println(\"-------------------------------------------\");\n System.out.println(\"-------------------------------------------\");\n outFile.printf(\"|%5s | %10d | %10d%s|\",\"Total\",numberOfLetters,100,\"%\");\n System.out.printf(\"|%5s | %10d | %10d%s|\\n\",\"Total\",numberOfLetters,100,\"%\");\n outFile.println();\n outFile.println(\"-------------------------------------------\");\n System.out.println(\"-------------------------------------------\");\n outFile.close();\n }", "public double mean() {\n\t\treturn StdStats.mean(results); \n\t}", "public double measurementProb(float[] measurement) {\r\n double prob = 1.0;\r\n for(int i=0;i<landmarks.length;i++) {\r\n float dist = (float) MathX.distance(x, y, landmarks[i].x, landmarks[i].y); \r\n prob *= MathX.Gaussian(dist, senseNoise, measurement[i]); \r\n } \r\n \r\n probability = prob;\r\n \r\n return prob;\r\n }", "public double getLikePercentSE() {\n return likePercentSE;\n }", "public double confidenceHi() {\n return mean() + CONFIDENCE * stddev() / Math.sqrt(trials);\n }", "public Double computeRelevance(IList<String> query, URI pageUri) {\n\t if (query == null || pageUri == null) {\n\t\t throw new NullPointerException();\n\t }\n\t \n IDictionary<String, Double> documentVector = documentTfIdfVectors.get(pageUri);\n IDictionary<String, Double> queryTfScores = computeTfScores(query);\n IDictionary<String, Double> queryVector = new ChainedHashDictionary<String, Double>();\n Double numerator = 0.0;\n \n for (KVPair<String, Double> pair: queryTfScores) {\n\t \t\tDouble queryWordScore = 0.0;\n\t \t\tDouble docWordScore = 0.0;\n\t \t\tif (idfScores.containsKey(pair.getKey())) {\t\n\t \t\t queryWordScore = queryTfScores.get(pair.getKey()) * idfScores.get(pair.getKey());\n\t \t\t}\n \t\t\tqueryVector.put(pair.getKey(), queryWordScore);\n\t \t\tif (documentVector.containsKey(pair.getKey())) {\n\t \t\t\tdocWordScore = documentVector.get(pair.getKey());\n\t \t\t} \n\t \t\tnumerator += queryWordScore * docWordScore;\n } \n \n Double denominator = docDenomScore.get(pageUri) * norm(queryVector);\n \n // A check to avoid division by zero\n if (denominator != 0.0) {\n \t\t return numerator / denominator;\n } else {\n return 0.0;\n }\n }" ]
[ "0.58621746", "0.58613867", "0.5838996", "0.57400566", "0.57352144", "0.56957936", "0.56839347", "0.56790215", "0.56433314", "0.56336397", "0.5582392", "0.5575175", "0.55409664", "0.5502984", "0.54664177", "0.545025", "0.5445568", "0.5434336", "0.5395909", "0.5385528", "0.53747743", "0.5359405", "0.5343364", "0.53242797", "0.53191406", "0.53145206", "0.53115785", "0.5275844", "0.52664787", "0.5252098", "0.5250156", "0.5243787", "0.52393365", "0.51854044", "0.5184492", "0.51705486", "0.5164807", "0.51608956", "0.51523846", "0.5145162", "0.5142101", "0.51351094", "0.5126627", "0.5123905", "0.51207805", "0.51175195", "0.5116114", "0.5114786", "0.5099142", "0.50903493", "0.5076813", "0.5060239", "0.5057242", "0.5053849", "0.5053028", "0.50516516", "0.5050082", "0.5046793", "0.5035885", "0.50221086", "0.5013676", "0.49968395", "0.49941143", "0.49906796", "0.49874663", "0.49863493", "0.498539", "0.49730504", "0.49700788", "0.4969422", "0.49617437", "0.49592146", "0.4958166", "0.49552053", "0.49426466", "0.49389884", "0.49365398", "0.4932142", "0.4928474", "0.4924729", "0.49195272", "0.4916724", "0.49098596", "0.49089864", "0.4908287", "0.49082783", "0.49044296", "0.48980635", "0.4896625", "0.48845896", "0.48836535", "0.48811293", "0.48795015", "0.4872899", "0.48716775", "0.48654252", "0.48628062", "0.486278", "0.4860439", "0.48589796", "0.4858233" ]
0.0
-1
Constructor to be used only by the builder.
protected Machine(final RestContext<AbiquoApi, AbiquoAsyncApi> context, final MachineDto target) { super(context, target); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Builder() {\n\t\t}", "private Builder()\n {\n }", "private Builder() {\n }", "private Builder() {\n }", "private Builder() {}", "public Builder() {\n\t\t}", "public Builder() {\n }", "public Builder() {\n }", "public Builder() {}", "public Builder() {}", "public Builder() {}", "private Construct(Builder builder) {\n super(builder);\n }", "public Builder() {\n }", "public Builder() { }", "public Builder(){\n }", "private DataModelBuilder() {\n }", "Constructor() {\r\n\t\t \r\n\t }", "public Builder()\n {\n this(\"\", \"\");\n }", "public JSONBuilder() {\n\t\tthis(null, null);\n\t}", "public GantBuilder ( ) { }", "private SimpleData(Builder builder) {\n super(builder);\n }", "private DescriptorBuilder() {\n // empty\n \n // NOTE: No tracing is performed, since this constructor is never used\n }", "public LinkBuilder() {\n }", "private BuilderUtils() {}", "public Constructor(){\n\t\t\n\t}", "private DataObject(Builder builder) {\n super(builder);\n }", "public JobBuilder() {\r\n job = new Job();\r\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "private Builder() {\n super(SCHEMA$);\n }", "public Builder() {\n\t\t\tsuper(Defaults.NAME);\n\t\t}", "private SupplierInfoBuilder() {\n }", "private Builder() {\n super(br.unb.cic.bionimbus.avro.gen.JobInfo.SCHEMA$);\n }", "public XMLModel002Builder() {\n }", "public ScriptBuilder() {\n }", "public BuiltBy() {\n }", "public SgaexpedbultoImpl()\n {\n }", "private BeeMessage(Builder builder) {\n super(builder);\n }", "private ReducedCFGBuilder() {\n\t}", "private HandlerBuilder() {\n }", "public Aanbieder() {\r\n\t\t}", "public Building() {\n\t}", "public PathBuilder() {\n\t\tthis( null, true );\n\t}", "private Payload(Builder builder) {\n super(builder);\n }", "protected IPCGCallDetailCreator()\r\n {\r\n // empty\r\n }", "public PSRelation()\n {\n }", "private Builder() {\n super(org.apache.gora.cascading.test.storage.TestRow.SCHEMA$);\n }", "private MazeBuilder() {\n\t}", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "private Model(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public XMLBuilder()\n\t{\n\t\tthis(\"\");\n\t}", "public UBERequest() {\r\n }", "private Builder() {\n super(sparqles.avro.analytics.EPViewInteroperability.SCHEMA$);\n }", "private Message(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }", "public BuildingResource() {\n }", "private Builder() {\n super(edu.pa.Rat.SCHEMA$);\n }", "private Instance(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public BwaOptions() {\n\t}", "private TMCourse() {\n\t}", "private Builder() {\n super(com.autodesk.ws.avro.Call.SCHEMA$);\n }", "private StrategyChainBuilder() {\n\t}", "private Builder() {\n super(TransferSerialMessage.SCHEMA$);\n }", "private Aliyun() {\n\t\tsuper();\n\t}", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "private Device(Builder builder) {\n super(builder);\n }", "private Message(Builder builder) {\n super(builder);\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private Package(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }", "public Tbdtokhaihq3() {\n super();\n }", "public QBXMLRequest() {\n }", "protected ClientStatus() {\n }", "private Node() {\n\n }", "public CyanSus() {\n\n }", "public CalccustoRequest()\r\n\t{\r\n\t}", "private Composite() {\n }", "private Sequence() {\n this(\"<Sequence>\", null, null);\n }", "private Compilation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private Rekenhulp()\n\t{\n\t}", "private Donatie(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private Command(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n }", "private Instantiation(){}", "Reproducible newInstance();", "public Pitonyak_09_02() {\r\n }", "public MethodBuilder() {\n\t\tvisibility = \"public\";\n\t\treturnType = \"void\";\n\t\tname = \"foo\";\n\t\trule = \"\";\n\t\ttype = \"\";\n\t\tparameters = new ArrayList<String>();\n\t\tcommands = new ArrayList<String>();\n\t}" ]
[ "0.78753823", "0.7837411", "0.78064895", "0.78064895", "0.7691248", "0.76522386", "0.75209075", "0.75209075", "0.7426873", "0.7426873", "0.7426873", "0.7409102", "0.7376953", "0.73278487", "0.723683", "0.71667486", "0.71483856", "0.7136429", "0.70155394", "0.6987519", "0.69812673", "0.6972304", "0.6968467", "0.6966585", "0.6860224", "0.6823706", "0.67821896", "0.67745274", "0.67745274", "0.67745274", "0.67745274", "0.67745274", "0.67745274", "0.67745274", "0.67745274", "0.67745274", "0.67745274", "0.67745274", "0.67745274", "0.67745274", "0.67745274", "0.67745274", "0.67745274", "0.67745274", "0.67745274", "0.67745274", "0.67745274", "0.67687005", "0.67605466", "0.67490584", "0.6720521", "0.6716295", "0.6712462", "0.6711454", "0.66931206", "0.6684938", "0.6660604", "0.6659682", "0.66570795", "0.66518605", "0.66472435", "0.66244483", "0.6620723", "0.6610672", "0.660925", "0.6606419", "0.6602604", "0.6578496", "0.65761274", "0.6557568", "0.65571326", "0.65472215", "0.6546017", "0.6542233", "0.65351653", "0.65346503", "0.65329695", "0.653125", "0.65308815", "0.6527075", "0.65197223", "0.65140337", "0.6511034", "0.65075445", "0.6507504", "0.65068287", "0.6500738", "0.64985275", "0.649219", "0.64896405", "0.6487097", "0.6484443", "0.64767975", "0.6470315", "0.6460082", "0.64584064", "0.6454355", "0.6453221", "0.64528525", "0.64520437", "0.64452744" ]
0.0
-1
Parent access Retrieve the unmanaged rack where the machine is.
public Rack getRack() { RESTLink link = checkNotNull(target.searchLink(ParentLinkName.RACK), ValidationErrors.MISSING_REQUIRED_LINK + " " + ParentLinkName.RACK); ExtendedUtils utils = (ExtendedUtils) context.getUtils(); HttpResponse response = utils.getAbiquoHttpClient().get(link); ParseXMLWithJAXB<RackDto> parser = new ParseXMLWithJAXB<RackDto>(utils.getXml(), TypeLiteral.get(RackDto.class)); return wrap(context, Rack.class, parser.apply(response)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequestMapping(value = \"/rack\")\n\tpublic Rack getRack() {\n\n\t\treturn rack;\n\t}", "Rack getByResourceGroup(String resourceGroupName, String rackName);", "public String getClientMachine();", "public ArrayList<String> getRack() {\n\t\treturn subsets;\n\t}", "public com.hps.july.persistence.SuperRegionAccessBean getSuperregion() throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n instantiateEJB();\n com.hps.july.persistence.SuperRegion localEJBRef = ejbRef().getSuperregion();\n if ( localEJBRef != null )\n return new com.hps.july.persistence.SuperRegionAccessBean(localEJBRef);\n else\n return null;\n }", "public I_LogicalAddress getRoot() {\n return root;\n }", "public StorageUnit getRoot();", "public String getBoxNetHost();", "private com.hps.july.persistence.SuperRegionHome ejbHome() throws java.rmi.RemoteException, javax.naming.NamingException {\n return (com.hps.july.persistence.SuperRegionHome) PortableRemoteObject.narrow(getHome(), com.hps.july.persistence.SuperRegionHome.class);\n }", "PhysicalMachine getPhysicalMachine() {\n return pm;\n }", "public int getOwner() {\n validify();\n return Client.INSTANCE.pieceGetOwner(ptr);\n }", "private NodeRef getompanyHomeFolder(){\n LOG.debug(\"### Executing \"+ Thread.currentThread().getStackTrace()[1].getMethodName() +\" ####\");\n return nodeLocatorService.getNode(\"companyhome\", null, null);\n }", "private com.hps.july.persistence.SuperRegionAccHome ejbHome() throws java.rmi.RemoteException, javax.naming.NamingException {\n return (com.hps.july.persistence.SuperRegionAccHome) PortableRemoteObject.narrow(getHome(), com.hps.july.persistence.SuperRegionAccHome.class);\n }", "CyRootNetwork getRootNetwork();", "public Machine machine() {\n return machine;\n }", "public String getHost() {\n return stack.stackAddress;\n }", "public BufferedReader reqGetHome() throws ServerStatusException,\n IOException {\n return reqGet(\"/\", USER_AGENT);\n }", "public URI getHome() {\n return this.homeSpace;\n }", "private Location getRegion() {\n Set<? extends Location> locations = blobStore.listAssignableLocations();\n if (!(swiftRegion == null || \"\".equals(swiftRegion))) {\n for (Location location : locations) {\n if (location.getId().equals(swiftRegion)) {\n return location;\n }\n }\n }\n if (locations.size() != 0) {\n return get(locations, 0);\n } else {\n return null;\n }\n }", "@RequestMapping(method = RequestMethod.POST, value = \"/rack\")\n\tpublic Rack addRack(@RequestBody Rack rack) {\n\t\tif (RackController.rack.getId() == 0) {\n\t\t\tRackController.rack.setId(rack.getId());\n\t\t\tRackController.rack.setNoOfShelves(rack.getNoOfShelves());\n\t\t\tRackController.rack.setShelves(rack.getShelves());\n\t\t}\n\t\treturn RackController.rack;\n\t}", "public String _get_codebase() {\n org.omg.CORBA.portable.Delegate delegate = _get_delegate();\n if (delegate instanceof Delegate)\n return ((Delegate) delegate).get_codebase(this);\n return null;\n }", "public java.lang.String getMachineName() {\r\n return machineName;\r\n }", "@DISPID(75)\r\n\t// = 0x4b. The runtime will prefer the VTID if present\r\n\t@VTID(73)\r\n\tjava.lang.String owner();", "@ZAttr(id=598)\n public String getGalSyncInternalSearchBase() {\n return getAttr(Provisioning.A_zimbraGalSyncInternalSearchBase, null);\n }", "public byte getSystem() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn __io__block.readByte(__io__address + 4);\n\t\t} else {\n\t\t\treturn __io__block.readByte(__io__address + 4);\n\t\t}\n\t}", "public SmartApplication getSmartApplication() {\r\n\t\treturn application;\r\n\t}", "public AddressSpace remoteAddressSpace() {\n return this.innerProperties() == null ? null : this.innerProperties().remoteAddressSpace();\n }", "public java.util.Enumeration getRegion() throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n\n instantiateEJB();\n return ejbRef().getRegion();\n }", "public interface Racks {\n /**\n * List racks in the subscription.\n *\n * <p>Get a list of racks in the provided subscription.\n *\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return a list of racks in the provided subscription as paginated response with {@link PagedIterable}.\n */\n PagedIterable<Rack> list();\n\n /**\n * List racks in the subscription.\n *\n * <p>Get a list of racks in the provided subscription.\n *\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return a list of racks in the provided subscription as paginated response with {@link PagedIterable}.\n */\n PagedIterable<Rack> list(Context context);\n\n /**\n * List racks in the resource group.\n *\n * <p>Get a list of racks in the provided resource group.\n *\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return a list of racks in the provided resource group as paginated response with {@link PagedIterable}.\n */\n PagedIterable<Rack> listByResourceGroup(String resourceGroupName);\n\n /**\n * List racks in the resource group.\n *\n * <p>Get a list of racks in the provided resource group.\n *\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return a list of racks in the provided resource group as paginated response with {@link PagedIterable}.\n */\n PagedIterable<Rack> listByResourceGroup(String resourceGroupName, Context context);\n\n /**\n * Retrieve the rack.\n *\n * <p>Get properties of the provided rack.\n *\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param rackName The name of the rack.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return properties of the provided rack along with {@link Response}.\n */\n Response<Rack> getByResourceGroupWithResponse(String resourceGroupName, String rackName, Context context);\n\n /**\n * Retrieve the rack.\n *\n * <p>Get properties of the provided rack.\n *\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param rackName The name of the rack.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return properties of the provided rack.\n */\n Rack getByResourceGroup(String resourceGroupName, String rackName);\n\n /**\n * Delete the rack.\n *\n * <p>Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource\n * is managed by the system.\n *\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param rackName The name of the rack.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void deleteByResourceGroup(String resourceGroupName, String rackName);\n\n /**\n * Delete the rack.\n *\n * <p>Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource\n * is managed by the system.\n *\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param rackName The name of the rack.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void delete(String resourceGroupName, String rackName, Context context);\n\n /**\n * Retrieve the rack.\n *\n * <p>Get properties of the provided rack.\n *\n * @param id the resource ID.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return properties of the provided rack along with {@link Response}.\n */\n Rack getById(String id);\n\n /**\n * Retrieve the rack.\n *\n * <p>Get properties of the provided rack.\n *\n * @param id the resource ID.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return properties of the provided rack along with {@link Response}.\n */\n Response<Rack> getByIdWithResponse(String id, Context context);\n\n /**\n * Delete the rack.\n *\n * <p>Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource\n * is managed by the system.\n *\n * @param id the resource ID.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void deleteById(String id);\n\n /**\n * Delete the rack.\n *\n * <p>Delete the provided rack. All customer initiated requests will be rejected as the life cycle of this resource\n * is managed by the system.\n *\n * @param id the resource ID.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void deleteByIdWithResponse(String id, Context context);\n\n /**\n * Begins definition for a new Rack resource.\n *\n * @param name resource name.\n * @return the first stage of the new Rack definition.\n */\n Rack.DefinitionStages.Blank define(String name);\n}", "public GUI GetHost() {\n\t\treturn m_Host;\n\t}", "public String remoteVolumeRegion() {\n return this.remoteVolumeRegion;\n }", "public String getOwner(){\n\t\treturn new SmartAPIModel().getCpOwner(cp.getLocalName());\n\t}", "private com.hps.july.persistence.EquipmentSetHome ejbHome() throws java.rmi.RemoteException, javax.naming.NamingException {\n return (com.hps.july.persistence.EquipmentSetHome) PortableRemoteObject.narrow(getHome(), com.hps.july.persistence.EquipmentSetHome.class);\n }", "public RTWLocation parent();", "public SystemDisk getSystemDisk() {\n return this.SystemDisk;\n }", "@Override\n\tpublic Computer getComputer() {\n\t\treturn com;\n\t}", "protected <K extends Resource> K getFromParent(String uri, Class<K> resourceType) {\n\t\tfor (RepositoryService rs : parent.getRepositoryServices()) {\n\t\t\tif (rs == this)\n\t\t\t\tcontinue;\n\t\t\ttry {\n\t\t\t\tK r = parent.doGetResource(uri, resourceType, rs);\n\t\t\t\tif (r != null)\n\t\t\t\t\treturn r;\n\t\t\t} catch (JRRuntimeException e) {\n\t\t\t}\n\t\t}\n\t\t// System.out.println(\"get from server not found \" + uri);\n\t\treturn null;\n\t}", "public ResourceLocation getLocationSkin()\n {\n NetworkPlayerInfo networkplayerinfo = this.getPlayerInfo();\n return networkplayerinfo == null ? DefaultPlayerSkin.getDefaultSkin(this.getUniqueID()) : networkplayerinfo.getLocationSkin();\n }", "public String getUserAgentStub() {\n\t\treturn this.userAgentStub;\n\t}", "String getParentDriverName();", "@DISPID(33)\r\n\t// = 0x21. The runtime will prefer the VTID if present\r\n\t@VTID(38)\r\n\tjava.lang.String owner();", "String getIntegHost();", "private com.hps.july.persistence.SuperRegion ejbRef() throws java.rmi.RemoteException {\n if ( ejbRef == null )\n return null;\n if ( __ejbRef == null )\n __ejbRef = (com.hps.july.persistence.SuperRegion) PortableRemoteObject.narrow(ejbRef, com.hps.july.persistence.SuperRegion.class);\n\n return __ejbRef;\n }", "@Override\n public Environment getEnvironment(int w, int h)\n {\n return master.getEnvironment(w, h);\n }", "private URI getSourceBackingVolumeStorageSystem(Volume vplexVolume) {\n // Get the backing volume associated with the source side only\n Volume localVolume = VPlexUtil.getVPLEXBackendVolume(vplexVolume,\n true, _dbClient);\n\n return localVolume.getStorageController();\n }", "public com.hps.july.persistence.DivisionAccessBean getDivision() throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n instantiateEJB();\n com.hps.july.persistence.Division localEJBRef = ejbRef().getDivision();\n if ( localEJBRef != null )\n return new com.hps.july.persistence.DivisionAccessBean(localEJBRef);\n else\n return null;\n }", "public com.hps.july.persistence.DivisionAccessBean getDivision() throws java.rmi.RemoteException, javax.ejb.FinderException, javax.naming.NamingException {\n instantiateEJB();\n com.hps.july.persistence.Division localEJBRef = ejbRef().getDivision();\n if ( localEJBRef != null )\n return new com.hps.july.persistence.DivisionAccessBean(localEJBRef);\n else\n return null;\n }", "public TaskStack getHomeStack() {\n return this.mTaskStackContainers.getHomeStack();\n }", "public String getHost() {\n\t\treturn this.sipStack.getHostAddress();\n\t}", "protected VcsRoot getRoot(String branchName) throws IOException {\n return getRoot(branchName, false);\n }", "public URL getCodeBase() {\n/* 169 */ return this.stub.getCodeBase();\n/* */ }", "public abstract String getMachineID();", "public abstract Address getBootHeapEnd();", "public Lane getLane()\r\n\t{\r\n\t\treturn owner;\r\n\t}", "@ZAttr(id=358)\n public String getGalInternalSearchBase() {\n return getAttr(Provisioning.A_zimbraGalInternalSearchBase, \"DOMAIN\");\n }", "public abstract Map<String, String> getEnvironment(NIOWorker nw);", "Host getHost();", "public String getPhysicalAddress()\r\n {\r\n return physicalAddress;\r\n }", "String getHome(ObjectStorage storage);", "public Sector getTarget() {\n\t\treturn this.centralSector;\n\t}", "public String getIp() {\n\t\treturn InfraUtil.getIpMachine();\n\t}", "public abstract Address getBootHeapStart();", "BrowserStack getBrowserStackInst();", "public ILocation top()\n {\n EmptyStackException ex = new EmptyStackException();\n if (top <= 0)\n {\n throw ex;\n }\n else\n {\n return stack.get(top - 1);\n }\n }", "public IRubyObject getTopSelf() {\n return topSelf;\n }", "public com.hps.july.persistence.SuperRegionKey getSuperregionKey() throws java.rmi.RemoteException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException {\n return (((com.hps.july.persistence.SuperRegionKey) __getCache(\"superregionKey\")));\n }", "public String getRemoteComputerString(){\n return this.remoteComputerString;\n }", "public String owner() {\n return this.owner;\n }", "public Part getPart() {\n if ( isZombie( part ) ) {\n Part part = segment.getDefaultPart();\n getCommander().requestLockOn( part );\n return part;\n } else {\n return part;\n }\n }", "public String getScreenName() {\n\t\treturn restClient.getScreenName();\n\t}", "public String getApplicationDomain()\n {\n ASPManager mgr = getASPManager();\n String curr_host = mgr.getCurrentHost();\n if(mgr.isDifferentApplicationPath())\n {\n int host_no = mgr.getCurrentHostIndex()+1;\n String[] data =Str.split((String)configfile.hosts.get(host_no+\"\"),\",\");\n \n if(!\"NONE\".equals(data[1]))\n curr_host = data[1];\n }\n\n return curr_host;\n }", "public VirtualMachine getVirtualMachine()\n {\n return vm;\n }", "public String getStunServer();", "public LocatorIF getBase() {\n return base_address;\n }", "public String getHostName() {\n return null;\n }", "public String getPhysicalURI()\n {\n return physicalURI;\n }", "public String getRoot();", "public String getWareHouseName()\n\t{\n\t\treturn getValue(WareHouse.WAREHOUSENAME).toString();\n\t}", "public String getWestSide() {\n return (String) getAttributeInternal(WESTSIDE);\n }", "public NetworkInfo getActiveNetworkInfo() {\n\treturn null;\r\n}", "private EntryStorageHome home()\r\n {\r\n if( home == null )\r\n {\r\n\t\ttry\r\n\t\t{\r\n home = (EntryStorageHome) \r\n get_storage_home().get_catalog().find_storage_home( PSS_HOME );\r\n\t\t}\r\n\t\tcatch( Throwable e )\r\n\t\t{\r\n\t\t String error = \"Could not resolve the EntryStorageHome\";\r\n\t\t throw new RuntimeException( error, e );\r\n\t\t}\r\n }\r\n return home;\r\n }", "public final Symbol top() {\n\t\ttry {\n\t\t\treturn opstack.top().getSymbol();\n\t\t} catch (BadTypeException | EmptyStackException e) {\n\t\t\tSystem.out.println(\"An exception has occurred, \"\n\t\t\t\t\t+ \"Maybe the stack has gone empty\");\n\t\t\treturn null;\n\t\t}\n\t}", "public Shard getLowerNeighbor() {\r\n double middleLat = south + Math.abs(north - south) / 2;\r\n double nextLat = middleLat - Math.abs(north - south);\r\n\r\n return new Shard(new Coordinates(nextLat, coordinates.getLon()), zoom);\r\n }", "public File getWorkingParent()\n {\n return validatePath(ServerSettings.getInstance().getProperty(ServerSettings.WORKING_PARENT));\n }", "String getHandOwner();", "@Override\n\t\tpublic String getHost() {\n\t\t\treturn null;\n\t\t}", "public String getRoot() {\n\t\treturn null;\n\t}", "public String getResearchhost() {\r\n\t\treturn researchhost;\r\n\t}", "public static String getCurrentBrowserName() {\r\n\t\tCapabilities c = ((RemoteWebDriver) driver).getCapabilities();\r\n\t\treturn c.getBrowserName();\r\n\t}", "public String getHostPrincipalRoot() {\n return hostPrincipalRoot;\n }", "public String getSimulatorCodeLocation() {\n return simSpec.getCodeLocation();\n }", "public String getAddress(){\r\n\t\ttry {\r\n\t\t\treturn this.workerobj.getString(WorkerController.ADDRESS);\r\n\t\t} catch (JSONException e) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public long getHandle() {\n if (this.cleanedUp) {\n throw new IllegalStateException(\"Tried fetch handle for cleaned up swapchain!\");\n }\n return this.swapchain;\n }", "public static String name() {\r\n String _computername=\"\";\r\n InetAddress _address=null;\r\n \r\n try {\r\n _address=InetAddress.getLocalHost();\r\n _computername=_address.getHostName();\r\n }\r\n catch (Exception ex) {\r\n throw new RuntimeException(ex.getMessage());\r\n }\r\n \r\n if (_address!=null) {\r\n _address=null; System.gc();\r\n }\r\n \r\n return _computername;\r\n }", "public String getSimulatorExecutable() {\n return simSpec.getSimExecutable();\n }", "java.lang.String getMachineId();", "public Member getCurrentTargetReplica() {\n return currentTargetReplicaAddress;\n }", "public ComputerSpec getComputerSpec() {\n return computerSpec;\n }", "public MacAddress getClientMac() {\n return clientMac;\n }", "BodyPart getGearLocation();" ]
[ "0.69822115", "0.5949644", "0.568824", "0.55359197", "0.5403682", "0.53515285", "0.52285093", "0.50676167", "0.50625396", "0.49354735", "0.48507017", "0.48435843", "0.4806164", "0.48054063", "0.47997507", "0.47809482", "0.4777881", "0.4747604", "0.4742336", "0.47329867", "0.47138518", "0.4709411", "0.46954635", "0.46889693", "0.46772778", "0.46586365", "0.4646219", "0.46448064", "0.4640373", "0.46126378", "0.4612217", "0.46095648", "0.46072832", "0.46070525", "0.460481", "0.46022272", "0.45953888", "0.45924369", "0.45914185", "0.45833978", "0.45826456", "0.45796335", "0.4577354", "0.45718443", "0.45672238", "0.45658308", "0.45658308", "0.45633778", "0.45593405", "0.45574725", "0.45574227", "0.4552555", "0.45494646", "0.45475417", "0.45346746", "0.45344275", "0.45333052", "0.4529251", "0.45287794", "0.45243517", "0.45211583", "0.45203143", "0.45084447", "0.45027336", "0.44908813", "0.44905868", "0.44766602", "0.44754562", "0.44733274", "0.44708338", "0.44648767", "0.44590962", "0.44563356", "0.44527027", "0.44513127", "0.44505194", "0.44437224", "0.4443515", "0.4442541", "0.44400716", "0.442862", "0.44227085", "0.4418539", "0.44167888", "0.44104627", "0.43963918", "0.4389501", "0.4389133", "0.43853852", "0.43825862", "0.43811807", "0.43797398", "0.43781045", "0.43774015", "0.4376883", "0.437237", "0.4370993", "0.43683615", "0.43662927", "0.43641123" ]
0.71934146
0
Gets the list of virtual machines in the physical machine.
public List<VirtualMachine> listVirtualMachines() { MachineOptions options = MachineOptions.builder().sync(false).build(); VirtualMachinesWithNodeExtendedDto vms = context.getApi().getInfrastructureApi() .listVirtualMachinesByMachine(target, options); return wrap(context, VirtualMachine.class, vms.getCollection()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<VirtualMachine> listRemoteVirtualMachines() {\n MachineOptions options = MachineOptions.builder().sync(true).build();\n VirtualMachinesWithNodeExtendedDto vms = context.getApi().getInfrastructureApi()\n .listVirtualMachinesByMachine(target, options);\n return wrap(context, VirtualMachine.class, vms.getCollection());\n }", "public VirtualMachines getVirtualMachines() {\n return virtualMachines;\n }", "public List<VirtualMachineDescriptor> listVirtualMachines() {\n ArrayList<VirtualMachineDescriptor> result =\n new ArrayList<VirtualMachineDescriptor>();\n\n MonitoredHost host;\n Set<Integer> vms;\n try {\n host = MonitoredHost.getMonitoredHost(new HostIdentifier((String)null));\n vms = host.activeVms();\n } catch (Throwable t) {\n if (t instanceof ExceptionInInitializerError) {\n t = t.getCause();\n }\n if (t instanceof ThreadDeath) {\n throw (ThreadDeath)t;\n }\n if (t instanceof SecurityException) {\n return result;\n }\n throw new InternalError(t); // shouldn't happen\n }\n\n for (Integer vmid: vms) {\n String pid = vmid.toString();\n String name = pid; // default to pid if name not available\n boolean isAttachable = false;\n MonitoredVm mvm = null;\n try {\n mvm = host.getMonitoredVm(new VmIdentifier(pid));\n try {\n isAttachable = MonitoredVmUtil.isAttachable(mvm);\n // use the command line as the display name\n name = MonitoredVmUtil.commandLine(mvm);\n } catch (Exception e) {\n }\n if (isAttachable) {\n result.add(new HotSpotVirtualMachineDescriptor(this, pid, name));\n }\n } catch (Throwable t) {\n if (t instanceof ThreadDeath) {\n throw (ThreadDeath)t;\n }\n } finally {\n if (mvm != null) {\n mvm.detach();\n }\n }\n }\n return result;\n }", "public List<VirtualMachine> listVirtualMachines(final Predicate<VirtualMachine> filter) {\n return Lists.newLinkedList(filter(listVirtualMachines(), filter));\n }", "@Override\n @GET\n @Path(\"/vms\")\n @Produces(\"application/json\")\n public Response getVMs() throws Exception {\n log.trace(\"getVMs() started.\");\n JSONArray json = new JSONArray();\n for (Vm vm : cluster.getVmList()) {\n JSONObject o = new JSONObject();\n String uri = String.format(\"%s/vms/%d\", rootUri, vm.getVmId());\n String vmUri = String.format(\"/providers/%d/vms/%d\", provider.getProviderId(), vm.getVmId());\n o.put(\"uri\", uri);\n o.put(\"baseUri\", vmUri);\n json.put(o);\n }\n\n log.trace(\"getVMs() finished successfully.\");\n return Response.ok(json.toString()).build();\n }", "public List<VirtualMachine> listRemoteVirtualMachines(final Predicate<VirtualMachine> filter) {\n return Lists.newLinkedList(filter(listVirtualMachines(), filter));\n }", "VirtualMachine[] getPlacedVirtualMachines() {\n VirtualMachine[] vms = new VirtualMachine[mapped_vms.size()];\n mapped_vms.toArray(vms);\n return vms;\n }", "public void printVirtualMachines() throws InvalidProperty, RuntimeFault, RemoteException{\r\n\t\tManagedEntity[] mes = new\r\n\t\t\t\tInventoryNavigator(_instance.getRootFolder()).searchManagedEntities(\"VirtualMachine\");\r\n\t\tfor (int i = 0; i < mes.length; i++) {\r\n\t\t\tVirtualMachine currVm = (VirtualMachine)mes[i];\r\n\t\t\tSystem.out.printf(\"vm[%d]: Name = %s\\n\", i, currVm.getName());\r\n\t\t}\r\n\t}", "public static ArrayList<VirtualMachine> getListVms(ServiceInstance si,String vmname) throws InvalidProperty, RuntimeFault, RemoteException, MalformedURLException{\n\t\t\tHostSystem hs= hostByname(vmname,si);\n\t\t\t//System.out.println(hs.getName());\n\t\t\tFolder rootFolder = si.getRootFolder();\n\t\t\tString name = rootFolder.getName();\n\t\t\tSystem.out.println(\"root:\" + name);\n\t\t\tSystem.out.println(\"====================================================================\");\n\t\t\tArrayList<VirtualMachine> vms = new ArrayList<VirtualMachine>();\n\t\t\tManagedEntity[] mes = new InventoryNavigator(hs).searchManagedEntities(new String[][] { {\"VirtualMachine\", \"name\" }, }, true);\n\t\t\tfor(int i=0;i<mes.length;i++){\n\t\t\t\tvms.add((VirtualMachine)mes[i]);\n\t\t\t}\n\t\t\treturn vms;\n\t\t\t\n\t\t}", "private EC2DescribeInstancesResponse listVirtualMachines(String[] virtualMachineIds, EC2InstanceFilterSet ifs, List<CloudStackKeyValue> resourceTags)\n throws Exception {\n EC2DescribeInstancesResponse instances = new EC2DescribeInstancesResponse();\n\n if (null == virtualMachineIds || 0 == virtualMachineIds.length) {\n instances = lookupInstances(null, instances, resourceTags);\n } else {\n for (int i = 0; i < virtualMachineIds.length; i++) {\n instances = lookupInstances(virtualMachineIds[i], instances, resourceTags);\n }\n }\n\n if (null == ifs)\n return instances;\n else\n return ifs.evaluate(instances);\n }", "@ServiceMethod(returns = ReturnType.COLLECTION)\n private PagedFlux<VirtualMachineScaleSetVMInner> listAsync(\n String resourceGroupName,\n String virtualMachineScaleSetName,\n String filter,\n String select,\n String expand,\n Context context) {\n return new PagedFlux<>(\n () -> listSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, filter, select, expand, context),\n nextLink -> listNextSinglePageAsync(nextLink, context));\n }", "public interface VirtualMachines {\n /**\n * Implements list virtual machine within subscription method\n *\n * <p>Returns list virtual machine within subscription.\n *\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return list of virtual machines as paginated response with {@link PagedIterable}.\n */\n PagedIterable<VirtualMachine> list();\n\n /**\n * Implements list virtual machine within subscription method\n *\n * <p>Returns list virtual machine within subscription.\n *\n * @param filter The filter to apply on the list operation.\n * @param top The maximum number of record sets to return.\n * @param skipToken to be used by nextLink implementation.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return list of virtual machines as paginated response with {@link PagedIterable}.\n */\n PagedIterable<VirtualMachine> list(String filter, Integer top, String skipToken, Context context);\n\n /**\n * Implements list virtual machine within RG method\n *\n * <p>Returns list of virtual machine within resource group.\n *\n * @param resourceGroupName The name of the resource group.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return list of virtual machines as paginated response with {@link PagedIterable}.\n */\n PagedIterable<VirtualMachine> listByResourceGroup(String resourceGroupName);\n\n /**\n * Implements list virtual machine within RG method\n *\n * <p>Returns list of virtual machine within resource group.\n *\n * @param resourceGroupName The name of the resource group.\n * @param filter The filter to apply on the list operation.\n * @param top The maximum number of record sets to return.\n * @param skipToken to be used by nextLink implementation.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return list of virtual machines as paginated response with {@link PagedIterable}.\n */\n PagedIterable<VirtualMachine> listByResourceGroup(\n String resourceGroupName, String filter, Integer top, String skipToken, Context context);\n\n /**\n * Implements virtual machine GET method\n *\n * <p>Get virtual machine.\n *\n * @param resourceGroupName The name of the resource group.\n * @param virtualMachineName virtual machine name.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return virtual machine along with {@link Response}.\n */\n Response<VirtualMachine> getByResourceGroupWithResponse(\n String resourceGroupName, String virtualMachineName, Context context);\n\n /**\n * Implements virtual machine GET method\n *\n * <p>Get virtual machine.\n *\n * @param resourceGroupName The name of the resource group.\n * @param virtualMachineName virtual machine name.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return virtual machine.\n */\n VirtualMachine getByResourceGroup(String resourceGroupName, String virtualMachineName);\n\n /**\n * Implements virtual machine DELETE method\n *\n * <p>Delete virtual machine.\n *\n * @param resourceGroupName The name of the resource group.\n * @param referer referer url.\n * @param virtualMachineName virtual machine name.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void delete(String resourceGroupName, String referer, String virtualMachineName);\n\n /**\n * Implements virtual machine DELETE method\n *\n * <p>Delete virtual machine.\n *\n * @param resourceGroupName The name of the resource group.\n * @param referer referer url.\n * @param virtualMachineName virtual machine name.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void delete(String resourceGroupName, String referer, String virtualMachineName, Context context);\n\n /**\n * Implements a start method for a virtual machine\n *\n * <p>Power on virtual machine.\n *\n * @param resourceGroupName The name of the resource group.\n * @param referer referer url.\n * @param virtualMachineName virtual machine name.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void start(String resourceGroupName, String referer, String virtualMachineName);\n\n /**\n * Implements a start method for a virtual machine\n *\n * <p>Power on virtual machine.\n *\n * @param resourceGroupName The name of the resource group.\n * @param referer referer url.\n * @param virtualMachineName virtual machine name.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void start(String resourceGroupName, String referer, String virtualMachineName, Context context);\n\n /**\n * Implements shutdown, poweroff, and suspend method for a virtual machine\n *\n * <p>Power off virtual machine, options: shutdown, poweroff, and suspend.\n *\n * @param resourceGroupName The name of the resource group.\n * @param referer referer url.\n * @param virtualMachineName virtual machine name.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void stop(String resourceGroupName, String referer, String virtualMachineName);\n\n /**\n * Implements shutdown, poweroff, and suspend method for a virtual machine\n *\n * <p>Power off virtual machine, options: shutdown, poweroff, and suspend.\n *\n * @param resourceGroupName The name of the resource group.\n * @param referer referer url.\n * @param virtualMachineName virtual machine name.\n * @param mode query stop mode parameter (reboot, shutdown, etc...).\n * @param m body stop mode parameter (reboot, shutdown, etc...).\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void stop(\n String resourceGroupName,\n String referer,\n String virtualMachineName,\n StopMode mode,\n VirtualMachineStopMode m,\n Context context);\n\n /**\n * Implements virtual machine GET method\n *\n * <p>Get virtual machine.\n *\n * @param id the resource ID.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return virtual machine along with {@link Response}.\n */\n VirtualMachine getById(String id);\n\n /**\n * Implements virtual machine GET method\n *\n * <p>Get virtual machine.\n *\n * @param id the resource ID.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return virtual machine along with {@link Response}.\n */\n Response<VirtualMachine> getByIdWithResponse(String id, Context context);\n\n /**\n * Implements virtual machine DELETE method\n *\n * <p>Delete virtual machine.\n *\n * @param id the resource ID.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void deleteById(String id);\n\n /**\n * Implements virtual machine DELETE method\n *\n * <p>Delete virtual machine.\n *\n * @param id the resource ID.\n * @param referer referer url.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void deleteByIdWithResponse(String id, String referer, Context context);\n\n /**\n * Begins definition for a new VirtualMachine resource.\n *\n * @param name resource name.\n * @return the first stage of the new VirtualMachine definition.\n */\n VirtualMachine.DefinitionStages.Blank define(String name);\n}", "public List<ServerHardware> getServers();", "public List<Computer> getAll(){\n\t\treturn getWithLimit(-1,-1);\n\t}", "@ServiceMethod(returns = ReturnType.COLLECTION)\n public PagedIterable<VirtualMachineScaleSetVMInner> list(\n String resourceGroupName,\n String virtualMachineScaleSetName,\n String filter,\n String select,\n String expand,\n Context context) {\n return new PagedIterable<>(\n listAsync(resourceGroupName, virtualMachineScaleSetName, filter, select, expand, context));\n }", "public Iterator<VirtualMachine> iterator() {\n return mapped_vms.iterator();\n }", "@ServiceMethod(returns = ReturnType.COLLECTION)\n public PagedFlux<VirtualMachineScaleSetVMInner> listAsync(\n String resourceGroupName, String virtualMachineScaleSetName) {\n final String filter = null;\n final String select = null;\n final String expand = null;\n return new PagedFlux<>(\n () -> listSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, filter, select, expand),\n nextLink -> listNextSinglePageAsync(nextLink));\n }", "public String[] getVirtualHosts() {\n return _virtualHosts;\n }", "@ServiceMethod(returns = ReturnType.COLLECTION)\n public PagedIterable<VirtualMachineScaleSetVMInner> list(\n String resourceGroupName, String virtualMachineScaleSetName) {\n final String filter = null;\n final String select = null;\n final String expand = null;\n return new PagedIterable<>(listAsync(resourceGroupName, virtualMachineScaleSetName, filter, select, expand));\n }", "public ArrayList<VirtualMachineVMImageListResponse.VirtualMachineVMImage> getVMImages() {\n return this.vMImages;\n }", "public Set<Long> getVirtualSystemIds() {\n return virtualSystemIds;\n }", "@ServiceMethod(returns = ReturnType.COLLECTION)\n public PagedFlux<VirtualMachineScaleSetVMInner> listAsync(\n String resourceGroupName, String virtualMachineScaleSetName, String filter, String select, String expand) {\n return new PagedFlux<>(\n () -> listSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, filter, select, expand),\n nextLink -> listNextSinglePageAsync(nextLink));\n }", "public List<Vet> getAllVets() {\n\t\tentityManager = JPAUtils.getEntityManager();\n\t\tentityManager.getTransaction().begin();\n\t\tvets = entityManager.createQuery(\"from Vet\", Vet.class).getResultList();\n\t\tentityManager.getTransaction().commit();\n\t\tentityManager.close();\n\t\treturn vets;\n\t}", "private PhysicalMachineVec getUsedPhysicalMachines(PriorityQueue<UsageInfo> pm_heap) {\n PhysicalMachineVec used_pms = new PhysicalMachineVec();\n for (Iterator<UsageInfo> it = pm_heap.iterator(); it.hasNext();) {\n UsageInfo info = it.next();\n if (!info.isEmpty()) {\n used_pms.push(info.getPhysicalMachine());\n }\n }\n return used_pms;\n }", "List<PhysicalTable> getPhysicalTables();", "public List<Machinecomponent> findByName(String name) {\n\t\treturn findByCriteria(Restrictions.eq(\"name\", name));\n\t}", "public List<SizeInfo> vmSizes() {\n return this.vmSizes;\n }", "public ArrayList<Card> getMachineCards() {\n\t\treturn this.machine;\n\t}", "public List<Voto> getVotos(){\n\t\treturn em.createQuery(\"SELECT c from Voto c\", Voto.class).getResultList();\n\t}", "public List<SubResource> resolutionVirtualNetworks() {\n return this.resolutionVirtualNetworks;\n }", "@Override\n\tpublic List<Parking> VIPparkings() {\n\t\treturn parkingRepository.VIPparkings();\n\t}", "VirtualMachine getByResourceGroup(String resourceGroupName, String virtualMachineName);", "VirtualMachine getByResourceGroup(String resourceGroupName, String virtualMachineName);", "public java.util.List<io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsVirtualDomain> getVirtualDomainsList() {\n if (virtualDomainsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(virtualDomains_);\n } else {\n return virtualDomainsBuilder_.getMessageList();\n }\n }", "public int getSizeVirtualMachine(){\n\t\treturn vms.size();\n\t}", "public List<VirtualHost> getHosts() {\r\n return this.hosts;\r\n }", "public List<MhsmVirtualNetworkRule> virtualNetworkRules() {\n return this.virtualNetworkRules;\n }", "public interface VirtualMachines {\n /**\n * The operation to assess patches on a vSphere VMware machine identity in Azure.\n *\n * @param resourceGroupName The name of the resource group.\n * @param name The name of the vSphere VMware machine.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return describes the properties of an AssessPatches result.\n */\n VirtualMachineAssessPatchesResult assessPatches(String resourceGroupName, String name);\n\n /**\n * The operation to assess patches on a vSphere VMware machine identity in Azure.\n *\n * @param resourceGroupName The name of the resource group.\n * @param name The name of the vSphere VMware machine.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return describes the properties of an AssessPatches result.\n */\n VirtualMachineAssessPatchesResult assessPatches(String resourceGroupName, String name, Context context);\n\n /**\n * The operation to install patches on a vSphere VMware machine identity in Azure.\n *\n * @param resourceGroupName The name of the resource group.\n * @param name The name of the vSphere VMware machine.\n * @param installPatchesInput Input for InstallPatches as directly received by the API.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the result summary of an installation operation.\n */\n VirtualMachineInstallPatchesResult installPatches(\n String resourceGroupName, String name, VirtualMachineInstallPatchesParameters installPatchesInput);\n\n /**\n * The operation to install patches on a vSphere VMware machine identity in Azure.\n *\n * @param resourceGroupName The name of the resource group.\n * @param name The name of the vSphere VMware machine.\n * @param installPatchesInput Input for InstallPatches as directly received by the API.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the result summary of an installation operation.\n */\n VirtualMachineInstallPatchesResult installPatches(\n String resourceGroupName,\n String name,\n VirtualMachineInstallPatchesParameters installPatchesInput,\n Context context);\n\n /**\n * Gets a virtual machine.\n *\n * <p>Implements virtual machine GET method.\n *\n * @param resourceGroupName The Resource Group Name.\n * @param virtualMachineName Name of the virtual machine resource.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return define the virtualMachine.\n */\n VirtualMachine getByResourceGroup(String resourceGroupName, String virtualMachineName);\n\n /**\n * Gets a virtual machine.\n *\n * <p>Implements virtual machine GET method.\n *\n * @param resourceGroupName The Resource Group Name.\n * @param virtualMachineName Name of the virtual machine resource.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return define the virtualMachine along with {@link Response}.\n */\n Response<VirtualMachine> getByResourceGroupWithResponse(\n String resourceGroupName, String virtualMachineName, Context context);\n\n /**\n * Deletes an virtual machine.\n *\n * <p>Implements virtual machine DELETE method.\n *\n * @param resourceGroupName The Resource Group Name.\n * @param virtualMachineName Name of the virtual machine resource.\n * @param force Whether force delete was specified.\n * @param retain Whether to just disable the VM from azure and retain the VM in the VMM.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void delete(String resourceGroupName, String virtualMachineName, Boolean force, Boolean retain);\n\n /**\n * Deletes an virtual machine.\n *\n * <p>Implements virtual machine DELETE method.\n *\n * @param resourceGroupName The Resource Group Name.\n * @param virtualMachineName Name of the virtual machine resource.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void delete(String resourceGroupName, String virtualMachineName);\n\n /**\n * Deletes an virtual machine.\n *\n * <p>Implements virtual machine DELETE method.\n *\n * @param resourceGroupName The Resource Group Name.\n * @param virtualMachineName Name of the virtual machine resource.\n * @param force Whether force delete was specified.\n * @param retain Whether to just disable the VM from azure and retain the VM in the VMM.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void delete(String resourceGroupName, String virtualMachineName, Boolean force, Boolean retain, Context context);\n\n /**\n * Implements the operation to stop a virtual machine.\n *\n * <p>Stop virtual machine.\n *\n * @param resourceGroupName The Resource Group Name.\n * @param virtualMachineName Name of the virtual machine resource.\n * @param body Virtualmachine stop action payload.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void stop(String resourceGroupName, String virtualMachineName, StopVirtualMachineOptions body);\n\n /**\n * Implements the operation to stop a virtual machine.\n *\n * <p>Stop virtual machine.\n *\n * @param resourceGroupName The Resource Group Name.\n * @param virtualMachineName Name of the virtual machine resource.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void stop(String resourceGroupName, String virtualMachineName);\n\n /**\n * Implements the operation to stop a virtual machine.\n *\n * <p>Stop virtual machine.\n *\n * @param resourceGroupName The Resource Group Name.\n * @param virtualMachineName Name of the virtual machine resource.\n * @param body Virtualmachine stop action payload.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void stop(String resourceGroupName, String virtualMachineName, StopVirtualMachineOptions body, Context context);\n\n /**\n * Implements the operation to start a virtual machine.\n *\n * <p>Start virtual machine.\n *\n * @param resourceGroupName The Resource Group Name.\n * @param virtualMachineName Name of the virtual machine resource.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void start(String resourceGroupName, String virtualMachineName);\n\n /**\n * Implements the operation to start a virtual machine.\n *\n * <p>Start virtual machine.\n *\n * @param resourceGroupName The Resource Group Name.\n * @param virtualMachineName Name of the virtual machine resource.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void start(String resourceGroupName, String virtualMachineName, Context context);\n\n /**\n * Implements the operation to restart a virtual machine.\n *\n * <p>Restart virtual machine.\n *\n * @param resourceGroupName The Resource Group Name.\n * @param virtualMachineName Name of the virtual machine resource.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void restart(String resourceGroupName, String virtualMachineName);\n\n /**\n * Implements the operation to restart a virtual machine.\n *\n * <p>Restart virtual machine.\n *\n * @param resourceGroupName The Resource Group Name.\n * @param virtualMachineName Name of the virtual machine resource.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void restart(String resourceGroupName, String virtualMachineName, Context context);\n\n /**\n * Implements GET virtualMachines in a subscription.\n *\n * <p>List of virtualMachines in a subscription.\n *\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return list of VirtualMachines as paginated response with {@link PagedIterable}.\n */\n PagedIterable<VirtualMachine> list();\n\n /**\n * Implements GET virtualMachines in a subscription.\n *\n * <p>List of virtualMachines in a subscription.\n *\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return list of VirtualMachines as paginated response with {@link PagedIterable}.\n */\n PagedIterable<VirtualMachine> list(Context context);\n\n /**\n * Implements GET virtualMachines in a resource group.\n *\n * <p>List of virtualMachines in a resource group.\n *\n * @param resourceGroupName The Resource Group Name.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return list of VirtualMachines as paginated response with {@link PagedIterable}.\n */\n PagedIterable<VirtualMachine> listByResourceGroup(String resourceGroupName);\n\n /**\n * Implements GET virtualMachines in a resource group.\n *\n * <p>List of virtualMachines in a resource group.\n *\n * @param resourceGroupName The Resource Group Name.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return list of VirtualMachines as paginated response with {@link PagedIterable}.\n */\n PagedIterable<VirtualMachine> listByResourceGroup(String resourceGroupName, Context context);\n\n /**\n * Gets a virtual machine.\n *\n * <p>Implements virtual machine GET method.\n *\n * @param id the resource ID.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return define the virtualMachine along with {@link Response}.\n */\n VirtualMachine getById(String id);\n\n /**\n * Gets a virtual machine.\n *\n * <p>Implements virtual machine GET method.\n *\n * @param id the resource ID.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return define the virtualMachine along with {@link Response}.\n */\n Response<VirtualMachine> getByIdWithResponse(String id, Context context);\n\n /**\n * Deletes an virtual machine.\n *\n * <p>Implements virtual machine DELETE method.\n *\n * @param id the resource ID.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void deleteById(String id);\n\n /**\n * Deletes an virtual machine.\n *\n * <p>Implements virtual machine DELETE method.\n *\n * @param id the resource ID.\n * @param force Whether force delete was specified.\n * @param retain Whether to just disable the VM from azure and retain the VM in the VMM.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void deleteByIdWithResponse(String id, Boolean force, Boolean retain, Context context);\n\n /**\n * Begins definition for a new VirtualMachine resource.\n *\n * @param name resource name.\n * @return the first stage of the new VirtualMachine definition.\n */\n VirtualMachine.DefinitionStages.Blank define(String name);\n}", "List<Computer> findAll();", "@SuppressWarnings(\"unchecked\")\n\tpublic List<Machinecomponent> findByMachineID(Long machineID) {\n\t\treturn findByCriteria(Restrictions.eq(\"machine.machineID\", machineID));\n\t}", "public VirtualMachine getVirtualMachine()\n {\n return vm;\n }", "public Map<String, Host> getVmTable() {\n\t\treturn vmTable;\n\t}", "public VirtualMachine getVM() {\n return _vm;\n }", "@java.lang.Override\n public java.util.List<io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsVirtualDomain> getVirtualDomainsList() {\n return virtualDomains_;\n }", "public Set<String> getVirtualSystemTypes() {\n return virtualSystemTypes;\n }", "@Override\n\tpublic DataVO<CitrixDesktopMachine> list(CitrixDesktopMachineForm f) {\n\t\treturn null;\n\t}", "public MyVM(String virtual_machine_name)\n {\n \ttry\n \t{\n \t\tthis.vmname= virtual_machine_name;\n \t\tthis.si=new ServiceInstance(new URL(SJSULAB.getVmwareHostURL()),\n\t\t\t\t\tSJSULAB.getVmwareLogin(), SJSULAB.getVmwarePassword(), true);\n \t\t\n \t\tthis.folder = si.getRootFolder();\n \t\tthis.vm=(VirtualMachine) new InventoryNavigator(folder).searchManagedEntity(\"VirtualMachine\",\n \t\t\t\tthis.vmname);\n \t\tSystem.out.println(\"MyVM, vm value : \"+vm);\n \t\t\n \t\tthis.hs= (HostSystem) new InventoryNavigator(folder).searchManagedEntity(\"HostSystem\", \"130.65.132.194\");\n \t\tSystem.out.println(\"MyVM, HS value : \"+hs);\n \t\tthis.snapshotname=\"snap2\";\n \t\t\n \t}\n \tcatch(Exception e)\n \t{\n \t\tSystem.out.println(e.toString());\n \t}\n }", "public String vmwareMachineId() {\n return this.vmwareMachineId;\n }", "public Iterator<VirtualMachineVMImageListResponse.VirtualMachineVMImage> iterator() {\n return this.getVMImages().iterator();\n }", "public Collection getListaPartidosEleicaoVotos(){\n return this.eleicaoDB.getListaPartidosEleicaoVotos();\n }", "List<PCDevice> getAllPC();", "java.util.List<com.google.cloud.compute.v1.AcceleratorConfig> getGuestAcceleratorsList();", "@Override\r\n\tpublic List<Mobile> showAllProduct() {\n\t\tQuery query=entitymanager.createQuery(\"FROM Mobile\");\r\n\t\tList<Mobile> myProd=query.getResultList();\r\n\t\treturn myProd;\r\n\t}", "public Worklist[] getWorklists() throws MEMEException {\n configureClient(client);\n client.setMidService(getMidService());\n return client.getCurrentWorklists();\n }", "public List<SubResource> registrationVirtualNetworks() {\n return this.registrationVirtualNetworks;\n }", "private List<Machine> placeholderMachines(List<String> names) {\n List<Machine> placeholderMachines = Lists.newArrayListWithCapacity(names.size());\n VsphereProvisioningTemplate provisioningTemplate = driverConfig\n .parseProvisioningTemplate(VsphereProvisioningTemplate.class);\n\n for (String name : names) {\n placeholderMachines.add(Machine.builder().id(name).cloudProvider(CloudProviders.VSPHERE)\n .machineSize(\"unknown\").region(provisioningTemplate.getResourcePool())\n .machineState(MachineState.PENDING).launchTime(UtcTime.now()).build());\n }\n return placeholderMachines;\n }", "public Collection<String> listDevices();", "public VirtualMachineVMImageListResponse() {\n super();\n this.setVMImages(new LazyArrayList<VirtualMachineVMImageListResponse.VirtualMachineVMImage>());\n }", "@ZAttr(id=352)\n public String[] getVirtualHostname() {\n return getMultiAttr(Provisioning.A_zimbraVirtualHostname);\n }", "public List<ServiceInstance> getAllInstances();", "public Map<String, VPlexVirtualVolumeInfo> getVirtualVolumes(boolean shallow) throws VPlexApiException {\n s_logger.info(\"Request for {} discovery of virtual volume info for VPlex at {}\",\n (shallow ? \"shallow\" : \"deep\"), _baseURI);\n\n Map<String, VPlexVirtualVolumeInfo> virtualVolumeInfoMap = new HashMap<String, VPlexVirtualVolumeInfo>();\n Map<String, VPlexVirtualVolumeInfo> distributedVirtualVolumesMap = new HashMap<String, VPlexVirtualVolumeInfo>();\n Map<String, Map<String, VPlexVirtualVolumeInfo>> localVirtualVolumesMap = new HashMap<String, Map<String, VPlexVirtualVolumeInfo>>();\n\n // Get the cluster information.\n List<VPlexClusterInfo> clusterInfoList = getClusterInfoLite();\n for (VPlexClusterInfo clusterInfo : clusterInfoList) {\n String clusterId = clusterInfo.getName();\n // for each cluster get the virtual volume information.\n List<VPlexVirtualVolumeInfo> clusterVirtualVolumeInfoList = _discoveryMgr.getVirtualVolumesForCluster(clusterId);\n for (VPlexVirtualVolumeInfo virtualVolumeInfo : clusterVirtualVolumeInfoList) {\n virtualVolumeInfo.addCluster(clusterId);\n String virtualVolumeName = virtualVolumeInfo.getName();\n\n if (!virtualVolumeInfoMap.containsKey(virtualVolumeName)) {\n // We want the unique list of virtual volumes on all\n // clusters. Distributed volumes will appear on both\n // clusters.\n virtualVolumeInfoMap.put(virtualVolumeName, virtualVolumeInfo);\n\n // If we are doing a deep discovery of the virtual volumes\n // keep a list of the distributed virtual volumes and a list\n // of the local virtual volumes for each cluster.\n if (!shallow) {\n String supportingDeviceName = virtualVolumeInfo.getSupportingDevice();\n if (VPlexVirtualVolumeInfo.Locality.distributed.name().equals(\n virtualVolumeInfo.getLocality())) {\n distributedVirtualVolumesMap.put(supportingDeviceName,\n virtualVolumeInfo);\n } else {\n Map<String, VPlexVirtualVolumeInfo> clusterLocalVolumesMap = localVirtualVolumesMap\n .get(clusterId);\n if (clusterLocalVolumesMap == null) {\n clusterLocalVolumesMap = new HashMap<String, VPlexVirtualVolumeInfo>();\n localVirtualVolumesMap.put(clusterId, clusterLocalVolumesMap);\n }\n clusterLocalVolumesMap.put(supportingDeviceName, virtualVolumeInfo);\n }\n }\n } else if (VPlexVirtualVolumeInfo.Locality.distributed.name().equals(\n virtualVolumeInfo.getLocality())) {\n // on a distributed volume, we need to be sure to add the second\n // cluster id as well... this is needed by ingestion. see CTRL-10982\n virtualVolumeInfoMap.get(virtualVolumeName).addCluster(clusterId);\n }\n }\n }\n // Do the deep discovery of the component structure for each\n // virtual volume, if necessary.\n if (!shallow) {\n // Get the component structure for each distributed virtual volume\n // starting with the supporting distributed device.\n _discoveryMgr.setSupportingComponentsForDistributedVirtualVolumes(distributedVirtualVolumesMap);\n\n // Get the component structure for each local virtual volume\n // starting with the supporting local device.\n for (Map.Entry<String, Map<String, VPlexVirtualVolumeInfo>> mapEntry : localVirtualVolumesMap\n .entrySet()) {\n _discoveryMgr.setSupportingComponentsForLocalVirtualVolumes(\n mapEntry.getKey(), mapEntry.getValue());\n }\n }\n\n return virtualVolumeInfoMap;\n }", "@Override\n\tpublic List<VIP> findAllVIP() {\n\t\treturn vb.findAll();\n\t}", "public VirtualMachinesStatistics getStatistics() {\n return statistics;\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}", "@RequestMapping(value=VideoSvcApi.VIDEO_SVC_PATH, method=RequestMethod.GET)\n\tpublic @ResponseBody Collection<Video> getVideos() {\n\t\treturn videos;\n\t}", "public static ArrayList<InstanceEntity> getInstances() {\n ILifeCycleServiceRest resourceserviceproxy =\n ConsumerFactory.createConsumer(MsbUtil.getNsocLifecycleBaseUrl(),\n ILifeCycleServiceRest.class);\n String result = \"\";\n try {\n result = resourceserviceproxy.getVnfInstances();\n } catch (Exception e1) {\n LOG.error(\"query vim info faild.\", e1);\n return null;\n }\n if (ToolUtil.isEmptyString(result)) {\n return null;\n }\n\n Gson gson = new Gson();\n Type listType = new TypeToken<ArrayList<InstanceEntity>>() {}.getType();\n return gson.fromJson(result, listType);\n }", "public List<Vehicle> getVehicles() {\n\t\tList<Vehicle> vehicleList = new ArrayList<Vehicle>();\n\t\tif ((vehicles == null)||(vehicles.isEmpty())) { // call DAO method getCustomers to retrieve list of customer objects from database\n\t\t\ttry {\n\t\t\t\tvehicleList = vehicleService.getAllVehicles();\n\t\t\t} catch (Exception e) {\n\t\t\t\tcurrentInstance = FacesContext.getCurrentInstance();\n\t\t\t\tFacesMessage message = null;\n\t\t\t\tmessage = new FacesMessage(FacesMessage.SEVERITY_ERROR,\"Failed\",\"Failed to retrieve vehicles from the database\" + e.getMessage());\n\t\t\t\tcurrentInstance.addMessage(null, message);\n\t\t\t}\n\t\t} else {\n\t\t\tvehicleList = vehicles;\n\t\t}\n\t\treturn vehicleList;\n\t}", "public List<Video> getVideoList() {\n return (ArrayList<Video>) mVideoServiceProxy.getVideos();\n }", "java.util.List<go.micro.runtime.RuntimeOuterClass.Service> \n getServicesList();", "java.util.List<go.micro.runtime.RuntimeOuterClass.Service> \n getServicesList();", "List<Long> getServers();", "private List<VM> getFreeVmsWS(DAG dag) {\r\n\t\tSet<VM> vms = getWorkflowEngine().getFreeVMs();\r\n\t\tList<VM> freeVms = new ArrayList<VM>();\r\n\t\tfor (VM vm : vms) {\r\n\t\t\t// make sure the VM is really free...sometimes the vm list in the\r\n\t\t\t// engine is not updated on time\r\n\t\t\tif (vm.getRunningJobs().isEmpty() && vm.getWaitingInputJobs().isEmpty()) {\r\n\t\t\t\tif (wfVms.containsKey(vm)) {\r\n\t\t\t\t\tif (wfVms.get(vm).equals(dag.getName().substring(0,2))) {\r\n\t\t\t\t\t\tfreeVms.add(vm);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn freeVms;\r\n\t}", "public List<Vehicle> getVehicles() {\n\t\treturn vehicles;\n\t\t\n\t}", "VM getVM();", "public List<VideoBlockModel> getVideos() {\n return (List<VideoBlockModel>) (List) getVideos(false);\n }", "public int getNumVMs() {\n return numVMs;\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}", "public List<RegionServer> regionServers() {\n\t\tBufferedReader bufReader = null;\n\t\tInputStreamReader input = null;\n\t\tList<RegionServer> list = new ArrayList<>();\n\t\ttry {\n\t\t\tURL url = new URL(HBase.HTTP + SystemConfig.getProperty(\"hive.cube.hbase.master\") + HBase.HBASE_REGION_SERVER_JMX);\n\t\t\tHttpURLConnection httpConn = (HttpURLConnection) url.openConnection();\n\t\t\tinput = new InputStreamReader(httpConn.getInputStream(), \"UTF-8\");\n\t\t\tbufReader = new BufferedReader(input);\n\t\t\tString line = \"\";\n\t\t\tStringBuilder contentBuf = new StringBuilder();\n\t\t\twhile ((line = bufReader.readLine()) != null) {\n\t\t\t\tcontentBuf.append(line);\n\t\t\t}\n\t\t\tJSONObject tmpBuf = JSON.parseObject(contentBuf.toString());\n\t\t\tJSONObject object = (JSONObject) JSON.parseArray(tmpBuf.getString(\"beans\")).get(0);\n\t\t\tString[] liveRegionServers = object.getString(\"tag.liveRegionServers\").split(\";\");\n\t\t\tfor (String node : liveRegionServers) {\n\t\t\t\tif (node.length() != 0) {\n\t\t\t\t\tRegionServer region = new RegionServer();\n\t\t\t\t\tregion.setRegionName(node.split(\",\")[0] + \":\" + node.split(\",\")[1]);\n\t\t\t\t\tregion.setStartTime(CalendarUtils.convertUnixTime(Long.parseLong(node.split(\",\")[2])));\n\t\t\t\t\tregion.setLive(true);\n\t\t\t\t\tlist.add(region);\n\t\t\t\t}\n\t\t\t}\n\t\t\tString[] deadRegionServers = object.getString(\"tag.deadRegionServers\").split(\";\");\n\t\t\tfor (String node : deadRegionServers) {\n\t\t\t\tif (node.length() != 0) {\n\t\t\t\t\tRegionServer region = new RegionServer();\n\t\t\t\t\tregion.setRegionName(node.split(\",\")[0] + \":\" + node.split(\",\")[1]);\n\t\t\t\t\tregion.setStartTime(CalendarUtils.convertUnixTime(Long.parseLong(node.split(\",\")[2])));\n\t\t\t\t\tregion.setLive(false);\n\t\t\t\t\tlist.add(region);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLOG.error(\"Filter[Region] HBase JMX has error,msg is \" + e.getMessage());\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (input != null) {\n\t\t\t\t\tinput.close();\n\t\t\t\t}\n\t\t\t\tif (bufReader != null) {\n\t\t\t\t\tbufReader.close();\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tLOG.error(\"Close IO has error,msg is \" + e.getMessage());\n\t\t\t}\n\t\t}\n\n\t\treturn list;\n\t}", "public void helloVM()\n {\n \ttry {\n\n\t\t\t\n\t\t\tVirtualMachineConfigInfo vminfo = vm.getConfig();\n\t\t\tVirtualMachineCapability vmc = vm.getCapability();\n\t\t\tVirtualMachineRuntimeInfo vmri = vm.getRuntime();\n\t\t\tVirtualMachineSummary vmsum = vm.getSummary();\n\n\t\t\t\n\t\t\tSystem.out.println(\"------------------------------------------\");\n\t\t\tSystem.out.println(\"VM Information : \");\n\t\t\t\n\t\t\tSystem.out.println(\"VM Name: \" + vminfo.getName());\n\t\t\tSystem.out.println(\"VM OS: \" + vminfo.getGuestFullName());\n\t\t\tSystem.out.println(\"VM ID: \" + vminfo.getGuestId());\n\t\t\tSystem.out.println(\"VM Guest IP Address is \" +vm.getGuest().getIpAddress());\n\t\t\t\n\n\t\t\tSystem.out.println(\"------------------------------------------\");\n\t\t\tSystem.out.println(\"Resource Pool Informtion : \");\n\t\t\t\n\t\t\tSystem.out.println(\"Resource pool: \" +vm.getResourcePool());\n\t\t\t\n\t\t\tSystem.out.println(\"VM Parent: \" +vm.getParent());\n\t\t\t//System.out.println(\"VM Values: \" +vm.getValues());\n\t\t\tSystem.out.println(\"Multiple snapshot supported: \"\t+ vmc.isMultipleSnapshotsSupported());\n\t\t\tSystem.out.println(\"Powered Off snapshot supported: \"+vmc.isPoweredOffSnapshotsSupported());\n\t\t\tSystem.out.println(\"Connection State: \" + vmri.getConnectionState());\n\t\t\tSystem.out.println(\"Power State: \" + vmri.getPowerState());\n\t\t\t\n\n\t\t\t//CPU Statistics\n\n\t\t\tSystem.out.println(\"------------------------------------------\");\n\t\t\tSystem.out.println(\"CPU and Memory Statistics\" );\n\t\t\t\n\t\t\tSystem.out.println(\"CPU Usage: \" +vmsum.getQuickStats().getOverallCpuUsage());\n\t\t\tSystem.out.println(\"Max CPU Usage: \" + vmri.getMaxCpuUsage());\n\t\t\tSystem.out.println(\"Memory Usage: \"+vmsum.getQuickStats().getGuestMemoryUsage());\n\t\t\tSystem.out.println(\"Max Memory Usage: \" + vmri.getMaxMemoryUsage());\n\t\t\tSystem.out.println(\"------------------------------------------\");\n\n\t\t} catch (InvalidProperty e) {\n\t\t\te.printStackTrace();\n\t\t} catch (RuntimeFault e) {\n\t\t\te.printStackTrace();\n\t\t} catch (RemoteException e) {\n\t\t\te.printStackTrace();\n\t\t}\n }", "public VirtualMachine getVirtualMachine(int i){\n\t\treturn vms.get(i);\n\t}", "public String[] getVideoDevicesList();", "PhysicalMachine getPhysicalMachine() {\n return pm;\n }", "public Long [] getMonManagedIds() {\n return this.MonManagedIds;\n }", "@Override\n\tpublic List<Parking> vIPavailableParking() {\n\t\treturn parkingRepository.vIPavailableParking();\n\t}", "public List<ServerServices> listServerServices();", "Set<ComputerSnapshot> getSnapshots();", "public Observable<List<Laptop>> getLaptops(){\n return laptopServices.getLaptops();\n }", "@GetMapping({ \"/vets\" })\n\tpublic @ResponseBody Vets showResourcesVetList() {\n\t\tVets vets = new Vets();\n\t\tvets.getVetList().addAll(this.vetRepository.findAll());\n\t\treturn vets;\n\t}", "public List<Machinecomponent> findByCode(String code) {\n\t\treturn findByCriteria(Restrictions.eq(\"code\", code));\n\t}", "public int getNumberOfHostOnMobile(){\n\t\t\treturn vmList.size();\n\t\t}", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<MarcaEntities> list() {\n\t\tList<MarcaEntities> lista = new ArrayList<MarcaEntities>();\n\t\ttry {\n\t\t\tQuery q = em.createQuery(\"from MarcaEntities m\");\n\t\t\tlista = (List<MarcaEntities>) q.getResultList();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error al listar una Marca: \" + e);\n\t\t}\n\t\treturn lista;\n\t}", "java.util.List<MateriliazedView>\n getViewsList();", "public Vector getResultObjects() {\n\treturn _vcResults;\n }", "public Vector<Cars> getCars() {\n\t\tVector<Cars> v = new Vector<Cars>();\n\t\ttry {\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\tResultSet rs = stmt\n\t\t\t\t\t.executeQuery(\"select * from vehicle_details order by vehicle_reg\");\n\t\t\twhile (rs.next()) {\n\t\t\t\tString reg = rs.getString(1);\n\t\t\t\tString make = rs.getString(2);\n\t\t\t\tString model = rs.getString(3);\n\t\t\t\tString drive = rs.getString(4);\n\t\t\t\tCars cars = new Cars(reg, make, model, drive);\n\t\t\t\tv.add(cars);\n\t\t\t}\n\t\t}\n\n\t\tcatch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn v;\n\t}", "List<String> getHosts();", "@ZAttr(id=562)\n public String[] getVirtualIPAddress() {\n return getMultiAttr(Provisioning.A_zimbraVirtualIPAddress);\n }", "public List<V1Volume> getVolumes() {\n return volumes;\n }", "public List<Partition> getPartitions() {\n return partitions;\n }", "@Override\n\tpublic List<TvShow> findAll() throws SystemException {\n\t\treturn findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null);\n\t}", "public List<ProductModel> getAllDevices() {\n\t\tSystem.out.println(\"\\nNetworkDevServ-getAllDev()\");\r\n\t\treturn deviceData.getAllDevices();\r\n\t}" ]
[ "0.7743158", "0.74124056", "0.732596", "0.67864436", "0.6561057", "0.64595276", "0.64566284", "0.64428", "0.6223648", "0.6134944", "0.5916764", "0.5869538", "0.58595765", "0.5851662", "0.58228713", "0.58207923", "0.5767589", "0.57450145", "0.57280326", "0.5695068", "0.56891316", "0.56438994", "0.55460143", "0.55176926", "0.55093193", "0.5472031", "0.54294324", "0.5387793", "0.5383807", "0.53709614", "0.5343694", "0.53197426", "0.53197426", "0.5318489", "0.5312526", "0.5298254", "0.5292011", "0.52919483", "0.52821106", "0.52808285", "0.5274117", "0.5268018", "0.52472097", "0.5239096", "0.5232173", "0.52070016", "0.51905465", "0.51823604", "0.5180163", "0.5177041", "0.51722676", "0.51672", "0.5164982", "0.515599", "0.51549494", "0.51293576", "0.5122941", "0.5102031", "0.5084404", "0.5082073", "0.50655186", "0.505453", "0.50521374", "0.5051209", "0.50506765", "0.5047022", "0.5040946", "0.5040829", "0.5030737", "0.5030737", "0.5024044", "0.5021812", "0.5020712", "0.5020661", "0.50142497", "0.49793002", "0.49774858", "0.4976574", "0.4964877", "0.49581367", "0.4957481", "0.4955085", "0.49511886", "0.4944918", "0.49235973", "0.49198252", "0.4918648", "0.49180624", "0.49177745", "0.4917048", "0.4904787", "0.48777166", "0.4873235", "0.4871776", "0.48704433", "0.48593843", "0.48552573", "0.48551613", "0.4829965", "0.48293135" ]
0.82640564
0
Gets the list of virtual machines in the physical machine matching the given filter.
public List<VirtualMachine> listVirtualMachines(final Predicate<VirtualMachine> filter) { return Lists.newLinkedList(filter(listVirtualMachines(), filter)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<VirtualMachine> listRemoteVirtualMachines(final Predicate<VirtualMachine> filter) {\n return Lists.newLinkedList(filter(listVirtualMachines(), filter));\n }", "public List<VirtualMachine> listVirtualMachines() {\n MachineOptions options = MachineOptions.builder().sync(false).build();\n VirtualMachinesWithNodeExtendedDto vms = context.getApi().getInfrastructureApi()\n .listVirtualMachinesByMachine(target, options);\n return wrap(context, VirtualMachine.class, vms.getCollection());\n }", "public List<VirtualMachine> listRemoteVirtualMachines() {\n MachineOptions options = MachineOptions.builder().sync(true).build();\n VirtualMachinesWithNodeExtendedDto vms = context.getApi().getInfrastructureApi()\n .listVirtualMachinesByMachine(target, options);\n return wrap(context, VirtualMachine.class, vms.getCollection());\n }", "public List<VirtualMachineDescriptor> listVirtualMachines() {\n ArrayList<VirtualMachineDescriptor> result =\n new ArrayList<VirtualMachineDescriptor>();\n\n MonitoredHost host;\n Set<Integer> vms;\n try {\n host = MonitoredHost.getMonitoredHost(new HostIdentifier((String)null));\n vms = host.activeVms();\n } catch (Throwable t) {\n if (t instanceof ExceptionInInitializerError) {\n t = t.getCause();\n }\n if (t instanceof ThreadDeath) {\n throw (ThreadDeath)t;\n }\n if (t instanceof SecurityException) {\n return result;\n }\n throw new InternalError(t); // shouldn't happen\n }\n\n for (Integer vmid: vms) {\n String pid = vmid.toString();\n String name = pid; // default to pid if name not available\n boolean isAttachable = false;\n MonitoredVm mvm = null;\n try {\n mvm = host.getMonitoredVm(new VmIdentifier(pid));\n try {\n isAttachable = MonitoredVmUtil.isAttachable(mvm);\n // use the command line as the display name\n name = MonitoredVmUtil.commandLine(mvm);\n } catch (Exception e) {\n }\n if (isAttachable) {\n result.add(new HotSpotVirtualMachineDescriptor(this, pid, name));\n }\n } catch (Throwable t) {\n if (t instanceof ThreadDeath) {\n throw (ThreadDeath)t;\n }\n } finally {\n if (mvm != null) {\n mvm.detach();\n }\n }\n }\n return result;\n }", "@ServiceMethod(returns = ReturnType.COLLECTION)\n private PagedFlux<VirtualMachineScaleSetVMInner> listAsync(\n String resourceGroupName,\n String virtualMachineScaleSetName,\n String filter,\n String select,\n String expand,\n Context context) {\n return new PagedFlux<>(\n () -> listSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, filter, select, expand, context),\n nextLink -> listNextSinglePageAsync(nextLink, context));\n }", "@ServiceMethod(returns = ReturnType.COLLECTION)\n public PagedIterable<VirtualMachineScaleSetVMInner> list(\n String resourceGroupName,\n String virtualMachineScaleSetName,\n String filter,\n String select,\n String expand,\n Context context) {\n return new PagedIterable<>(\n listAsync(resourceGroupName, virtualMachineScaleSetName, filter, select, expand, context));\n }", "public NetworkInstance[] queryServers(NetworkFilter filter);", "@ServiceMethod(returns = ReturnType.COLLECTION)\n public PagedFlux<VirtualMachineScaleSetVMInner> listAsync(\n String resourceGroupName, String virtualMachineScaleSetName, String filter, String select, String expand) {\n return new PagedFlux<>(\n () -> listSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, filter, select, expand),\n nextLink -> listNextSinglePageAsync(nextLink));\n }", "public VirtualMachine findVirtualMachine(final Predicate<VirtualMachine> filter) {\n return Iterables.getFirst(filter(listVirtualMachines(), filter), null);\n }", "private EC2DescribeInstancesResponse listVirtualMachines(String[] virtualMachineIds, EC2InstanceFilterSet ifs, List<CloudStackKeyValue> resourceTags)\n throws Exception {\n EC2DescribeInstancesResponse instances = new EC2DescribeInstancesResponse();\n\n if (null == virtualMachineIds || 0 == virtualMachineIds.length) {\n instances = lookupInstances(null, instances, resourceTags);\n } else {\n for (int i = 0; i < virtualMachineIds.length; i++) {\n instances = lookupInstances(virtualMachineIds[i], instances, resourceTags);\n }\n }\n\n if (null == ifs)\n return instances;\n else\n return ifs.evaluate(instances);\n }", "public VirtualMachine findRemoteVirtualMachine(final Predicate<VirtualMachine> filter) {\n return Iterables.getFirst(filter(listVirtualMachines(), filter), null);\n }", "public VirtualMachines getVirtualMachines() {\n return virtualMachines;\n }", "public static ArrayList<VirtualMachine> getListVms(ServiceInstance si,String vmname) throws InvalidProperty, RuntimeFault, RemoteException, MalformedURLException{\n\t\t\tHostSystem hs= hostByname(vmname,si);\n\t\t\t//System.out.println(hs.getName());\n\t\t\tFolder rootFolder = si.getRootFolder();\n\t\t\tString name = rootFolder.getName();\n\t\t\tSystem.out.println(\"root:\" + name);\n\t\t\tSystem.out.println(\"====================================================================\");\n\t\t\tArrayList<VirtualMachine> vms = new ArrayList<VirtualMachine>();\n\t\t\tManagedEntity[] mes = new InventoryNavigator(hs).searchManagedEntities(new String[][] { {\"VirtualMachine\", \"name\" }, }, true);\n\t\t\tfor(int i=0;i<mes.length;i++){\n\t\t\t\tvms.add((VirtualMachine)mes[i]);\n\t\t\t}\n\t\t\treturn vms;\n\t\t\t\n\t\t}", "private List<VM> getFreeVmsWS(DAG dag) {\r\n\t\tSet<VM> vms = getWorkflowEngine().getFreeVMs();\r\n\t\tList<VM> freeVms = new ArrayList<VM>();\r\n\t\tfor (VM vm : vms) {\r\n\t\t\t// make sure the VM is really free...sometimes the vm list in the\r\n\t\t\t// engine is not updated on time\r\n\t\t\tif (vm.getRunningJobs().isEmpty() && vm.getWaitingInputJobs().isEmpty()) {\r\n\t\t\t\tif (wfVms.containsKey(vm)) {\r\n\t\t\t\t\tif (wfVms.get(vm).equals(dag.getName().substring(0,2))) {\r\n\t\t\t\t\t\tfreeVms.add(vm);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn freeVms;\r\n\t}", "public List<VirtualMachine> search(SearchCriteria searchCriteria, SearchMode mode,\n List<SearchCriterionType> searchOrder);", "public ArrayList<String[]> getAllVacations(String filterChoice, String filterChoiceForSearch) {\n return model.getAllVacations();\n }", "@Override\n @GET\n @Path(\"/vms\")\n @Produces(\"application/json\")\n public Response getVMs() throws Exception {\n log.trace(\"getVMs() started.\");\n JSONArray json = new JSONArray();\n for (Vm vm : cluster.getVmList()) {\n JSONObject o = new JSONObject();\n String uri = String.format(\"%s/vms/%d\", rootUri, vm.getVmId());\n String vmUri = String.format(\"/providers/%d/vms/%d\", provider.getProviderId(), vm.getVmId());\n o.put(\"uri\", uri);\n o.put(\"baseUri\", vmUri);\n json.put(o);\n }\n\n log.trace(\"getVMs() finished successfully.\");\n return Response.ok(json.toString()).build();\n }", "List<List<String>> getFilters(String resource);", "List<DeviceDetails> getDevices(Predicate<DeviceDetails> deviceFilter);", "VirtualMachine[] getPlacedVirtualMachines() {\n VirtualMachine[] vms = new VirtualMachine[mapped_vms.size()];\n mapped_vms.toArray(vms);\n return vms;\n }", "public List<Computer> getAll(){\n\t\treturn getWithLimit(-1,-1);\n\t}", "public void printVirtualMachines() throws InvalidProperty, RuntimeFault, RemoteException{\r\n\t\tManagedEntity[] mes = new\r\n\t\t\t\tInventoryNavigator(_instance.getRootFolder()).searchManagedEntities(\"VirtualMachine\");\r\n\t\tfor (int i = 0; i < mes.length; i++) {\r\n\t\t\tVirtualMachine currVm = (VirtualMachine)mes[i];\r\n\t\t\tSystem.out.printf(\"vm[%d]: Name = %s\\n\", i, currVm.getName());\r\n\t\t}\r\n\t}", "<E extends CtElement> List<E> getElements(Filter<E> filter);", "ArrayList<Match> getMatchList( Filter filter ) {\n return list;\n }", "public List<PlantDTO> fetchPlants(String filter);", "@ServiceMethod(returns = ReturnType.COLLECTION)\n public PagedFlux<VirtualMachineScaleSetVMInner> listAsync(\n String resourceGroupName, String virtualMachineScaleSetName) {\n final String filter = null;\n final String select = null;\n final String expand = null;\n return new PagedFlux<>(\n () -> listSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, filter, select, expand),\n nextLink -> listNextSinglePageAsync(nextLink));\n }", "List<Product> getProductsByClientFilter(ClientFilter clientFilter) throws ServiceException;", "private PhysicalMachineVec getUsedPhysicalMachines(PriorityQueue<UsageInfo> pm_heap) {\n PhysicalMachineVec used_pms = new PhysicalMachineVec();\n for (Iterator<UsageInfo> it = pm_heap.iterator(); it.hasNext();) {\n UsageInfo info = it.next();\n if (!info.isEmpty()) {\n used_pms.push(info.getPhysicalMachine());\n }\n }\n return used_pms;\n }", "List<Computer> findAll();", "List<String> getFilters();", "@ServiceMethod(returns = ReturnType.COLLECTION)\n public PagedIterable<VirtualMachineScaleSetVMInner> list(\n String resourceGroupName, String virtualMachineScaleSetName) {\n final String filter = null;\n final String select = null;\n final String expand = null;\n return new PagedIterable<>(listAsync(resourceGroupName, virtualMachineScaleSetName, filter, select, expand));\n }", "public List<Computer> searchComputers(ComputerSpec searchSpec) {\n List<Computer> matchedComputers = new ArrayList<>();\n\n for (Computer computer : inventory) {\n if (computer.getComputerSpec().matches(searchSpec)) {\n matchedComputers.add(computer);\n }\n }\n return matchedComputers;\n }", "public Collection<Miniserver> getFilteredMiniservers(){\n return this.filteredMiniservers;\n }", "public static ArrayList<Unit> filterUnitsBy(VecUnit units, Predicate<Unit> filter) {\n int numUnits = (int) units.size();\n ArrayList<Unit> result = new ArrayList<>(numUnits);\n for (int i=0; i<numUnits; i++) {\n Unit unit = units.get(i);\n if (filter.test(unit)) result.add(unit);\n }\n return result;\n }", "@Override\n public List runFilter(String filter) {\n return runFilter(\"\", filter);\n }", "java.util.List<org.tensorflow.proto.distruntime.JobDeviceFilters> \n getJobsList();", "public List<LocalCentroComercial> consultarLocalesCentroComercialPorParametro(Map<String, String> filtros);", "@Override\n\tpublic DataVO<CitrixDesktopMachine> list(CitrixDesktopMachineForm f) {\n\t\treturn null;\n\t}", "public List<COSName> getFilters() {\n/* 312 */ List<COSName> retval = null;\n/* 313 */ COSBase filters = this.stream.getFilters();\n/* 314 */ if (filters instanceof COSName) {\n/* */ \n/* 316 */ COSName name = (COSName)filters;\n/* 317 */ retval = new COSArrayList<COSName>(name, (COSBase)name, (COSDictionary)this.stream, COSName.FILTER);\n/* */ }\n/* 319 */ else if (filters instanceof COSArray) {\n/* */ \n/* 321 */ retval = ((COSArray)filters).toList();\n/* */ } \n/* 323 */ return retval;\n/* */ }", "private List<Machine> placeholderMachines(List<String> names) {\n List<Machine> placeholderMachines = Lists.newArrayListWithCapacity(names.size());\n VsphereProvisioningTemplate provisioningTemplate = driverConfig\n .parseProvisioningTemplate(VsphereProvisioningTemplate.class);\n\n for (String name : names) {\n placeholderMachines.add(Machine.builder().id(name).cloudProvider(CloudProviders.VSPHERE)\n .machineSize(\"unknown\").region(provisioningTemplate.getResourcePool())\n .machineState(MachineState.PENDING).launchTime(UtcTime.now()).build());\n }\n return placeholderMachines;\n }", "public List<Contest> searchContests(Filter filter) throws ContestManagementException {\n return null;\r\n }", "@ServiceMethod(returns = ReturnType.COLLECTION)\n public PagedIterable<Device> getAllDevices(String filter) {\n return this.serviceClient.getAllDevices(filter);\n }", "@CacheResult(cacheName = \"prov-software\")\n\t@Query(\"SELECT DISTINCT(ip.software) FROM #{#entityName} ip INNER JOIN ip.type AS i \"\n\t\t\t+ \" WHERE (:node = i.node.id OR :node LIKE CONCAT(i.node.id,':%'))\"\n\t\t\t+ \" AND ip.os=:os AND ip.software IS NOT NULL ORDER BY ip.software\")\n\tList<String> findAllSoftwares(@CacheKey String node, @CacheKey VmOs os);", "public List<ServerHardware> getServers();", "Set<Customer> getCustomers(final CustomerQueryFilter filter);", "public List<UnManagedVolumeRestRep> getByHost(URI hostId, ResourceFilter<UnManagedVolumeRestRep> filter) {\n List<RelatedResourceRep> refs = listByHost(hostId);\n return getByRefs(refs, filter);\n }", "public List<Ve> searchVe(String maSearch);", "public Call<ResponsePaginated<Movie>> getMovies(String filter) {\n return apiService.getMovies(filter);\n }", "public ContentList filterContentList(ContentDatabaseFilter filter) throws DatabaseException;", "public List<RegionServer> regionServers() {\n\t\tBufferedReader bufReader = null;\n\t\tInputStreamReader input = null;\n\t\tList<RegionServer> list = new ArrayList<>();\n\t\ttry {\n\t\t\tURL url = new URL(HBase.HTTP + SystemConfig.getProperty(\"hive.cube.hbase.master\") + HBase.HBASE_REGION_SERVER_JMX);\n\t\t\tHttpURLConnection httpConn = (HttpURLConnection) url.openConnection();\n\t\t\tinput = new InputStreamReader(httpConn.getInputStream(), \"UTF-8\");\n\t\t\tbufReader = new BufferedReader(input);\n\t\t\tString line = \"\";\n\t\t\tStringBuilder contentBuf = new StringBuilder();\n\t\t\twhile ((line = bufReader.readLine()) != null) {\n\t\t\t\tcontentBuf.append(line);\n\t\t\t}\n\t\t\tJSONObject tmpBuf = JSON.parseObject(contentBuf.toString());\n\t\t\tJSONObject object = (JSONObject) JSON.parseArray(tmpBuf.getString(\"beans\")).get(0);\n\t\t\tString[] liveRegionServers = object.getString(\"tag.liveRegionServers\").split(\";\");\n\t\t\tfor (String node : liveRegionServers) {\n\t\t\t\tif (node.length() != 0) {\n\t\t\t\t\tRegionServer region = new RegionServer();\n\t\t\t\t\tregion.setRegionName(node.split(\",\")[0] + \":\" + node.split(\",\")[1]);\n\t\t\t\t\tregion.setStartTime(CalendarUtils.convertUnixTime(Long.parseLong(node.split(\",\")[2])));\n\t\t\t\t\tregion.setLive(true);\n\t\t\t\t\tlist.add(region);\n\t\t\t\t}\n\t\t\t}\n\t\t\tString[] deadRegionServers = object.getString(\"tag.deadRegionServers\").split(\";\");\n\t\t\tfor (String node : deadRegionServers) {\n\t\t\t\tif (node.length() != 0) {\n\t\t\t\t\tRegionServer region = new RegionServer();\n\t\t\t\t\tregion.setRegionName(node.split(\",\")[0] + \":\" + node.split(\",\")[1]);\n\t\t\t\t\tregion.setStartTime(CalendarUtils.convertUnixTime(Long.parseLong(node.split(\",\")[2])));\n\t\t\t\t\tregion.setLive(false);\n\t\t\t\t\tlist.add(region);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLOG.error(\"Filter[Region] HBase JMX has error,msg is \" + e.getMessage());\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (input != null) {\n\t\t\t\t\tinput.close();\n\t\t\t\t}\n\t\t\t\tif (bufReader != null) {\n\t\t\t\t\tbufReader.close();\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tLOG.error(\"Close IO has error,msg is \" + e.getMessage());\n\t\t\t}\n\t\t}\n\n\t\treturn list;\n\t}", "public Iterator<VirtualMachine> iterator() {\n return mapped_vms.iterator();\n }", "@Override\n\tpublic synchronized List<Plantilla> findAll(String filtro){\n\t\tList<Plantilla> lista = new ArrayList<>();\n\t\tfor(Plantilla p:listaPlantillas()){\n\t\t\ttry{\n\t\t\t\tboolean pasoFiltro = (filtro==null||filtro.isEmpty())\n\t\t\t\t\t\t||p.getNombrePlantilla().toLowerCase().contains(filtro.toLowerCase());\n\t\t\t\tif(pasoFiltro){\n\t\t\t\t\tlista.add(p.clone());\n\t\t\t\t}\n\t\t\t}catch(CloneNotSupportedException ex) {\n\t\t\t\tLogger.getLogger(ServicioPlantillaImpl.class.getName()).log(null, ex);\n\t\t\t}\n\t\t}\n\t\tCollections.sort(lista, new Comparator<Plantilla>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(Plantilla o1, Plantilla o2) {\n\t\t\t\treturn (int) (o2.getId() - o1.getId());\n\t\t\t}});\n\t\t\n\t\treturn lista;\n\t}", "private ArrayList<Computer> getInfectList() {\n ArrayList<Computer> infectList = new ArrayList<>();\n\n for (int i = 0; i < computers.length; i++) {\n if (computers[i].isVirus()) {\n for (int j = 0; j < matrix.length; j++) {\n if (matrix[i][j] && !computers[j].isVirus()) {\n infectList.add(computers[j]);\n }\n }\n }\n }\n\n return infectList;\n }", "public List getFiles(HasMetricsFilter filter) {\n if (fileLookup == null) {\n buildFileLookupMap();\n }\n List<BaseFileInfo> result = newArrayList();\n for (BaseFileInfo fileInfo : fileLookup.values()) {\n if (filter.accept(fileInfo)) {\n result.add(fileInfo);\n }\n }\n return result;\n }", "public List<ParameterValueObject> getClustering(Filter filter);", "List<Person> getAllPersonsWithMobile();", "public interface VirtualMachines {\n /**\n * Implements list virtual machine within subscription method\n *\n * <p>Returns list virtual machine within subscription.\n *\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return list of virtual machines as paginated response with {@link PagedIterable}.\n */\n PagedIterable<VirtualMachine> list();\n\n /**\n * Implements list virtual machine within subscription method\n *\n * <p>Returns list virtual machine within subscription.\n *\n * @param filter The filter to apply on the list operation.\n * @param top The maximum number of record sets to return.\n * @param skipToken to be used by nextLink implementation.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return list of virtual machines as paginated response with {@link PagedIterable}.\n */\n PagedIterable<VirtualMachine> list(String filter, Integer top, String skipToken, Context context);\n\n /**\n * Implements list virtual machine within RG method\n *\n * <p>Returns list of virtual machine within resource group.\n *\n * @param resourceGroupName The name of the resource group.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return list of virtual machines as paginated response with {@link PagedIterable}.\n */\n PagedIterable<VirtualMachine> listByResourceGroup(String resourceGroupName);\n\n /**\n * Implements list virtual machine within RG method\n *\n * <p>Returns list of virtual machine within resource group.\n *\n * @param resourceGroupName The name of the resource group.\n * @param filter The filter to apply on the list operation.\n * @param top The maximum number of record sets to return.\n * @param skipToken to be used by nextLink implementation.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return list of virtual machines as paginated response with {@link PagedIterable}.\n */\n PagedIterable<VirtualMachine> listByResourceGroup(\n String resourceGroupName, String filter, Integer top, String skipToken, Context context);\n\n /**\n * Implements virtual machine GET method\n *\n * <p>Get virtual machine.\n *\n * @param resourceGroupName The name of the resource group.\n * @param virtualMachineName virtual machine name.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return virtual machine along with {@link Response}.\n */\n Response<VirtualMachine> getByResourceGroupWithResponse(\n String resourceGroupName, String virtualMachineName, Context context);\n\n /**\n * Implements virtual machine GET method\n *\n * <p>Get virtual machine.\n *\n * @param resourceGroupName The name of the resource group.\n * @param virtualMachineName virtual machine name.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return virtual machine.\n */\n VirtualMachine getByResourceGroup(String resourceGroupName, String virtualMachineName);\n\n /**\n * Implements virtual machine DELETE method\n *\n * <p>Delete virtual machine.\n *\n * @param resourceGroupName The name of the resource group.\n * @param referer referer url.\n * @param virtualMachineName virtual machine name.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void delete(String resourceGroupName, String referer, String virtualMachineName);\n\n /**\n * Implements virtual machine DELETE method\n *\n * <p>Delete virtual machine.\n *\n * @param resourceGroupName The name of the resource group.\n * @param referer referer url.\n * @param virtualMachineName virtual machine name.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void delete(String resourceGroupName, String referer, String virtualMachineName, Context context);\n\n /**\n * Implements a start method for a virtual machine\n *\n * <p>Power on virtual machine.\n *\n * @param resourceGroupName The name of the resource group.\n * @param referer referer url.\n * @param virtualMachineName virtual machine name.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void start(String resourceGroupName, String referer, String virtualMachineName);\n\n /**\n * Implements a start method for a virtual machine\n *\n * <p>Power on virtual machine.\n *\n * @param resourceGroupName The name of the resource group.\n * @param referer referer url.\n * @param virtualMachineName virtual machine name.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void start(String resourceGroupName, String referer, String virtualMachineName, Context context);\n\n /**\n * Implements shutdown, poweroff, and suspend method for a virtual machine\n *\n * <p>Power off virtual machine, options: shutdown, poweroff, and suspend.\n *\n * @param resourceGroupName The name of the resource group.\n * @param referer referer url.\n * @param virtualMachineName virtual machine name.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void stop(String resourceGroupName, String referer, String virtualMachineName);\n\n /**\n * Implements shutdown, poweroff, and suspend method for a virtual machine\n *\n * <p>Power off virtual machine, options: shutdown, poweroff, and suspend.\n *\n * @param resourceGroupName The name of the resource group.\n * @param referer referer url.\n * @param virtualMachineName virtual machine name.\n * @param mode query stop mode parameter (reboot, shutdown, etc...).\n * @param m body stop mode parameter (reboot, shutdown, etc...).\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void stop(\n String resourceGroupName,\n String referer,\n String virtualMachineName,\n StopMode mode,\n VirtualMachineStopMode m,\n Context context);\n\n /**\n * Implements virtual machine GET method\n *\n * <p>Get virtual machine.\n *\n * @param id the resource ID.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return virtual machine along with {@link Response}.\n */\n VirtualMachine getById(String id);\n\n /**\n * Implements virtual machine GET method\n *\n * <p>Get virtual machine.\n *\n * @param id the resource ID.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return virtual machine along with {@link Response}.\n */\n Response<VirtualMachine> getByIdWithResponse(String id, Context context);\n\n /**\n * Implements virtual machine DELETE method\n *\n * <p>Delete virtual machine.\n *\n * @param id the resource ID.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void deleteById(String id);\n\n /**\n * Implements virtual machine DELETE method\n *\n * <p>Delete virtual machine.\n *\n * @param id the resource ID.\n * @param referer referer url.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void deleteByIdWithResponse(String id, String referer, Context context);\n\n /**\n * Begins definition for a new VirtualMachine resource.\n *\n * @param name resource name.\n * @return the first stage of the new VirtualMachine definition.\n */\n VirtualMachine.DefinitionStages.Blank define(String name);\n}", "List<String> getActiveFilters();", "public List<MessageFilter> getFilters();", "public List<Machinecomponent> findByName(String name) {\n\t\treturn findByCriteria(Restrictions.eq(\"name\", name));\n\t}", "public <T> List<T> list(MDSKey startId, @Nullable MDSKey stopId, Type typeOfT, int limit,\n Predicate<T> filter) {\n return Lists.newArrayList(listKV(startId, stopId, typeOfT, limit, filter).values());\n }", "public static system_settings[] get_filtered(nitro_service service, String filter) throws Exception\r\n\t{\r\n\t\tsystem_settings obj = new system_settings();\r\n\t\toptions option = new options();\r\n\t\toption.set_filter(filter);\r\n\t\tsystem_settings[] response = (system_settings[]) obj.getfiltered(service, option);\r\n\t\treturn response;\r\n\t}", "@ServiceMethod(returns = ReturnType.SINGLE)\n private Mono<PagedResponse<VirtualMachineScaleSetVMInner>> listSinglePageAsync(\n String resourceGroupName,\n String virtualMachineScaleSetName,\n String filter,\n String select,\n String expand,\n Context context) {\n if (this.client.getEndpoint() == null) {\n return Mono\n .error(\n new IllegalArgumentException(\n \"Parameter this.client.getEndpoint() is required and cannot be null.\"));\n }\n if (resourceGroupName == null) {\n return Mono\n .error(new IllegalArgumentException(\"Parameter resourceGroupName is required and cannot be null.\"));\n }\n if (virtualMachineScaleSetName == null) {\n return Mono\n .error(\n new IllegalArgumentException(\n \"Parameter virtualMachineScaleSetName is required and cannot be null.\"));\n }\n if (this.client.getSubscriptionId() == null) {\n return Mono\n .error(\n new IllegalArgumentException(\n \"Parameter this.client.getSubscriptionId() is required and cannot be null.\"));\n }\n final String apiVersion = \"2020-06-01\";\n final String accept = \"application/json\";\n context = this.client.mergeContext(context);\n return service\n .list(\n this.client.getEndpoint(),\n resourceGroupName,\n virtualMachineScaleSetName,\n filter,\n select,\n expand,\n apiVersion,\n this.client.getSubscriptionId(),\n accept,\n context)\n .map(\n res ->\n new PagedResponseBase<>(\n res.getRequest(),\n res.getStatusCode(),\n res.getHeaders(),\n res.getValue().value(),\n res.getValue().nextLink(),\n null));\n }", "List<DeviceDetails> getDevices(Predicate<DeviceDetails> deviceFilter, Predicate<DeviceDetails> deviceFilter1);", "public List<COSName> getFilters()\n {\n COSBase filters = stream.getFilters();\n if (filters instanceof COSName)\n {\n return Collections.singletonList((COSName) filters);\n } \n else if (filters instanceof COSArray)\n {\n return (List<COSName>)((COSArray) filters).toList();\n }\n return Collections.emptyList();\n }", "@ServiceMethod(returns = ReturnType.COLLECTION)\n public PagedIterable<Device> getAllDevices(String filter, Context context) {\n return this.serviceClient.getAllDevices(filter, context);\n }", "List<PortEntity> getPorts(Map<String, Object> condition);", "@Override\n public List<Vehicle> getVehiclesByMake(String make){\n List<VehicleDetails> results = repo.findByMake(make);\n return mapper.mapAsList(results, Vehicle.class);\n }", "public List<Vet> getAllVets() {\n\t\tentityManager = JPAUtils.getEntityManager();\n\t\tentityManager.getTransaction().begin();\n\t\tvets = entityManager.createQuery(\"from Vet\", Vet.class).getResultList();\n\t\tentityManager.getTransaction().commit();\n\t\tentityManager.close();\n\t\treturn vets;\n\t}", "List<DeviceDetails> getDevices(Predicate<DeviceDetails> deviceFilter, Predicate<DeviceDetails> deviceFilter2, Predicate<DeviceDetails> deviceFilter3);", "public interface FilterServiceManagementMBean {\n\n\t/**\n\t * Return all registered filters\n\t * \n\t * @return a list of known filters\n\t */\n\tList<String> getFilters();\n\n\t/**\n\t * Return all active with higher priority filter by service\n\t * \n\t * @return a list of used filters\n\t */\n\tList<String> getActiveFilters();\n\n\t/**\n\t * Launch the reinitialization of the filter list (relaod form disk)\n\t * \n\t * @throws IOException\n\t * if an error while reading the file system\n\t */\n\tvoid reinitFilters() throws IOException;\n\n}", "java.util.List<com.google.monitoring.dashboard.v1.DashboardFilter> getDashboardFiltersList();", "@GET\n @Path(\"/filter\")\n @Produces(\"text/plain\")\n public String getFilterWordList() throws JsonProcessingException {\n ObjectMapper mapper = new ObjectMapper();\n return mapper.writeValueAsString(FilterImpl.getList());\n }", "public List<Job> filteredJobsList(Map<String, String> filterParameters) throws IOException,\n\t\t\tClassNotFoundException {\n\t\treturn this.filteredJobsList(filterParameters, 0, 0);\n\t}", "public List<HQ> buscaPorFiltro(TipoFiltro tipoFiltro, String filtro){\n\t\tif(tipoFiltro.equals(TipoFiltro.TITULO)) {\n\t\t\tlogger.info(\"Buscando por filtro de titulo :\"+filtro);\n\t\t\treturn itemRepository.filtraPorTitulo(UserServiceImpl.authenticated().getId(), filtro);\n\t\t}\n\t\t\n\t\telse if (tipoFiltro.equals(TipoFiltro.UNIVERSO)) {\n\t\t\tlogger.info(\"Buscando por filtro de universo: \"+filtro);\n\t\t\treturn itemRepository.filtraPorUniverso(UserServiceImpl.authenticated().getId(), filtro);\n\t\t}\n\t\t\n\t\telse if (tipoFiltro.equals(TipoFiltro.EDITORA)) {\n\t\t\tlogger.info(\"Buscando por filtro de editora: \"+filtro);\n\t\t\treturn itemRepository.filtraPorEditora(UserServiceImpl.authenticated().getId(), filtro);\n\t\t}\n\t\t\n\t\treturn itemRepository.findAll(UserServiceImpl.authenticated().getId());\n\t}", "public List<HostScalingPolicy> selectHSP() {\n\n\t\tList<HostScalingPolicy> customers = new ArrayList<HostScalingPolicy>();\n\t\tConnection connection = null;\n\t\tPreparedStatement preparedStatement = null;\n\t\tResultSet resultSet = null;\n\n\t\ttry {\n\n\t\t\tconnection = (Connection) DBConnection.getConnection();\n\t\t\tString sql = \"select * from host_scaling_policy\";\n\t\t\tpreparedStatement = (PreparedStatement) connection.prepareStatement(sql);\n\t\t\tresultSet = preparedStatement.executeQuery();\n\n\t\t\tHostScalingPolicy customer = null;\n\t\t\twhile (resultSet.next()) {\n\n\t\t\t\tcustomer = new HostScalingPolicy();\n\t\t\t\tcustomer.setName(resultSet.getString(1));\n\t\t\t\tcustomer.setHost_groups(resultSet.getString(2));\n\n\t\t\t\tcustomers.add(customer);\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.error(e.getMessage());\n\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tresultSet.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\tLOGGER.error(e.getMessage());\n\t\t\t}\n\t\t}\n\n\t\treturn customers;\n\t}", "public Collection findPartnerFunctions(IDataFilter filter)\n throws FindEntityException, SystemException, RemoteException;", "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n\tpublic Vector getFilteredList(String text) {\n\t\tVector v = new Vector();\n\n\t\tif (text.length() > 2) {\n\t\t\tFuncaoDAOImpl funcaoDao = new FuncaoDAOImpl();\n\t\t\tList<Funcao> lista = funcaoDao.getListByStrDescriptor(text);\n\t\t\tfor (Funcao funcao : lista) {\n\t\t\t\tv.add(funcao.getStrFuncaoVerbo() + \" \"\n\t\t\t\t\t\t+ funcao.getStrFuncaoObjeto());\n\t\t\t}\n\t\t}\n\n\t\treturn v;\n\t}", "@Override\n protected FilterResults performFiltering(CharSequence constraint) {\n\n FilterResults results = new FilterResults();\n if (constraint != null && constraint.length() > 0) {\n\n ArrayList<VehicleData> filterList = new ArrayList<>();\n\n for (int i = 0; i < mflatFilterList.size(); i++) {\n if (\n mflatFilterList.get(i).getName().toLowerCase().contains(constraint.toString().toLowerCase())\n || mflatFilterList.get(i).getNumber().toLowerCase().contains(constraint.toString().toLowerCase())\n || mflatFilterList.get(i).getModel().toLowerCase().contains(constraint.toString().toLowerCase())\n || mflatFilterList.get(i).getColor().toLowerCase().contains(constraint.toString().toLowerCase())\n || mflatFilterList.get(i).getFlat().getNumber().toLowerCase().contains(constraint.toString().toLowerCase())\n || mflatFilterList.get(i).getFlat().getName().toLowerCase().contains(constraint.toString().toLowerCase())\n ) {\n filterList.add(mflatFilterList.get(i));\n }\n }\n\n results.count = filterList.size();\n\n results.values = filterList;\n\n } else {\n results.count = mflatFilterList.size();\n results.values = mflatFilterList;\n }\n return results;\n }", "@Override\r\n\tpublic List<Mobile> showAllProduct() {\n\t\tQuery query=entitymanager.createQuery(\"FROM Mobile\");\r\n\t\tList<Mobile> myProd=query.getResultList();\r\n\t\treturn myProd;\r\n\t}", "public List<ShelfItem> getAllShelf(String filter, String username, Integer from, Integer to);", "private List<VideoItem> filter(List<VideoItem> models, String query) {\n query = query.toLowerCase();\n final List<VideoItem> filteredModelList = new ArrayList<>();\n for (final VideoItem model : models) {\n final String text = model.getTitle().toLowerCase();\n if (text.contains(query)) {\n filteredModelList.add(model);\n }\n }\n return filteredModelList;\n }", "public List<Timetable> getListSearch(String from, String to) throws Exception;", "public List<UnManagedVolumeRestRep> getByStorageSystem(URI storageSystemId,\n ResourceFilter<UnManagedVolumeRestRep> filter) {\n List<RelatedResourceRep> refs = listByStorageSystem(storageSystemId);\n return getByRefs(refs, filter);\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic List<Machinecomponent> findByMachineID(Long machineID) {\n\t\treturn findByCriteria(Restrictions.eq(\"machine.machineID\", machineID));\n\t}", "protected static List<CondorVM> createVM(int userId, int vms) {\n LinkedList<CondorVM> list = new LinkedList<>();\n \n //VM Parameters\n long size = 10000; //image size (MB)\n int ram = 512; //vm memory (MB)\n int mips = 1000;\n long bw = 1000;\n int pesNumber = 1; //number of cpus\n String vmm = \"Xen\"; //VMM name\n \n //create VMs\n CondorVM[] vm = new CondorVM[vms];\n for (int i = 0; i < vms; i++) {\n double ratio = 1.0;\n vm[i] = new CondorVM(i, userId, mips * ratio, pesNumber, ram, bw, size, vmm, new CloudletSchedulerSpaceShared());\n list.add(vm[i]);\n }\n return list;\n }", "VirtualMachine getByResourceGroup(String resourceGroupName, String virtualMachineName);", "VirtualMachine getByResourceGroup(String resourceGroupName, String virtualMachineName);", "public List<Contest> searchContests(Filter filter) throws ContestManagementException {\r\n if (error) {\r\n throw new ContestManagementException(\"error\");\r\n }\r\n\r\n StudioFileType fileType = new StudioFileType();\r\n fileType.setDescription(\"PS\");\r\n fileType.setExtension(\".ps\");\r\n fileType.setImageFile(false);\r\n fileType.setStudioFileType(34);\r\n\r\n ContestChannel channel = new ContestChannel();\r\n channel.setContestChannelId(new Long(2));\r\n channel.setDescription(\"This is a channel\");\r\n\r\n ContestStatus contestStatus = new ContestStatus();\r\n contestStatus.setContestStatusId(new Long(24));\r\n contestStatus.setDescription(\"This is a status\");\r\n contestStatus.setName(\"name\");\r\n\r\n ContestType contestType = new ContestType();\r\n contestType.setContestType(new Long(234));\r\n contestType.setDescription(\"this is a contest type\");\r\n\r\n Contest contest = new Contest();\r\n contest.setContestChannel(channel);\r\n contest.setContestId(new Long(24));\r\n contest.setContestType(contestType);\r\n contest.setCreatedUser(new Long(34654));\r\n contest.setEndDate(new Date());\r\n contest.setStatus(contestStatus);\r\n contest.setStartDate(new Date());\r\n\r\n Set<StudioFileType> fileTypes = new HashSet<StudioFileType>();\r\n fileTypes.add(fileType);\r\n contest.setFileTypes(fileTypes);\r\n \r\n if (invalid) {\r\n contestStatus.setContestStatusId(new Long(-1));\r\n }\r\n\r\n return Arrays.asList(new Contest[] { contest });\r\n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n private Mono<PagedResponse<VirtualMachineScaleSetVMInner>> listSinglePageAsync(\n String resourceGroupName, String virtualMachineScaleSetName, String filter, String select, String expand) {\n if (this.client.getEndpoint() == null) {\n return Mono\n .error(\n new IllegalArgumentException(\n \"Parameter this.client.getEndpoint() is required and cannot be null.\"));\n }\n if (resourceGroupName == null) {\n return Mono\n .error(new IllegalArgumentException(\"Parameter resourceGroupName is required and cannot be null.\"));\n }\n if (virtualMachineScaleSetName == null) {\n return Mono\n .error(\n new IllegalArgumentException(\n \"Parameter virtualMachineScaleSetName is required and cannot be null.\"));\n }\n if (this.client.getSubscriptionId() == null) {\n return Mono\n .error(\n new IllegalArgumentException(\n \"Parameter this.client.getSubscriptionId() is required and cannot be null.\"));\n }\n final String apiVersion = \"2020-06-01\";\n final String accept = \"application/json\";\n return FluxUtil\n .withContext(\n context ->\n service\n .list(\n this.client.getEndpoint(),\n resourceGroupName,\n virtualMachineScaleSetName,\n filter,\n select,\n expand,\n apiVersion,\n this.client.getSubscriptionId(),\n accept,\n context))\n .<PagedResponse<VirtualMachineScaleSetVMInner>>map(\n res ->\n new PagedResponseBase<>(\n res.getRequest(),\n res.getStatusCode(),\n res.getHeaders(),\n res.getValue().value(),\n res.getValue().nextLink(),\n null))\n .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));\n }", "List<State> getListStateByFilter( StateFilter filter );", "public List<SensorResponse> getFilteredList(){\n return filteredList;\n }", "public List<String> getFileFilters() {\n/* 420 */ List<String> retval = null;\n/* 421 */ COSBase filters = this.stream.getDictionaryObject(COSName.F_FILTER);\n/* 422 */ if (filters instanceof COSName) {\n/* */ \n/* 424 */ COSName name = (COSName)filters;\n/* 425 */ retval = new COSArrayList<String>(name.getName(), (COSBase)name, (COSDictionary)this.stream, COSName.F_FILTER);\n/* */ \n/* */ }\n/* 428 */ else if (filters instanceof COSArray) {\n/* */ \n/* */ \n/* 431 */ retval = COSArrayList.convertCOSNameCOSArrayToList((COSArray)filters);\n/* */ } \n/* 433 */ return retval;\n/* */ }", "public static boolean[] getSelectedSpecsFilter() {\r\n return PCCTRL.selectedSpecsFilter;\r\n }", "public List<MachineBuyConfig> getMachineProfit(Date startTime, Date endTime) {\n\t\treturn machineConfigMapper.getMachineProfit(startTime, endTime);\r\n\t}", "List<PhysicalTable> getPhysicalTables();", "@PostMapping(value = \"/readSoftwareFilterListPaged\")\n\tpublic @ResponseBody ResultPagingVO readSoftwareFilterListPaged(HttpServletRequest req, HttpServletResponse res,\n\t\t\tModelMap model) {\n\n\t\treturn readCommonCtrlItemAndPropList(req, GPMSConstants.CTRL_ITEM_SWFILTER_RULE);\n\t}", "default Set<StackKey> findAll(Predicate<ItemStack> filter) {\n Set<StackKey> items = new HashSet<>();\n for (IInventoryAdapter inventoryObject : this) {\n for (IInvSlot slot : InventoryIterator.get(inventoryObject)) {\n ItemStack stack = slot.getStack();\n if (!InvTools.isEmpty(stack) && filter.test(stack)) {\n stack = stack.copy();\n InvTools.setSize(stack, 1);\n items.add(StackKey.make(stack));\n }\n }\n }\n return items;\n }", "List<FilterInfo> getZuulFiltersForFilterId(String filter_id);", "public ArrayList<Vehicle> getPlanes() {\n return vehicles.stream().filter(loc -> loc.getClass().getSuperclass().getSimpleName().equals(\"Plane\")).collect(Collectors.toCollection(ArrayList::new));\n }" ]
[ "0.7799426", "0.6585082", "0.6147667", "0.58498293", "0.58091056", "0.57572496", "0.5753083", "0.56608194", "0.56574136", "0.54663503", "0.5382314", "0.5378959", "0.5172227", "0.5094253", "0.50863695", "0.50453424", "0.5039486", "0.50348663", "0.4990187", "0.49717504", "0.48916396", "0.48644727", "0.48428333", "0.4814129", "0.48016396", "0.4799976", "0.47794577", "0.47615683", "0.47558486", "0.4744827", "0.47410592", "0.47333828", "0.47268143", "0.47228733", "0.46981496", "0.46938172", "0.46786293", "0.46784192", "0.4667366", "0.4620899", "0.4596586", "0.45946166", "0.4594605", "0.45852467", "0.4579514", "0.4557644", "0.45529214", "0.45481735", "0.45467082", "0.44891858", "0.44816357", "0.4475874", "0.4468118", "0.44657004", "0.445841", "0.44575444", "0.44540527", "0.4453182", "0.44449076", "0.44430804", "0.4409906", "0.44084656", "0.4403912", "0.44028178", "0.4400432", "0.43954197", "0.43891236", "0.4380163", "0.43758622", "0.43720523", "0.43690458", "0.436845", "0.4368142", "0.43665838", "0.43484005", "0.43381974", "0.43317825", "0.43232417", "0.43172535", "0.43117705", "0.43005094", "0.42984802", "0.42980605", "0.4296003", "0.42902407", "0.4289783", "0.42884535", "0.42884535", "0.42842287", "0.42835146", "0.426942", "0.425495", "0.42532825", "0.4248561", "0.42483535", "0.42474502", "0.42464784", "0.4244022", "0.4243669", "0.4238035" ]
0.83323026
0
Gets a single virtual machine in the physical machine matching the given filter.
public VirtualMachine findVirtualMachine(final Predicate<VirtualMachine> filter) { return Iterables.getFirst(filter(listVirtualMachines(), filter), null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public VirtualMachine findRemoteVirtualMachine(final Predicate<VirtualMachine> filter) {\n return Iterables.getFirst(filter(listVirtualMachines(), filter), null);\n }", "public List<VirtualMachine> listVirtualMachines(final Predicate<VirtualMachine> filter) {\n return Lists.newLinkedList(filter(listVirtualMachines(), filter));\n }", "public List<VirtualMachine> listRemoteVirtualMachines(final Predicate<VirtualMachine> filter) {\n return Lists.newLinkedList(filter(listVirtualMachines(), filter));\n }", "VM getVM();", "VirtualMachine getByResourceGroup(String resourceGroupName, String virtualMachineName);", "VirtualMachine getByResourceGroup(String resourceGroupName, String virtualMachineName);", "public VirtualMachine getVirtualMachine(int i){\n\t\treturn vms.get(i);\n\t}", "Optional<Computer> findOne(long idToSelect);", "private Machine getMachineOrFail(String machineId) {\n for (Machine machine : listMachines()) {\n if (machine.getId().equals(machineId)) {\n return machine;\n }\n }\n throw new NotFoundException(String.format(\"no machine with id '%s' found in cloud pool\", machineId));\n }", "public static IFilter fromWMFilter( WMFilter filter )\r\n throws WMWorkflowException\r\n {\r\n if ( filter.getFilterType() == WMFilter.SIMPLE_TYPE ) {\r\n if ( filter.getComparison() == WMFilter.EQ ) {\r\n return new CompareFilter( filter.getAttributeName(), CompareFilter.EQ, filter.getFilterValue() );\r\n } else if ( filter.getComparison() == WMFilter.NE ) {\r\n return new CompareFilter( filter.getAttributeName(), CompareFilter.EQ, filter.getFilterValue() );\r\n } else if ( filter.getComparison() == WMFilter.GE ) {\r\n return new CompareFilter( filter.getAttributeName(), CompareFilter.GE, filter.getFilterValue() );\r\n } else if ( filter.getComparison() == WMFilter.GT ) {\r\n return new CompareFilter( filter.getAttributeName(), CompareFilter.GT, filter.getFilterValue() );\r\n } else if ( filter.getComparison() == WMFilter.LE) {\r\n return new CompareFilter( filter.getAttributeName(), CompareFilter.LE, filter.getFilterValue() );\r\n } else if ( filter.getComparison() == WMFilter.LT) {\r\n return new CompareFilter( filter.getAttributeName(), CompareFilter.LT, filter.getFilterValue() );\r\n }\r\n } else {\r\n try {\r\n SQLQueryParser parser = new SQLQueryParser( new StringReader( filter.getFilterString() ) );\r\n\r\n return parser.SQLOrExpr();\r\n }\r\n catch ( Exception e ) {\r\n log.error( \"Exception\", e );\r\n throw new WMWorkflowException( e );\r\n }\r\n }\r\n return null;\r\n }", "public MyPowerHost findHostForVm(Vm vm) {\n\t\t//找到第一个合适的host就返回\n\t\tfor (MyPowerHost host : this.<MyPowerHost> getHostList()) {\n\t\t\tif (host.isSuitableForVm(vm)) {\n\t\t\t\treturn host;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public VirtualMachine getVirtualMachine()\n {\n return vm;\n }", "@JsonIgnore\n public VM getVM() {\n if (wvm == null || wvm == WVM.Workspace) {\n return null;\n }\n switch (wvm) {\n case Version:\n return VM.Version;\n default:\n return VM.Microversion;\n }\n }", "@INLINE\n public static MaxineVM vm() {\n return vm;\n }", "public Computer getComputer(int id) {\n for (Computer computer : inventory) {\n if (computer.getSerialNumber() == id) {\n return computer;\n }\n }\n return null;\n }", "public VirtualMachine getVM() {\n return _vm;\n }", "public Guest getGuest(String name) {\n\t\tString checkName = name.toUpperCase();\n for (Guest guest : guestList) {\n if (guest.getName().toUpperCase().equals(checkName)){\n return guest;\n }\n }\n return null;\n }", "Computer findComputerByActiveTrueAndIpAndPort(String ip, int port);", "public VirtualMachine searchVirtualMachine(String vmName) throws Exception{\r\n\t\tManagedEntity[] mes = new\r\n\t\t\t\tInventoryNavigator(_instance.getRootFolder()).searchManagedEntities(\"VirtualMachine\");\r\n\t\tfor (ManagedEntity managedEntity : mes) {\r\n\t\t\tVirtualMachine virtualMachine = (VirtualMachine)managedEntity;\r\n\t\t\tif(virtualMachine.getName().equals(vmName))\r\n\t\t\t\treturn virtualMachine;\r\n\t\t}\r\n\t\tthrow new Exception(String.format(\"VM with name : %s not found.\", vmName));\r\n\t}", "public Machine machine() {\n return machine;\n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n private Mono<PagedResponse<VirtualMachineScaleSetVMInner>> listSinglePageAsync(\n String resourceGroupName,\n String virtualMachineScaleSetName,\n String filter,\n String select,\n String expand,\n Context context) {\n if (this.client.getEndpoint() == null) {\n return Mono\n .error(\n new IllegalArgumentException(\n \"Parameter this.client.getEndpoint() is required and cannot be null.\"));\n }\n if (resourceGroupName == null) {\n return Mono\n .error(new IllegalArgumentException(\"Parameter resourceGroupName is required and cannot be null.\"));\n }\n if (virtualMachineScaleSetName == null) {\n return Mono\n .error(\n new IllegalArgumentException(\n \"Parameter virtualMachineScaleSetName is required and cannot be null.\"));\n }\n if (this.client.getSubscriptionId() == null) {\n return Mono\n .error(\n new IllegalArgumentException(\n \"Parameter this.client.getSubscriptionId() is required and cannot be null.\"));\n }\n final String apiVersion = \"2020-06-01\";\n final String accept = \"application/json\";\n context = this.client.mergeContext(context);\n return service\n .list(\n this.client.getEndpoint(),\n resourceGroupName,\n virtualMachineScaleSetName,\n filter,\n select,\n expand,\n apiVersion,\n this.client.getSubscriptionId(),\n accept,\n context)\n .map(\n res ->\n new PagedResponseBase<>(\n res.getRequest(),\n res.getStatusCode(),\n res.getHeaders(),\n res.getValue().value(),\n res.getValue().nextLink(),\n null));\n }", "Computer findComputerByActiveTrueAndComputerId(Long computerId);", "public NetworkInstance[] queryServers(NetworkFilter filter);", "public MyVM(String virtual_machine_name)\n {\n \ttry\n \t{\n \t\tthis.vmname= virtual_machine_name;\n \t\tthis.si=new ServiceInstance(new URL(SJSULAB.getVmwareHostURL()),\n\t\t\t\t\tSJSULAB.getVmwareLogin(), SJSULAB.getVmwarePassword(), true);\n \t\t\n \t\tthis.folder = si.getRootFolder();\n \t\tthis.vm=(VirtualMachine) new InventoryNavigator(folder).searchManagedEntity(\"VirtualMachine\",\n \t\t\t\tthis.vmname);\n \t\tSystem.out.println(\"MyVM, vm value : \"+vm);\n \t\t\n \t\tthis.hs= (HostSystem) new InventoryNavigator(folder).searchManagedEntity(\"HostSystem\", \"130.65.132.194\");\n \t\tSystem.out.println(\"MyVM, HS value : \"+hs);\n \t\tthis.snapshotname=\"snap2\";\n \t\t\n \t}\n \tcatch(Exception e)\n \t{\n \t\tSystem.out.println(e.toString());\n \t}\n }", "@Override\n public Machine call() throws Exception {\n Machine selectedMachine = maasClient.allocateMachineById(systemId);\n if (selectedMachine == null) {\n return null;\n }\n do {\n Thread.sleep(MaasClientPollingService.POLLING_INTERVAL);\n } while (maasClient.getMachineById(systemId).getStatus() != Machine.ALLOCATED);\n\n // Put tags\n tags.forEach(tag -> {\n maasClient.createTagIfNotExists(tag.getName(), tag.getComment());\n maasClient.addTagToMachines(tag.getName(), systemId);\n });\n\n // Deploy OS\n selectedMachine = maasClient.deployMachine(systemId, userData);\n if (selectedMachine == null) {\n return null;\n }\n do {\n Thread.sleep(MaasClientPollingService.POLLING_INTERVAL);\n } while (maasClient.getMachineById(systemId).getStatus() != Machine.DEPLOYED);\n\n return selectedMachine;\n }", "public List<VirtualMachine> listVirtualMachines() {\n MachineOptions options = MachineOptions.builder().sync(false).build();\n VirtualMachinesWithNodeExtendedDto vms = context.getApi().getInfrastructureApi()\n .listVirtualMachinesByMachine(target, options);\n return wrap(context, VirtualMachine.class, vms.getCollection());\n }", "Computer selectByPrimaryKey(Long id);", "default ItemStack findOne(Predicate<ItemStack> filter) {\n for (IInventoryAdapter inventoryObject : this) {\n InventoryManipulator im = InventoryManipulator.get(inventoryObject);\n ItemStack removed = im.tryRemoveItem(filter);\n if (!InvTools.isEmpty(removed))\n return removed;\n }\n return InvTools.emptyStack();\n }", "@ServiceMethod(returns = ReturnType.COLLECTION)\n private PagedFlux<VirtualMachineScaleSetVMInner> listAsync(\n String resourceGroupName,\n String virtualMachineScaleSetName,\n String filter,\n String select,\n String expand,\n Context context) {\n return new PagedFlux<>(\n () -> listSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, filter, select, expand, context),\n nextLink -> listNextSinglePageAsync(nextLink, context));\n }", "public Software getSoftware(Software target){\n return products.find (target);\n }", "public Vehicle getMake(String make) {\n\t\tfor (int i = 0; i < vehicles.size(); i++) {\n\t\t\tVehicle temp = vehicles.get(i);\n\n\t\t\tif (temp.getMake().equals(make)) {\n\t\t\t\treturn temp;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}", "PhysicalMachine getPhysicalMachine() {\n return pm;\n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n private Mono<PagedResponse<VirtualMachineScaleSetVMInner>> listSinglePageAsync(\n String resourceGroupName, String virtualMachineScaleSetName, String filter, String select, String expand) {\n if (this.client.getEndpoint() == null) {\n return Mono\n .error(\n new IllegalArgumentException(\n \"Parameter this.client.getEndpoint() is required and cannot be null.\"));\n }\n if (resourceGroupName == null) {\n return Mono\n .error(new IllegalArgumentException(\"Parameter resourceGroupName is required and cannot be null.\"));\n }\n if (virtualMachineScaleSetName == null) {\n return Mono\n .error(\n new IllegalArgumentException(\n \"Parameter virtualMachineScaleSetName is required and cannot be null.\"));\n }\n if (this.client.getSubscriptionId() == null) {\n return Mono\n .error(\n new IllegalArgumentException(\n \"Parameter this.client.getSubscriptionId() is required and cannot be null.\"));\n }\n final String apiVersion = \"2020-06-01\";\n final String accept = \"application/json\";\n return FluxUtil\n .withContext(\n context ->\n service\n .list(\n this.client.getEndpoint(),\n resourceGroupName,\n virtualMachineScaleSetName,\n filter,\n select,\n expand,\n apiVersion,\n this.client.getSubscriptionId(),\n accept,\n context))\n .<PagedResponse<VirtualMachineScaleSetVMInner>>map(\n res ->\n new PagedResponseBase<>(\n res.getRequest(),\n res.getStatusCode(),\n res.getHeaders(),\n res.getValue().value(),\n res.getValue().nextLink(),\n null))\n .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));\n }", "public RTTIClass select(ClassFilter filter);", "public Voto find(int id ) { \n\t\treturn em.find(Voto.class, id);\n\t}", "VM createVM();", "@ServiceMethod(returns = ReturnType.COLLECTION)\n public PagedFlux<VirtualMachineScaleSetVMInner> listAsync(\n String resourceGroupName, String virtualMachineScaleSetName, String filter, String select, String expand) {\n return new PagedFlux<>(\n () -> listSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, filter, select, expand),\n nextLink -> listNextSinglePageAsync(nextLink));\n }", "public static VMWrap current() throws IOException {\n\t\t// Get pid of self process\n\t\tString name = ManagementFactory.getRuntimeMXBean().getName();\n\t\tString pid = name.substring(0, name.indexOf('@'));\n\t\treturn process(pid);\n\t}", "private BasicCoffeeMachine createCoffeeMachine() {\n\t\tMap<CoffeeSelection, CoffeeBean> beans = new HashMap<CoffeeSelection, CoffeeBean>();\n\t\tbeans.put(CoffeeSelection.ESPRESSO, new CoffeeBean(\"My favorite espresso bean\", 1000));\n\t\tbeans.put(CoffeeSelection.FILTER_COFFEE, new CoffeeBean(\"My favorite filter coffee bean\", 1000));\n\t\t\n\t\t// instantiate a new CoffeeMachine object\n\t\treturn new PremiumCoffeeMachine(beans);\n\t}", "public static MemberVO getMember(HttpServletRequest request) {\n\t\treturn getMember(request.getSession());\n\n\t}", "@objid (\"17c23aa2-9083-11e1-81e9-001ec947ccaf\")\n MObject findById(MClass cls, final UUID siteIdentifier, IMObjectFilter filter);", "public static TargetVirtualMachine createVirtualMachine() {\n\t\treturn new HotSpotVirtualMachine();\n\n\t}", "@PostMapping(value = \"/readSoftwareFilter\")\n\tpublic @ResponseBody ResultVO readSoftwareFilter(HttpServletRequest req) {\n\t\tResultVO resultVO = new ResultVO();\n\t\tString objId = req.getParameter(\"objId\");\n\t\ttry {\n\t\t\tresultVO = ctrlMstService.readCtrlItem(objId);\n\t\t} catch (Exception ex) {\n\t\t\tlogger.error(\"error in readSoftwareFilter : {}, {}, {}\", GPMSConstants.CODE_SYSERROR,\n\t\t\t\t\tMessageSourceHelper.getMessage(GPMSConstants.MSG_SYSERROR), ex.toString());\n\t\t\tif (resultVO != null) {\n\t\t\t\tresultVO.setStatus(new StatusVO(GPMSConstants.MSG_FAIL, GPMSConstants.CODE_SYSERROR,\n\t\t\t\t\t\tMessageSourceHelper.getMessage(GPMSConstants.MSG_SYSERROR)));\n\t\t\t}\n\t\t}\n\t\treturn resultVO;\n\t}", "public ProductView get(String id, String developerId) {\n LOG.debug(\"Enter. id: {}, developerId: {}.\", id, developerId);\n\n ProductView result = cacheApplication.getProductById(developerId, id);\n\n if (result == null) {\n LOG.debug(\"Cache fail, get from database.\");\n\n List<ProductView> productViews = fetchProducts(developerId);\n\n result = productViews.stream().filter(view -> id.equals(view.getId())).findAny().orElse(null);\n }\n\n LOG.debug(\"Exit. productView: {}.\", result);\n return result;\n }", "public Object fetchSpecificFilterValue(String fieldName, FilterOperator operator) {\n if (fieldName == null || filter == null) {\n return null;\n }\n final List<Filter> list = filter.get(fieldName, operator);\n if (list == null || list.isEmpty()) {\n return null;\n }\n return list.get(0).getValue();\n }", "private VM findVMforTask(Job job, double taskDeadline, double taskBudget, List<VM> vms) {\r\n\t\t\r\n\t\tdouble vmMips = 0.0;\r\n\t\tVM fastestVm = null;\r\n\t\tTask task = job.getTask();\r\n\t\t\r\n\t\tfor (VM vm : vms) {\r\n\t\t\tdouble runtime = environment.getPredictedRuntime(vm.getVmType(), task);\r\n\t\t\tdouble cost = environment.getCost(runtime, vm.getVmType());\r\n\t\t\t\r\n\t\t\tif (cost <= taskBudget){\r\n\t\t\t\tif(vm.getVmType().getMips() > vmMips){\r\n\t\t\t\t\tvmMips = vm.getVmType().getMips();\r\n\t\t\t\t\tfastestVm = vm;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\treturn fastestVm;\r\n\t}", "public Guest getGuest(int guest_ID) {\n for (Guest guest : guestList) {\n if (guest.getGuest_ID() == guest_ID)\n return guest;\n }\n return null;\n }", "FilterInfo getActiveFilterInfoForFilter(String filter_id);", "public WVM getWVM() {\n return wvm;\n }", "VirtualMachineProfile virtualMachineProfile();", "public List<VirtualMachine> listRemoteVirtualMachines() {\n MachineOptions options = MachineOptions.builder().sync(true).build();\n VirtualMachinesWithNodeExtendedDto vms = context.getApi().getInfrastructureApi()\n .listVirtualMachinesByMachine(target, options);\n return wrap(context, VirtualMachine.class, vms.getCollection());\n }", "public Vehicle getModel(String model) {\n\t\tfor (int i = 0; i < vehicles.size(); i++) {\n\t\t\tVehicle temp = vehicles.get(i);\n\n\t\t\tif (temp.getModel().equals(model)) {\n\t\t\t\treturn temp;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}", "public SVMmodel getSVMmodel(List<ActionVocal> vocalActions) {\n\n for(SVMmodel model : svmModels.values()) {\n if (model.containsTheSounds( false, vocalActions))\n return model;\n }\n\n return null;\n }", "@Override\r\n\tpublic VendingMachine createVendingMachine(\r\n\t\t\tVendingMachineModel vendingMachineModel) {\r\n\t\tVendingMachine hospitalVendingMachine = new HospitalVendingMachine();\r\n\t\treturn null;\r\n\t}", "public String vmwareMachineId() {\n return this.vmwareMachineId;\n }", "private static AsyncFilter loadInstance(String property){ \n Class className = null; \n try{ \n className = Class.forName(property);\n return (AsyncFilter)className.newInstance();\n } catch (ClassNotFoundException ex){\n SelectorThread.logger().log(Level.WARNING,ex.getMessage(),ex);\n } catch (InstantiationException ex){\n SelectorThread.logger().log(Level.WARNING,ex.getMessage(),ex); \n } catch (IllegalAccessException ex){\n SelectorThread.logger().log(Level.WARNING,ex.getMessage(),ex); \n }\n return null;\n }", "private Filter makeFilter(String filterName) {\r\n Class c = null;\r\n Filter f = null;\r\n try {\r\n c = Class.forName(filterName);\r\n f = (Filter) c.newInstance();\r\n } catch (Exception e) {\r\n System.out.println(\"There was a problem to load the filter class: \"\r\n + filterName);\r\n }\r\n return f;\r\n }", "Collection<Coin> findByMachineName(String name);", "public final Device blockingGetEmulator() {\n Device emu = find(true);\n if (emu != null) {\n return emu;\n }\n EmulatorController emuController = EmulatorController.getInstance();\n if (emuController.getState() == State.NOT_RUNNING) {\n try {\n emuController.launch();\n } catch (IOException e) {\n System.err.println(\"Problem while launching emulator.\");\n e.printStackTrace(System.err);\n return null;\n }\n } else {\n System.out.println(\"Emulator is \" + emuController.getState() + \", which is not expected.\");\n }\n while (!Thread.currentThread().isInterrupted()) {\n if (emuController.getState() == State.NOT_RUNNING) {\n System.err.println(\"Error while starting the emulator. (\" + emuController.getState() + \")\");\n return null;\n }\n Device emu2 = find(true);\n if (emu2 != null) {\n return emu2;\n }\n try {\n Thread.sleep(2000);\n } catch (InterruptedException e2) {\n System.err.println(\"Devices: interrupted in loop.\");\n return null;\n }\n }\n return null;\n }", "public static VendingMachine create(VendingMachineType type)\n {\n VendingMachine machine = null;\n\n if (type == VendingMachineType.STANDARD) {\n machine = new StandardVendingMachine();\n }\n\n return machine;\n }", "@Nullable\n @Override\n public Workload getWorkloadByIp(String ip) {\n for (Workload workload : workloadRepository.findAll()) {\n if (workload.getIpAddress().equals(ip)) {\n return workload;\n }\n }\n return null;\n }", "public List<VirtualMachineDescriptor> listVirtualMachines() {\n ArrayList<VirtualMachineDescriptor> result =\n new ArrayList<VirtualMachineDescriptor>();\n\n MonitoredHost host;\n Set<Integer> vms;\n try {\n host = MonitoredHost.getMonitoredHost(new HostIdentifier((String)null));\n vms = host.activeVms();\n } catch (Throwable t) {\n if (t instanceof ExceptionInInitializerError) {\n t = t.getCause();\n }\n if (t instanceof ThreadDeath) {\n throw (ThreadDeath)t;\n }\n if (t instanceof SecurityException) {\n return result;\n }\n throw new InternalError(t); // shouldn't happen\n }\n\n for (Integer vmid: vms) {\n String pid = vmid.toString();\n String name = pid; // default to pid if name not available\n boolean isAttachable = false;\n MonitoredVm mvm = null;\n try {\n mvm = host.getMonitoredVm(new VmIdentifier(pid));\n try {\n isAttachable = MonitoredVmUtil.isAttachable(mvm);\n // use the command line as the display name\n name = MonitoredVmUtil.commandLine(mvm);\n } catch (Exception e) {\n }\n if (isAttachable) {\n result.add(new HotSpotVirtualMachineDescriptor(this, pid, name));\n }\n } catch (Throwable t) {\n if (t instanceof ThreadDeath) {\n throw (ThreadDeath)t;\n }\n } finally {\n if (mvm != null) {\n mvm.detach();\n }\n }\n }\n return result;\n }", "@SuppressWarnings(\"unchecked\")\n public <V> V fetchFromLargeCache(String key, Supplier<V> valueComputer) {\n return (V) LOCAL_LARGE_CACHE.get(key, ignored -> valueComputer.get());\n }", "IQueryNode getVirtualPlan(Object groupID) throws Exception;", "public PhysicianParc getSelectedPhysician() {\n if (nextPhysicianAvailableCheckbox.isChecked()) {\n return null;\n }\n\n // iterate the radio-buttons and get the selected physician\n for (int i = 0; i < nearbyPhysicianRadioButtonList.size(); i++) {\n if (nearbyPhysicianRadioButtonList.get(i).isChecked()) {\n return nearbyPhysicianList.get(i);\n }\n }\n\n // no physician was selected and the checkbox was not selected\n // -> handle as if the checkbox is selected\n return null;\n }", "@SuppressWarnings(\"unchecked\")\n public <V> V fetchFromSmallCache(String key, Supplier<V> valueComputer) {\n return (V) LOCAL_SMALL_CACHE.get(key, ignored -> valueComputer.get());\n }", "@Override\n\tpublic Filter< ? > getFilter(final Filter< ? > filter, final String storeCode) {\n\t\tif (filter == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tFilter< ? > returnValue = null;\n\t\t// Find from the range definition first.\n\t\tString filterId = filter.getId();\n\t\tif (LOG.isDebugEnabled()) {\n\t\t\tLOG.debug(\"Getting filter for storeCode=\" + storeCode + \" and filterId=\" + filterId);\n\t\t}\n\t\tif (filter instanceof PriceFilter) {\n\t\t\treturnValue = findPriceFilter(storeCode, filterId);\n\t\t} else if (filter instanceof AttributeRangeFilter) {\n\t\t\treturnValue = findAttributeRangeFilter(storeCode, filterId);\n\t\t} else if (filter instanceof AttributeFilter) {\n\t\t\treturnValue = findAttributeValueFilter(storeCode, filterId);\n\t\t}\n\t\t// Not found, then return the given filter.\n\t\tif (returnValue == null) {\n\t\t\treturnValue = filter;\n\t\t}\n\n\t\treturn returnValue;\n\t}", "private VirtualBoxMachine validateVirtualBoxMachine(VirtualMachine virtualMachine) throws VMDriverException {\n if (virtualMachine instanceof VirtualBoxMachine) { // TODO evitar el instance_of y el cast ¿?\n return (VirtualBoxMachine) virtualMachine;\n } else {\n throw new VMDriverException(\"Non-valid virtual machine especification\");\n }\n }", "@Override\n\tpublic vip selectByphone(String phonum) {\n\t\treturn this.vd.selectByphone(phonum);\n\t}", "public ProcessFilter getCurrentFilter() throws ProcessManagerException {\r\n if (currentProcessFilter == null) {\r\n currentProcessFilter = new ProcessFilter(processModel, currentRole,\r\n getLanguage());\r\n }\r\n return currentProcessFilter;\r\n }", "public synchronized OFPort getFromPortMap(IOFSwitch sw, MacAddress sourceMac, MacAddress dstMac, VlanVid vlan, IPv4Address ipAddressSource, IPv4Address ipAddressDst, TenantVirtualNetwork tenantVirtualNetwork) {\n\t\tTenant3 tenant = null;\n\t\tVirtualNetwork virtualNetwork = null;\n\t\tif (vlan == VlanVid.FULL_MASK || vlan == null) {\n\t\t\tvlan = VlanVid.ofVlan(0);\n\t\t}\n\n\t\tif(tenantVirtualNetwork != null){\n\t\t\ttenant = tenantVirtualNetwork.getTenant();\n\t\t\tvirtualNetwork = tenantVirtualNetwork .getVirtualNetwork();\n\t\t}\n\n\t\tif (tenant != null && sw != null && virtualNetwork != null) {\n\t\t\tif (switchTenantVirtualNetworkMap.get(sw) != null) {\n\t\t\t\tif (switchTenantVirtualNetworkMap.get(sw).get(tenant) != null) {\n\t\t\t\t\tMap<Host, OFPort> virtualNetworkMap = switchTenantVirtualNetworkMap.get(sw).get(tenant).get(virtualNetwork);\n\t\t\t\t\tif (virtualNetworkMap != null ) {\n\t\t\t\t\t\tHost host = null;\n\t\t\t\t\t\tIterator<Host> iteratorHost = virtualNetwork.getHostList().iterator();\n\t\t\t\t\t\twhile(iteratorHost.hasNext()){\n\t\t\t\t\t\t\thost = iteratorHost.next();\n\t\t\t\t\t\t\tif (host.getPhysicalHost().getIpAddress().equals(ipAddressSource) && host.getPhysicalHost().getVlan().equals(vlan)){\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn virtualNetworkMap.get(host.getPhysicalHost());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public MinaIpFilter(IpFilter filter) {\n this.filter = filter;\n }", "public Jode single(Predicate<Jode> filter) {\n return children().single(filter);\n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n public VirtualMachineScaleSetVMInner get(String resourceGroupName, String vmScaleSetName, String instanceId) {\n final InstanceViewTypes expand = null;\n return getAsync(resourceGroupName, vmScaleSetName, instanceId, expand).block();\n }", "@Override\n\tpublic DataVO<CitrixDesktopMachine> list(CitrixDesktopMachineForm f) {\n\t\treturn null;\n\t}", "public ParticleMeasure filter(final Filter filter)\n\t\t{\n\t\tParticleMeasure out=new ParticleMeasure();\n\t\t\n\t\t//Copy all the columns\n\t\tout.columns.addAll(columns);\n\t\t\n\t\t//Copy all frames\n\t\tfor(Map.Entry<EvDecimal, FrameInfo> f:frameInfo.entrySet())\n\t\t\tif(filter.acceptFrame(f.getKey()))\n\t\t\t\t{\n\t\t\t\t//Create place-holder for frame\n\t\t\t\tfinal FrameInfo oldInfo=f.getValue();\n\t\t\t\tfinal FrameInfo newInfo=new FrameInfo();\n\t\t\t\tout.frameInfo.put(f.getKey(), newInfo);\n\n\t\t\t\t//Filter need to execute lazily as well\n\t\t\t\tnewInfo.calcInfo=new CalcInfo()\n\t\t\t\t\t{\n\t\t\t\t\tpublic void calc()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t//Execute calculation if not done already\n\t\t\t\t\t\tif(oldInfo.calcInfo!=null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\toldInfo.calcInfo.calc();\n\t\t\t\t\t\t\toldInfo.calcInfo=null;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//Filter particles\n\t\t\t\t\t\tfor(int id:oldInfo.keySet())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\tParticleInfo pInfo=oldInfo.get(id);\n\t\t\t\t\t\t\tif(filter.acceptParticle(id, pInfo))\n\t\t\t\t\t\t\t\tnewInfo.put(id,pInfo);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\n\t\treturn out;\n\t\t}", "public Camera getCamera() { return (Camera)CameraSet.elementAt(0); }", "@Override\n public Possible<T> filter(Predicate<? super T> predicate) {\n AbstractDynamicPossible<T> self = this;\n return new AbstractDynamicPossible<T>() {\n @Override\n public boolean isPresent() {\n if (self.isPresent()) {\n boolean reallyPresent = true;\n T t = null;\n try {\n t = self.get();\n } catch (NoSuchElementException e) {\n // in case there was a race and the value became absent\n reallyPresent = false;\n }\n if (reallyPresent) {\n return predicate.test(t);\n }\n }\n return false;\n }\n\n @Override\n public T get() {\n T result = self.get();\n if (predicate.test(result)) {\n return result;\n }\n throw new NoSuchElementException();\n }\n };\n }", "List<DeviceDetails> getDevices(Predicate<DeviceDetails> deviceFilter);", "private PhysicalMachineVec getUsedPhysicalMachines(PriorityQueue<UsageInfo> pm_heap) {\n PhysicalMachineVec used_pms = new PhysicalMachineVec();\n for (Iterator<UsageInfo> it = pm_heap.iterator(); it.hasNext();) {\n UsageInfo info = it.next();\n if (!info.isEmpty()) {\n used_pms.push(info.getPhysicalMachine());\n }\n }\n return used_pms;\n }", "public Gateway find(String mac) {\n\t\tGateway gateway = new Gateway();\n\t\tSystem.out.println(\">>>>>>>>>>>>>>>Estou no GatewayDBImplemen.find\");\n\t\tgateway = entityManager.find(Gateway.class, mac);\n\t\tif (gateway != null) {\n\t\t\treturn gateway;\n\t\t}\n\t\treturn null;\n\t}", "Filter getFilter();", "private Object readResolve() throws ObjectStreamException {\n if (delegate != null) {\n return new VirtualBoxComputerLauncher(delegate, hostName, virtualMachineName, snapshotName, virtualMachineType,\n virtualMachineStopMode, startupWaitingPeriodSeconds);\n }\n return this;\n }", "@RequestMapping(\"mall/mall_view.do\")\n\tpublic String mall_view(\n\t\t\tHttpServletRequest request,\n\t\t\tModel model\n\t\t\t) throws UnknownHostException {\n\t\tMap<String, Object> map = topInfo(request);\n\t\tint no = (int) map.get(\"no\");\n\t\tString search_option = (String) map.get(\"search_option\");\n\t\tString search_data = (String) map.get(\"search_data\");\n\t\t\n\t\tProductDTO dto = dao.getView(no);\n\t\t\n\t\tmodel.addAttribute(\"menu_gubun\", \"member_view\");\n\t\tmodel.addAttribute(\"dto\", dto);\n\t\treturn \"shop/mall/mall_view\";\n\t}", "DeviceEntity getByMac(String mac);", "public static File getCurrentMatchFile(String eventFilter, String tabletFilter) {\n File dir = new File(Environment.getExternalStorageDirectory(), MATCH_FILE_DIRECTORY_NAME);\n dir.mkdirs();\n File[] files = dir.listFiles(new MatchFileFilter(eventFilter, tabletFilter));\n\n File target = null;\n int targetNum = 0;\n\n for (File f : files) {\n String name = f.getName().split(\"\\\\.\")[0];\n String[] values = name.split(\"-\");\n\n int num = Integer.valueOf(values[3]);\n\n if (num >= targetNum) {\n target = f;\n }\n }\n\n if (target == null) {\n target = new File(dir, getMatchFileName(eventFilter, tabletFilter, 1));\n try {\n target.createNewFile();\n } catch (IOException e) {\n return null;\n }\n }\n\n return target;\n }", "public TrafficIncident getIncidentById(Filter filter);", "public Vector2d getVm() {\n return vm;\n }", "public final Device blockingGetHardware() {\n Device hardware = find(false);\n if (hardware != null) {\n return hardware;\n }\n while (!Thread.currentThread().isInterrupted()) {\n try {\n Thread.sleep(2000);\n Device hardware2 = find(false);\n if (hardware2 != null) {\n return hardware2;\n }\n } catch (InterruptedException e) {\n return null;\n }\n }\n return null;\n }", "private void findVehicle(RoutingContext routingContext) {\n var vehicleId = routingContext.pathParam(\"id\");\n // Find it in the registry. The Node#withBlockchainData provides\n // the required context with the current, immutable database state.\n var vehicleOpt = node.withBlockchainData(\n (blockchainData) -> service.findVehicle(vehicleId, blockchainData));\n if (vehicleOpt.isPresent()) {\n // Respond with the vehicle details\n var vehicle = vehicleOpt.get();\n routingContext.response()\n .putHeader(\"Content-Type\", \"application/octet-stream\")\n .end(Buffer.buffer(vehicle.toByteArray()));\n } else {\n // Respond that the vehicle with such ID is not found\n routingContext.response()\n .setStatusCode(HTTP_NOT_FOUND)\n .end();\n }\n }", "@Override\n protected EtmMonitor getEtmMonitor() throws ServletException {\n String etmMonitorName =\n filterConfig.getInitParameter(SpringEtmMonitorContextSupport.ETM_MONITOR_PARAMETER_NAME);\n WebApplicationContext ctx =\n WebApplicationContextUtils.getRequiredWebApplicationContext(filterConfig\n .getServletContext());\n\n return SpringEtmMonitorContextSupport.locateEtmMonitor(ctx, etmMonitorName);\n }", "public LSPFilter getFilter () {\r\n return filter;\r\n }", "@Override\n public ItemStack findAmmo(IToolStackView tool, ModifierEntry modifier, LivingEntity shooter, ItemStack standardAmmo, Predicate<ItemStack> ammoPredicate) {\n return getStack(tool, modifier, tool.getPersistentData().getInt(SELECTED_SLOT));\n }", "public List<VirtualMachine> search(SearchCriteria searchCriteria, SearchMode mode,\n List<SearchCriterionType> searchOrder);", "public static TimeMachine getTimeMachine() {\n return _instance;\n }", "public com.flexnet.opsembedded.webservices.DeviceMachineTypeQueryType getMachineType() {\n return machineType;\n }", "VirtualMachineTemplate getByResourceGroup(String resourceGroupName, String virtualMachineTemplateName);", "private Node chooseMinerNode(MinerType m) {\n\t\tNetwork.shuffle();\n\t\tfor (int i=0; i< Network.size(); i++) {\n\t\t\tNetNode n = (NetNode) Network.get(i);\n\t\t\t\tif (n.getMtype() == m)\n\t\t\t\t\treturn n;\t\n\t\t}\n\t\treturn null;\n\t}", "VehicleModel findByVehicleModelName(String vehicleModelName);", "Materia findMateriaByNome(String nome);" ]
[ "0.7525826", "0.5965466", "0.5764368", "0.5312596", "0.5130798", "0.5130798", "0.5122882", "0.5083046", "0.5054382", "0.49704832", "0.49250475", "0.48139623", "0.47916391", "0.47685227", "0.47513625", "0.46126464", "0.45814833", "0.45768255", "0.45341337", "0.4519677", "0.4511134", "0.44987094", "0.44943595", "0.4453573", "0.4411149", "0.44038004", "0.43967637", "0.4391234", "0.43829164", "0.43621245", "0.43544132", "0.43445566", "0.43360424", "0.42860058", "0.42849788", "0.4281307", "0.42807603", "0.42745927", "0.42686406", "0.42636502", "0.42593932", "0.42401117", "0.423345", "0.4229489", "0.42195252", "0.42188087", "0.421702", "0.42152634", "0.42100576", "0.4208404", "0.4187235", "0.41848895", "0.4180213", "0.41512656", "0.41377443", "0.41371527", "0.41363487", "0.41240397", "0.41231197", "0.4122086", "0.41166738", "0.409243", "0.40833396", "0.4050146", "0.4037312", "0.40337807", "0.4032112", "0.40247688", "0.40242854", "0.4022224", "0.40197906", "0.40193477", "0.40184155", "0.40130362", "0.40123957", "0.4006985", "0.40040743", "0.39980882", "0.39976692", "0.3992053", "0.3990459", "0.39882046", "0.39855304", "0.3981616", "0.3974219", "0.39712054", "0.39695853", "0.39661193", "0.39649653", "0.39644623", "0.3961852", "0.39611366", "0.39507696", "0.39455387", "0.39442772", "0.39431724", "0.39357248", "0.3935072", "0.39350355", "0.39340344" ]
0.7931381
0
Gets the list of virtual machines in the physical machine synchronizing virtual machines from remote hypervisor with abiquo's database.
public List<VirtualMachine> listRemoteVirtualMachines() { MachineOptions options = MachineOptions.builder().sync(true).build(); VirtualMachinesWithNodeExtendedDto vms = context.getApi().getInfrastructureApi() .listVirtualMachinesByMachine(target, options); return wrap(context, VirtualMachine.class, vms.getCollection()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<VirtualMachine> listVirtualMachines() {\n MachineOptions options = MachineOptions.builder().sync(false).build();\n VirtualMachinesWithNodeExtendedDto vms = context.getApi().getInfrastructureApi()\n .listVirtualMachinesByMachine(target, options);\n return wrap(context, VirtualMachine.class, vms.getCollection());\n }", "public VirtualMachines getVirtualMachines() {\n return virtualMachines;\n }", "public List<VirtualMachineDescriptor> listVirtualMachines() {\n ArrayList<VirtualMachineDescriptor> result =\n new ArrayList<VirtualMachineDescriptor>();\n\n MonitoredHost host;\n Set<Integer> vms;\n try {\n host = MonitoredHost.getMonitoredHost(new HostIdentifier((String)null));\n vms = host.activeVms();\n } catch (Throwable t) {\n if (t instanceof ExceptionInInitializerError) {\n t = t.getCause();\n }\n if (t instanceof ThreadDeath) {\n throw (ThreadDeath)t;\n }\n if (t instanceof SecurityException) {\n return result;\n }\n throw new InternalError(t); // shouldn't happen\n }\n\n for (Integer vmid: vms) {\n String pid = vmid.toString();\n String name = pid; // default to pid if name not available\n boolean isAttachable = false;\n MonitoredVm mvm = null;\n try {\n mvm = host.getMonitoredVm(new VmIdentifier(pid));\n try {\n isAttachable = MonitoredVmUtil.isAttachable(mvm);\n // use the command line as the display name\n name = MonitoredVmUtil.commandLine(mvm);\n } catch (Exception e) {\n }\n if (isAttachable) {\n result.add(new HotSpotVirtualMachineDescriptor(this, pid, name));\n }\n } catch (Throwable t) {\n if (t instanceof ThreadDeath) {\n throw (ThreadDeath)t;\n }\n } finally {\n if (mvm != null) {\n mvm.detach();\n }\n }\n }\n return result;\n }", "public List<VirtualMachine> listRemoteVirtualMachines(final Predicate<VirtualMachine> filter) {\n return Lists.newLinkedList(filter(listVirtualMachines(), filter));\n }", "@Override\n @GET\n @Path(\"/vms\")\n @Produces(\"application/json\")\n public Response getVMs() throws Exception {\n log.trace(\"getVMs() started.\");\n JSONArray json = new JSONArray();\n for (Vm vm : cluster.getVmList()) {\n JSONObject o = new JSONObject();\n String uri = String.format(\"%s/vms/%d\", rootUri, vm.getVmId());\n String vmUri = String.format(\"/providers/%d/vms/%d\", provider.getProviderId(), vm.getVmId());\n o.put(\"uri\", uri);\n o.put(\"baseUri\", vmUri);\n json.put(o);\n }\n\n log.trace(\"getVMs() finished successfully.\");\n return Response.ok(json.toString()).build();\n }", "VirtualMachine[] getPlacedVirtualMachines() {\n VirtualMachine[] vms = new VirtualMachine[mapped_vms.size()];\n mapped_vms.toArray(vms);\n return vms;\n }", "public void printVirtualMachines() throws InvalidProperty, RuntimeFault, RemoteException{\r\n\t\tManagedEntity[] mes = new\r\n\t\t\t\tInventoryNavigator(_instance.getRootFolder()).searchManagedEntities(\"VirtualMachine\");\r\n\t\tfor (int i = 0; i < mes.length; i++) {\r\n\t\t\tVirtualMachine currVm = (VirtualMachine)mes[i];\r\n\t\t\tSystem.out.printf(\"vm[%d]: Name = %s\\n\", i, currVm.getName());\r\n\t\t}\r\n\t}", "public List<ServerHardware> getServers();", "private List<Server> getRemoteServers() {\n if (!isDas())\n throw new RuntimeException(\"Internal Error\"); // todo?\n\n List<Server> notdas = new ArrayList<Server>(targets.size());\n String dasName = serverEnv.getInstanceName();\n\n for (Server server : targets) {\n if (!dasName.equals(server.getName()))\n notdas.add(server);\n }\n\n return notdas;\n }", "public List<VirtualMachine> listVirtualMachines(final Predicate<VirtualMachine> filter) {\n return Lists.newLinkedList(filter(listVirtualMachines(), filter));\n }", "public static ArrayList<VirtualMachine> getListVms(ServiceInstance si,String vmname) throws InvalidProperty, RuntimeFault, RemoteException, MalformedURLException{\n\t\t\tHostSystem hs= hostByname(vmname,si);\n\t\t\t//System.out.println(hs.getName());\n\t\t\tFolder rootFolder = si.getRootFolder();\n\t\t\tString name = rootFolder.getName();\n\t\t\tSystem.out.println(\"root:\" + name);\n\t\t\tSystem.out.println(\"====================================================================\");\n\t\t\tArrayList<VirtualMachine> vms = new ArrayList<VirtualMachine>();\n\t\t\tManagedEntity[] mes = new InventoryNavigator(hs).searchManagedEntities(new String[][] { {\"VirtualMachine\", \"name\" }, }, true);\n\t\t\tfor(int i=0;i<mes.length;i++){\n\t\t\t\tvms.add((VirtualMachine)mes[i]);\n\t\t\t}\n\t\t\treturn vms;\n\t\t\t\n\t\t}", "private EC2DescribeInstancesResponse listVirtualMachines(String[] virtualMachineIds, EC2InstanceFilterSet ifs, List<CloudStackKeyValue> resourceTags)\n throws Exception {\n EC2DescribeInstancesResponse instances = new EC2DescribeInstancesResponse();\n\n if (null == virtualMachineIds || 0 == virtualMachineIds.length) {\n instances = lookupInstances(null, instances, resourceTags);\n } else {\n for (int i = 0; i < virtualMachineIds.length; i++) {\n instances = lookupInstances(virtualMachineIds[i], instances, resourceTags);\n }\n }\n\n if (null == ifs)\n return instances;\n else\n return ifs.evaluate(instances);\n }", "Set<ComputerSnapshot> getSnapshots();", "public List<RegionServer> regionServers() {\n\t\tBufferedReader bufReader = null;\n\t\tInputStreamReader input = null;\n\t\tList<RegionServer> list = new ArrayList<>();\n\t\ttry {\n\t\t\tURL url = new URL(HBase.HTTP + SystemConfig.getProperty(\"hive.cube.hbase.master\") + HBase.HBASE_REGION_SERVER_JMX);\n\t\t\tHttpURLConnection httpConn = (HttpURLConnection) url.openConnection();\n\t\t\tinput = new InputStreamReader(httpConn.getInputStream(), \"UTF-8\");\n\t\t\tbufReader = new BufferedReader(input);\n\t\t\tString line = \"\";\n\t\t\tStringBuilder contentBuf = new StringBuilder();\n\t\t\twhile ((line = bufReader.readLine()) != null) {\n\t\t\t\tcontentBuf.append(line);\n\t\t\t}\n\t\t\tJSONObject tmpBuf = JSON.parseObject(contentBuf.toString());\n\t\t\tJSONObject object = (JSONObject) JSON.parseArray(tmpBuf.getString(\"beans\")).get(0);\n\t\t\tString[] liveRegionServers = object.getString(\"tag.liveRegionServers\").split(\";\");\n\t\t\tfor (String node : liveRegionServers) {\n\t\t\t\tif (node.length() != 0) {\n\t\t\t\t\tRegionServer region = new RegionServer();\n\t\t\t\t\tregion.setRegionName(node.split(\",\")[0] + \":\" + node.split(\",\")[1]);\n\t\t\t\t\tregion.setStartTime(CalendarUtils.convertUnixTime(Long.parseLong(node.split(\",\")[2])));\n\t\t\t\t\tregion.setLive(true);\n\t\t\t\t\tlist.add(region);\n\t\t\t\t}\n\t\t\t}\n\t\t\tString[] deadRegionServers = object.getString(\"tag.deadRegionServers\").split(\";\");\n\t\t\tfor (String node : deadRegionServers) {\n\t\t\t\tif (node.length() != 0) {\n\t\t\t\t\tRegionServer region = new RegionServer();\n\t\t\t\t\tregion.setRegionName(node.split(\",\")[0] + \":\" + node.split(\",\")[1]);\n\t\t\t\t\tregion.setStartTime(CalendarUtils.convertUnixTime(Long.parseLong(node.split(\",\")[2])));\n\t\t\t\t\tregion.setLive(false);\n\t\t\t\t\tlist.add(region);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLOG.error(\"Filter[Region] HBase JMX has error,msg is \" + e.getMessage());\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (input != null) {\n\t\t\t\t\tinput.close();\n\t\t\t\t}\n\t\t\t\tif (bufReader != null) {\n\t\t\t\t\tbufReader.close();\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tLOG.error(\"Close IO has error,msg is \" + e.getMessage());\n\t\t\t}\n\t\t}\n\n\t\treturn list;\n\t}", "public String[] getVirtualHosts() {\n return _virtualHosts;\n }", "public Set<Long> getVirtualSystemIds() {\n return virtualSystemIds;\n }", "public List<SubResource> resolutionVirtualNetworks() {\n return this.resolutionVirtualNetworks;\n }", "List<Long> getServers();", "public List<Computer> getAll(){\n\t\treturn getWithLimit(-1,-1);\n\t}", "public List<SubResource> registrationVirtualNetworks() {\n return this.registrationVirtualNetworks;\n }", "public interface VirtualMachines {\n /**\n * Implements list virtual machine within subscription method\n *\n * <p>Returns list virtual machine within subscription.\n *\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return list of virtual machines as paginated response with {@link PagedIterable}.\n */\n PagedIterable<VirtualMachine> list();\n\n /**\n * Implements list virtual machine within subscription method\n *\n * <p>Returns list virtual machine within subscription.\n *\n * @param filter The filter to apply on the list operation.\n * @param top The maximum number of record sets to return.\n * @param skipToken to be used by nextLink implementation.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return list of virtual machines as paginated response with {@link PagedIterable}.\n */\n PagedIterable<VirtualMachine> list(String filter, Integer top, String skipToken, Context context);\n\n /**\n * Implements list virtual machine within RG method\n *\n * <p>Returns list of virtual machine within resource group.\n *\n * @param resourceGroupName The name of the resource group.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return list of virtual machines as paginated response with {@link PagedIterable}.\n */\n PagedIterable<VirtualMachine> listByResourceGroup(String resourceGroupName);\n\n /**\n * Implements list virtual machine within RG method\n *\n * <p>Returns list of virtual machine within resource group.\n *\n * @param resourceGroupName The name of the resource group.\n * @param filter The filter to apply on the list operation.\n * @param top The maximum number of record sets to return.\n * @param skipToken to be used by nextLink implementation.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return list of virtual machines as paginated response with {@link PagedIterable}.\n */\n PagedIterable<VirtualMachine> listByResourceGroup(\n String resourceGroupName, String filter, Integer top, String skipToken, Context context);\n\n /**\n * Implements virtual machine GET method\n *\n * <p>Get virtual machine.\n *\n * @param resourceGroupName The name of the resource group.\n * @param virtualMachineName virtual machine name.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return virtual machine along with {@link Response}.\n */\n Response<VirtualMachine> getByResourceGroupWithResponse(\n String resourceGroupName, String virtualMachineName, Context context);\n\n /**\n * Implements virtual machine GET method\n *\n * <p>Get virtual machine.\n *\n * @param resourceGroupName The name of the resource group.\n * @param virtualMachineName virtual machine name.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return virtual machine.\n */\n VirtualMachine getByResourceGroup(String resourceGroupName, String virtualMachineName);\n\n /**\n * Implements virtual machine DELETE method\n *\n * <p>Delete virtual machine.\n *\n * @param resourceGroupName The name of the resource group.\n * @param referer referer url.\n * @param virtualMachineName virtual machine name.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void delete(String resourceGroupName, String referer, String virtualMachineName);\n\n /**\n * Implements virtual machine DELETE method\n *\n * <p>Delete virtual machine.\n *\n * @param resourceGroupName The name of the resource group.\n * @param referer referer url.\n * @param virtualMachineName virtual machine name.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void delete(String resourceGroupName, String referer, String virtualMachineName, Context context);\n\n /**\n * Implements a start method for a virtual machine\n *\n * <p>Power on virtual machine.\n *\n * @param resourceGroupName The name of the resource group.\n * @param referer referer url.\n * @param virtualMachineName virtual machine name.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void start(String resourceGroupName, String referer, String virtualMachineName);\n\n /**\n * Implements a start method for a virtual machine\n *\n * <p>Power on virtual machine.\n *\n * @param resourceGroupName The name of the resource group.\n * @param referer referer url.\n * @param virtualMachineName virtual machine name.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void start(String resourceGroupName, String referer, String virtualMachineName, Context context);\n\n /**\n * Implements shutdown, poweroff, and suspend method for a virtual machine\n *\n * <p>Power off virtual machine, options: shutdown, poweroff, and suspend.\n *\n * @param resourceGroupName The name of the resource group.\n * @param referer referer url.\n * @param virtualMachineName virtual machine name.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void stop(String resourceGroupName, String referer, String virtualMachineName);\n\n /**\n * Implements shutdown, poweroff, and suspend method for a virtual machine\n *\n * <p>Power off virtual machine, options: shutdown, poweroff, and suspend.\n *\n * @param resourceGroupName The name of the resource group.\n * @param referer referer url.\n * @param virtualMachineName virtual machine name.\n * @param mode query stop mode parameter (reboot, shutdown, etc...).\n * @param m body stop mode parameter (reboot, shutdown, etc...).\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void stop(\n String resourceGroupName,\n String referer,\n String virtualMachineName,\n StopMode mode,\n VirtualMachineStopMode m,\n Context context);\n\n /**\n * Implements virtual machine GET method\n *\n * <p>Get virtual machine.\n *\n * @param id the resource ID.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return virtual machine along with {@link Response}.\n */\n VirtualMachine getById(String id);\n\n /**\n * Implements virtual machine GET method\n *\n * <p>Get virtual machine.\n *\n * @param id the resource ID.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return virtual machine along with {@link Response}.\n */\n Response<VirtualMachine> getByIdWithResponse(String id, Context context);\n\n /**\n * Implements virtual machine DELETE method\n *\n * <p>Delete virtual machine.\n *\n * @param id the resource ID.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void deleteById(String id);\n\n /**\n * Implements virtual machine DELETE method\n *\n * <p>Delete virtual machine.\n *\n * @param id the resource ID.\n * @param referer referer url.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void deleteByIdWithResponse(String id, String referer, Context context);\n\n /**\n * Begins definition for a new VirtualMachine resource.\n *\n * @param name resource name.\n * @return the first stage of the new VirtualMachine definition.\n */\n VirtualMachine.DefinitionStages.Blank define(String name);\n}", "@Override\n public List<InstanceOverallStatusDto> syncInstances(List<Manifest.Key> given) {\n List<InstanceDto> list = list();\n List<Manifest.Key> instances = (given == null || given.isEmpty()) ? list.stream().map(d -> d.instance).toList() : given;\n Set<String> errors = new TreeSet<>();\n\n // on CENTRAL only, synchronize managed servers. only after that we know all instances.\n if (minion.getMode() == MinionMode.CENTRAL) {\n List<ManagedMasterDto> toSync = list.stream().filter(i -> instances.contains(i.instance)).map(i -> i.managedServer)\n .toList();\n\n log.info(\"Mass-synchronize {} server(s).\", toSync.size());\n\n ManagedServersResource rs = rc.initResource(new ManagedServersResourceImpl());\n try (Activity sync = reporter.start(\"Synchronize Servers\", toSync.size())) {\n AtomicLong syncNo = new AtomicLong(0);\n ExecutorService es = Executors.newFixedThreadPool(4, new RequestScopedNamedDaemonThreadFactory(reqScope,\n reg.get(group).getTransactions(), reporter, () -> \"Mass-Synchronizer \" + syncNo.incrementAndGet()));\n List<Future<?>> syncTasks = new ArrayList<>();\n for (ManagedMasterDto host : toSync) {\n syncTasks.add(es.submit(() -> {\n try (Activity singleSync = reporter.start(\"Synchronize \" + host.hostName)) {\n if (log.isDebugEnabled()) {\n log.debug(\"Synchronize {}\", host.hostName);\n }\n rs.synchronize(group, host.hostName);\n } catch (Exception e) {\n errors.add(host.hostName);\n log.warn(\"Could not synchronize managed server: {}: {}\", host.hostName, e.toString());\n if (log.isDebugEnabled()) {\n log.debug(\"Exception:\", e);\n }\n }\n sync.workAndCancelIfRequested(1);\n }));\n }\n\n FutureHelper.awaitAll(syncTasks);\n es.shutdown(); // make all threads exit :)\n }\n } else {\n // update the local stored state.\n ResourceProvider.getResource(minion.getSelf(), MasterRootResource.class, context).getNamedMaster(group)\n .updateOverallStatus();\n }\n\n // for each instance, read the meta-manifest, and provide the recorded data.\n var result = new ArrayList<InstanceOverallStatusDto>();\n for (var inst : list.stream().filter(i -> instances.contains(i.instance)).toList()) {\n if (inst.managedServer != null && inst.managedServer.hostName != null\n && errors.contains(inst.managedServer.hostName)) {\n continue; // no state as we could not sync.\n }\n result.add(new InstanceOverallStatusDto(inst.instanceConfiguration.id,\n new InstanceOverallState(inst.instance, hive).read()));\n }\n\n return result;\n }", "public RemoteIdentities remoteIdentities() {\n return this.remoteIdentities;\n }", "List<Computer> findAll();", "public Collection< Remote > getPreferredRemotes()\n {\n ArrayList< Remote > remotes = new ArrayList< Remote >( preferredListModel.size() );\n for ( Enumeration< ? > e = preferredListModel.elements(); e.hasMoreElements(); )\n remotes.add( ( Remote )e.nextElement() );\n return remotes;\n }", "@ServiceMethod(returns = ReturnType.COLLECTION)\n private PagedFlux<VirtualMachineScaleSetVMInner> listAsync(\n String resourceGroupName,\n String virtualMachineScaleSetName,\n String filter,\n String select,\n String expand,\n Context context) {\n return new PagedFlux<>(\n () -> listSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, filter, select, expand, context),\n nextLink -> listNextSinglePageAsync(nextLink, context));\n }", "@ServiceMethod(returns = ReturnType.COLLECTION)\n public PagedFlux<VirtualMachineScaleSetVMInner> listAsync(\n String resourceGroupName, String virtualMachineScaleSetName) {\n final String filter = null;\n final String select = null;\n final String expand = null;\n return new PagedFlux<>(\n () -> listSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, filter, select, expand),\n nextLink -> listNextSinglePageAsync(nextLink));\n }", "private List<User> syncDataFromMaster() {\n\n// if (getHostPostOfServer().equals(ClusterInfo.getClusterInfo().getMaster())) {\n// return;\n// }\n String requestUrl;\n requestUrl = \"http://\".concat(ClusterInfo.getClusterInfo().getMaster().concat(\"/users\"));\n List<User> users = restTemplate.getForObject(requestUrl, List.class);\n return users;\n\n }", "public Map<String, Host> getVmTable() {\n\t\treturn vmTable;\n\t}", "public List<String> listAllRemoteSites () {\r\n\t\ttry {\r\n\t\t\tList<String> urls = new ArrayList<String>();\r\n\t\t\tpstmt = conn.prepareStatement(\"SELECT * FROM RemoteSite\");\r\n\t\t\trset = pstmt.executeQuery();\r\n\t\t\twhile (rset.next()) {\r\n\t\t\t\turls.add(rset.getString(\"url\"));\r\n\t\t\t}\r\n\t\t\treturn urls;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t} finally {\r\n\t\t\tDatabaseConnection.closeStmt(pstmt, rset);\r\n\t\t}\r\n\t}", "public List<GcGrouperSyncMember> retrieveGcGrouperSyncMembers() {\n List<GcGrouperSyncMember> result = new ArrayList<GcGrouperSyncMember>();\n for (ProvisioningEntityWrapper provisioningEntityWrapper : this.provisioningEntityWrappers) {\n GcGrouperSyncMember gcGrouperSyncMember = provisioningEntityWrapper.getGcGrouperSyncMember();\n if (gcGrouperSyncMember != null) {\n result.add(gcGrouperSyncMember);\n }\n }\n return result;\n }", "public PropertyRemoteServers getServers() {\n return this.m_Servers;\n }", "@Override\n\tpublic List<VIP> findAllVIP() {\n\t\treturn vb.findAll();\n\t}", "public java.util.List<io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsVirtualDomain> getVirtualDomainsList() {\n if (virtualDomainsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(virtualDomains_);\n } else {\n return virtualDomainsBuilder_.getMessageList();\n }\n }", "public List<Host> selectALL() {\n Statement stm = null;\n ResultSet rs = null;\n List<Host> hostList = new ArrayList<Host>();\n try {\n // conn = SQLiteDataSource.getDataSource().getConnection();\n // conn.setAutoCommit(true);\n\n stm = conn.createStatement();\n rs = stm.executeQuery(selectSQL);\n\n while (rs.next()) {\n Host host = new Host(rs.getInt(\"id\"), rs.getString(\"host_name\"), rs.getString(\"profile\"),\n rs.getInt(\"web_port\"), rs.getInt(\"admin_port\"));\n hostList.add(host);\n }\n } catch (SQLException e) {\n logger.error(e.getMessage(), e);\n } finally {\n try {\n if (rs != null) {\n rs.close();\n }\n if (stm != null) {\n stm.close();\n }\n } catch (SQLException e) {\n logger.error(e.getMessage(), e);\n }\n }\n\n return hostList;\n }", "public ArrayList<VirtualMachineVMImageListResponse.VirtualMachineVMImage> getVMImages() {\n return this.vMImages;\n }", "@Override\n\tpublic List<Parking> VIPparkings() {\n\t\treturn parkingRepository.VIPparkings();\n\t}", "public Iterator<VirtualMachine> iterator() {\n return mapped_vms.iterator();\n }", "public List<VirtualHost> getHosts() {\r\n return this.hosts;\r\n }", "public String listSync() throws IOException {\n\t\treturn listSync(null, null, null, null);\n\t}", "List<MemberRegistration> getRemoteMembers()\n {\n if (cohortRegistry != null)\n {\n return cohortRegistry.getRemoteMembers();\n }\n\n return null;\n }", "public interface VirtualMachines {\n /**\n * The operation to assess patches on a vSphere VMware machine identity in Azure.\n *\n * @param resourceGroupName The name of the resource group.\n * @param name The name of the vSphere VMware machine.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return describes the properties of an AssessPatches result.\n */\n VirtualMachineAssessPatchesResult assessPatches(String resourceGroupName, String name);\n\n /**\n * The operation to assess patches on a vSphere VMware machine identity in Azure.\n *\n * @param resourceGroupName The name of the resource group.\n * @param name The name of the vSphere VMware machine.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return describes the properties of an AssessPatches result.\n */\n VirtualMachineAssessPatchesResult assessPatches(String resourceGroupName, String name, Context context);\n\n /**\n * The operation to install patches on a vSphere VMware machine identity in Azure.\n *\n * @param resourceGroupName The name of the resource group.\n * @param name The name of the vSphere VMware machine.\n * @param installPatchesInput Input for InstallPatches as directly received by the API.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the result summary of an installation operation.\n */\n VirtualMachineInstallPatchesResult installPatches(\n String resourceGroupName, String name, VirtualMachineInstallPatchesParameters installPatchesInput);\n\n /**\n * The operation to install patches on a vSphere VMware machine identity in Azure.\n *\n * @param resourceGroupName The name of the resource group.\n * @param name The name of the vSphere VMware machine.\n * @param installPatchesInput Input for InstallPatches as directly received by the API.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the result summary of an installation operation.\n */\n VirtualMachineInstallPatchesResult installPatches(\n String resourceGroupName,\n String name,\n VirtualMachineInstallPatchesParameters installPatchesInput,\n Context context);\n\n /**\n * Gets a virtual machine.\n *\n * <p>Implements virtual machine GET method.\n *\n * @param resourceGroupName The Resource Group Name.\n * @param virtualMachineName Name of the virtual machine resource.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return define the virtualMachine.\n */\n VirtualMachine getByResourceGroup(String resourceGroupName, String virtualMachineName);\n\n /**\n * Gets a virtual machine.\n *\n * <p>Implements virtual machine GET method.\n *\n * @param resourceGroupName The Resource Group Name.\n * @param virtualMachineName Name of the virtual machine resource.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return define the virtualMachine along with {@link Response}.\n */\n Response<VirtualMachine> getByResourceGroupWithResponse(\n String resourceGroupName, String virtualMachineName, Context context);\n\n /**\n * Deletes an virtual machine.\n *\n * <p>Implements virtual machine DELETE method.\n *\n * @param resourceGroupName The Resource Group Name.\n * @param virtualMachineName Name of the virtual machine resource.\n * @param force Whether force delete was specified.\n * @param retain Whether to just disable the VM from azure and retain the VM in the VMM.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void delete(String resourceGroupName, String virtualMachineName, Boolean force, Boolean retain);\n\n /**\n * Deletes an virtual machine.\n *\n * <p>Implements virtual machine DELETE method.\n *\n * @param resourceGroupName The Resource Group Name.\n * @param virtualMachineName Name of the virtual machine resource.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void delete(String resourceGroupName, String virtualMachineName);\n\n /**\n * Deletes an virtual machine.\n *\n * <p>Implements virtual machine DELETE method.\n *\n * @param resourceGroupName The Resource Group Name.\n * @param virtualMachineName Name of the virtual machine resource.\n * @param force Whether force delete was specified.\n * @param retain Whether to just disable the VM from azure and retain the VM in the VMM.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void delete(String resourceGroupName, String virtualMachineName, Boolean force, Boolean retain, Context context);\n\n /**\n * Implements the operation to stop a virtual machine.\n *\n * <p>Stop virtual machine.\n *\n * @param resourceGroupName The Resource Group Name.\n * @param virtualMachineName Name of the virtual machine resource.\n * @param body Virtualmachine stop action payload.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void stop(String resourceGroupName, String virtualMachineName, StopVirtualMachineOptions body);\n\n /**\n * Implements the operation to stop a virtual machine.\n *\n * <p>Stop virtual machine.\n *\n * @param resourceGroupName The Resource Group Name.\n * @param virtualMachineName Name of the virtual machine resource.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void stop(String resourceGroupName, String virtualMachineName);\n\n /**\n * Implements the operation to stop a virtual machine.\n *\n * <p>Stop virtual machine.\n *\n * @param resourceGroupName The Resource Group Name.\n * @param virtualMachineName Name of the virtual machine resource.\n * @param body Virtualmachine stop action payload.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void stop(String resourceGroupName, String virtualMachineName, StopVirtualMachineOptions body, Context context);\n\n /**\n * Implements the operation to start a virtual machine.\n *\n * <p>Start virtual machine.\n *\n * @param resourceGroupName The Resource Group Name.\n * @param virtualMachineName Name of the virtual machine resource.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void start(String resourceGroupName, String virtualMachineName);\n\n /**\n * Implements the operation to start a virtual machine.\n *\n * <p>Start virtual machine.\n *\n * @param resourceGroupName The Resource Group Name.\n * @param virtualMachineName Name of the virtual machine resource.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void start(String resourceGroupName, String virtualMachineName, Context context);\n\n /**\n * Implements the operation to restart a virtual machine.\n *\n * <p>Restart virtual machine.\n *\n * @param resourceGroupName The Resource Group Name.\n * @param virtualMachineName Name of the virtual machine resource.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void restart(String resourceGroupName, String virtualMachineName);\n\n /**\n * Implements the operation to restart a virtual machine.\n *\n * <p>Restart virtual machine.\n *\n * @param resourceGroupName The Resource Group Name.\n * @param virtualMachineName Name of the virtual machine resource.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void restart(String resourceGroupName, String virtualMachineName, Context context);\n\n /**\n * Implements GET virtualMachines in a subscription.\n *\n * <p>List of virtualMachines in a subscription.\n *\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return list of VirtualMachines as paginated response with {@link PagedIterable}.\n */\n PagedIterable<VirtualMachine> list();\n\n /**\n * Implements GET virtualMachines in a subscription.\n *\n * <p>List of virtualMachines in a subscription.\n *\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return list of VirtualMachines as paginated response with {@link PagedIterable}.\n */\n PagedIterable<VirtualMachine> list(Context context);\n\n /**\n * Implements GET virtualMachines in a resource group.\n *\n * <p>List of virtualMachines in a resource group.\n *\n * @param resourceGroupName The Resource Group Name.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return list of VirtualMachines as paginated response with {@link PagedIterable}.\n */\n PagedIterable<VirtualMachine> listByResourceGroup(String resourceGroupName);\n\n /**\n * Implements GET virtualMachines in a resource group.\n *\n * <p>List of virtualMachines in a resource group.\n *\n * @param resourceGroupName The Resource Group Name.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return list of VirtualMachines as paginated response with {@link PagedIterable}.\n */\n PagedIterable<VirtualMachine> listByResourceGroup(String resourceGroupName, Context context);\n\n /**\n * Gets a virtual machine.\n *\n * <p>Implements virtual machine GET method.\n *\n * @param id the resource ID.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return define the virtualMachine along with {@link Response}.\n */\n VirtualMachine getById(String id);\n\n /**\n * Gets a virtual machine.\n *\n * <p>Implements virtual machine GET method.\n *\n * @param id the resource ID.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return define the virtualMachine along with {@link Response}.\n */\n Response<VirtualMachine> getByIdWithResponse(String id, Context context);\n\n /**\n * Deletes an virtual machine.\n *\n * <p>Implements virtual machine DELETE method.\n *\n * @param id the resource ID.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void deleteById(String id);\n\n /**\n * Deletes an virtual machine.\n *\n * <p>Implements virtual machine DELETE method.\n *\n * @param id the resource ID.\n * @param force Whether force delete was specified.\n * @param retain Whether to just disable the VM from azure and retain the VM in the VMM.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void deleteByIdWithResponse(String id, Boolean force, Boolean retain, Context context);\n\n /**\n * Begins definition for a new VirtualMachine resource.\n *\n * @param name resource name.\n * @return the first stage of the new VirtualMachine definition.\n */\n VirtualMachine.DefinitionStages.Blank define(String name);\n}", "public String getRemoteComputerString(){\n return this.remoteComputerString;\n }", "public Long [] getMonManagedIds() {\n return this.MonManagedIds;\n }", "List<Server> servers() {\n return servers;\n }", "public ArrayList<String> getDbSlaves() throws JsonSyntaxException, JsonIOException, IOException {\n ArrayList<String> dbslaves = new ArrayList<>();\n if (dbhosts != null) {\n for (String h : dbhosts) {\n dbslaves.add(h);\n }\n return dbslaves;\n }\n if (slavesFile != null) {\n File f = new File(slavesFile);\n FileInputStream input = new FileInputStream(f);\n Gson gson = new Gson();\n Hosts hosts = gson.fromJson(new InputStreamReader(input), Hosts.class);\n dbhosts = hosts.getHosts();\n if (hosts != null) {\n for (String host : hosts.getHosts()) {\n dbslaves.add(host);\n }\n }\n }\n return dbslaves;\n }", "public java.lang.String[] getRemoteHostNames() {\r\n return remoteHostNames;\r\n }", "public MyVM(String virtual_machine_name)\n {\n \ttry\n \t{\n \t\tthis.vmname= virtual_machine_name;\n \t\tthis.si=new ServiceInstance(new URL(SJSULAB.getVmwareHostURL()),\n\t\t\t\t\tSJSULAB.getVmwareLogin(), SJSULAB.getVmwarePassword(), true);\n \t\t\n \t\tthis.folder = si.getRootFolder();\n \t\tthis.vm=(VirtualMachine) new InventoryNavigator(folder).searchManagedEntity(\"VirtualMachine\",\n \t\t\t\tthis.vmname);\n \t\tSystem.out.println(\"MyVM, vm value : \"+vm);\n \t\t\n \t\tthis.hs= (HostSystem) new InventoryNavigator(folder).searchManagedEntity(\"HostSystem\", \"130.65.132.194\");\n \t\tSystem.out.println(\"MyVM, HS value : \"+hs);\n \t\tthis.snapshotname=\"snap2\";\n \t\t\n \t}\n \tcatch(Exception e)\n \t{\n \t\tSystem.out.println(e.toString());\n \t}\n }", "public List<Server> getAllServers(){\n\t\tlogger.info(\"Getting the all server details\");\n\t\treturn new ArrayList<Server>(servers.values());\n\t}", "public NetworkInstance[] getServers();", "java.util.List<io.netifi.proteus.admin.om.Connection> \n getConnectionsList();", "@ServiceMethod(returns = ReturnType.COLLECTION)\n public PagedFlux<VirtualMachineScaleSetVMInner> listAsync(\n String resourceGroupName, String virtualMachineScaleSetName, String filter, String select, String expand) {\n return new PagedFlux<>(\n () -> listSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, filter, select, expand),\n nextLink -> listNextSinglePageAsync(nextLink));\n }", "public List<Person> getListSynchronsprecher() {\n\t\treturn this.listSynchronsprecher;\n\t}", "private List<Machine> placeholderMachines(List<String> names) {\n List<Machine> placeholderMachines = Lists.newArrayListWithCapacity(names.size());\n VsphereProvisioningTemplate provisioningTemplate = driverConfig\n .parseProvisioningTemplate(VsphereProvisioningTemplate.class);\n\n for (String name : names) {\n placeholderMachines.add(Machine.builder().id(name).cloudProvider(CloudProviders.VSPHERE)\n .machineSize(\"unknown\").region(provisioningTemplate.getResourcePool())\n .machineState(MachineState.PENDING).launchTime(UtcTime.now()).build());\n }\n return placeholderMachines;\n }", "Server remote(Server bootstrap, Database<S> vat);", "public List<GcGrouperSyncMembership> retrieveGcGrouperSyncMemberships() {\n List<GcGrouperSyncMembership> result = new ArrayList<GcGrouperSyncMembership>();\n for (ProvisioningMembershipWrapper provisioningMembershipWrapper : this.provisioningMembershipWrappers) {\n GcGrouperSyncMembership gcGrouperSyncMembership = provisioningMembershipWrapper.getGcGrouperSyncMembership();\n if (gcGrouperSyncMembership != null) {\n result.add(gcGrouperSyncMembership);\n }\n }\n return result;\n }", "@Test(groups = {NETWORK_INTEGRATION_TESTS})\n public void getPrivateNetworkIPsByVirtualDatacenterOrderByVirtualMachine()\n {\n RemoteService rs = remoteServiceGenerator.createInstance(RemoteServiceType.DHCP_SERVICE);\n VirtualDatacenter vdc = vdcGenerator.createInstance(rs.getDatacenter());\n setup(vdc.getDatacenter(), rs, vdc.getEnterprise(), vdc.getNetwork(), vdc);\n VLANNetwork vlan = vlanGenerator.createInstance(vdc.getNetwork(), rs, \"255.255.255.0\");\n setup(vlan.getConfiguration(), vlan);\n\n IPAddress ip = IPAddress.newIPAddress(vlan.getConfiguration().getAddress()).nextIPAddress();\n IPAddress lastIP =\n IPNetworkRang.lastIPAddressWithNumNodes(\n IPAddress.newIPAddress(vlan.getConfiguration().getAddress()),\n IPNetworkRang.masktoNumberOfNodes(vlan.getConfiguration().getMask()));\n\n persistIP(ip, lastIP, vdc, vlan);\n\n String validURI = resolveVirtualDatacenterActionGetIPsURI(vdc.getId());\n validURI = validURI + \"?by=virtualmachine\";\n\n ClientResponse response =\n get(validURI, SYSADMIN, SYSADMIN, IpsPoolManagementDto.MEDIA_TYPE);\n assertEquals(response.getStatusCode(), Status.OK.getStatusCode());\n }", "@java.lang.Override\n public java.util.List<io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsVirtualDomain> getVirtualDomainsList() {\n return virtualDomains_;\n }", "public static ArrayList<InstanceEntity> getInstances() {\n ILifeCycleServiceRest resourceserviceproxy =\n ConsumerFactory.createConsumer(MsbUtil.getNsocLifecycleBaseUrl(),\n ILifeCycleServiceRest.class);\n String result = \"\";\n try {\n result = resourceserviceproxy.getVnfInstances();\n } catch (Exception e1) {\n LOG.error(\"query vim info faild.\", e1);\n return null;\n }\n if (ToolUtil.isEmptyString(result)) {\n return null;\n }\n\n Gson gson = new Gson();\n Type listType = new TypeToken<ArrayList<InstanceEntity>>() {}.getType();\n return gson.fromJson(result, listType);\n }", "public String vmwareMachineId() {\n return this.vmwareMachineId;\n }", "List<String> getHosts();", "private void getComputers() {\n DatabaseReference ref = FirebaseDatabase.getInstance().getReference(\"Computer\");\n ref.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n for (DataSnapshot ds : dataSnapshot.getChildren()) {\n Computer c = ds.getValue(Computer.class);\n computers.add(c);\n }\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }", "public List<ContentInterventoBOBean> execGetAll() {\n System.out.println(\"InterventoLogics - execGetAll\");\n InterventoClient client = new InterventoClient(new ContentInterventoRequestBean());\n try {\n client.getAll();\n return BOFactory.convertWorkableToBOInterventi(client.getResList());\n }catch(Exception e){\n e.printStackTrace();\n }\n return null;\n }", "List<Uuid> getActivePeers() throws RemoteException;", "@DataProvider(name = \"sBoxBrowsersProvider\", parallel=true)\n public Object[][] getRemoteDrivers() throws MalformedURLException {\n DesiredCapabilities firefoxCapabs = DesiredCapabilities.firefox();\n\n //firefoxCapabs.setPlatform(Platform.LINUX);\n //firefoxCapabs.setCapability(\"e34:auth\", \"sjej35po2vgxd7yg\");\n //firefoxCapabs.setCapability(\"e34:video\", true);\n //firefoxCapabs.setCapability(\"acceptInsecureCerts\", true);\n\n\n // Return Chrome capabilities object\n DesiredCapabilities chromeCaps = DesiredCapabilities.chrome();\n\n chromeCaps.setPlatform(Platform.LINUX);\n chromeCaps.setCapability(\"e34:auth\", \"sjej35po2vgxd7yg\");\n chromeCaps.setCapability(\"e34:video\", true);\n chromeCaps.setCapability(\"acceptInsecureCerts\", true);\n\n\n return new Object[][]{\n {firefoxCapabs},\n //{chromeCaps}\n };\n\n }", "org.jacorb.imr.HostInfo[] list_hosts();", "public Worklist[] getWorklists() throws MEMEException {\n configureClient(client);\n client.setMidService(getMidService());\n return client.getCurrentWorklists();\n }", "public List<String> getAddresses() throws RemoteException {\n\t\tList<String> addresses = new ArrayList<String>();\n\t\tif (this.registry != null) {\n\t\t\tfor (IServer server : this.serverList.getServers()) {\n\t\t\t\taddresses.add(server.getFullAddress());\n\t\t\t}\n\t\t}\n\t\treturn addresses;\n\t}", "@Override\n public synchronized List<MemberRegistration> retrieveRemoteRegistrations()\n {\n /*\n * Ensure the current properties are retrieved from the registry.\n */\n CohortMembership registryStoreProperties = this.retrieveRegistryStoreProperties();\n Map<String, MemberRegistration> remoteMemberMap = this.getRemoteMemberMap(registryStoreProperties.getRemoteRegistrations());\n\n if (remoteMemberMap.isEmpty())\n {\n return null;\n }\n else\n {\n return new ArrayList<>(remoteMemberMap.values());\n }\n }", "public Vector<ServidorOcsp> getServidores() {\n\n\t\tVector<ServidorOcsp> copy = null;\n\t\tint total2 = servidores.size();\n\t\t\n\t\ttry {\n\t\t\tcopy = new Vector<ServidorOcsp>();\n\t\t\tfor (int i=0;i<total2;i++)\n\t\t\t\tcopy.add((ServidorOcsp)servidores.get(i).clone());\n\t\t} catch (CloneNotSupportedException e) {\t\t\n\t\t\tlogger.error(e.getMessage());\n\t\t}\n\t\treturn copy;\n\t}", "public List<FileServer> viewAllFileServer() {\n\t\tList<FileServer> fileservers=getHibernateTemplate().find(\"from FileServer\");\r\n\t\t//另外一种方法\r\n\t\t/*Session session=getHibernateTemplate().getSessionFactory().openSession();\r\n\t\tTransaction ts=session.beginTransaction();\r\n\t\tQuery query=session.createQuery(\"from FileServer\");\r\n\t\t\r\n\t\tList<FileServer> fileservers=query.list();\r\n\t\t\r\n\t\tts.commit();\r\n\t\tsession.close();\r\n\t\tsession=null;*/\r\n\t\treturn fileservers;\r\n\t}", "java.util.List<io.netifi.proteus.admin.om.Connection> \n getConnectionList();", "public ArrayList<Server> getServers(){\n return this.serversList;\n }", "@Override\n\tpublic DataVO<CitrixDesktopMachine> list(CitrixDesktopMachineForm f) {\n\t\treturn null;\n\t}", "@Exported\n public ArrayList<Slave> getSlaves() {\n return this.slaves;\n }", "public Vector<Cars> getCars() {\n\t\tVector<Cars> v = new Vector<Cars>();\n\t\ttry {\n\t\t\tStatement stmt = conn.createStatement();\n\t\t\tResultSet rs = stmt\n\t\t\t\t\t.executeQuery(\"select * from vehicle_details order by vehicle_reg\");\n\t\t\twhile (rs.next()) {\n\t\t\t\tString reg = rs.getString(1);\n\t\t\t\tString make = rs.getString(2);\n\t\t\t\tString model = rs.getString(3);\n\t\t\t\tString drive = rs.getString(4);\n\t\t\t\tCars cars = new Cars(reg, make, model, drive);\n\t\t\t\tv.add(cars);\n\t\t\t}\n\t\t}\n\n\t\tcatch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn v;\n\t}", "Map<ServerName, List<String>> getDeployedHRIs(final HBaseAdmin admin) throws IOException {\n ClusterStatus status = admin.getClusterStatus();\n Collection<ServerName> regionServers = status.getServers();\n Map<ServerName, List<String>> mm =\n new HashMap<ServerName, List<String>>();\n for (ServerName hsi : regionServers) {\n AdminProtos.AdminService.BlockingInterface server = ((HConnection) connection).getAdmin(hsi);\n\n // list all online regions from this region server\n List<HRegionInfo> regions = ProtobufUtil.getOnlineRegions(server);\n List<String> regionNames = new ArrayList<String>();\n for (HRegionInfo hri : regions) {\n regionNames.add(hri.getRegionNameAsString());\n }\n mm.put(hsi, regionNames);\n }\n return mm;\n }", "List<storage_server_connections> getAllForLun(String lunId);", "@ZAttr(id=352)\n public String[] getVirtualHostname() {\n return getMultiAttr(Provisioning.A_zimbraVirtualHostname);\n }", "public List<ServerServices> listServerServices();", "public java.util.List<? extends io.envoyproxy.envoy.data.dns.v3.DnsTable.DnsVirtualDomainOrBuilder> \n getVirtualDomainsOrBuilderList() {\n if (virtualDomainsBuilder_ != null) {\n return virtualDomainsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(virtualDomains_);\n }\n }", "public void helloVM()\n {\n \ttry {\n\n\t\t\t\n\t\t\tVirtualMachineConfigInfo vminfo = vm.getConfig();\n\t\t\tVirtualMachineCapability vmc = vm.getCapability();\n\t\t\tVirtualMachineRuntimeInfo vmri = vm.getRuntime();\n\t\t\tVirtualMachineSummary vmsum = vm.getSummary();\n\n\t\t\t\n\t\t\tSystem.out.println(\"------------------------------------------\");\n\t\t\tSystem.out.println(\"VM Information : \");\n\t\t\t\n\t\t\tSystem.out.println(\"VM Name: \" + vminfo.getName());\n\t\t\tSystem.out.println(\"VM OS: \" + vminfo.getGuestFullName());\n\t\t\tSystem.out.println(\"VM ID: \" + vminfo.getGuestId());\n\t\t\tSystem.out.println(\"VM Guest IP Address is \" +vm.getGuest().getIpAddress());\n\t\t\t\n\n\t\t\tSystem.out.println(\"------------------------------------------\");\n\t\t\tSystem.out.println(\"Resource Pool Informtion : \");\n\t\t\t\n\t\t\tSystem.out.println(\"Resource pool: \" +vm.getResourcePool());\n\t\t\t\n\t\t\tSystem.out.println(\"VM Parent: \" +vm.getParent());\n\t\t\t//System.out.println(\"VM Values: \" +vm.getValues());\n\t\t\tSystem.out.println(\"Multiple snapshot supported: \"\t+ vmc.isMultipleSnapshotsSupported());\n\t\t\tSystem.out.println(\"Powered Off snapshot supported: \"+vmc.isPoweredOffSnapshotsSupported());\n\t\t\tSystem.out.println(\"Connection State: \" + vmri.getConnectionState());\n\t\t\tSystem.out.println(\"Power State: \" + vmri.getPowerState());\n\t\t\t\n\n\t\t\t//CPU Statistics\n\n\t\t\tSystem.out.println(\"------------------------------------------\");\n\t\t\tSystem.out.println(\"CPU and Memory Statistics\" );\n\t\t\t\n\t\t\tSystem.out.println(\"CPU Usage: \" +vmsum.getQuickStats().getOverallCpuUsage());\n\t\t\tSystem.out.println(\"Max CPU Usage: \" + vmri.getMaxCpuUsage());\n\t\t\tSystem.out.println(\"Memory Usage: \"+vmsum.getQuickStats().getGuestMemoryUsage());\n\t\t\tSystem.out.println(\"Max Memory Usage: \" + vmri.getMaxMemoryUsage());\n\t\t\tSystem.out.println(\"------------------------------------------\");\n\n\t\t} catch (InvalidProperty e) {\n\t\t\te.printStackTrace();\n\t\t} catch (RuntimeFault e) {\n\t\t\te.printStackTrace();\n\t\t} catch (RemoteException e) {\n\t\t\te.printStackTrace();\n\t\t}\n }", "public List<Vehicle> getVehicles() {\n\t\tList<Vehicle> vehicleList = new ArrayList<Vehicle>();\n\t\tif ((vehicles == null)||(vehicles.isEmpty())) { // call DAO method getCustomers to retrieve list of customer objects from database\n\t\t\ttry {\n\t\t\t\tvehicleList = vehicleService.getAllVehicles();\n\t\t\t} catch (Exception e) {\n\t\t\t\tcurrentInstance = FacesContext.getCurrentInstance();\n\t\t\t\tFacesMessage message = null;\n\t\t\t\tmessage = new FacesMessage(FacesMessage.SEVERITY_ERROR,\"Failed\",\"Failed to retrieve vehicles from the database\" + e.getMessage());\n\t\t\t\tcurrentInstance.addMessage(null, message);\n\t\t\t}\n\t\t} else {\n\t\t\tvehicleList = vehicles;\n\t\t}\n\t\treturn vehicleList;\n\t}", "@Override\n\tpublic List<Portlet> getListForSync(Map<String, Object> param) {\n\t\treturn portletDao.getListForSync(param);\n\t}", "Iterable<CurrentVersionCacheDao> getCurrentVersionCacheConnections();", "public List<Voto> getVotos(){\n\t\treturn em.createQuery(\"SELECT c from Voto c\", Voto.class).getResultList();\n\t}", "private void runRemotely() {\n if (!isDas())\n return;\n\n List<Server> remoteServers = getRemoteServers();\n\n if (remoteServers.isEmpty())\n return;\n\n try {\n ParameterMap paramMap = new ParameterMap();\n paramMap.set(\"monitor\", \"true\");\n paramMap.set(\"DEFAULT\", pattern);\n ClusterOperationUtil.replicateCommand(\"get\", FailurePolicy.Error, FailurePolicy.Warn, remoteServers,\n context, paramMap, habitat);\n }\n catch (Exception ex) {\n setError(Strings.get(\"admin.get.monitoring.remote.error\", getNames(remoteServers)));\n }\n }", "@Override\n\tpublic List<Computer> getAll() {\n\t\t\n\t\tConnection connection = null;\n\t\tPreparedStatement preparedStatement = null;\n\t\tResultSet resultSet = null;\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tString sql = \"SELECT computer.id, computer.name, computer.introduced, computer.discontinued, computer.company_id, company.name FROM computer INNER JOIN company ON computer.company_id = company.id;\";\n\t\t\tconnection = DriverManager.getConnection(URL, USER, PASSWORD);\n\t\t\tpreparedStatement = connection.prepareStatement(sql);\n\t\t\tresultSet = preparedStatement.executeQuery();\n\t\t\tList<Computer> computerList = new ArrayList<Computer>();\n\t\t\twhile(resultSet.next()) {\n\t\t\t\n\t\t\t\tCompany company = Company.builder()\n\t\t\t\t\t\t.setId(resultSet.getLong(\"computer.company_id\"))\n\t\t\t\t\t\t.setName(resultSet.getString(\"company.name\"))\n\t\t\t\t\t\t.build();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tComputer computer = Computer.builder()\n\t\t\t\t\t\t.setId(resultSet.getLong(\"computer.id\"))\n\t\t\t\t\t\t.setName(resultSet.getString(\"computer.name\"))\n\t\t\t\t\t\t.setIntroduced(resultSet.getTimestamp(\"computer.introduced\"))\n\t\t\t\t\t\t.setDiscontinued(resultSet.getTimestamp(\"computer.discontinued\"))\n\t\t\t\t\t\t.setCompany_id(resultSet.getLong(\"computer.company_id\"))\n\t\t\t\t\t\t.setCompany(company)\n\t\t\t\t\t\t.build();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcomputer.toString();\n\t\t\t\tcomputerList.add(computer);\n\t\t\t}\n\t\t\t\n\t\t\treturn computerList;\n\t\t\t\n\t\t} catch(SQLException e) {\n\t\t\t\n\t\t\tthrow new DAOException(\"Impossible de récupérer la liste des ordinateurs\", e);\n\t\t}finally {\n\t\t\tDaoUtils.closeAll(resultSet, preparedStatement, connection);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "@Override\n\tpublic List<Parking> vIPavailableParking() {\n\t\treturn parkingRepository.vIPavailableParking();\n\t}", "@Transactional(readOnly = true)\n public List<SystemDTO> findAll() {\n log.debug(\"Request to get all Systems\");\n return systemRepository.findAll().stream()\n .map(systemMapper::toDto)\n .collect(Collectors.toCollection(LinkedList::new));\n }", "public SortedMap<String, RemoteFileInfo> getAllFileInfo() {\r\n return remotes;\r\n }", "@Override\r\n\tpublic List<Map<String, Object>> selectTargetManagement() throws Exception {\n\t\treturn dao.selectTargetManage();\r\n\t}", "public List<VideoBlockModel> getVideos() {\n return (List<VideoBlockModel>) (List) getVideos(false);\n }", "public HashSet<Part> getPartRepositoryParts() throws RemoteException;", "public VirtualMachine getVirtualMachine()\n {\n return vm;\n }", "public List<Vet> getAllVets() {\n\t\tentityManager = JPAUtils.getEntityManager();\n\t\tentityManager.getTransaction().begin();\n\t\tvets = entityManager.createQuery(\"from Vet\", Vet.class).getResultList();\n\t\tentityManager.getTransaction().commit();\n\t\tentityManager.close();\n\t\treturn vets;\n\t}", "@Override\n\tpublic ArrayList<VODRecord> getVideoList(InviteUtils client, String startTime, String endTime) {\n\t\tArrayList<VODRecord> mList = new ArrayList<VODRecord>();\n\t\t\n\t\t\n\t\t\n\t\treturn super.getVideoList(client, startTime, endTime);\n\t}", "public void powerOffAllVms() throws Exception\n {\n VirtualMachine ivm = null;\n ivm = new VirtualMachine(connectAnchor);\n Vector<ManagedObjectReference> vmMors = ivm.getAllVM();\n if (vmMors != null && vmMors.size() > 0) {\n for (ManagedObjectReference vmMor : vmMors) {\n if (ivm.getVMState(vmMor) == VirtualMachinePowerState.POWERED_ON) {\n ivm.powerOffVM(vmMor);\n }\n }\n }\n }", "protected List<String> loadMaterializedViewsAsList() throws SQLException {\r\n\r\n\t\tif (materializedViews == null) {\r\n\t\t\tmaterializedViews = new ArrayList<String>();\r\n\r\n\t\t\tfinal Statement stm = sqlConnection.createStatement();\r\n\t\t\tfinal ResultSet resultSet = stm.executeQuery(materializedViewsSelect);\r\n\r\n\t\t\twhile (resultSet.next()) {\r\n\t\t\t\tmaterializedViews.add(resultSet.getString(1));\r\n\t\t\t}\r\n\r\n\t\t\tresultSet.close();\r\n\t\t\tstm.close();\r\n\t\t}\r\n\r\n\t\treturn materializedViews;\r\n\t}", "public List<ServerServices> searchExternalService(int servId, String dataPort, String servicePort);" ]
[ "0.6909291", "0.6383007", "0.62625533", "0.6077801", "0.60466087", "0.5915172", "0.5603216", "0.555023", "0.5468563", "0.5349479", "0.5348559", "0.5298062", "0.5239825", "0.5236675", "0.52355164", "0.5222642", "0.52222735", "0.52101105", "0.51834565", "0.51515836", "0.51462674", "0.50634944", "0.50521743", "0.50519985", "0.50191146", "0.49920318", "0.49833944", "0.49537364", "0.49434063", "0.49411017", "0.4929562", "0.4924105", "0.49236235", "0.49113545", "0.49057308", "0.49017316", "0.48882285", "0.48854712", "0.48849848", "0.48712498", "0.48666906", "0.48629692", "0.48483062", "0.48404756", "0.48403165", "0.48380962", "0.4822903", "0.4816026", "0.48124886", "0.4802598", "0.47955105", "0.47951338", "0.47774348", "0.47588244", "0.47538254", "0.47440788", "0.47418997", "0.47363204", "0.4735539", "0.4711608", "0.47106305", "0.47105756", "0.47104496", "0.47038668", "0.46923035", "0.4675052", "0.46647984", "0.46629593", "0.46550578", "0.46201175", "0.4597325", "0.45947537", "0.4592524", "0.45903462", "0.45880002", "0.458632", "0.4583684", "0.45808232", "0.45718467", "0.45660275", "0.4565865", "0.4563442", "0.4562355", "0.4556813", "0.45559216", "0.455369", "0.45454782", "0.4541899", "0.45388097", "0.45315874", "0.45228666", "0.45174617", "0.45101732", "0.4505625", "0.4505514", "0.4504712", "0.4493264", "0.44887176", "0.4483726", "0.44787347" ]
0.7582461
0
Gets the list of virtual machines in the physical machine matching the given filter synchronizing virtual machines from remote hypervisor with abiquo's database.
public List<VirtualMachine> listRemoteVirtualMachines(final Predicate<VirtualMachine> filter) { return Lists.newLinkedList(filter(listVirtualMachines(), filter)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<VirtualMachine> listVirtualMachines(final Predicate<VirtualMachine> filter) {\n return Lists.newLinkedList(filter(listVirtualMachines(), filter));\n }", "public List<VirtualMachine> listRemoteVirtualMachines() {\n MachineOptions options = MachineOptions.builder().sync(true).build();\n VirtualMachinesWithNodeExtendedDto vms = context.getApi().getInfrastructureApi()\n .listVirtualMachinesByMachine(target, options);\n return wrap(context, VirtualMachine.class, vms.getCollection());\n }", "public List<VirtualMachine> listVirtualMachines() {\n MachineOptions options = MachineOptions.builder().sync(false).build();\n VirtualMachinesWithNodeExtendedDto vms = context.getApi().getInfrastructureApi()\n .listVirtualMachinesByMachine(target, options);\n return wrap(context, VirtualMachine.class, vms.getCollection());\n }", "public NetworkInstance[] queryServers(NetworkFilter filter);", "public VirtualMachine findRemoteVirtualMachine(final Predicate<VirtualMachine> filter) {\n return Iterables.getFirst(filter(listVirtualMachines(), filter), null);\n }", "public List<VirtualMachineDescriptor> listVirtualMachines() {\n ArrayList<VirtualMachineDescriptor> result =\n new ArrayList<VirtualMachineDescriptor>();\n\n MonitoredHost host;\n Set<Integer> vms;\n try {\n host = MonitoredHost.getMonitoredHost(new HostIdentifier((String)null));\n vms = host.activeVms();\n } catch (Throwable t) {\n if (t instanceof ExceptionInInitializerError) {\n t = t.getCause();\n }\n if (t instanceof ThreadDeath) {\n throw (ThreadDeath)t;\n }\n if (t instanceof SecurityException) {\n return result;\n }\n throw new InternalError(t); // shouldn't happen\n }\n\n for (Integer vmid: vms) {\n String pid = vmid.toString();\n String name = pid; // default to pid if name not available\n boolean isAttachable = false;\n MonitoredVm mvm = null;\n try {\n mvm = host.getMonitoredVm(new VmIdentifier(pid));\n try {\n isAttachable = MonitoredVmUtil.isAttachable(mvm);\n // use the command line as the display name\n name = MonitoredVmUtil.commandLine(mvm);\n } catch (Exception e) {\n }\n if (isAttachable) {\n result.add(new HotSpotVirtualMachineDescriptor(this, pid, name));\n }\n } catch (Throwable t) {\n if (t instanceof ThreadDeath) {\n throw (ThreadDeath)t;\n }\n } finally {\n if (mvm != null) {\n mvm.detach();\n }\n }\n }\n return result;\n }", "@ServiceMethod(returns = ReturnType.COLLECTION)\n private PagedFlux<VirtualMachineScaleSetVMInner> listAsync(\n String resourceGroupName,\n String virtualMachineScaleSetName,\n String filter,\n String select,\n String expand,\n Context context) {\n return new PagedFlux<>(\n () -> listSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, filter, select, expand, context),\n nextLink -> listNextSinglePageAsync(nextLink, context));\n }", "private EC2DescribeInstancesResponse listVirtualMachines(String[] virtualMachineIds, EC2InstanceFilterSet ifs, List<CloudStackKeyValue> resourceTags)\n throws Exception {\n EC2DescribeInstancesResponse instances = new EC2DescribeInstancesResponse();\n\n if (null == virtualMachineIds || 0 == virtualMachineIds.length) {\n instances = lookupInstances(null, instances, resourceTags);\n } else {\n for (int i = 0; i < virtualMachineIds.length; i++) {\n instances = lookupInstances(virtualMachineIds[i], instances, resourceTags);\n }\n }\n\n if (null == ifs)\n return instances;\n else\n return ifs.evaluate(instances);\n }", "public VirtualMachines getVirtualMachines() {\n return virtualMachines;\n }", "@ServiceMethod(returns = ReturnType.COLLECTION)\n public PagedFlux<VirtualMachineScaleSetVMInner> listAsync(\n String resourceGroupName, String virtualMachineScaleSetName, String filter, String select, String expand) {\n return new PagedFlux<>(\n () -> listSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, filter, select, expand),\n nextLink -> listNextSinglePageAsync(nextLink));\n }", "public VirtualMachine findVirtualMachine(final Predicate<VirtualMachine> filter) {\n return Iterables.getFirst(filter(listVirtualMachines(), filter), null);\n }", "@Override\n @GET\n @Path(\"/vms\")\n @Produces(\"application/json\")\n public Response getVMs() throws Exception {\n log.trace(\"getVMs() started.\");\n JSONArray json = new JSONArray();\n for (Vm vm : cluster.getVmList()) {\n JSONObject o = new JSONObject();\n String uri = String.format(\"%s/vms/%d\", rootUri, vm.getVmId());\n String vmUri = String.format(\"/providers/%d/vms/%d\", provider.getProviderId(), vm.getVmId());\n o.put(\"uri\", uri);\n o.put(\"baseUri\", vmUri);\n json.put(o);\n }\n\n log.trace(\"getVMs() finished successfully.\");\n return Response.ok(json.toString()).build();\n }", "VirtualMachine[] getPlacedVirtualMachines() {\n VirtualMachine[] vms = new VirtualMachine[mapped_vms.size()];\n mapped_vms.toArray(vms);\n return vms;\n }", "public List<RegionServer> regionServers() {\n\t\tBufferedReader bufReader = null;\n\t\tInputStreamReader input = null;\n\t\tList<RegionServer> list = new ArrayList<>();\n\t\ttry {\n\t\t\tURL url = new URL(HBase.HTTP + SystemConfig.getProperty(\"hive.cube.hbase.master\") + HBase.HBASE_REGION_SERVER_JMX);\n\t\t\tHttpURLConnection httpConn = (HttpURLConnection) url.openConnection();\n\t\t\tinput = new InputStreamReader(httpConn.getInputStream(), \"UTF-8\");\n\t\t\tbufReader = new BufferedReader(input);\n\t\t\tString line = \"\";\n\t\t\tStringBuilder contentBuf = new StringBuilder();\n\t\t\twhile ((line = bufReader.readLine()) != null) {\n\t\t\t\tcontentBuf.append(line);\n\t\t\t}\n\t\t\tJSONObject tmpBuf = JSON.parseObject(contentBuf.toString());\n\t\t\tJSONObject object = (JSONObject) JSON.parseArray(tmpBuf.getString(\"beans\")).get(0);\n\t\t\tString[] liveRegionServers = object.getString(\"tag.liveRegionServers\").split(\";\");\n\t\t\tfor (String node : liveRegionServers) {\n\t\t\t\tif (node.length() != 0) {\n\t\t\t\t\tRegionServer region = new RegionServer();\n\t\t\t\t\tregion.setRegionName(node.split(\",\")[0] + \":\" + node.split(\",\")[1]);\n\t\t\t\t\tregion.setStartTime(CalendarUtils.convertUnixTime(Long.parseLong(node.split(\",\")[2])));\n\t\t\t\t\tregion.setLive(true);\n\t\t\t\t\tlist.add(region);\n\t\t\t\t}\n\t\t\t}\n\t\t\tString[] deadRegionServers = object.getString(\"tag.deadRegionServers\").split(\";\");\n\t\t\tfor (String node : deadRegionServers) {\n\t\t\t\tif (node.length() != 0) {\n\t\t\t\t\tRegionServer region = new RegionServer();\n\t\t\t\t\tregion.setRegionName(node.split(\",\")[0] + \":\" + node.split(\",\")[1]);\n\t\t\t\t\tregion.setStartTime(CalendarUtils.convertUnixTime(Long.parseLong(node.split(\",\")[2])));\n\t\t\t\t\tregion.setLive(false);\n\t\t\t\t\tlist.add(region);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLOG.error(\"Filter[Region] HBase JMX has error,msg is \" + e.getMessage());\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (input != null) {\n\t\t\t\t\tinput.close();\n\t\t\t\t}\n\t\t\t\tif (bufReader != null) {\n\t\t\t\t\tbufReader.close();\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tLOG.error(\"Close IO has error,msg is \" + e.getMessage());\n\t\t\t}\n\t\t}\n\n\t\treturn list;\n\t}", "@ServiceMethod(returns = ReturnType.COLLECTION)\n public PagedIterable<VirtualMachineScaleSetVMInner> list(\n String resourceGroupName,\n String virtualMachineScaleSetName,\n String filter,\n String select,\n String expand,\n Context context) {\n return new PagedIterable<>(\n listAsync(resourceGroupName, virtualMachineScaleSetName, filter, select, expand, context));\n }", "public static ArrayList<VirtualMachine> getListVms(ServiceInstance si,String vmname) throws InvalidProperty, RuntimeFault, RemoteException, MalformedURLException{\n\t\t\tHostSystem hs= hostByname(vmname,si);\n\t\t\t//System.out.println(hs.getName());\n\t\t\tFolder rootFolder = si.getRootFolder();\n\t\t\tString name = rootFolder.getName();\n\t\t\tSystem.out.println(\"root:\" + name);\n\t\t\tSystem.out.println(\"====================================================================\");\n\t\t\tArrayList<VirtualMachine> vms = new ArrayList<VirtualMachine>();\n\t\t\tManagedEntity[] mes = new InventoryNavigator(hs).searchManagedEntities(new String[][] { {\"VirtualMachine\", \"name\" }, }, true);\n\t\t\tfor(int i=0;i<mes.length;i++){\n\t\t\t\tvms.add((VirtualMachine)mes[i]);\n\t\t\t}\n\t\t\treturn vms;\n\t\t\t\n\t\t}", "public HashMap<InetSocketAddress, GameServer> requestServers(String filter) throws IOException {\n boolean finished = false;\n InetSocketAddress last = new InetSocketAddress(\"0.0.0.0\", 0);\n while (!finished) {\n // We send queries until the last IP read is 0.0.0.0 and port it 0. That is the Master Server's way of\n // telling us that the list is complete.\n\n // Send query to master server\n byte[] sendBuf = Requests.MASTER(Region.EVERYWHERE, last, filter + \"\\0\");\n DatagramPacket packet = new DatagramPacket(sendBuf, sendBuf.length, host);\n socket.send(packet);\n\n DatagramPacket recv = recieve(Requests.MASTER_RESPONSE);\n if (recv != null) {\n last = parseResponse(recv); // Save the last IP read\n if (last.equals(fin)) {\n finished = true;\n }\n }\n }\n return gameServers;\n }", "List<Computer> findAll();", "public void printVirtualMachines() throws InvalidProperty, RuntimeFault, RemoteException{\r\n\t\tManagedEntity[] mes = new\r\n\t\t\t\tInventoryNavigator(_instance.getRootFolder()).searchManagedEntities(\"VirtualMachine\");\r\n\t\tfor (int i = 0; i < mes.length; i++) {\r\n\t\t\tVirtualMachine currVm = (VirtualMachine)mes[i];\r\n\t\t\tSystem.out.printf(\"vm[%d]: Name = %s\\n\", i, currVm.getName());\r\n\t\t}\r\n\t}", "public String listSync(String filterName, String filterHost, String filterIds, String filterLanguage) throws IOException {\n\t\t// Use the helper to make the Request object\n\t\tRequest req = makeListRequest(filterName, filterHost, filterIds, filterLanguage);\n\t\t\n\t\t// Synchronous call\n\t\tResponse rsp = Util.callSync(client, req);\n\t\treturn rsp.body().string();\n\t}", "public List<ServerHardware> getServers();", "@Override\n\tpublic DataVO<CitrixDesktopMachine> list(CitrixDesktopMachineForm f) {\n\t\treturn null;\n\t}", "private List<VM> getFreeVmsWS(DAG dag) {\r\n\t\tSet<VM> vms = getWorkflowEngine().getFreeVMs();\r\n\t\tList<VM> freeVms = new ArrayList<VM>();\r\n\t\tfor (VM vm : vms) {\r\n\t\t\t// make sure the VM is really free...sometimes the vm list in the\r\n\t\t\t// engine is not updated on time\r\n\t\t\tif (vm.getRunningJobs().isEmpty() && vm.getWaitingInputJobs().isEmpty()) {\r\n\t\t\t\tif (wfVms.containsKey(vm)) {\r\n\t\t\t\t\tif (wfVms.get(vm).equals(dag.getName().substring(0,2))) {\r\n\t\t\t\t\t\tfreeVms.add(vm);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn freeVms;\r\n\t}", "public List<Computer> getAll(){\n\t\treturn getWithLimit(-1,-1);\n\t}", "private List<Machine> placeholderMachines(List<String> names) {\n List<Machine> placeholderMachines = Lists.newArrayListWithCapacity(names.size());\n VsphereProvisioningTemplate provisioningTemplate = driverConfig\n .parseProvisioningTemplate(VsphereProvisioningTemplate.class);\n\n for (String name : names) {\n placeholderMachines.add(Machine.builder().id(name).cloudProvider(CloudProviders.VSPHERE)\n .machineSize(\"unknown\").region(provisioningTemplate.getResourcePool())\n .machineState(MachineState.PENDING).launchTime(UtcTime.now()).build());\n }\n return placeholderMachines;\n }", "public Collection<Miniserver> getFilteredMiniservers(){\n return this.filteredMiniservers;\n }", "public interface VirtualMachines {\n /**\n * Implements list virtual machine within subscription method\n *\n * <p>Returns list virtual machine within subscription.\n *\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return list of virtual machines as paginated response with {@link PagedIterable}.\n */\n PagedIterable<VirtualMachine> list();\n\n /**\n * Implements list virtual machine within subscription method\n *\n * <p>Returns list virtual machine within subscription.\n *\n * @param filter The filter to apply on the list operation.\n * @param top The maximum number of record sets to return.\n * @param skipToken to be used by nextLink implementation.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return list of virtual machines as paginated response with {@link PagedIterable}.\n */\n PagedIterable<VirtualMachine> list(String filter, Integer top, String skipToken, Context context);\n\n /**\n * Implements list virtual machine within RG method\n *\n * <p>Returns list of virtual machine within resource group.\n *\n * @param resourceGroupName The name of the resource group.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return list of virtual machines as paginated response with {@link PagedIterable}.\n */\n PagedIterable<VirtualMachine> listByResourceGroup(String resourceGroupName);\n\n /**\n * Implements list virtual machine within RG method\n *\n * <p>Returns list of virtual machine within resource group.\n *\n * @param resourceGroupName The name of the resource group.\n * @param filter The filter to apply on the list operation.\n * @param top The maximum number of record sets to return.\n * @param skipToken to be used by nextLink implementation.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return list of virtual machines as paginated response with {@link PagedIterable}.\n */\n PagedIterable<VirtualMachine> listByResourceGroup(\n String resourceGroupName, String filter, Integer top, String skipToken, Context context);\n\n /**\n * Implements virtual machine GET method\n *\n * <p>Get virtual machine.\n *\n * @param resourceGroupName The name of the resource group.\n * @param virtualMachineName virtual machine name.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return virtual machine along with {@link Response}.\n */\n Response<VirtualMachine> getByResourceGroupWithResponse(\n String resourceGroupName, String virtualMachineName, Context context);\n\n /**\n * Implements virtual machine GET method\n *\n * <p>Get virtual machine.\n *\n * @param resourceGroupName The name of the resource group.\n * @param virtualMachineName virtual machine name.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return virtual machine.\n */\n VirtualMachine getByResourceGroup(String resourceGroupName, String virtualMachineName);\n\n /**\n * Implements virtual machine DELETE method\n *\n * <p>Delete virtual machine.\n *\n * @param resourceGroupName The name of the resource group.\n * @param referer referer url.\n * @param virtualMachineName virtual machine name.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void delete(String resourceGroupName, String referer, String virtualMachineName);\n\n /**\n * Implements virtual machine DELETE method\n *\n * <p>Delete virtual machine.\n *\n * @param resourceGroupName The name of the resource group.\n * @param referer referer url.\n * @param virtualMachineName virtual machine name.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void delete(String resourceGroupName, String referer, String virtualMachineName, Context context);\n\n /**\n * Implements a start method for a virtual machine\n *\n * <p>Power on virtual machine.\n *\n * @param resourceGroupName The name of the resource group.\n * @param referer referer url.\n * @param virtualMachineName virtual machine name.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void start(String resourceGroupName, String referer, String virtualMachineName);\n\n /**\n * Implements a start method for a virtual machine\n *\n * <p>Power on virtual machine.\n *\n * @param resourceGroupName The name of the resource group.\n * @param referer referer url.\n * @param virtualMachineName virtual machine name.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void start(String resourceGroupName, String referer, String virtualMachineName, Context context);\n\n /**\n * Implements shutdown, poweroff, and suspend method for a virtual machine\n *\n * <p>Power off virtual machine, options: shutdown, poweroff, and suspend.\n *\n * @param resourceGroupName The name of the resource group.\n * @param referer referer url.\n * @param virtualMachineName virtual machine name.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void stop(String resourceGroupName, String referer, String virtualMachineName);\n\n /**\n * Implements shutdown, poweroff, and suspend method for a virtual machine\n *\n * <p>Power off virtual machine, options: shutdown, poweroff, and suspend.\n *\n * @param resourceGroupName The name of the resource group.\n * @param referer referer url.\n * @param virtualMachineName virtual machine name.\n * @param mode query stop mode parameter (reboot, shutdown, etc...).\n * @param m body stop mode parameter (reboot, shutdown, etc...).\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void stop(\n String resourceGroupName,\n String referer,\n String virtualMachineName,\n StopMode mode,\n VirtualMachineStopMode m,\n Context context);\n\n /**\n * Implements virtual machine GET method\n *\n * <p>Get virtual machine.\n *\n * @param id the resource ID.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return virtual machine along with {@link Response}.\n */\n VirtualMachine getById(String id);\n\n /**\n * Implements virtual machine GET method\n *\n * <p>Get virtual machine.\n *\n * @param id the resource ID.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return virtual machine along with {@link Response}.\n */\n Response<VirtualMachine> getByIdWithResponse(String id, Context context);\n\n /**\n * Implements virtual machine DELETE method\n *\n * <p>Delete virtual machine.\n *\n * @param id the resource ID.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void deleteById(String id);\n\n /**\n * Implements virtual machine DELETE method\n *\n * <p>Delete virtual machine.\n *\n * @param id the resource ID.\n * @param referer referer url.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void deleteByIdWithResponse(String id, String referer, Context context);\n\n /**\n * Begins definition for a new VirtualMachine resource.\n *\n * @param name resource name.\n * @return the first stage of the new VirtualMachine definition.\n */\n VirtualMachine.DefinitionStages.Blank define(String name);\n}", "@ServiceMethod(returns = ReturnType.COLLECTION)\n public PagedFlux<VirtualMachineScaleSetVMInner> listAsync(\n String resourceGroupName, String virtualMachineScaleSetName) {\n final String filter = null;\n final String select = null;\n final String expand = null;\n return new PagedFlux<>(\n () -> listSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, filter, select, expand),\n nextLink -> listNextSinglePageAsync(nextLink));\n }", "public List<VirtualMachine> search(SearchCriteria searchCriteria, SearchMode mode,\n List<SearchCriterionType> searchOrder);", "private List<Server> getRemoteServers() {\n if (!isDas())\n throw new RuntimeException(\"Internal Error\"); // todo?\n\n List<Server> notdas = new ArrayList<Server>(targets.size());\n String dasName = serverEnv.getInstanceName();\n\n for (Server server : targets) {\n if (!dasName.equals(server.getName()))\n notdas.add(server);\n }\n\n return notdas;\n }", "public List<ServerServices> searchExternalService(int servId, String dataPort, String servicePort);", "List<ObjectInformation> filter(\n\t\t\tfinal GetObjectInformationParameters params)\n\t\t\tthrows WorkspaceCommunicationException {\n\t\tfinal int querysize = params.getLimit() < 100 ? 100 :\n\t\t\t\tparams.getLimit();\n\t\tfinal PermissionSet pset = params.getPermissionSet();\n\t\tif (pset.isEmpty()) {\n\t\t\treturn new LinkedList<ObjectInformation>();\n\t\t}\n\t\tfinal DBObject verq = buildQuery(params);\n\t\tfinal DBObject projection = buildProjection(params);\n\t\tfinal DBObject sort = buildSortSpec(params);\n\t\tfinal DBCursor cur = buildCursor(verq, projection, sort);\n\t\t\n\t\t//querying on versions directly so no need to worry about race \n\t\t//condition where the workspace object was saved but no versions\n\t\t//were saved yet\n\t\t\n\t\tfinal List<ObjectInformation> ret = new LinkedList<>();\n\t\twhile (cur.hasNext() && ret.size() < params.getLimit()) {\n\t\t\tfinal List<Map<String, Object>> verobjs = new ArrayList<>();\n\t\t\twhile (cur.hasNext() && verobjs.size() < querysize) {\n\t\t\t\ttry {\n\t\t\t\t\tverobjs.add(QueryMethods.dbObjectToMap(cur.next()));\n\t\t\t\t} catch (MongoException me) {\n\t\t\t\t\tthrow new WorkspaceCommunicationException(\n\t\t\t\t\t\t\t\"There was a problem communicating with the database\", me);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfinal Map<Map<String, Object>, ObjectInformation> objs =\n\t\t\t\t\tgenerateObjectInfo(pset, verobjs, params.isShowHidden(),\n\t\t\t\t\t\t\tparams.isShowDeleted(), params.isShowOnlyDeleted(),\n\t\t\t\t\t\t\tparams.isShowAllVersions(), params.asAdmin()\n\t\t\t\t\t\t\t);\n\t\t\t//maintain the ordering \n\t\t\tfinal Iterator<Map<String, Object>> veriter = verobjs.iterator();\n\t\t\twhile (veriter.hasNext() && ret.size() < params.getLimit()) {\n\t\t\t\tfinal Map<String, Object> v = veriter.next();\n\t\t\t\tif (objs.containsKey(v)) {\n\t\t\t\t\tret.add(objs.get(v));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}", "public ContentList filterContentList(ContentDatabaseFilter filter) throws DatabaseException;", "public List<UnManagedVolumeRestRep> getByHost(URI hostId, ResourceFilter<UnManagedVolumeRestRep> filter) {\n List<RelatedResourceRep> refs = listByHost(hostId);\n return getByRefs(refs, filter);\n }", "@Override\n\tpublic ArrayList<VODRecord> getVideoList(InviteUtils client, String startTime, String endTime) {\n\t\tArrayList<VODRecord> mList = new ArrayList<VODRecord>();\n\t\t\n\t\t\n\t\t\n\t\treturn super.getVideoList(client, startTime, endTime);\n\t}", "@Test(groups = {NETWORK_INTEGRATION_TESTS})\n public void getPrivateNetworkIPsByVirtualDatacenterOrderByVirtualMachine()\n {\n RemoteService rs = remoteServiceGenerator.createInstance(RemoteServiceType.DHCP_SERVICE);\n VirtualDatacenter vdc = vdcGenerator.createInstance(rs.getDatacenter());\n setup(vdc.getDatacenter(), rs, vdc.getEnterprise(), vdc.getNetwork(), vdc);\n VLANNetwork vlan = vlanGenerator.createInstance(vdc.getNetwork(), rs, \"255.255.255.0\");\n setup(vlan.getConfiguration(), vlan);\n\n IPAddress ip = IPAddress.newIPAddress(vlan.getConfiguration().getAddress()).nextIPAddress();\n IPAddress lastIP =\n IPNetworkRang.lastIPAddressWithNumNodes(\n IPAddress.newIPAddress(vlan.getConfiguration().getAddress()),\n IPNetworkRang.masktoNumberOfNodes(vlan.getConfiguration().getMask()));\n\n persistIP(ip, lastIP, vdc, vlan);\n\n String validURI = resolveVirtualDatacenterActionGetIPsURI(vdc.getId());\n validURI = validURI + \"?by=virtualmachine\";\n\n ClientResponse response =\n get(validURI, SYSADMIN, SYSADMIN, IpsPoolManagementDto.MEDIA_TYPE);\n assertEquals(response.getStatusCode(), Status.OK.getStatusCode());\n }", "public List<Host> selectALL() {\n Statement stm = null;\n ResultSet rs = null;\n List<Host> hostList = new ArrayList<Host>();\n try {\n // conn = SQLiteDataSource.getDataSource().getConnection();\n // conn.setAutoCommit(true);\n\n stm = conn.createStatement();\n rs = stm.executeQuery(selectSQL);\n\n while (rs.next()) {\n Host host = new Host(rs.getInt(\"id\"), rs.getString(\"host_name\"), rs.getString(\"profile\"),\n rs.getInt(\"web_port\"), rs.getInt(\"admin_port\"));\n hostList.add(host);\n }\n } catch (SQLException e) {\n logger.error(e.getMessage(), e);\n } finally {\n try {\n if (rs != null) {\n rs.close();\n }\n if (stm != null) {\n stm.close();\n }\n } catch (SQLException e) {\n logger.error(e.getMessage(), e);\n }\n }\n\n return hostList;\n }", "public ArrayList<VicinityMessage> getChatMessages(String fromIp){\n\n ArrayList<VicinityMessage> chat = new ArrayList<>();\n\n for(int i=0; i<this.allMessages.size(); i++){\n\n if(this.allMessages.get(i).getFrom().equals(fromIp)){\n chat.add(allMessages.get(i));\n Log.i(TAG, allMessages.get(i).getMessageBody());\n\n }\n }\n\n return chat;\n }", "public List<Computer> searchComputers(ComputerSpec searchSpec) {\n List<Computer> matchedComputers = new ArrayList<>();\n\n for (Computer computer : inventory) {\n if (computer.getComputerSpec().matches(searchSpec)) {\n matchedComputers.add(computer);\n }\n }\n return matchedComputers;\n }", "public Vector findAll(String login, Boolean isAdmin) throws Exception {\n \nDebugSupport.printlnTest(\"RegionObject findAll started\");\t\n\tQuery query;\n\n if (!isAdmin.booleanValue()) {\n query = new Query(QUERY_SELECT_View, DataUtil.RESULT_JdbcObjectVector);\n query.append(\"AND o.loiginid=?\", login);\n } else {\n query = new Query(QUERY_SELECT_Admin, DataUtil.RESULT_JdbcObjectVector);\n }\n\n query.append(\"ORDER BY regname\");\n\n Vector vec= findVector(query);\n return vec;\n}", "public ArrayList<String[]> getAllVacations(String filterChoice, String filterChoiceForSearch) {\n return model.getAllVacations();\n }", "public List<LocalCentroComercial> consultarLocalesCentroComercialPorParametro(Map<String, String> filtros);", "public List<VirtualNetworkFunctionRecord> getListRegisteredVNFR() {\n\t\tVirtualNetworkFunctionRecord[] list = restTemplate.getForObject(serviceProfile.getServiceBaseUrl(), VirtualNetworkFunctionRecord[].class);\n\t return Arrays.asList(list);\t\t\n\t}", "protected static List<CondorVM> createVM(int userId, int vms) {\n LinkedList<CondorVM> list = new LinkedList<>();\n \n //VM Parameters\n long size = 10000; //image size (MB)\n int ram = 512; //vm memory (MB)\n int mips = 1000;\n long bw = 1000;\n int pesNumber = 1; //number of cpus\n String vmm = \"Xen\"; //VMM name\n \n //create VMs\n CondorVM[] vm = new CondorVM[vms];\n for (int i = 0; i < vms; i++) {\n double ratio = 1.0;\n vm[i] = new CondorVM(i, userId, mips * ratio, pesNumber, ram, bw, size, vmm, new CloudletSchedulerSpaceShared());\n list.add(vm[i]);\n }\n return list;\n }", "public static void localchangelist(){\r\n\t\t \r\n\t\t\r\n\t\tList<ChangeLocationApplication> l = ChangeLocationApplication.find(\"Locationchangetype =? AND isApproved is false order by timestamp desc\",\"CHANGELOCATIONALONE\").fetch();\r\n\t\t\r\n\t\tSystem.out.println(\"Location Change Applications\"+ l);\r\n\t\t\r\n\t\trender(l);\r\n\t}", "Set<ComputerSnapshot> getSnapshots();", "public Iterator<VirtualMachine> iterator() {\n return mapped_vms.iterator();\n }", "ArrayList<Match> getMatchList( Filter filter ) {\n return list;\n }", "public MyVM(String virtual_machine_name)\n {\n \ttry\n \t{\n \t\tthis.vmname= virtual_machine_name;\n \t\tthis.si=new ServiceInstance(new URL(SJSULAB.getVmwareHostURL()),\n\t\t\t\t\tSJSULAB.getVmwareLogin(), SJSULAB.getVmwarePassword(), true);\n \t\t\n \t\tthis.folder = si.getRootFolder();\n \t\tthis.vm=(VirtualMachine) new InventoryNavigator(folder).searchManagedEntity(\"VirtualMachine\",\n \t\t\t\tthis.vmname);\n \t\tSystem.out.println(\"MyVM, vm value : \"+vm);\n \t\t\n \t\tthis.hs= (HostSystem) new InventoryNavigator(folder).searchManagedEntity(\"HostSystem\", \"130.65.132.194\");\n \t\tSystem.out.println(\"MyVM, HS value : \"+hs);\n \t\tthis.snapshotname=\"snap2\";\n \t\t\n \t}\n \tcatch(Exception e)\n \t{\n \t\tSystem.out.println(e.toString());\n \t}\n }", "private PhysicalMachineVec getUsedPhysicalMachines(PriorityQueue<UsageInfo> pm_heap) {\n PhysicalMachineVec used_pms = new PhysicalMachineVec();\n for (Iterator<UsageInfo> it = pm_heap.iterator(); it.hasNext();) {\n UsageInfo info = it.next();\n if (!info.isEmpty()) {\n used_pms.push(info.getPhysicalMachine());\n }\n }\n return used_pms;\n }", "default CompletableFuture<List<Box>> queryVisible() {\n //Fill search Map with the Values\n final Map<String,Object> searchData = new HashMap<String,Object>() {\n {\n put(BoxPersistenceDAO.QUERY_PARAM_DELFLAG, false);\n }\n\n @Override\n public Object put(String key, Object o) {\n if (o != null) return super.put(key, o);\n return null;\n }\n };\n\n return query(searchData);\n }", "private ArrayList<Computer> getInfectList() {\n ArrayList<Computer> infectList = new ArrayList<>();\n\n for (int i = 0; i < computers.length; i++) {\n if (computers[i].isVirus()) {\n for (int j = 0; j < matrix.length; j++) {\n if (matrix[i][j] && !computers[j].isVirus()) {\n infectList.add(computers[j]);\n }\n }\n }\n }\n\n return infectList;\n }", "private void getVehicleByParse() {\n\t\tvehicles = new ArrayList<DCVehicle>();\n\t\tfinal ParseUser user = ParseUser.getCurrentUser();\n\t\tParseQuery<ParseObject> query = ParseQuery.getQuery(\"DCVehicle\");\n\n\t\tquery.setCachePolicy(ParseQuery.CachePolicy.NETWORK_ELSE_CACHE);\n\t\tquery.whereEqualTo(\"vehiclePrivateOwner\", user);\n\t\tquery.findInBackground(new FindCallback<ParseObject>() {\n\t\t\tpublic void done(final List<ParseObject> vehicleList,\n\t\t\t\t\tParseException e) {\n\t\t\t\tif (e == null) {\n\t\t\t\t\t// Loop through all vehicles that we got from the query\n\t\t\t\t\tfor (int i = 0; i < vehicleList.size(); i++) {\n\t\t\t\t\t\t// Convert parse object (DC Vehicle) into vehicle\n\t\t\t\t\t\tDCVehicle vehicle = ParseUtilities\n\t\t\t\t\t\t\t\t.convertVehicle(vehicleList.get(i));\n\n\t\t\t\t\t\t// Get photo from the parse\n\t\t\t\t\t\tParseFile photo = (ParseFile) vehicleList.get(i).get(\n\t\t\t\t\t\t\t\t\"vehiclePhoto\");\n\t\t\t\t\t\tbyte[] data = null;\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif (photo != null)\n\t\t\t\t\t\t\t\tdata = photo.getData();\n\t\t\t\t\t\t} catch (ParseException e1) {\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (data == null) {\n\t\t\t\t\t\t\tvehicle.setPhotoSrc(null);\n\t\t\t\t\t\t\tvehicle.setPhoto(false);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tvehicle.setPhotoSrc(data);\n\t\t\t\t\t\t\tvehicle.setPhoto(true);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvehicles.add(vehicle);\n\t\t\t\t\t\tvehicleObjects.add(vehicleList.get(i));\n\t\t\t\t\t}\n\n\t\t\t\t\t// Set adapter\n\t\t\t\t\tadapter = new VehicleListAdapter(VehiclesListActivity.this,\n\t\t\t\t\t\t\tvehicles, vehiclePicker, addJournyActivity);\n\t\t\t\t\tlist.setAdapter(adapter);\n\t\t\t\t} else {\n\t\t\t\t\tLog.e(\"Get Vehicle\", e.getMessage());\n\t\t\t\t}\n\n\t\t\t\t// Disable loading bar\n\t\t\t\tloading.setVisibility(View.GONE);\n\t\t\t}\n\t\t});\n\t}", "public List<List<Vertice<T>>> caminos(Vertice<T> v1,Vertice<T> v2) {\n\t\t\n \tList<List<Vertice<T>>>salida = new ArrayList<List<Vertice<T>>>();\n \tList<Vertice<T>> marcados = new ArrayList<Vertice<T>>();\n \tmarcados.add(v1);\n return buscarCaminosAux(v1,v2,marcados,salida);\n \n\n }", "public List<SubResource> resolutionVirtualNetworks() {\n return this.resolutionVirtualNetworks;\n }", "@Override\n\tpublic List<VIP> findAllVIP() {\n\t\treturn vb.findAll();\n\t}", "List<Product> getProductsByClientFilter(ClientFilter clientFilter) throws ServiceException;", "public interface VirtualMachines {\n /**\n * The operation to assess patches on a vSphere VMware machine identity in Azure.\n *\n * @param resourceGroupName The name of the resource group.\n * @param name The name of the vSphere VMware machine.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return describes the properties of an AssessPatches result.\n */\n VirtualMachineAssessPatchesResult assessPatches(String resourceGroupName, String name);\n\n /**\n * The operation to assess patches on a vSphere VMware machine identity in Azure.\n *\n * @param resourceGroupName The name of the resource group.\n * @param name The name of the vSphere VMware machine.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return describes the properties of an AssessPatches result.\n */\n VirtualMachineAssessPatchesResult assessPatches(String resourceGroupName, String name, Context context);\n\n /**\n * The operation to install patches on a vSphere VMware machine identity in Azure.\n *\n * @param resourceGroupName The name of the resource group.\n * @param name The name of the vSphere VMware machine.\n * @param installPatchesInput Input for InstallPatches as directly received by the API.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the result summary of an installation operation.\n */\n VirtualMachineInstallPatchesResult installPatches(\n String resourceGroupName, String name, VirtualMachineInstallPatchesParameters installPatchesInput);\n\n /**\n * The operation to install patches on a vSphere VMware machine identity in Azure.\n *\n * @param resourceGroupName The name of the resource group.\n * @param name The name of the vSphere VMware machine.\n * @param installPatchesInput Input for InstallPatches as directly received by the API.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return the result summary of an installation operation.\n */\n VirtualMachineInstallPatchesResult installPatches(\n String resourceGroupName,\n String name,\n VirtualMachineInstallPatchesParameters installPatchesInput,\n Context context);\n\n /**\n * Gets a virtual machine.\n *\n * <p>Implements virtual machine GET method.\n *\n * @param resourceGroupName The Resource Group Name.\n * @param virtualMachineName Name of the virtual machine resource.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return define the virtualMachine.\n */\n VirtualMachine getByResourceGroup(String resourceGroupName, String virtualMachineName);\n\n /**\n * Gets a virtual machine.\n *\n * <p>Implements virtual machine GET method.\n *\n * @param resourceGroupName The Resource Group Name.\n * @param virtualMachineName Name of the virtual machine resource.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return define the virtualMachine along with {@link Response}.\n */\n Response<VirtualMachine> getByResourceGroupWithResponse(\n String resourceGroupName, String virtualMachineName, Context context);\n\n /**\n * Deletes an virtual machine.\n *\n * <p>Implements virtual machine DELETE method.\n *\n * @param resourceGroupName The Resource Group Name.\n * @param virtualMachineName Name of the virtual machine resource.\n * @param force Whether force delete was specified.\n * @param retain Whether to just disable the VM from azure and retain the VM in the VMM.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void delete(String resourceGroupName, String virtualMachineName, Boolean force, Boolean retain);\n\n /**\n * Deletes an virtual machine.\n *\n * <p>Implements virtual machine DELETE method.\n *\n * @param resourceGroupName The Resource Group Name.\n * @param virtualMachineName Name of the virtual machine resource.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void delete(String resourceGroupName, String virtualMachineName);\n\n /**\n * Deletes an virtual machine.\n *\n * <p>Implements virtual machine DELETE method.\n *\n * @param resourceGroupName The Resource Group Name.\n * @param virtualMachineName Name of the virtual machine resource.\n * @param force Whether force delete was specified.\n * @param retain Whether to just disable the VM from azure and retain the VM in the VMM.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void delete(String resourceGroupName, String virtualMachineName, Boolean force, Boolean retain, Context context);\n\n /**\n * Implements the operation to stop a virtual machine.\n *\n * <p>Stop virtual machine.\n *\n * @param resourceGroupName The Resource Group Name.\n * @param virtualMachineName Name of the virtual machine resource.\n * @param body Virtualmachine stop action payload.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void stop(String resourceGroupName, String virtualMachineName, StopVirtualMachineOptions body);\n\n /**\n * Implements the operation to stop a virtual machine.\n *\n * <p>Stop virtual machine.\n *\n * @param resourceGroupName The Resource Group Name.\n * @param virtualMachineName Name of the virtual machine resource.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void stop(String resourceGroupName, String virtualMachineName);\n\n /**\n * Implements the operation to stop a virtual machine.\n *\n * <p>Stop virtual machine.\n *\n * @param resourceGroupName The Resource Group Name.\n * @param virtualMachineName Name of the virtual machine resource.\n * @param body Virtualmachine stop action payload.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void stop(String resourceGroupName, String virtualMachineName, StopVirtualMachineOptions body, Context context);\n\n /**\n * Implements the operation to start a virtual machine.\n *\n * <p>Start virtual machine.\n *\n * @param resourceGroupName The Resource Group Name.\n * @param virtualMachineName Name of the virtual machine resource.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void start(String resourceGroupName, String virtualMachineName);\n\n /**\n * Implements the operation to start a virtual machine.\n *\n * <p>Start virtual machine.\n *\n * @param resourceGroupName The Resource Group Name.\n * @param virtualMachineName Name of the virtual machine resource.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void start(String resourceGroupName, String virtualMachineName, Context context);\n\n /**\n * Implements the operation to restart a virtual machine.\n *\n * <p>Restart virtual machine.\n *\n * @param resourceGroupName The Resource Group Name.\n * @param virtualMachineName Name of the virtual machine resource.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void restart(String resourceGroupName, String virtualMachineName);\n\n /**\n * Implements the operation to restart a virtual machine.\n *\n * <p>Restart virtual machine.\n *\n * @param resourceGroupName The Resource Group Name.\n * @param virtualMachineName Name of the virtual machine resource.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void restart(String resourceGroupName, String virtualMachineName, Context context);\n\n /**\n * Implements GET virtualMachines in a subscription.\n *\n * <p>List of virtualMachines in a subscription.\n *\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return list of VirtualMachines as paginated response with {@link PagedIterable}.\n */\n PagedIterable<VirtualMachine> list();\n\n /**\n * Implements GET virtualMachines in a subscription.\n *\n * <p>List of virtualMachines in a subscription.\n *\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return list of VirtualMachines as paginated response with {@link PagedIterable}.\n */\n PagedIterable<VirtualMachine> list(Context context);\n\n /**\n * Implements GET virtualMachines in a resource group.\n *\n * <p>List of virtualMachines in a resource group.\n *\n * @param resourceGroupName The Resource Group Name.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return list of VirtualMachines as paginated response with {@link PagedIterable}.\n */\n PagedIterable<VirtualMachine> listByResourceGroup(String resourceGroupName);\n\n /**\n * Implements GET virtualMachines in a resource group.\n *\n * <p>List of virtualMachines in a resource group.\n *\n * @param resourceGroupName The Resource Group Name.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return list of VirtualMachines as paginated response with {@link PagedIterable}.\n */\n PagedIterable<VirtualMachine> listByResourceGroup(String resourceGroupName, Context context);\n\n /**\n * Gets a virtual machine.\n *\n * <p>Implements virtual machine GET method.\n *\n * @param id the resource ID.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return define the virtualMachine along with {@link Response}.\n */\n VirtualMachine getById(String id);\n\n /**\n * Gets a virtual machine.\n *\n * <p>Implements virtual machine GET method.\n *\n * @param id the resource ID.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n * @return define the virtualMachine along with {@link Response}.\n */\n Response<VirtualMachine> getByIdWithResponse(String id, Context context);\n\n /**\n * Deletes an virtual machine.\n *\n * <p>Implements virtual machine DELETE method.\n *\n * @param id the resource ID.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void deleteById(String id);\n\n /**\n * Deletes an virtual machine.\n *\n * <p>Implements virtual machine DELETE method.\n *\n * @param id the resource ID.\n * @param force Whether force delete was specified.\n * @param retain Whether to just disable the VM from azure and retain the VM in the VMM.\n * @param context The context to associate with this operation.\n * @throws IllegalArgumentException thrown if parameters fail the validation.\n * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.\n * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.\n */\n void deleteByIdWithResponse(String id, Boolean force, Boolean retain, Context context);\n\n /**\n * Begins definition for a new VirtualMachine resource.\n *\n * @param name resource name.\n * @return the first stage of the new VirtualMachine definition.\n */\n VirtualMachine.DefinitionStages.Blank define(String name);\n}", "public Collection< Remote > getPreferredRemotes()\n {\n ArrayList< Remote > remotes = new ArrayList< Remote >( preferredListModel.size() );\n for ( Enumeration< ? > e = preferredListModel.elements(); e.hasMoreElements(); )\n remotes.add( ( Remote )e.nextElement() );\n return remotes;\n }", "@SuppressWarnings(\"unchecked\")\n private List<Action> handlePeersQuery(\n AbstractNode node, CqlMapper mapper, Predicate<AbstractNode> nodeFilter, boolean isV2) {\n Codec<Set<String>> tokenCodec =\n mapper.codecFor(new RawType.RawSet(CodecUtils.primitive(ASCII)));\n\n AbstractCluster cluster = node.getCluster();\n Stream<AbstractNode> stream = cluster.getNodes().stream();\n\n Queue<List<ByteBuffer>> peerRows =\n stream\n .filter(nodeFilter)\n .map(\n n -> {\n InetSocketAddress address = resolveAddress(n);\n\n List<ByteBuffer> row =\n CodecUtils.row(\n mapper.inet.encode(n.resolvePeerInfo(\"peer\", address.getAddress())),\n mapper.varchar.encode(\n n.resolvePeerInfo(\"data_center\", n.getDataCenter().getName())),\n CodecUtils.encodePeerInfo(n, mapper.varchar::encode, \"rack\", \"rack1\"),\n mapper.varchar.encode(\n n.resolvePeerInfo(\"release_version\", n.resolveCassandraVersion())),\n tokenCodec.encode(resolveTokens(n)),\n mapper.uuid.encode(n.getHostId()),\n mapper.uuid.encode(n.resolvePeerInfo(\"schema_version\", schemaVersion)));\n\n if (isV2) {\n row.addAll(\n CodecUtils.row(\n mapper.cint.encode(n.resolvePeerInfo(\"peer_port\", address.getPort())),\n mapper.inet.encode(\n n.resolvePeerInfo(\"native_address\", address.getAddress())),\n mapper.cint.encode(\n n.resolvePeerInfo(\"native_port\", address.getPort()))));\n } else {\n row.addAll(\n CodecUtils.row(\n mapper.inet.encode(\n n.resolvePeerInfo(\"rpc_address\", address.getAddress()))));\n }\n if (node.resolveDSEVersion() != null) {\n row.add(mapper.ascii.encode(n.resolveDSEVersion()));\n row.add(CodecUtils.encodePeerInfo(n, mapper.bool::encode, \"graph\", false));\n }\n return row;\n })\n .collect(Collectors.toCollection(ArrayDeque::new));\n\n Rows rows = new DefaultRows(buildSystemPeersRowsMetadata(node, isV2), peerRows);\n MessageResponseAction action = new MessageResponseAction(rows);\n return Collections.singletonList(action);\n }", "public static ArrayList<InstanceEntity> getInstances() {\n ILifeCycleServiceRest resourceserviceproxy =\n ConsumerFactory.createConsumer(MsbUtil.getNsocLifecycleBaseUrl(),\n ILifeCycleServiceRest.class);\n String result = \"\";\n try {\n result = resourceserviceproxy.getVnfInstances();\n } catch (Exception e1) {\n LOG.error(\"query vim info faild.\", e1);\n return null;\n }\n if (ToolUtil.isEmptyString(result)) {\n return null;\n }\n\n Gson gson = new Gson();\n Type listType = new TypeToken<ArrayList<InstanceEntity>>() {}.getType();\n return gson.fromJson(result, listType);\n }", "@Override\n public List<Vehicle> getVehiclesByMake(String make){\n List<VehicleDetails> results = repo.findByMake(make);\n return mapper.mapAsList(results, Vehicle.class);\n }", "@Override\r\n\tpublic List<Object> consultarVehiculos() {\r\n\t\t\r\n\t\tFormat formato = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\t\t\r\n\t\treturn AdminEstacionamientoImpl.getParqueadero().stream().map(\r\n\t\t\t\t temp -> {HashMap<String, String> lista = new HashMap<String, String>(); \r\n\t\t\t\t lista.put( \"placa\", temp.getVehiculo().getPlaca() );\r\n\t\t\t\t lista.put( \"tipo\", temp.getVehiculo().getTipo() );\r\n\t\t\t\t lista.put( \"fechaInicio\", formato.format( temp.getFechaInicio() ) );\r\n\r\n\t\t\t\t return lista;\r\n\t\t\t\t }\r\n\t\t\t\t).collect(Collectors.toList());\r\n\t}", "@Override\r\n @Transactional(rollbackFor = InfraccionException.class)\r\n public List<InfraccionDTO> findByFilter(EscenarioIncumplimientoFilter filtro) throws InfraccionException {\r\n LOG.info(\"findByFilter\");\r\n List<InfraccionDTO> retorno=null;\r\n try{\r\n Query query = getFindQuery(filtro);\r\n retorno = InfraccionBuilder.toListInfraccionDTO(query.getResultList());\r\n }catch(Exception e){\r\n LOG.error(\"Error en findByFilter\",e);\r\n }\r\n return retorno;\r\n }", "private void getAllContainers() {\n AID ams = getAMS();\n QueryPlatformLocationsAction queryPlatformLocationsAction = new QueryPlatformLocationsAction();\n sendRequest(new Action(ams, queryPlatformLocationsAction));\n MessageTemplate mt = MessageTemplate.and(\n MessageTemplate.MatchSender(getAMS()),\n MessageTemplate.MatchPerformative(ACLMessage.INFORM));\n ACLMessage resp = blockingReceive(mt);\n ContentElement ce = null;\n try {\n ce = getContentManager().extractContent(resp);\n } catch (Codec.CodecException e) {\n e.printStackTrace();\n } catch (OntologyException e) {\n e.printStackTrace();\n }\n Result result = (Result) ce;\n jade.util.leap.Iterator it = result.getItems().iterator();\n while (it.hasNext()) {\n Location loc = (Location) it.next();\n containersOnPlatform.put(loc.getName(), loc);\n }\n }", "public Collection findPartnerFunctions(IDataFilter filter)\n throws FindEntityException, SystemException, RemoteException;", "public List getEnterWarehouseStaticsByCrm(CommonRecord crm) {\n\t\tString startTime = crm.getString(\"startTime\", \"\");\n\t\tString companyCode = crm.getString(\"companyCode\", \"\");\n\t\tString warehouseNo = crm.getString(\"warehouseNo\", \"\");\n\t\tString endTime = crm.getString(\"endTime\", \"\");\n\t\tString sql=\"select ewd.product_no product_no,sum(nvl(ewd.qty,0))qty from pd_enter_warehouse ew ,pd_enter_warehouse_detail ewd\" +\n\t\t\t\t\" where ew.ew_no=ewd.ew_no and ew.company_Code='\"+companyCode+\"' \";\n\t\tsql+=\" and ew.OK_TIME >=to_date('\"\n\t\t\t\t+ startTime\n\t\t\t\t+ \" 00:00:00','yyyy-mm-dd hh24:mi:ss') \";\n\t\tsql+=\" and ew.OK_TIME <to_date('\"\n\t\t\t+ endTime\n\t\t\t+ \" 00:00:00','yyyy-mm-dd hh24:mi:ss')+1 \";\n\t\tif(StringUtils.isNotEmpty(warehouseNo)){\n\t\t\tsql+=\" and ew.warehouse_no ='\"+warehouseNo+\"' \";\n\t\t}\n\t\tsql+=\" group by ewd.product_no\";\n\t\t\n\t\tlog.info(\"getEnterWarehouseStaticsByCrm=\"+sql);\n\t\treturn this.getJdbcTemplate().queryForList(sql);\n\t}", "@ServiceMethod(returns = ReturnType.SINGLE)\n private Mono<PagedResponse<VirtualMachineScaleSetVMInner>> listSinglePageAsync(\n String resourceGroupName,\n String virtualMachineScaleSetName,\n String filter,\n String select,\n String expand,\n Context context) {\n if (this.client.getEndpoint() == null) {\n return Mono\n .error(\n new IllegalArgumentException(\n \"Parameter this.client.getEndpoint() is required and cannot be null.\"));\n }\n if (resourceGroupName == null) {\n return Mono\n .error(new IllegalArgumentException(\"Parameter resourceGroupName is required and cannot be null.\"));\n }\n if (virtualMachineScaleSetName == null) {\n return Mono\n .error(\n new IllegalArgumentException(\n \"Parameter virtualMachineScaleSetName is required and cannot be null.\"));\n }\n if (this.client.getSubscriptionId() == null) {\n return Mono\n .error(\n new IllegalArgumentException(\n \"Parameter this.client.getSubscriptionId() is required and cannot be null.\"));\n }\n final String apiVersion = \"2020-06-01\";\n final String accept = \"application/json\";\n context = this.client.mergeContext(context);\n return service\n .list(\n this.client.getEndpoint(),\n resourceGroupName,\n virtualMachineScaleSetName,\n filter,\n select,\n expand,\n apiVersion,\n this.client.getSubscriptionId(),\n accept,\n context)\n .map(\n res ->\n new PagedResponseBase<>(\n res.getRequest(),\n res.getStatusCode(),\n res.getHeaders(),\n res.getValue().value(),\n res.getValue().nextLink(),\n null));\n }", "public List<ContentInterventoBOBean> execGetAll() {\n System.out.println(\"InterventoLogics - execGetAll\");\n InterventoClient client = new InterventoClient(new ContentInterventoRequestBean());\n try {\n client.getAll();\n return BOFactory.convertWorkableToBOInterventi(client.getResList());\n }catch(Exception e){\n e.printStackTrace();\n }\n return null;\n }", "public Map<String, VPlexVirtualVolumeInfo> getVirtualVolumes(boolean shallow) throws VPlexApiException {\n s_logger.info(\"Request for {} discovery of virtual volume info for VPlex at {}\",\n (shallow ? \"shallow\" : \"deep\"), _baseURI);\n\n Map<String, VPlexVirtualVolumeInfo> virtualVolumeInfoMap = new HashMap<String, VPlexVirtualVolumeInfo>();\n Map<String, VPlexVirtualVolumeInfo> distributedVirtualVolumesMap = new HashMap<String, VPlexVirtualVolumeInfo>();\n Map<String, Map<String, VPlexVirtualVolumeInfo>> localVirtualVolumesMap = new HashMap<String, Map<String, VPlexVirtualVolumeInfo>>();\n\n // Get the cluster information.\n List<VPlexClusterInfo> clusterInfoList = getClusterInfoLite();\n for (VPlexClusterInfo clusterInfo : clusterInfoList) {\n String clusterId = clusterInfo.getName();\n // for each cluster get the virtual volume information.\n List<VPlexVirtualVolumeInfo> clusterVirtualVolumeInfoList = _discoveryMgr.getVirtualVolumesForCluster(clusterId);\n for (VPlexVirtualVolumeInfo virtualVolumeInfo : clusterVirtualVolumeInfoList) {\n virtualVolumeInfo.addCluster(clusterId);\n String virtualVolumeName = virtualVolumeInfo.getName();\n\n if (!virtualVolumeInfoMap.containsKey(virtualVolumeName)) {\n // We want the unique list of virtual volumes on all\n // clusters. Distributed volumes will appear on both\n // clusters.\n virtualVolumeInfoMap.put(virtualVolumeName, virtualVolumeInfo);\n\n // If we are doing a deep discovery of the virtual volumes\n // keep a list of the distributed virtual volumes and a list\n // of the local virtual volumes for each cluster.\n if (!shallow) {\n String supportingDeviceName = virtualVolumeInfo.getSupportingDevice();\n if (VPlexVirtualVolumeInfo.Locality.distributed.name().equals(\n virtualVolumeInfo.getLocality())) {\n distributedVirtualVolumesMap.put(supportingDeviceName,\n virtualVolumeInfo);\n } else {\n Map<String, VPlexVirtualVolumeInfo> clusterLocalVolumesMap = localVirtualVolumesMap\n .get(clusterId);\n if (clusterLocalVolumesMap == null) {\n clusterLocalVolumesMap = new HashMap<String, VPlexVirtualVolumeInfo>();\n localVirtualVolumesMap.put(clusterId, clusterLocalVolumesMap);\n }\n clusterLocalVolumesMap.put(supportingDeviceName, virtualVolumeInfo);\n }\n }\n } else if (VPlexVirtualVolumeInfo.Locality.distributed.name().equals(\n virtualVolumeInfo.getLocality())) {\n // on a distributed volume, we need to be sure to add the second\n // cluster id as well... this is needed by ingestion. see CTRL-10982\n virtualVolumeInfoMap.get(virtualVolumeName).addCluster(clusterId);\n }\n }\n }\n // Do the deep discovery of the component structure for each\n // virtual volume, if necessary.\n if (!shallow) {\n // Get the component structure for each distributed virtual volume\n // starting with the supporting distributed device.\n _discoveryMgr.setSupportingComponentsForDistributedVirtualVolumes(distributedVirtualVolumesMap);\n\n // Get the component structure for each local virtual volume\n // starting with the supporting local device.\n for (Map.Entry<String, Map<String, VPlexVirtualVolumeInfo>> mapEntry : localVirtualVolumesMap\n .entrySet()) {\n _discoveryMgr.setSupportingComponentsForLocalVirtualVolumes(\n mapEntry.getKey(), mapEntry.getValue());\n }\n }\n\n return virtualVolumeInfoMap;\n }", "List<List<String>> getFilters(String resource);", "Map<ServerName, List<String>> getDeployedHRIs(final HBaseAdmin admin) throws IOException {\n ClusterStatus status = admin.getClusterStatus();\n Collection<ServerName> regionServers = status.getServers();\n Map<ServerName, List<String>> mm =\n new HashMap<ServerName, List<String>>();\n for (ServerName hsi : regionServers) {\n AdminProtos.AdminService.BlockingInterface server = ((HConnection) connection).getAdmin(hsi);\n\n // list all online regions from this region server\n List<HRegionInfo> regions = ProtobufUtil.getOnlineRegions(server);\n List<String> regionNames = new ArrayList<String>();\n for (HRegionInfo hri : regions) {\n regionNames.add(hri.getRegionNameAsString());\n }\n mm.put(hsi, regionNames);\n }\n return mm;\n }", "@Test(groups = {NETWORK_INTEGRATION_TESTS})\n public void getPrivateNetworkIPsByVirtualDatacenterOrderByMAC()\n {\n RemoteService rs = remoteServiceGenerator.createInstance(RemoteServiceType.DHCP_SERVICE);\n VirtualDatacenter vdc = vdcGenerator.createInstance(rs.getDatacenter());\n setup(vdc.getDatacenter(), rs, vdc.getEnterprise(), vdc.getNetwork(), vdc);\n VLANNetwork vlan = vlanGenerator.createInstance(vdc.getNetwork(), rs, \"255.255.255.0\");\n setup(vlan.getConfiguration(), vlan);\n\n IPAddress ip = IPAddress.newIPAddress(vlan.getConfiguration().getAddress()).nextIPAddress();\n IPAddress lastIP =\n IPNetworkRang.lastIPAddressWithNumNodes(\n IPAddress.newIPAddress(vlan.getConfiguration().getAddress()),\n IPNetworkRang.masktoNumberOfNodes(vlan.getConfiguration().getMask()));\n\n persistIP(ip, lastIP, vdc, vlan);\n\n String validURI = resolveVirtualDatacenterActionGetIPsURI(vdc.getId());\n validURI = validURI + \"?by=mac\";\n\n ClientResponse response =\n get(validURI, SYSADMIN, SYSADMIN, IpsPoolManagementDto.BASE_MEDIA_TYPE);\n assertEquals(response.getStatusCode(), Status.OK.getStatusCode());\n }", "public List<HQ> buscaPorFiltro(TipoFiltro tipoFiltro, String filtro){\n\t\tif(tipoFiltro.equals(TipoFiltro.TITULO)) {\n\t\t\tlogger.info(\"Buscando por filtro de titulo :\"+filtro);\n\t\t\treturn itemRepository.filtraPorTitulo(UserServiceImpl.authenticated().getId(), filtro);\n\t\t}\n\t\t\n\t\telse if (tipoFiltro.equals(TipoFiltro.UNIVERSO)) {\n\t\t\tlogger.info(\"Buscando por filtro de universo: \"+filtro);\n\t\t\treturn itemRepository.filtraPorUniverso(UserServiceImpl.authenticated().getId(), filtro);\n\t\t}\n\t\t\n\t\telse if (tipoFiltro.equals(TipoFiltro.EDITORA)) {\n\t\t\tlogger.info(\"Buscando por filtro de editora: \"+filtro);\n\t\t\treturn itemRepository.filtraPorEditora(UserServiceImpl.authenticated().getId(), filtro);\n\t\t}\n\t\t\n\t\treturn itemRepository.findAll(UserServiceImpl.authenticated().getId());\n\t}", "public List<ParameterValueObject> getClustering(Filter filter);", "@Override\n public Page execute(HttpServletRequest request) throws ServiceException {\n MachineService machineService = new MachineService();\n\n List<Machine> machines = machineService.findAll();\n request.setAttribute(MACHINES_ATTRIBUTE, machines);\n\n String userId = request.getParameter(USER_ID_ATTRIBUTE);\n request.setAttribute(USER_ID_ATTRIBUTE, userId);\n\n return new Page(MACHINES_INFO_PAGE);\n }", "private Vector getParamList(Object userObject) {\n\n if (userObject instanceof rcNode) {\n rcNode nn = (rcNode) userObject;\n if ((nn.client == null) || (nn.client.farm == null)) {\n return new Vector();\n }\n return getParameters(nn.client.farm);\n } else if (userObject instanceof String) {\n Vector farms = (Vector) groupFarms.get(userObject);\n if (farms == null) {\n return new Vector();\n }\n Vector v = null;\n TreeSet ss = null;\n for (Enumeration e = farms.elements(); e.hasMoreElements();) {\n rcNode nn = (rcNode) e.nextElement();\n if ((nn == null) || (nn.client == null) || (nn.client.farm == null)) {\n continue;\n }\n MFarm farm = nn.client.farm;\n Vector parametersList = getParameters(farm);\n if (v == null) {\n v = new Vector(parametersList);\n if (!intersectSelected) {\n ss = new TreeSet();\n auxiliarAdding(ss, parametersList);\n }\n } else if (intersectSelected) {\n intersectVectors(v, parametersList);\n } else {\n reunionVectors(ss, v, parametersList);\n }\n }\n return v;\n }\n return new Vector();\n }", "public static Map<NetworkNode.TYPE, Set<Software>> getRemoteSWMapByScanningNode(NetworkNode.TYPE scanning){\n Map<NetworkNode.TYPE, Set<Software>> visibleSoftware = new EnumMap<>(NetworkNode.TYPE.class);\n //from all possible nodes, only check those who are actually connected\n Predicate<NetworkNode> isConnected = node -> getConnectedHosts(scanning).contains(node.getType());\n Set<NetworkNode> viewableNodes = Simulation.getSimWorld().getNodes().stream().filter(isConnected).collect(Collectors.toSet());\n //assume Adversary is scanning\n if (scanning.equals(NetworkNode.TYPE.ADVERSARY)){\n\n Predicate<Software> isVisibleByAdv;\n //scans on Router\n List<String> webserverPublicWhitelist = List.of(Simulation.SERVICE_HTTP, Simulation.SERVICE_HTTPS, Simulation.SERVICE_PHP, Simulation.SERVICE_NGINX);\n isVisibleByAdv = sw -> webserverPublicWhitelist.contains(sw.getName());\n visibleSoftware.put(NetworkNode.TYPE.WEBSERVER, Simulation.getNodeByType(NetworkNode.TYPE.WEBSERVER).getRemoteSoftware().stream().filter(isVisibleByAdv).collect(Collectors.toSet()));\n\n List<String> adminPublicWhitelist = List.of(Simulation.SERVICE_SSH);\n isVisibleByAdv = sw -> adminPublicWhitelist.contains(sw.getName());\n visibleSoftware.put(NetworkNode.TYPE.ADMINPC, Simulation.getNodeByType(NetworkNode.TYPE.ADMINPC).getRemoteSoftware().stream().filter(isVisibleByAdv).collect(Collectors.toSet()));\n }else if (scanning.equals(NetworkNode.TYPE.ROUTER)){\n for (NetworkNode node: viewableNodes){\n visibleSoftware.put(node.getType(), new HashSet<>(node.getRemoteSoftware()));\n }\n }else if (scanning.equals(NetworkNode.TYPE.WEBSERVER)){\n for (NetworkNode node: viewableNodes){\n if (node.getType().equals(NetworkNode.TYPE.ADMINPC)){\n visibleSoftware.put(NetworkNode.TYPE.ADMINPC, new HashSet<>(node.getRemoteSoftware()));\n }else if (node.getType().equals(NetworkNode.TYPE.DATABASE)){\n visibleSoftware.put(NetworkNode.TYPE.DATABASE, new HashSet<>(node.getRemoteSoftware()));\n }\n }\n }else {\n //Admin & Database see everything\n for (NetworkNode node: viewableNodes){\n visibleSoftware.put(node.getType(), new HashSet<>(node.getRemoteSoftware()));\n }\n }\n return visibleSoftware;\n }", "public List<SubResource> registrationVirtualNetworks() {\n return this.registrationVirtualNetworks;\n }", "public Vector getRemoteAppList(String s_user_for, String site) throws Exception{\r\n\t\tVector result_list = null;\r\n\t\ttry {\r\n\t\t\tif (site.equalsIgnoreCase(\"production\")) {\r\n\t\t\t\tsetldschema( PropertyLoader.getConfig(\"ldschema.xml.url\") );\r\n\t\t\t\tresult_list = constructApplist(PropertyLoader.getConfig(\"applist.xml.url\"), s_user_for);\r\n\t\t\t} else if (site.equalsIgnoreCase(\"pre-production\")){\r\n\t\t\t\tsetldschema( PropertyLoader.getConfig(\"ldschema.xml.url\") );\r\n\t\t\t\tresult_list = constructApplist(PropertyLoader.getConfig(\"ppapplist.xml.url\"), s_user_for);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tlogger.error(\":getRemoteAppList\" + e.getMessage(), e);\r\n\t\t\tthrow new Exception(e.getMessage());\r\n\t\t}\r\n\t\treturn result_list;\r\n\t}", "List<Long> getServers();", "public ArrayList<Guest02Dto> getList(){\n\t\tArrayList<Guest02Dto> list=new ArrayList<Guest02Dto>();\n\t\tString sql=\"select num,sub,(select name from user02 \";\n\t\tsql+=\" where num=unum) as uname,pay from GUEST02\";\n\t\tjavax.sql.DataSource source=null;\n\t\ttry {\n\t\t\tInitialContext init = new InitialContext();\n\t\t\tContext context=(Context)init.lookup(\"java:/comp/env\");\n\t\t\tsource=(javax.sql.DataSource) context.lookup(\"jdbc/oracle\");\n\t\t\t\n\t\t} catch (NamingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tConnection conn=null;\n\t\tPreparedStatement pstmt=null;\n\t\tResultSet rs=null;\n\t\t\n\t\ttry {\n\t\t\tconn=source.getConnection();\n\t\t\tpstmt=conn.prepareStatement(sql);\n\t\t\trs=pstmt.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tGuest02Dto bean=new Guest02Dto();\n\t\t\t\tbean.setNum(rs.getInt(\"num\"));\n\t\t\t\tbean.setSub(rs.getString(\"sub\"));\n\t\t\t\tbean.setName(rs.getString(\"uname\"));\n\t\t\t\tbean.setPay(rs.getInt(\"pay\"));\n\t\t\t\tlist.add(bean);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally{\n\t\t\ttry {\n\t\t\t\tif(rs!=null)rs.close();\n\t\t\t\tif(pstmt!=null)pstmt.close();\n\t\t\t\tif(conn!=null)conn.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn list;\n\t}", "@Test(groups = {NETWORK_INTEGRATION_TESTS})\n public void getPrivateNetworkIPsByVirtualDatacenterOrderByVirtualAppliance()\n {\n RemoteService rs = remoteServiceGenerator.createInstance(RemoteServiceType.DHCP_SERVICE);\n VirtualDatacenter vdc = vdcGenerator.createInstance(rs.getDatacenter());\n setup(vdc.getDatacenter(), rs, vdc.getEnterprise(), vdc.getNetwork(), vdc);\n VLANNetwork vlan = vlanGenerator.createInstance(vdc.getNetwork(), rs, \"255.255.255.0\");\n setup(vlan.getConfiguration(), vlan);\n\n IPAddress ip = IPAddress.newIPAddress(vlan.getConfiguration().getAddress()).nextIPAddress();\n IPAddress lastIP =\n IPNetworkRang.lastIPAddressWithNumNodes(\n IPAddress.newIPAddress(vlan.getConfiguration().getAddress()),\n IPNetworkRang.masktoNumberOfNodes(vlan.getConfiguration().getMask()));\n\n persistIP(ip, lastIP, vdc, vlan);\n\n String validURI = resolveVirtualDatacenterActionGetIPsURI(vdc.getId());\n validURI = validURI + \"?by=virtualappliance\";\n\n ClientResponse response =\n get(validURI, SYSADMIN, SYSADMIN, IpsPoolManagementDto.MEDIA_TYPE);\n assertEquals(response.getStatusCode(), Status.OK.getStatusCode());\n }", "List<ArticuloBitacoraLeyMercadoDTO> obtenerHistoricoLeyMercado(int first, int pageSize, String sortField, Map<String, String> filters) throws SICException;", "List<PortEntity> getPorts(Map<String, Object> condition);", "public Map<String, VPlexVirtualVolumeInfo> findVirtualVolumes(List<VPlexClusterInfo> clusterInfoList,\n List<VPlexVirtualVolumeInfo> virtualVolumeInfos) {\n return _discoveryMgr.findVirtualVolumes(clusterInfoList, virtualVolumeInfos, true, true);\n }", "@ServiceMethod(returns = ReturnType.COLLECTION)\n public PagedIterable<VirtualMachineScaleSetVMInner> list(\n String resourceGroupName, String virtualMachineScaleSetName) {\n final String filter = null;\n final String select = null;\n final String expand = null;\n return new PagedIterable<>(listAsync(resourceGroupName, virtualMachineScaleSetName, filter, select, expand));\n }", "public List<KeyValue> scan(Key from, Key to, String queryStr) {\n List<KeyCluster> keyClusterList = findAll();\n OpType opType = ( queryStr == null ? OpType.MultiGets : OpType.MultiSelectQuery);\n //return executeRequest( keyClusterList, opType);\n int size = keyClusterList.size();\n List<Key> keyList = new ArrayList<Key>(2);\n keyList.add(from); keyList.add(to);\n ScanParaList scanParaList = new ScanParaList(OpType.Get, keyList, queryStr);\n CountDownLatch countDownLatch = new CountDownLatch(size);\n ExecutorService executor = Executors.newFixedThreadPool(size);\n List<Runnable> runnableList = new ArrayList<Runnable>(size);\n for ( int i = 0; i < size ; i++ ) {\n Request request = createScanRequest(scanParaList);\n RunThread runThread = new RunThread(request, keyClusterList.get(i), countDownLatch, OpType.Scan);\n runnableList.add( runThread);\n executor.submit( runThread );\n }\n try {\n countDownLatch.await(timeout *5, TimeUnit.MILLISECONDS);\n } catch (InterruptedException ex) {\n logger.warn(ex.getMessage(), ex);\n } finally {\n executor.shutdown();\n return mergeResponse( runnableList);\n }\n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n private Mono<PagedResponse<VirtualMachineScaleSetVMInner>> listSinglePageAsync(\n String resourceGroupName, String virtualMachineScaleSetName, String filter, String select, String expand) {\n if (this.client.getEndpoint() == null) {\n return Mono\n .error(\n new IllegalArgumentException(\n \"Parameter this.client.getEndpoint() is required and cannot be null.\"));\n }\n if (resourceGroupName == null) {\n return Mono\n .error(new IllegalArgumentException(\"Parameter resourceGroupName is required and cannot be null.\"));\n }\n if (virtualMachineScaleSetName == null) {\n return Mono\n .error(\n new IllegalArgumentException(\n \"Parameter virtualMachineScaleSetName is required and cannot be null.\"));\n }\n if (this.client.getSubscriptionId() == null) {\n return Mono\n .error(\n new IllegalArgumentException(\n \"Parameter this.client.getSubscriptionId() is required and cannot be null.\"));\n }\n final String apiVersion = \"2020-06-01\";\n final String accept = \"application/json\";\n return FluxUtil\n .withContext(\n context ->\n service\n .list(\n this.client.getEndpoint(),\n resourceGroupName,\n virtualMachineScaleSetName,\n filter,\n select,\n expand,\n apiVersion,\n this.client.getSubscriptionId(),\n accept,\n context))\n .<PagedResponse<VirtualMachineScaleSetVMInner>>map(\n res ->\n new PagedResponseBase<>(\n res.getRequest(),\n res.getStatusCode(),\n res.getHeaders(),\n res.getValue().value(),\n res.getValue().nextLink(),\n null))\n .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));\n }", "@Override\n public List<InstanceOverallStatusDto> syncInstances(List<Manifest.Key> given) {\n List<InstanceDto> list = list();\n List<Manifest.Key> instances = (given == null || given.isEmpty()) ? list.stream().map(d -> d.instance).toList() : given;\n Set<String> errors = new TreeSet<>();\n\n // on CENTRAL only, synchronize managed servers. only after that we know all instances.\n if (minion.getMode() == MinionMode.CENTRAL) {\n List<ManagedMasterDto> toSync = list.stream().filter(i -> instances.contains(i.instance)).map(i -> i.managedServer)\n .toList();\n\n log.info(\"Mass-synchronize {} server(s).\", toSync.size());\n\n ManagedServersResource rs = rc.initResource(new ManagedServersResourceImpl());\n try (Activity sync = reporter.start(\"Synchronize Servers\", toSync.size())) {\n AtomicLong syncNo = new AtomicLong(0);\n ExecutorService es = Executors.newFixedThreadPool(4, new RequestScopedNamedDaemonThreadFactory(reqScope,\n reg.get(group).getTransactions(), reporter, () -> \"Mass-Synchronizer \" + syncNo.incrementAndGet()));\n List<Future<?>> syncTasks = new ArrayList<>();\n for (ManagedMasterDto host : toSync) {\n syncTasks.add(es.submit(() -> {\n try (Activity singleSync = reporter.start(\"Synchronize \" + host.hostName)) {\n if (log.isDebugEnabled()) {\n log.debug(\"Synchronize {}\", host.hostName);\n }\n rs.synchronize(group, host.hostName);\n } catch (Exception e) {\n errors.add(host.hostName);\n log.warn(\"Could not synchronize managed server: {}: {}\", host.hostName, e.toString());\n if (log.isDebugEnabled()) {\n log.debug(\"Exception:\", e);\n }\n }\n sync.workAndCancelIfRequested(1);\n }));\n }\n\n FutureHelper.awaitAll(syncTasks);\n es.shutdown(); // make all threads exit :)\n }\n } else {\n // update the local stored state.\n ResourceProvider.getResource(minion.getSelf(), MasterRootResource.class, context).getNamedMaster(group)\n .updateOverallStatus();\n }\n\n // for each instance, read the meta-manifest, and provide the recorded data.\n var result = new ArrayList<InstanceOverallStatusDto>();\n for (var inst : list.stream().filter(i -> instances.contains(i.instance)).toList()) {\n if (inst.managedServer != null && inst.managedServer.hostName != null\n && errors.contains(inst.managedServer.hostName)) {\n continue; // no state as we could not sync.\n }\n result.add(new InstanceOverallStatusDto(inst.instanceConfiguration.id,\n new InstanceOverallState(inst.instance, hive).read()));\n }\n\n return result;\n }", "private final RPC<T> remote_compute( int lo, int hi ) {\n int mid = (hi+lo)>>>1;\n T rpc = clone();\n rpc._nlo = lo;\n rpc._nhi = hi;\n addToPendingCount(1); // Not complete until the RPC returns\n // Set self up as needing completion by this RPC: when the ACK comes back\n // we'll get a wakeup.\n return new RPC(H2O.CLOUD._memary[mid], rpc).addCompleter(this).call();\n }", "public Worklist[] getWorklists() throws MEMEException {\n configureClient(client);\n client.setMidService(getMidService());\n return client.getCurrentWorklists();\n }", "public List<Machinecomponent> findByName(String name) {\n\t\treturn findByCriteria(Restrictions.eq(\"name\", name));\n\t}", "@Override\n\t@Transactional\n\tpublic List<IoMember> filterMemberByTelephone(String telephone) {\n\t\treturn memberDao.filterMemberByTelephone(telephone);\n\t}", "@Override\n\tpublic synchronized List<Plantilla> findAll(String filtro){\n\t\tList<Plantilla> lista = new ArrayList<>();\n\t\tfor(Plantilla p:listaPlantillas()){\n\t\t\ttry{\n\t\t\t\tboolean pasoFiltro = (filtro==null||filtro.isEmpty())\n\t\t\t\t\t\t||p.getNombrePlantilla().toLowerCase().contains(filtro.toLowerCase());\n\t\t\t\tif(pasoFiltro){\n\t\t\t\t\tlista.add(p.clone());\n\t\t\t\t}\n\t\t\t}catch(CloneNotSupportedException ex) {\n\t\t\t\tLogger.getLogger(ServicioPlantillaImpl.class.getName()).log(null, ex);\n\t\t\t}\n\t\t}\n\t\tCollections.sort(lista, new Comparator<Plantilla>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(Plantilla o1, Plantilla o2) {\n\t\t\t\treturn (int) (o2.getId() - o1.getId());\n\t\t\t}});\n\t\t\n\t\treturn lista;\n\t}", "java.util.List<org.tensorflow.proto.distruntime.JobDeviceFilters> \n getJobsList();", "List<DeviceDetails> getDevices(Predicate<DeviceDetails> deviceFilter);", "@RequestMapping(value = \"verificators\", method = RequestMethod.GET)\n public Set<OrganizationDTO> getVerificators(@AuthenticationPrincipal SecurityUserDetailsService.CustomUserDetails user) {\n\n Organization userOrganization = organizationService.getOrganizationById(user.getOrganizationId());\n return organizationService.findByIdAndTypeAndActiveAgreementDeviceType(user.getOrganizationId(),\n OrganizationType.STATE_VERIFICATOR, userOrganization.getDeviceTypes().iterator().next()).stream()\n .map(organization -> new OrganizationDTO(organization.getId(), organization.getName()))\n .collect(Collectors.toSet());\n }", "public synchronized List<QuorumServerInfo> getQuorumServerInfoList() throws IOException {\n List<QuorumServerInfo> quorumMemberStateList = new LinkedList<>();\n GroupInfoReply groupInfo = getGroupInfo();\n if (groupInfo == null) {\n throw new UnavailableException(\"Cannot get raft group info\");\n }\n if (groupInfo.getException() != null) {\n throw groupInfo.getException();\n }\n RaftProtos.RoleInfoProto roleInfo = groupInfo.getRoleInfoProto();\n if (roleInfo == null) {\n throw new UnavailableException(\"Cannot get server role info\");\n }\n RaftProtos.LeaderInfoProto leaderInfo = roleInfo.getLeaderInfo();\n if (leaderInfo == null) {\n throw new UnavailableException(\"Cannot get server leader info\");\n }\n for (RaftProtos.ServerRpcProto member : leaderInfo.getFollowerInfoList()) {\n HostAndPort hp = HostAndPort.fromString(member.getId().getAddress());\n NetAddress memberAddress = NetAddress.newBuilder().setHost(hp.getHost())\n .setRpcPort(hp.getPort()).build();\n\n long maxElectionTimeoutMs =\n Configuration.getMs(PropertyKey.MASTER_EMBEDDED_JOURNAL_MAX_ELECTION_TIMEOUT);\n quorumMemberStateList.add(QuorumServerInfo.newBuilder()\n .setIsLeader(false)\n .setPriority(member.getId().getPriority())\n .setServerAddress(memberAddress)\n .setServerState(member.getLastRpcElapsedTimeMs() > maxElectionTimeoutMs\n ? QuorumServerState.UNAVAILABLE : QuorumServerState.AVAILABLE).build());\n }\n NetAddress self = NetAddress.newBuilder()\n .setHost(mLocalAddress.getHostString())\n .setRpcPort(mLocalAddress.getPort())\n .build();\n quorumMemberStateList.add(QuorumServerInfo.newBuilder()\n .setIsLeader(true)\n .setPriority(roleInfo.getSelf().getPriority())\n .setServerAddress(self)\n .setServerState(QuorumServerState.AVAILABLE).build());\n quorumMemberStateList.sort(Comparator.comparing(info -> info.getServerAddress().toString()));\n return quorumMemberStateList;\n }", "List<MobilePhone> getMobilePhonesFromOwner(Owner owner);" ]
[ "0.72655725", "0.6671593", "0.62890893", "0.5879146", "0.5623036", "0.55624187", "0.5477845", "0.53991354", "0.53613025", "0.53095365", "0.5293374", "0.5265236", "0.50450087", "0.49742186", "0.49431264", "0.48929057", "0.48859194", "0.48838034", "0.48340857", "0.477417", "0.47491902", "0.47418275", "0.47280258", "0.47137508", "0.4682878", "0.4667366", "0.4629246", "0.46211368", "0.46159327", "0.45783636", "0.45758048", "0.45399517", "0.45017648", "0.44756377", "0.44305226", "0.4402114", "0.43965232", "0.43919396", "0.43849635", "0.4361407", "0.4357395", "0.43432635", "0.43375963", "0.43358088", "0.43304384", "0.43238828", "0.43094662", "0.4304743", "0.42952806", "0.4295234", "0.42928746", "0.4277354", "0.42709088", "0.4265589", "0.42628184", "0.4262736", "0.42610708", "0.4255082", "0.42478302", "0.42463166", "0.42444274", "0.42286295", "0.4226364", "0.4214321", "0.42131215", "0.420823", "0.4205161", "0.42009807", "0.41998047", "0.41931933", "0.41893527", "0.41791573", "0.4172239", "0.41651446", "0.41644403", "0.4163469", "0.4160747", "0.4159632", "0.41530818", "0.41497707", "0.41464436", "0.4145439", "0.41427943", "0.4138969", "0.4137822", "0.413307", "0.41328156", "0.4132664", "0.41295552", "0.41291422", "0.412845", "0.412105", "0.4120321", "0.41197956", "0.4117295", "0.41134053", "0.41129124", "0.4103589", "0.41032532", "0.41029856" ]
0.75831056
0
Gets a single virtual machine in the physical machine matching the given filter synchronizing virtual machines from remote hypervisor with abiquo's database.
public VirtualMachine findRemoteVirtualMachine(final Predicate<VirtualMachine> filter) { return Iterables.getFirst(filter(listVirtualMachines(), filter), null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public VirtualMachine findVirtualMachine(final Predicate<VirtualMachine> filter) {\n return Iterables.getFirst(filter(listVirtualMachines(), filter), null);\n }", "public List<VirtualMachine> listRemoteVirtualMachines(final Predicate<VirtualMachine> filter) {\n return Lists.newLinkedList(filter(listVirtualMachines(), filter));\n }", "public List<VirtualMachine> listVirtualMachines(final Predicate<VirtualMachine> filter) {\n return Lists.newLinkedList(filter(listVirtualMachines(), filter));\n }", "public List<VirtualMachine> listRemoteVirtualMachines() {\n MachineOptions options = MachineOptions.builder().sync(true).build();\n VirtualMachinesWithNodeExtendedDto vms = context.getApi().getInfrastructureApi()\n .listVirtualMachinesByMachine(target, options);\n return wrap(context, VirtualMachine.class, vms.getCollection());\n }", "VM getVM();", "public MyVM(String virtual_machine_name)\n {\n \ttry\n \t{\n \t\tthis.vmname= virtual_machine_name;\n \t\tthis.si=new ServiceInstance(new URL(SJSULAB.getVmwareHostURL()),\n\t\t\t\t\tSJSULAB.getVmwareLogin(), SJSULAB.getVmwarePassword(), true);\n \t\t\n \t\tthis.folder = si.getRootFolder();\n \t\tthis.vm=(VirtualMachine) new InventoryNavigator(folder).searchManagedEntity(\"VirtualMachine\",\n \t\t\t\tthis.vmname);\n \t\tSystem.out.println(\"MyVM, vm value : \"+vm);\n \t\t\n \t\tthis.hs= (HostSystem) new InventoryNavigator(folder).searchManagedEntity(\"HostSystem\", \"130.65.132.194\");\n \t\tSystem.out.println(\"MyVM, HS value : \"+hs);\n \t\tthis.snapshotname=\"snap2\";\n \t\t\n \t}\n \tcatch(Exception e)\n \t{\n \t\tSystem.out.println(e.toString());\n \t}\n }", "private Object readResolve() throws ObjectStreamException {\n if (delegate != null) {\n return new VirtualBoxComputerLauncher(delegate, hostName, virtualMachineName, snapshotName, virtualMachineType,\n virtualMachineStopMode, startupWaitingPeriodSeconds);\n }\n return this;\n }", "Optional<Computer> findOne(long idToSelect);", "@Override\n public Machine call() throws Exception {\n Machine selectedMachine = maasClient.allocateMachineById(systemId);\n if (selectedMachine == null) {\n return null;\n }\n do {\n Thread.sleep(MaasClientPollingService.POLLING_INTERVAL);\n } while (maasClient.getMachineById(systemId).getStatus() != Machine.ALLOCATED);\n\n // Put tags\n tags.forEach(tag -> {\n maasClient.createTagIfNotExists(tag.getName(), tag.getComment());\n maasClient.addTagToMachines(tag.getName(), systemId);\n });\n\n // Deploy OS\n selectedMachine = maasClient.deployMachine(systemId, userData);\n if (selectedMachine == null) {\n return null;\n }\n do {\n Thread.sleep(MaasClientPollingService.POLLING_INTERVAL);\n } while (maasClient.getMachineById(systemId).getStatus() != Machine.DEPLOYED);\n\n return selectedMachine;\n }", "public List<VirtualMachine> listVirtualMachines() {\n MachineOptions options = MachineOptions.builder().sync(false).build();\n VirtualMachinesWithNodeExtendedDto vms = context.getApi().getInfrastructureApi()\n .listVirtualMachinesByMachine(target, options);\n return wrap(context, VirtualMachine.class, vms.getCollection());\n }", "Computer selectByPrimaryKey(Long id);", "public NetworkInstance[] queryServers(NetworkFilter filter);", "public MyPowerHost findHostForVm(Vm vm) {\n\t\t//找到第一个合适的host就返回\n\t\tfor (MyPowerHost host : this.<MyPowerHost> getHostList()) {\n\t\t\tif (host.isSuitableForVm(vm)) {\n\t\t\t\treturn host;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "Computer findComputerByActiveTrueAndComputerId(Long computerId);", "public VirtualMachine getVirtualMachine(int i){\n\t\treturn vms.get(i);\n\t}", "public VirtualMachine getVirtualMachine()\n {\n return vm;\n }", "Computer findComputerByActiveTrueAndIpAndPort(String ip, int port);", "VirtualMachine getByResourceGroup(String resourceGroupName, String virtualMachineName);", "VirtualMachine getByResourceGroup(String resourceGroupName, String virtualMachineName);", "public VirtualMachine getVM() {\n return _vm;\n }", "@ServiceMethod(returns = ReturnType.COLLECTION)\n private PagedFlux<VirtualMachineScaleSetVMInner> listAsync(\n String resourceGroupName,\n String virtualMachineScaleSetName,\n String filter,\n String select,\n String expand,\n Context context) {\n return new PagedFlux<>(\n () -> listSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, filter, select, expand, context),\n nextLink -> listNextSinglePageAsync(nextLink, context));\n }", "@INLINE\n public static MaxineVM vm() {\n return vm;\n }", "private Machine getMachineOrFail(String machineId) {\n for (Machine machine : listMachines()) {\n if (machine.getId().equals(machineId)) {\n return machine;\n }\n }\n throw new NotFoundException(String.format(\"no machine with id '%s' found in cloud pool\", machineId));\n }", "Server remote(Server bootstrap, Database<S> vat);", "public List<VirtualMachineDescriptor> listVirtualMachines() {\n ArrayList<VirtualMachineDescriptor> result =\n new ArrayList<VirtualMachineDescriptor>();\n\n MonitoredHost host;\n Set<Integer> vms;\n try {\n host = MonitoredHost.getMonitoredHost(new HostIdentifier((String)null));\n vms = host.activeVms();\n } catch (Throwable t) {\n if (t instanceof ExceptionInInitializerError) {\n t = t.getCause();\n }\n if (t instanceof ThreadDeath) {\n throw (ThreadDeath)t;\n }\n if (t instanceof SecurityException) {\n return result;\n }\n throw new InternalError(t); // shouldn't happen\n }\n\n for (Integer vmid: vms) {\n String pid = vmid.toString();\n String name = pid; // default to pid if name not available\n boolean isAttachable = false;\n MonitoredVm mvm = null;\n try {\n mvm = host.getMonitoredVm(new VmIdentifier(pid));\n try {\n isAttachable = MonitoredVmUtil.isAttachable(mvm);\n // use the command line as the display name\n name = MonitoredVmUtil.commandLine(mvm);\n } catch (Exception e) {\n }\n if (isAttachable) {\n result.add(new HotSpotVirtualMachineDescriptor(this, pid, name));\n }\n } catch (Throwable t) {\n if (t instanceof ThreadDeath) {\n throw (ThreadDeath)t;\n }\n } finally {\n if (mvm != null) {\n mvm.detach();\n }\n }\n }\n return result;\n }", "private void getVehicleByParse() {\n\t\tvehicles = new ArrayList<DCVehicle>();\n\t\tfinal ParseUser user = ParseUser.getCurrentUser();\n\t\tParseQuery<ParseObject> query = ParseQuery.getQuery(\"DCVehicle\");\n\n\t\tquery.setCachePolicy(ParseQuery.CachePolicy.NETWORK_ELSE_CACHE);\n\t\tquery.whereEqualTo(\"vehiclePrivateOwner\", user);\n\t\tquery.findInBackground(new FindCallback<ParseObject>() {\n\t\t\tpublic void done(final List<ParseObject> vehicleList,\n\t\t\t\t\tParseException e) {\n\t\t\t\tif (e == null) {\n\t\t\t\t\t// Loop through all vehicles that we got from the query\n\t\t\t\t\tfor (int i = 0; i < vehicleList.size(); i++) {\n\t\t\t\t\t\t// Convert parse object (DC Vehicle) into vehicle\n\t\t\t\t\t\tDCVehicle vehicle = ParseUtilities\n\t\t\t\t\t\t\t\t.convertVehicle(vehicleList.get(i));\n\n\t\t\t\t\t\t// Get photo from the parse\n\t\t\t\t\t\tParseFile photo = (ParseFile) vehicleList.get(i).get(\n\t\t\t\t\t\t\t\t\"vehiclePhoto\");\n\t\t\t\t\t\tbyte[] data = null;\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif (photo != null)\n\t\t\t\t\t\t\t\tdata = photo.getData();\n\t\t\t\t\t\t} catch (ParseException e1) {\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (data == null) {\n\t\t\t\t\t\t\tvehicle.setPhotoSrc(null);\n\t\t\t\t\t\t\tvehicle.setPhoto(false);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tvehicle.setPhotoSrc(data);\n\t\t\t\t\t\t\tvehicle.setPhoto(true);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvehicles.add(vehicle);\n\t\t\t\t\t\tvehicleObjects.add(vehicleList.get(i));\n\t\t\t\t\t}\n\n\t\t\t\t\t// Set adapter\n\t\t\t\t\tadapter = new VehicleListAdapter(VehiclesListActivity.this,\n\t\t\t\t\t\t\tvehicles, vehiclePicker, addJournyActivity);\n\t\t\t\t\tlist.setAdapter(adapter);\n\t\t\t\t} else {\n\t\t\t\t\tLog.e(\"Get Vehicle\", e.getMessage());\n\t\t\t\t}\n\n\t\t\t\t// Disable loading bar\n\t\t\t\tloading.setVisibility(View.GONE);\n\t\t\t}\n\t\t});\n\t}", "public Computer getComputer(int id) {\n for (Computer computer : inventory) {\n if (computer.getSerialNumber() == id) {\n return computer;\n }\n }\n return null;\n }", "private void findVehicle(RoutingContext routingContext) {\n var vehicleId = routingContext.pathParam(\"id\");\n // Find it in the registry. The Node#withBlockchainData provides\n // the required context with the current, immutable database state.\n var vehicleOpt = node.withBlockchainData(\n (blockchainData) -> service.findVehicle(vehicleId, blockchainData));\n if (vehicleOpt.isPresent()) {\n // Respond with the vehicle details\n var vehicle = vehicleOpt.get();\n routingContext.response()\n .putHeader(\"Content-Type\", \"application/octet-stream\")\n .end(Buffer.buffer(vehicle.toByteArray()));\n } else {\n // Respond that the vehicle with such ID is not found\n routingContext.response()\n .setStatusCode(HTTP_NOT_FOUND)\n .end();\n }\n }", "@ServiceMethod(returns = ReturnType.COLLECTION)\n public PagedFlux<VirtualMachineScaleSetVMInner> listAsync(\n String resourceGroupName, String virtualMachineScaleSetName, String filter, String select, String expand) {\n return new PagedFlux<>(\n () -> listSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, filter, select, expand),\n nextLink -> listNextSinglePageAsync(nextLink));\n }", "Collection<Coin> findByMachineName(String name);", "public VirtualMachines getVirtualMachines() {\n return virtualMachines;\n }", "VM createVM();", "@ResponseBody\n\t@RequestMapping(\"/load\")\n\t@RequiresPermissions(\"desktopCitrix:read\")\n\t@Override\n\tpublic DataVO<CitrixDesktopMachine> load(@RequestBody CitrixDesktopMachineForm f) {\n\t\tDataVO<CitrixDesktopMachine> vo = new DataVO<CitrixDesktopMachine>();\n\t\ttry{\n\t\t\tvo.setT(citrixDesktopMachineService.findById(f.getUuid()));\n\t\t\tvo.setState(ResponseState.SUCCESS.getValue());\n\t\t}catch(ServiceException e){\n\t\t\tlogger.error(e.getMessage(),e);\n\t\t\tvo.setState(ResponseState.FAILURE.getValue());\n\t\t\tvo.setMessage(e.getMessage());\n\t\t}catch(Exception e){\n\t\t\tlogger.error(e.getMessage(),e);\n\t\t\tvo.setState(ResponseState.FAILURE.getValue());\n\t\t\tvo.setMessage(MessageUtil.SYS_EXCEPTION);\n\t\t}\n\t\treturn vo;\n\t}", "private final RPC<T> remote_compute( int lo, int hi ) {\n int mid = (hi+lo)>>>1;\n T rpc = clone();\n rpc._nlo = lo;\n rpc._nhi = hi;\n addToPendingCount(1); // Not complete until the RPC returns\n // Set self up as needing completion by this RPC: when the ACK comes back\n // we'll get a wakeup.\n return new RPC(H2O.CLOUD._memary[mid], rpc).addCompleter(this).call();\n }", "RemoteMapper findMapper(int k) {\n\n RemoteMapper rm = null;\n try {\n ChordInterface c = this.chord.FindSuccessor(k);\n rm = (RemoteMapper) Naming.lookup(\"rmi:/\" + c.getIP() + \":1099/Keys-\" + c.getNodeKey());\n } catch (RemoteException ex) {\n System.err.println(\"findMapper remote exception\");\n } catch (NotBoundException en) {\n System.err.println(\"findMapper notBoundException\");\n } catch (MalformedURLException em) {\n em.printStackTrace();\n }\n return rm;\n }", "@Override\n\tpublic DataVO<CitrixDesktopMachine> list(CitrixDesktopMachineForm f) {\n\t\treturn null;\n\t}", "public String vmwareMachineId() {\n return this.vmwareMachineId;\n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n private Mono<PagedResponse<VirtualMachineScaleSetVMInner>> listSinglePageAsync(\n String resourceGroupName,\n String virtualMachineScaleSetName,\n String filter,\n String select,\n String expand,\n Context context) {\n if (this.client.getEndpoint() == null) {\n return Mono\n .error(\n new IllegalArgumentException(\n \"Parameter this.client.getEndpoint() is required and cannot be null.\"));\n }\n if (resourceGroupName == null) {\n return Mono\n .error(new IllegalArgumentException(\"Parameter resourceGroupName is required and cannot be null.\"));\n }\n if (virtualMachineScaleSetName == null) {\n return Mono\n .error(\n new IllegalArgumentException(\n \"Parameter virtualMachineScaleSetName is required and cannot be null.\"));\n }\n if (this.client.getSubscriptionId() == null) {\n return Mono\n .error(\n new IllegalArgumentException(\n \"Parameter this.client.getSubscriptionId() is required and cannot be null.\"));\n }\n final String apiVersion = \"2020-06-01\";\n final String accept = \"application/json\";\n context = this.client.mergeContext(context);\n return service\n .list(\n this.client.getEndpoint(),\n resourceGroupName,\n virtualMachineScaleSetName,\n filter,\n select,\n expand,\n apiVersion,\n this.client.getSubscriptionId(),\n accept,\n context)\n .map(\n res ->\n new PagedResponseBase<>(\n res.getRequest(),\n res.getStatusCode(),\n res.getHeaders(),\n res.getValue().value(),\n res.getValue().nextLink(),\n null));\n }", "QueryNetworkResponse queryVirtualisedNetworkResource(\n QueryNetworkRequest queryNetworkRequest, PoP poP) throws AdapterException;", "public Gateway find(String mac) {\n\t\tGateway gateway = new Gateway();\n\t\tSystem.out.println(\">>>>>>>>>>>>>>>Estou no GatewayDBImplemen.find\");\n\t\tgateway = entityManager.find(Gateway.class, mac);\n\t\tif (gateway != null) {\n\t\t\treturn gateway;\n\t\t}\n\t\treturn null;\n\t}", "@JsonIgnore\n public VM getVM() {\n if (wvm == null || wvm == WVM.Workspace) {\n return null;\n }\n switch (wvm) {\n case Version:\n return VM.Version;\n default:\n return VM.Microversion;\n }\n }", "public VirtualMachine searchVirtualMachine(String vmName) throws Exception{\r\n\t\tManagedEntity[] mes = new\r\n\t\t\t\tInventoryNavigator(_instance.getRootFolder()).searchManagedEntities(\"VirtualMachine\");\r\n\t\tfor (ManagedEntity managedEntity : mes) {\r\n\t\t\tVirtualMachine virtualMachine = (VirtualMachine)managedEntity;\r\n\t\t\tif(virtualMachine.getName().equals(vmName))\r\n\t\t\t\treturn virtualMachine;\r\n\t\t}\r\n\t\tthrow new Exception(String.format(\"VM with name : %s not found.\", vmName));\r\n\t}", "public HashMap<InetSocketAddress, GameServer> requestServers(String filter) throws IOException {\n boolean finished = false;\n InetSocketAddress last = new InetSocketAddress(\"0.0.0.0\", 0);\n while (!finished) {\n // We send queries until the last IP read is 0.0.0.0 and port it 0. That is the Master Server's way of\n // telling us that the list is complete.\n\n // Send query to master server\n byte[] sendBuf = Requests.MASTER(Region.EVERYWHERE, last, filter + \"\\0\");\n DatagramPacket packet = new DatagramPacket(sendBuf, sendBuf.length, host);\n socket.send(packet);\n\n DatagramPacket recv = recieve(Requests.MASTER_RESPONSE);\n if (recv != null) {\n last = parseResponse(recv); // Save the last IP read\n if (last.equals(fin)) {\n finished = true;\n }\n }\n }\n return gameServers;\n }", "BSQLMachine createBSQLMachine();", "IQueryNode getVirtualPlan(Object groupID) throws Exception;", "public Machine machine() {\n return machine;\n }", "@ServiceMethod(returns = ReturnType.SINGLE)\n private Mono<PagedResponse<VirtualMachineScaleSetVMInner>> listSinglePageAsync(\n String resourceGroupName, String virtualMachineScaleSetName, String filter, String select, String expand) {\n if (this.client.getEndpoint() == null) {\n return Mono\n .error(\n new IllegalArgumentException(\n \"Parameter this.client.getEndpoint() is required and cannot be null.\"));\n }\n if (resourceGroupName == null) {\n return Mono\n .error(new IllegalArgumentException(\"Parameter resourceGroupName is required and cannot be null.\"));\n }\n if (virtualMachineScaleSetName == null) {\n return Mono\n .error(\n new IllegalArgumentException(\n \"Parameter virtualMachineScaleSetName is required and cannot be null.\"));\n }\n if (this.client.getSubscriptionId() == null) {\n return Mono\n .error(\n new IllegalArgumentException(\n \"Parameter this.client.getSubscriptionId() is required and cannot be null.\"));\n }\n final String apiVersion = \"2020-06-01\";\n final String accept = \"application/json\";\n return FluxUtil\n .withContext(\n context ->\n service\n .list(\n this.client.getEndpoint(),\n resourceGroupName,\n virtualMachineScaleSetName,\n filter,\n select,\n expand,\n apiVersion,\n this.client.getSubscriptionId(),\n accept,\n context))\n .<PagedResponse<VirtualMachineScaleSetVMInner>>map(\n res ->\n new PagedResponseBase<>(\n res.getRequest(),\n res.getStatusCode(),\n res.getHeaders(),\n res.getValue().value(),\n res.getValue().nextLink(),\n null))\n .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));\n }", "public MsvmSwitchPort getSwitchPort() throws Exception {\n\t\t// Get the settings data.\n\t\tString path = super.getObjectPath().getPath();\n\t\tString wmiClass = \"Msvm_SwitchPort\";\n\t\tString format = \"ASSOCIATORS OF {%s} WHERE ResultClass=%s\";\n\t\tString wql = String.format(format, path, wmiClass);\n\t\tSWbemObjectSet<MsvmSwitchPort> objSetSP = super.getService().execQuery(wql, MsvmSwitchPort.class);\n\n\t\tint size = objSetSP.getSize();\n\n\t\tif (size == 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (size > 1) {\n\t\t\tthrow new Exception(\"More than one Msvm_SwitchPort\");\n\t\t}\n\n\t\treturn objSetSP.iterator().next();\n\t}", "private EC2DescribeInstancesResponse listVirtualMachines(String[] virtualMachineIds, EC2InstanceFilterSet ifs, List<CloudStackKeyValue> resourceTags)\n throws Exception {\n EC2DescribeInstancesResponse instances = new EC2DescribeInstancesResponse();\n\n if (null == virtualMachineIds || 0 == virtualMachineIds.length) {\n instances = lookupInstances(null, instances, resourceTags);\n } else {\n for (int i = 0; i < virtualMachineIds.length; i++) {\n instances = lookupInstances(virtualMachineIds[i], instances, resourceTags);\n }\n }\n\n if (null == ifs)\n return instances;\n else\n return ifs.evaluate(instances);\n }", "@Test(groups = {NETWORK_INTEGRATION_TESTS})\n public void getPrivateNetworkIPsByVirtualDatacenterOrderByVirtualMachine()\n {\n RemoteService rs = remoteServiceGenerator.createInstance(RemoteServiceType.DHCP_SERVICE);\n VirtualDatacenter vdc = vdcGenerator.createInstance(rs.getDatacenter());\n setup(vdc.getDatacenter(), rs, vdc.getEnterprise(), vdc.getNetwork(), vdc);\n VLANNetwork vlan = vlanGenerator.createInstance(vdc.getNetwork(), rs, \"255.255.255.0\");\n setup(vlan.getConfiguration(), vlan);\n\n IPAddress ip = IPAddress.newIPAddress(vlan.getConfiguration().getAddress()).nextIPAddress();\n IPAddress lastIP =\n IPNetworkRang.lastIPAddressWithNumNodes(\n IPAddress.newIPAddress(vlan.getConfiguration().getAddress()),\n IPNetworkRang.masktoNumberOfNodes(vlan.getConfiguration().getMask()));\n\n persistIP(ip, lastIP, vdc, vlan);\n\n String validURI = resolveVirtualDatacenterActionGetIPsURI(vdc.getId());\n validURI = validURI + \"?by=virtualmachine\";\n\n ClientResponse response =\n get(validURI, SYSADMIN, SYSADMIN, IpsPoolManagementDto.MEDIA_TYPE);\n assertEquals(response.getStatusCode(), Status.OK.getStatusCode());\n }", "public static void localVotouEleitor() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tRegistoVoto ans = null;\n\t\tString cc, idEleicao;\n\t\tSystem.out.println(\"Insira o CC do eleitor que pretende pesquisar: \");\n\t\tcc = sc.nextLine();\n\t\tSystem.out.println(\"Insira o ID da eleicao que pretende pesquisar: \");\n\t\tidEleicao = sc.nextLine();\n\t\t\n\t\tint check = 0;\n\t\tint tries = 0;\n\t\tdo {\n\t\t\ttry {\n\t\t\t\tans = rmiserver.pesquisaLocalVoto(cc, idEleicao);\n\t\t\t\tif(ans != null) {\n\t\t\t\t\tSystem.out.println(\"\\nCC: \"+ans.cc+\"\\nID Eleicao: \"+idEleicao+\"\\nLocal: \"+ans.nomeDep+\"Data/Hora: \"+ans.dataVoto.toString());\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"Voto nao encontrado.\");\n\t\t\t\t}\n\t\t\t\tcheck = 1;\n\t\t\t} catch (RemoteException e1) {\n\t\t\t\t// Tratamento da Excepcao da chamada RMI addCandidatos\n\t\t\t\tif(tries == 0) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(6000);\n\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\ttries++;\n\t\t\t\t\t}\n\t\t\t\t}else if(tries > 0 && tries < 24) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\ttries++;\n\t\t\t\t\t}\n\t\t\t\t}else if(tries >= 24) {\n\t\t\t\t\tSystem.out.println(\"Impossivel realizar a operacao devido a falha tecnica (Servidores RMI desligados).\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}while(check==0);\n\t\tcheck = 0;\n\n\t}", "com.hps.july.persistence.Worker getTechStuff() throws java.rmi.RemoteException, javax.ejb.FinderException;", "public String getRemoteBlock(String hash){\n getBlock = true;\n getBlockHash = hash;\n try{\n synchronized(this){\n this.wait();\n }\n } catch(InterruptedException e){\n // nothing happens here\n }\n getBlock = false;\n if(remoteBlocks.containsKey(hash))\n return remoteBlocks.get(hash);\n else{\n return \"notfound\";\n }\n }", "public Guest getGuest(String name) {\n\t\tString checkName = name.toUpperCase();\n for (Guest guest : guestList) {\n if (guest.getName().toUpperCase().equals(checkName)){\n return guest;\n }\n }\n return null;\n }", "public static String selectParent(ConnectionProvider connectionProvider, String maMachineId) throws ServletException {\n String strSql = \"\";\n strSql = strSql + \n \" SELECT (TO_CHAR(COALESCE(TO_CHAR(table1.Value), '')) || ' - ' || TO_CHAR(COALESCE(TO_CHAR(table1.Name), ''))) AS NAME FROM MA_Machine left join (select MA_Machine_ID, Value, Name from MA_Machine) table1 on (MA_Machine.MA_Machine_ID = table1.MA_Machine_ID) WHERE MA_Machine.MA_Machine_ID = ? \";\n\n ResultSet result;\n String strReturn = \"\";\n PreparedStatement st = null;\n\n int iParameter = 0;\n try {\n st = connectionProvider.getPreparedStatement(strSql);\n iParameter++; UtilSql.setValue(st, iParameter, 12, null, maMachineId);\n\n result = st.executeQuery();\n if(result.next()) {\n strReturn = UtilSql.getValue(result, \"name\");\n }\n result.close();\n } catch(SQLException e){\n log4j.error(\"SQL error in query: \" + strSql + \"Exception:\"+ e);\n throw new ServletException(\"@CODE=\" + e.getSQLState() + \"@\" + e.getMessage());\n } catch(Exception ex){\n log4j.error(\"Exception in query: \" + strSql + \"Exception:\"+ ex);\n throw new ServletException(\"@CODE=@\" + ex.getMessage());\n } finally {\n try {\n connectionProvider.releasePreparedStatement(st);\n } catch(Exception ignore){\n ignore.printStackTrace();\n }\n }\n return(strReturn);\n }", "public <T> IRemoteService<T> getRemoteService(String bizId)\n/* */ {\n/* 51 */ if (applicationContext != null)\n/* */ {\n/* 53 */ T bean = applicationContext.getBean(bizId);\n/* 54 */ if (bean != null)\n/* 55 */ return getRemoteService(bean);\n/* */ }\n/* 57 */ return null;\n/* */ }", "@Test\n public void getComputerBuildByIdentifier() {\n Iterable<ComputerBuild> computerBuilds = computerBuildService.getAllComputerBuildsFromUser(USER_NAME_TO_TEST_OWNERSHIP_ENDPOINTS);\n ComputerBuild retrievedBuild = computerBuilds.iterator().next();\n assertNotNull(retrievedBuild);\n\n ComputerBuild foundBuild = computerBuildService.getComputerBuildByBuildIdentifier(retrievedBuild.getBuildIdentifier());\n\n assertNotNull(foundBuild);\n assertEquals(retrievedBuild.getBuildIdentifier(), foundBuild.getBuildIdentifier());\n assertEquals(retrievedBuild.getUser().getUsername(), foundBuild.getUser().getUsername());\n\n }", "public static ResultSet selectLargerTV() throws Exception{\n Connection connection = DriverManager.getConnection(\"jdbc:postgresql://127.0.0.1:10000/tiana18\", \"tiana18web\", \"<password>\");\n ResultSet result = connection.createStatement().executeQuery(\"select * from public.switchedelectronics where id = 9;\");\n connection.close();\n return result;\n }", "CTelnetServers selectByPrimaryKey(String ipAddress, String module, String ne);", "private VirtualBoxMachine validateVirtualBoxMachine(VirtualMachine virtualMachine) throws VMDriverException {\n if (virtualMachine instanceof VirtualBoxMachine) { // TODO evitar el instance_of y el cast ¿?\n return (VirtualBoxMachine) virtualMachine;\n } else {\n throw new VMDriverException(\"Non-valid virtual machine especification\");\n }\n }", "private final RPC<T> remote_compute( int nlo, int nhi ) {\n // No remote work?\n if( !(nlo < nhi) ) return null;\n int node = addShift(nlo);\n assert node != H2O.SELF.index();\n T rpc = clone();\n rpc.setCompleter(null);\n rpc._nhi = (short)nhi;\n addToPendingCount(1); // Not complete until the RPC returns\n // Set self up as needing completion by this RPC: when the ACK comes back\n // we'll get a wakeup.\n return new RPC(H2O.CLOUD._memary[node], rpc).addCompleter(this).call();\n }", "@Override\n public Page execute(HttpServletRequest request) throws ServiceException {\n MachineService machineService = new MachineService();\n\n List<Machine> machines = machineService.findAll();\n request.setAttribute(MACHINES_ATTRIBUTE, machines);\n\n String userId = request.getParameter(USER_ID_ATTRIBUTE);\n request.setAttribute(USER_ID_ATTRIBUTE, userId);\n\n return new Page(MACHINES_INFO_PAGE);\n }", "@Nullable\n @Override\n public Workload getWorkloadByIp(String ip) {\n for (Workload workload : workloadRepository.findAll()) {\n if (workload.getIpAddress().equals(ip)) {\n return workload;\n }\n }\n return null;\n }", "public String readOneVictim(String Victim_id){\n\t\tDB_Responder readpointed = new DB_Responder(MainActivity.this);\n\t\treadpointed.open();\n\t\tString PoVictim = readpointed.getpoineddata(Victim_id);\n\t\treadpointed.close();\n\t\tLog.d(\"read info\", PoVictim);\n\t\treturn PoVictim;\n\t}", "private QueryResult performMappedQuery() throws VizException {\n\n if (database == null) {\n throw new VizException(\"Database not specified for query\");\n }\n if (query == null) {\n throw new VizException(\"Cannot execute null query\");\n }\n\n QlServerRequest request = new QlServerRequest(query);\n request.setDatabase(database);\n request.setType(QueryType.QUERY);\n request.setParamMap(paramMap);\n\n // set the mode so the handler knows what to do\n if (queryLanguage == null) {\n throw new VizException(\"Query language not specified\");\n } else if (queryLanguage.equals(QueryLanguage.HQL)) {\n request.setLang(QlServerRequest.QueryLanguage.HQL);\n } else {\n request.setLang(QlServerRequest.QueryLanguage.SQL);\n }\n\n // create request object\n QueryResult retVal = null;\n // get result\n AbstractResponseMessage response = (AbstractResponseMessage) ThriftClient\n .sendRequest(request);\n\n if (response instanceof ResponseMessageGeneric) {\n retVal = (QueryResult) ((ResponseMessageGeneric) response)\n .getContents();\n\n } else if (response instanceof ResponseMessageError) {\n ResponseMessageError rme = (ResponseMessageError) response;\n VizServerSideException innerException = new VizServerSideException(\n rme.toString());\n throw new VizServerSideException(rme.getErrorMsg(), innerException);\n }\n\n return retVal;\n }", "public static void main(String[] args)\n {\n Client oneClient;\n\n try\n {\n oneClient = new Client();\n\n // We will try to create a new virtual machine. The first thing we\n // need is an OpenNebula virtual machine template.\n\n // This VM template is a valid one, but it will probably fail to run\n // if we try to deploy it; the path for the image is unlikely to\n // exist.\n String vmTemplate =\n \"NAME = vm_from_java CPU = 0.1 MEMORY = 64\\n\"\n + \"#DISK = [\\n\"\n + \"#\\tsource = \\\"/home/user/vmachines/ttylinux/ttylinux.img\\\",\\n\"\n + \"#\\ttarget = \\\"hda\\\",\\n\"\n + \"#\\treadonly = \\\"no\\\" ]\\n\"\n + \"# NIC = [ NETWORK = \\\"Non existing network\\\" ]\\n\"\n + \"FEATURES = [ acpi=\\\"no\\\" ]\";\n\n // You can try to uncomment the NIC line, in that case OpenNebula\n // won't be able to insert this machine in the database.\n\n System.out.println(\"Virtual Machine Template:\\n\" + vmTemplate);\n System.out.println();\n\n System.out.print(\"Trying to allocate the virtual machine... \");\n OneResponse rc = VirtualMachine.allocate(oneClient, vmTemplate);\n\n if( rc.isError() )\n {\n System.out.println( \"failed!\");\n throw new Exception( rc.getErrorMessage() );\n }\n\n // The response message is the new VM's ID\n int newVMID = Integer.parseInt(rc.getMessage());\n System.out.println(\"ok, ID \" + newVMID + \".\");\n\n // We can create a representation for the new VM, using the returned\n // VM-ID\n VirtualMachine vm = new VirtualMachine(newVMID, oneClient);\n\n // Let's hold the VM, so the scheduler won't try to deploy it\n System.out.print(\"Trying to hold the new VM... \");\n rc = vm.hold();\n\n if(rc.isError())\n {\n System.out.println(\"failed!\");\n throw new Exception( rc.getErrorMessage() );\n }\n else\n System.out.println(\"ok.\");\n\n // And now we can request its information.\n rc = vm.info();\n\n if(rc.isError())\n throw new Exception( rc.getErrorMessage() );\n\n System.out.println();\n System.out.println(\n \"This is the information OpenNebula stores for the new VM:\");\n System.out.println(rc.getMessage() + \"\\n\");\n\n // This VirtualMachine object has some helpers, so we can access its\n // attributes easily (remember to load the data first using the info\n // method).\n System.out.println(\"The new VM \" +\n vm.getName() + \" has status: \" + vm.status());\n\n // And we can also use xpath expressions\n System.out.println(\"The path of the disk is\");\n System.out.println( \"\\t\" + vm.xpath(\"template/disk/source\") );\n\n // Let's delete the VirtualMachine object.\n vm = null;\n\n // The reference is lost, but we can ask OpenNebula about the VM\n // again. This time however, we are going to use the VM pool\n VirtualMachinePool vmPool = new VirtualMachinePool(oneClient);\n // Remember that we have to ask the pool to retrieve the information\n // from OpenNebula\n rc = vmPool.info();\n\n if(rc.isError())\n throw new Exception( rc.getErrorMessage() );\n\n System.out.println(\n \"\\nThese are all the Virtual Machines in the pool:\");\n for ( VirtualMachine vmachine : vmPool )\n {\n System.out.println(\"\\tID : \" + vmachine.getId() +\n \", Name : \" + vmachine.getName() );\n\n // Check if we have found the VM we are looking for\n if ( vmachine.getId().equals( \"\"+newVMID ) )\n {\n vm = vmachine;\n }\n }\n\n // We have also some useful helpers for the actions you can perform\n // on a virtual machine, like suspend:\n rc = vm.suspend();\n System.out.println(\"\\nTrying to suspend the VM \" + vm.getId() +\n \" (should fail)...\");\n\n // This is all the information you can get from the OneResponse:\n System.out.println(\"\\tOpenNebula response\");\n System.out.println(\"\\t Error: \" + rc.isError());\n System.out.println(\"\\t Msg: \" + rc.getMessage());\n System.out.println(\"\\t ErrMsg: \" + rc.getErrorMessage());\n\n rc = vm.terminate();\n System.out.println(\"\\nTrying to terminate the VM \" +\n vm.getId() + \"...\");\n\n System.out.println(\"\\tOpenNebula response\");\n System.out.println(\"\\t Error: \" + rc.isError());\n System.out.println(\"\\t Msg: \" + rc.getMessage());\n System.out.println(\"\\t ErrMsg: \" + rc.getErrorMessage());\n\n\n }\n catch (Exception e)\n {\n System.out.println(e.getMessage());\n }\n\n\n }", "public HostSystem searchHostSystem(String hostIp) throws Exception{\r\n\t\tManagedEntity[] mes = new\r\n\t\t\t\tInventoryNavigator(_instance.getRootFolder()).searchManagedEntities(\"HostSystem\");\r\n\t\tfor (ManagedEntity managedEntity : mes) {\r\n\t\t\tHostSystem currHostSystem = (HostSystem)managedEntity;\r\n\t\t\tif(currHostSystem.getName().equals(hostIp))\r\n\t\t\t\treturn currHostSystem;\r\n\t\t}\r\n\t\tthrow new Exception(String.format(\"Host System with IP address : %s not found.\", hostIp));\r\n\t}", "Mono<T> findReactive(String collection, String hkey, Class<T> tclass);", "@SuppressWarnings(\"unchecked\")\n public <V> V fetchFromLargeCache(String key, Supplier<V> valueComputer) {\n return (V) LOCAL_LARGE_CACHE.get(key, ignored -> valueComputer.get());\n }", "@Override\n\tpublic vip selectByphone(String phonum) {\n\t\treturn this.vd.selectByphone(phonum);\n\t}", "PhysicalMachine getPhysicalMachine() {\n return pm;\n }", "@SuppressWarnings(\"rawtypes\")\n public ManagedConnection matchManagedConnections(Set connectionSet,\n Subject subject, ConnectionRequestInfo cxRequestInfo)\n throws ResourceException { \n \n for(Object result : connectionSet){\n if (result instanceof VertxManagedConnection) {\n VertxManagedConnection vertMC = (VertxManagedConnection) result;\n if (this.equals(vertMC.getManagementConnectionFactory())) {\n return vertMC;\n }\n }\n }\n return null;\n }", "public Voto find(int id ) { \n\t\treturn em.find(Voto.class, id);\n\t}", "public static VMWrap current() throws IOException {\n\t\t// Get pid of self process\n\t\tString name = ManagementFactory.getRuntimeMXBean().getName();\n\t\tString pid = name.substring(0, name.indexOf('@'));\n\t\treturn process(pid);\n\t}", "public Vehicle getModel(String model) {\n\t\tfor (int i = 0; i < vehicles.size(); i++) {\n\t\t\tVehicle temp = vehicles.get(i);\n\n\t\t\tif (temp.getModel().equals(model)) {\n\t\t\t\treturn temp;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}", "public LogicalTernminationPointMO queryInterfaceByName(String neId, String infName) throws ServiceException {\r\n Map<String, String> conditionMap = new HashMap<>();\r\n conditionMap.put(\"meID\", neId);\r\n conditionMap.put(\"name\", infName);\r\n return ltpInvDao.query(conditionMap).get(0);\r\n }", "public static Turing_Machine initialiseMachine() {\n\t\tnew FenetreCreation();\n\t\ttry {\n\t\t\tbarrier.await();\n\t\t} catch (Exception e) {\n\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\te.getMessage(), \"Erreur\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn null;\n\t\t}\n\t\tTuring_Machine tmp = machine;\n\t\tmachine = null;\n\t\treturn tmp;\n\t}", "List<Computer> findAll();", "VehicleModel findByVehicleModelName(String vehicleModelName);", "public Data findName(String machineName) {\n\n for (Data M : connectedData) {\n if (M.getNodeName() == machineName) {\n System.out.println(\"weve found \" + machineName);\n } else {\n System.out.println(\"NOT found \" + machineName);\n }\n }\n return null;\n }", "public java.rmi.Remote getSomethingRemote() throws RemoteException;", "public RemoteJenkinsServer findRemoteHost(final String displayName) {\n RemoteJenkinsServer match = null;\n\n for (final RemoteJenkinsServer host : this.getDescriptor().remoteSites) {\n // if we find a match, then stop looping\n if (displayName.equals(host.getDisplayName())) {\n match = host;\n break;\n }\n }\n\n return match;\n }", "public String getRemoteComputerString(){\n return this.remoteComputerString;\n }", "public void printVirtualMachines() throws InvalidProperty, RuntimeFault, RemoteException{\r\n\t\tManagedEntity[] mes = new\r\n\t\t\t\tInventoryNavigator(_instance.getRootFolder()).searchManagedEntities(\"VirtualMachine\");\r\n\t\tfor (int i = 0; i < mes.length; i++) {\r\n\t\t\tVirtualMachine currVm = (VirtualMachine)mes[i];\r\n\t\t\tSystem.out.printf(\"vm[%d]: Name = %s\\n\", i, currVm.getName());\r\n\t\t}\r\n\t}", "public T caseSynchronousMachine(SynchronousMachine object) {\n\t\treturn null;\n\t}", "public static IFilter fromWMFilter( WMFilter filter )\r\n throws WMWorkflowException\r\n {\r\n if ( filter.getFilterType() == WMFilter.SIMPLE_TYPE ) {\r\n if ( filter.getComparison() == WMFilter.EQ ) {\r\n return new CompareFilter( filter.getAttributeName(), CompareFilter.EQ, filter.getFilterValue() );\r\n } else if ( filter.getComparison() == WMFilter.NE ) {\r\n return new CompareFilter( filter.getAttributeName(), CompareFilter.EQ, filter.getFilterValue() );\r\n } else if ( filter.getComparison() == WMFilter.GE ) {\r\n return new CompareFilter( filter.getAttributeName(), CompareFilter.GE, filter.getFilterValue() );\r\n } else if ( filter.getComparison() == WMFilter.GT ) {\r\n return new CompareFilter( filter.getAttributeName(), CompareFilter.GT, filter.getFilterValue() );\r\n } else if ( filter.getComparison() == WMFilter.LE) {\r\n return new CompareFilter( filter.getAttributeName(), CompareFilter.LE, filter.getFilterValue() );\r\n } else if ( filter.getComparison() == WMFilter.LT) {\r\n return new CompareFilter( filter.getAttributeName(), CompareFilter.LT, filter.getFilterValue() );\r\n }\r\n } else {\r\n try {\r\n SQLQueryParser parser = new SQLQueryParser( new StringReader( filter.getFilterString() ) );\r\n\r\n return parser.SQLOrExpr();\r\n }\r\n catch ( Exception e ) {\r\n log.error( \"Exception\", e );\r\n throw new WMWorkflowException( e );\r\n }\r\n }\r\n return null;\r\n }", "@Override\n\tpublic car getByVin(String vinId) {\n\t\t\t\ttry{\n\t\t\t\t\tcar so=carDataRepository.getByVin(vinId);\n\t\t\t\t\t\n\t\t\t\t\treturn so;\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception ex)\n\t\t\t\t\t{\n\t\t\t\t\t\tex.printStackTrace();\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t}", "DeviceEntity getByMac(String mac);", "private void getRemoteProxy() {\n String[] webIds = StringUtils.splitByWholeSeparator(this.webId, RPXY_WID_MARKER);\n\n // Remote proxy webid is same as live\n String liveWId = webIds[0];\n // Webid of section where live is published (section is parent of remote proxy)\n String sectionWId = webIds[1];\n\n // Get proxy(ies) with live webId\n DocumentModelList rProxies = ToutaticeEsQueryHelper.unrestrictedQuery(this.session, String.format(ToutaticeWebIdHelper.RPXY_WEB_ID_QUERY, liveWId), 1);\n\n // Published in one place only only\n if (rProxies.size() == 1) {\n // Proxy found\n DocumentModel rPxy = rProxies.get(0);\n // Check parent\n if (isParentWebId(rPxy, sectionWId)) {\n this.documents.add(rPxy);\n }\n } else if (rProxies.size() > 1) {\n // Published in many places.\n // Check all to see incoherences (this.documents.size() must be equals to one)\n for (DocumentModel rPxy : rProxies) {\n if (isParentWebId(rPxy, sectionWId)) {\n this.documents.add(rPxy);\n }\n }\n }\n }", "@objid (\"17c23aa2-9083-11e1-81e9-001ec947ccaf\")\n MObject findById(MClass cls, final UUID siteIdentifier, IMObjectFilter filter);", "@Override\r\n public VehiculoModel consultarVehiculo(String placa) {\n Connection conn = null;\r\n VehiculoModel vehiculo = null; //defino un objeto de vehiculo como nulo\r\n try{\r\n conn = Conexion.getConnection();\r\n String sql = \"Select * from vehiculo where vehPlaca=?\";\r\n PreparedStatement statement = conn.prepareStatement(sql); //se prepara para la query\r\n statement.setString(1, placa);\r\n ResultSet result = statement.executeQuery(sql);\r\n while(result.next()){\r\n vehiculo = new VehiculoModel(result.getString(1), result.getString(2), result.getString(3), \r\n result.getInt(4), result.getInt(5), result.getString(6), result.getInt(7));\r\n }\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"Codigo : \" + ex.getErrorCode() + \"\\nError: \" + ex.getMessage());\r\n }\r\n \r\n return vehiculo;\r\n }", "public abstract void execute(VirtualMachine vm);", "public SVMmodel getSVMmodel(List<ActionVocal> vocalActions) {\n\n for(SVMmodel model : svmModels.values()) {\n if (model.containsTheSounds( false, vocalActions))\n return model;\n }\n\n return null;\n }", "VirtualMachine[] getPlacedVirtualMachines() {\n VirtualMachine[] vms = new VirtualMachine[mapped_vms.size()];\n mapped_vms.toArray(vms);\n return vms;\n }", "public String getClientMachine();", "public WVM getWVM() {\n return wvm;\n }", "public List<UnManagedVolumeRestRep> getByHost(URI hostId, ResourceFilter<UnManagedVolumeRestRep> filter) {\n List<RelatedResourceRep> refs = listByHost(hostId);\n return getByRefs(refs, filter);\n }", "public Vertice selectPickedModelVertice(){\n\t\tunselectAllVertices();\n\t\tVertice pickVertice = getPickedModelVertice();\n\t\tif(pickVertice != null){\n\t\t\tselectModelVertice(pickVertice);\n\t\t\treturn pickVertice;\n\t\t}\n\t\treturn null;\n\t}", "private void runRemotely() {\n if (!isDas())\n return;\n\n List<Server> remoteServers = getRemoteServers();\n\n if (remoteServers.isEmpty())\n return;\n\n try {\n ParameterMap paramMap = new ParameterMap();\n paramMap.set(\"monitor\", \"true\");\n paramMap.set(\"DEFAULT\", pattern);\n ClusterOperationUtil.replicateCommand(\"get\", FailurePolicy.Error, FailurePolicy.Warn, remoteServers,\n context, paramMap, habitat);\n }\n catch (Exception ex) {\n setError(Strings.get(\"admin.get.monitoring.remote.error\", getNames(remoteServers)));\n }\n }", "java.lang.String getMachineId();" ]
[ "0.70496225", "0.62166953", "0.56379056", "0.5458059", "0.51914567", "0.5035175", "0.4912477", "0.4909858", "0.49046853", "0.4892577", "0.48794982", "0.48711023", "0.48689118", "0.48240456", "0.48232266", "0.4807648", "0.4767622", "0.4754168", "0.4754168", "0.45522276", "0.4551923", "0.45494103", "0.45136312", "0.4470152", "0.44695482", "0.44460255", "0.44435075", "0.44210115", "0.4408414", "0.44078836", "0.44035238", "0.44032636", "0.43786854", "0.437276", "0.4372045", "0.43676528", "0.43610835", "0.4345851", "0.43357387", "0.43125626", "0.43083066", "0.42975226", "0.42739835", "0.42662042", "0.4265178", "0.4251586", "0.423767", "0.42346367", "0.4226906", "0.4215979", "0.4203044", "0.4202255", "0.41898578", "0.41822237", "0.41815656", "0.41798276", "0.4178491", "0.41753608", "0.41594434", "0.41487926", "0.4143608", "0.4143161", "0.41402745", "0.41279957", "0.41141284", "0.41003504", "0.40992358", "0.40971652", "0.4096986", "0.40939236", "0.40889266", "0.40828812", "0.40799356", "0.40733078", "0.40480107", "0.40340966", "0.4031788", "0.4019408", "0.4018339", "0.40168124", "0.4010068", "0.3990839", "0.39890614", "0.39882004", "0.3986355", "0.3978044", "0.39615524", "0.3958741", "0.39579427", "0.39512303", "0.39505982", "0.39478227", "0.39446688", "0.3944594", "0.39437073", "0.39412105", "0.39377704", "0.39369583", "0.39369097", "0.39339983" ]
0.733283
0